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

Posted
On 2/12/2023 at 12:31 PM, jgab said:

I have modified the post Feb 6 to check for missing ip and warn about it

 

ok, let's simplify the problem. I noticed that the master-slave connection is not working very well....perhaps, to make it easier and more reliable, transfer the slave to a separate master and manage everything autonomously there!? But then everything would still be desirable to somehow centrally manage everything...that's why the idea of the so-called connection between ER4 came up...what is meant: there are 3 masters, each master has its own ER4, but in order to manage everything centrally, then make one ER4 is the master, and all other ER4s are slaves, and information/rules, etc., can be exchanged directly between ER4s.

Posted

Jan can you help me?

I have a QA and if I press  a button the deug show:

Please login or register to see this code.

If I try in ER 311:btn=10 or 311:HDMI1  or   311:btn=HDMI1 n does not work.

Can you write the exact frase to execute?

Thanks

  • Topic Author
  • Posted
    11 hours ago, Sjakie said:

    Jan can you help me?

    I have a QA and if I press  a button the deug show:

    Please login or register to see this code.

    If I try in ER 311:btn=10 or 311:HDMI1  or   311:btn=HDMI1 n does not work.

    Can you write the exact frase to execute?

    Thanks

    In ER you can't trigger on a button click in another QA (no event generated) The UIEvent is a local trigger inside the QA.

    If the QA updates some property as a result of the click you could possibly trigger on that.

    Posted

    Jan, tell me how to describe in ER4 that there is no device in the system at all, which then gives us a failure in the operation of the entire system. The point is this:
    1) Since zigbee devices became available in HC3, I bought several temperature sensors and several relays for testing.
    2) At first, everything connects, everything even works, but then out of nowhere, they themselves are removed from the system
    3) And the situation turned out yesterday that my rule for turning off the pump based on room temperature did not work, since the device with id=789 simply did not appear in the system!
    4) Let's somehow describe it and output it to a separate variable, on the basis of which we will at least receive appropriate messages to understand that something needs to be done!

  • Topic Author
  • Posted
    22 hours ago, fastvd said:

    ok, let's simplify the problem. I noticed that the master-slave connection is not working very well....perhaps, to make it easier and more reliable, transfer the slave to a separate master and manage everything autonomously there!? But then everything would still be desirable to somehow centrally manage everything...that's why the idea of the so-called connection between ER4 came up...what is meant: there are 3 masters, each master has its own ER4, but in order to manage everything centrally, then make one ER4 is the master, and all other ER4s are slaves, and information/rules, etc., can be exchanged directly between ER4s.

     

    The problem is that I only have one box so I can't test any code.

    If you have more then one ER QA on the same box it's easy to send and receive events between them

    QA88

    rule("66:isOn => remote(77,{type='lightOn',id=66})")

     

    QA77

    rule("#lightOn => log('Light %s turned on',env.event.id)")

     

    It would be possible to do something similar to send event to slave with an ER QA.

    Please login or register to see this code.

     

    Slave with QA 77

    Please login or register to see this code.

     

    So, you need uuid and integrationPin

     

    So this is to send event to slave, a bit unsure about the other way..

    Posted
    6 minutes ago, jgab said:

     

    The problem is that I only have one box so I can't test any code.

    If you have more then one ER QA on the same box it's easy to send and receive events between them

    QA88

    rule("66:isOn => remote(77,{type='lightOn',id=66})")

     

    QA77

    rule("#lightOn => log('Light %s turned on',env.event.id)")

     

    It would be possible to do something similar to send event to slave with an ER QA.

    Please login or register to see this code.

     

    Slave with QA 77

    Please login or register to see this code.

     

    So, you need uuid and integrationPin

     

    So this is to send event to slave, a bit unsure about the other way..

    Well, as far as I understand, this integrationPin is a secret of fibaro itself... but somehow the same home assistant according to the API works perfectly with HC3...

  • Topic Author
  • Posted

    Maybe just set it to nil and see if it works

    17 minutes ago, fastvd said:

    Well, as far as I understand, this integrationPin is a secret of fibaro itself... but somehow the same home assistant according to the API works perfectly with HC3...

    Well, if we have the ip and credentials for the slave one could use the normal REST api.

    I hoped the point with using the /slave api that we didn't need to ip and credentials because the slaves are already integrated.

    Posted
    5 minutes ago, jgab said:

    Maybe just set it to nil and see if it works

    Well, if we have the ip and credentials for the slave one could use the normal REST api.

    I hoped the point with using the /slave api that we didn't need to ip and credentials because the slaves are already integrated.

    No, you didn't understand me. I'm just looking for the fibaro level slave integration workaround I described above that doesn't work very well.

    30 minutes ago, fastvd said:

    Jan, tell me how to describe in ER4 that there is no device in the system at all, which then gives us a failure in the operation of the entire system. The point is this:
    1) Since zigbee devices became available in HC3, I bought several temperature sensors and several relays for testing.
    2) At first, everything connects, everything even works, but then out of nowhere, they themselves are removed from the system
    3) And the situation turned out yesterday that my rule for turning off the pump based on room temperature did not work, since the device with id=789 simply did not appear in the system!
    4) Let's somehow describe it and output it to a separate variable, on the basis of which we will at least receive appropriate messages to understand that something needs to be done!

    This question is really important!

  • Topic Author
  • Posted (edited)
    19 minutes ago, fastvd said:

    No, you didn't understand me. I'm just looking for the fibaro level slave integration workaround I described above that doesn't work very well.

    So did the code above work to send an event to a slave?

     

     

    There is an event that is generated when a device is removed that you can try to trigger on

    Please login or register to see this code.

    but it may be that this event is not generated if the device is removed by a bug...

    You could also check every minute if any device is removed like below

     

    19 minutes ago, fastvd said:

    This question is really important!

    Please login or register to see this code.

     

    Edited by jgab
    Posted
    9 minutes ago, jgab said:

    So did the code above work to send an event to a slave?

     

     

    There is an event that is generated when a device is removed that you can try to trigger on

    Please login or register to see this code.

    but it may be that this event is not generated if the device is removed by a bug...

    You could also check every minute if any device is removed like below

     

    Please login or register to see this code.

     

    1) So did the code above work to send an event to a slave? - I can't verify it, since I don't know integrationPin

    2) it's not a question of deletion, but whether there is a device with such an ID in general. I think it's better to go this way!

    Posted

    ran this test code... just didn't understand where it got device number 4 from? I don't have such an ID in the system in general, and even less so in the list of local existingDevices

     

    Please login or register to see this attachment.

    Please login or register to see this image.

    /monthly_2023_02/image.png.e5d0fe1bc88d5efa19ba22256a88dbe2.png" />

  • Topic Author
  • Posted (edited)

    You should set existingDevices, it is populated with the existing device at startup. 

    It's a list that is a key/value so {168=true,879=true,1286=true,1348=true} etc.

    When you made it into an array you got

    {1=168,2=879,3=1286,4=1348} and it couldn't find device 4 and posted the event.

    SO just leave it empty or if you for some reason want to pre-populate it add as {id1=true,id2=true, } etc.

    Edited by jgab
    Posted

    Please login or register to see this image.

    /monthly_2023_02/image.png.49d4f8a76249216b4478e1bf80d81ae8.png" />

    image.png.45cf4f45e8c100e71d8d691d3d7fcaa4.png

  • Topic Author
  • Posted

    So what is line 161?

    Posted

    Please login or register to see this image.

    /monthly_2023_02/image.png.f451b08f8c2e394939c5775d9cd52720.png" />

  • Topic Author
  • Posted

    It's your first line.
    If you need to populate the list the Lua syntax is

    {[168]=true,[879]=true,....

    Posted (edited)

     

    ok, it didn't give an error...but again, it's not quite the same...this rule will detect when the device is actually removed, and we have to check if it EVEN exists with such an ID!

    Edited by fastvd
  • Topic Author
  • Posted

    {[168]=true,[879]=true,....

    Posted (edited)
    6 minutes ago, jgab said:

    {[168]=true,[879]=true,....

    yes, I already saw it myself..tmou edited the previous answer

    for the test, I replaced ID 168 with 68....I don't have a device with id=68 in my system...this is where I can check it!

    Please login or register to see this image.

    /monthly_2023_02/image.png.8b86308dbeac14dcee6817569ec15d6d.png" />

     

     

    Edited by fastvd
    Posted

    In other words: how can you check if there is such an ID at all?

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