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


Recommended Posts

  • Topic Author
  • Sorry, my fault. Try this one

    Please login or register to see this code.

     

    Edited by jgab
    Link to comment
    Share on other sites

    there was no error...but in the logs in the console I see that:
    "HC3L-00018156","ip":"10.1.44.163","online":false


    although it is now ONLINE from the web interface

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this image.

    /monthly_2023_02/image.png.4ce41e49c455cff3bd639e1a3570bd5c.png" />

    Link to comment
    Share on other sites

  • Topic Author
  • Sorry, had some debug code in there

    Please login or register to see this code.

    I removed in from the previous post.

    Link to comment
    Share on other sites

    2 hours ago, jgab said:

    Sorry, had some debug code in there

    Please login or register to see this code.

    I removed in from the previous post.

    Please login or register to see this image.

    /monthly_2023_02/image.png.814ae2a6efc39cdefd0df0a973f5f6bb.png" />

    Please login or register to see this attachment.

    Error(((

    Edited by fastvd
    Link to comment
    Share on other sites

  • Topic Author
  • 2 hours ago, fastvd said:

    any idea?

    can you replace 'checkSlaves' with this and report what you get?

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    57 minutes ago, jgab said:

    can you replace 'checkSlaves' with this and report what you get?

    Please login or register to see this code.

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • This is very confusing - and the error message didn't help is it doesn't have a line number 😕

    I believe we are not getting what we think from the api call. Can you add a debug line in checkSlaves

    Please login or register to see this code.

     

    can it be that you don't get the serial ?

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • important that you change the line 

    fibaro.post ({type='slave', id=s.serial, online=s.online, ip=s.ip, cred=slaveCredentials[s.serial]})

    to

    fibaro.post ({type='slave', id=s.serial, online=s.online, ip=s.ip, creds=slaveCredentials[s.serial]})

    e.g. creds instead of cred. However that's not the main problem.

     

    I think we don't get the serial number.

    we could try with the id. you have to fill in the full id.

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    2 hours ago, jgab said:

    important that you change the line 

    fibaro.post ({type='slave', id=s.serial, online=s.online, ip=s.ip, cred=slaveCredentials[s.serial]})

    to

    fibaro.post ({type='slave', id=s.serial, online=s.online, ip=s.ip, creds=slaveCredentials[s.serial]})

    e.g. creds instead of cred. However that's not the main problem.

     

    I think we don't get the serial number.

    we could try with the id. you have to fill in the full id.

    Please login or register to see this code.

     

    error(

    Please login or register to see this image.

    /monthly_2023_02/image.png.77564ea6afc91844a23069226dc4ca26.png" />

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    maybe it makes sense to write a simple version, without automatic substitution of all data?

    Link to comment
    Share on other sites

  • Topic Author
  • Can you add the debug line so we see what you get from the api call?

    Please login or register to see this code.

     

    I see now that you spelled slavecredentials with lowercase, should be slaveCredentials

    Link to comment
    Share on other sites

    1 hour ago, jgab said:

    Can you add the debug line so we see what you get from the api call?

    Please login or register to see this code.

     

    I see now that you spelled slavecredentials with lowercase, should be slaveCredentials

    Please login or register to see this image.

    /monthly_2023_02/image.png.60272dc569b042fc26562dda368c8c62.png" />

    Please login or register to see this attachment.

     

    Edited by fastvd
    Link to comment
    Share on other sites

    I'm not a programmer, but somehow I got the idea to look at what the query returns to the sls table... I don't know if I described it correctly, but it didn't seem to give an error... but what it did could be the reason...
    sls:null

    Please login or register to see this attachment.

    Please login or register to see this image.

    /monthly_2023_02/image.png.648c55ea4562da152110d4af3c0d7035.png" />

    Edited by fastvd
    Link to comment
    Share on other sites

  • Topic Author
  • Turns out we are not allowed to access the /service/slaves api the normal way. Need to dd creds for your HC3 in the code

    XXXXX/YYYYY

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    Please login or register to see this attachment.

    Please login or register to see this image.

    /monthly_2023_02/image.png.45eb771b3e8f32286dc31089900e2fbe.png" />

     

    Edited by fastvd
    Link to comment
    Share on other sites

  • Topic Author
  • Hmm, the code I posted contained a lot of strange characters...

    This compiles for me

    Please login or register to see this code.

     

    Edited by jgab
    Link to comment
    Share on other sites

    Now it does not issue errors, and even sees which slave is currently offline. But I don't see something that triggers the reboot slave rule

    p.s.: I manually specially disabled the wifi connection with one of the slaves...

     

     

    Please login or register to see this attachment.

    Edited by fastvd
    Link to comment
    Share on other sites

    Again. The new function does determine if the controller is online or not...but the next rule, which is supposed to restart the slave controller, then it doesn't work(((

    Link to comment
    Share on other sites

    Join the conversation

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

    Guest
    Reply to this topic...

    ×   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...