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

Lua Code to query if HC2 does communicate with a unit


Question

Posted

Dear All,

Does someone know how to query a device for good communication before sending a command?

Is transfer OK to device xxx? => Yes then I send the command

=> No, I ask again till yes

I use FGS221 to send 220V impulse to open or close hydro-electro vanes. These Vanes open or close Sprinklers in the garden.

The problem is that sometimes Zwave communication is out for a few minutes. Thanks to stable Fibaro 3.591... Not local as theres many vane at different location and when this happens, all the vane fail to close...

Thus at 6pm, impulse is send to open sprinkler and 15min another is sent to close it but it doesn't thus sprinkler are running all the night!! Huge bill and garden becomes a lake!!

I don't have a status feedback on these vanes thus there's no way to know if it's open or closed. Also as it uses impulses, there's no way to use a loop that checks if the FGS221 has changed its status as they go back to 0 after impulse.

Does anyone know if this command exist?

Thank you very much in advance for your help!

4 answers to this question

Recommended Posts

  • 0
Posted

I don't know whether such a command exists, but in your situation I can imagine this is critical for you to work.

In your situation I would use a script that is activated through sceneactivation associated with your relay. The script then runs while the sprinkler relay is on.

In a global variable you can define whether the sprinkler should be on or off. When you turn of your sprinkler, the scene that does this should switch off the relay and set the global to off. This ensures that the relay is switched off most of the time. But if it's not, then the script will see that the global is set to off while the relay is not. It should then keep trying to switch of the relay.

I'm not an expert, perhaps guys like Robmac or Kirkrof have a much better solution. My concept should work however, hope you understand what I've tried to explain.

  • 0
  • Inquirer
  • Posted

    Hi hvb83,

    Thank you for your answer.

    I should have explain the functionning of the vane more deeply.

    To open the vane => O1=220V and O2=220V for 20 sec

    To close the vane => O1=220V and O2=0V for 20sec

    Thus FGS221 is only "ON" during 20sec then sprinkler runs for 15min (FGS221=off) then FGS221 is again on for 20 sec to close the sprinkler.

    So there's no way to link the status of the sprinkler and the FGS221.

    The only thing I do is a loop that check if the relay changed it's status during the 20sec. I realize that I should modify one thing. the 20 sec counter should start after the loop is verifyed instead of before because if the loop take 21 sec to be verifyed, the relay will never open or close the vane. (If it doesn't open, it's not as bad as if it doesn't close it and water runs for 10 hrs!!)

    So I may have a solution but again, as fibaro is not working/stable as it should, you have to transform a very simple code in a very heavy one just to compensate the misconception...

    • 0
    Posted

    Tibus31,

    I use FGS221 to open/close sprinklers (Gargena 24V) In parameters for FGS221 you have the possibility to turn off the switch after certain time even without the signal from HC. I have activated it to avoid the situation you have described. I'm using it and never had problems with sprinklers so far. Maybe you can setup the system the same way ?

    • 0
  • Inquirer
  • Posted

    Hi Richo,

    This could be a good idea but from what I see, it's an auto off only. As a remind, The vane I use needs O2=on for 20 sec then off to close the vane.

    I should have used the whole gardena system

    Please login or register to see this image.

    /emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

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