Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

While do end loop error, need help?


Question

Guest samuelboerhoop
Posted

I got a error on line 4 > "do" what is wrong with the loop ?

[ERROR] 20:08:26: line log("Connecting...");..."]:4

Please login or register to see this code.

2 answers to this question

Recommended Posts

  • 0
Posted

I would add a ) to close up the tonumber:

 

(( tonumber(fibaro:getValue(153, "value")) > 0 and fibaro:getGlobalValue("Denon_Startup") == "OFF" ))

 

Also, you're using a while..do, but this looks like it should be an if..then (no repetitive functionality required)?

  • 0
Guest samuelboerhoop
  • Inquirer
  • Posted

    Thank you, that did the trick.

     

    I am using the loop, for waiting till my denon receiver is been INITIALIZED (Network) port. If the loop above (while do end) is "INITIALISED" then it will continue the code > like, switch on the receiver > select to TV > set volume, etc...

     

    As GlobalValue("Denon_Startup") == "OFF" )) is a variable which sets it to INITIALIZED in the main loop from the denon receiver.

    see below:

    Please login or register to see this code.

    Works well, thanks

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...