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

Question
mmdonnelly 0
I've created a simple virtual device to integrate opensprinkler into HC2. It allows me to toggle from auto to manual to off and turn each zone on and off. I'm having a heck of a time building on the basic functionality like getting feedback of the status to update the icon and more complicated actions in buttons. Looking at the LUA reference manual, I'm not really sure where to start and searches on this forum don't really yield any results that help.
What I'm looking for is how to retrieve a status into a variable to update the state of the icon. I understand if nobody has used this, but just wonder how to handle a return value from an HTTP get to retrieve a state. Also, currently, you have to ensure all zones are off before manually turning another on or else water pressure is too low to pop up the sprinkler heads. Trying to add multiple lines to shutoff all other zones before turning one on does not run anything. I suspect running LUA code to execute or get zone states and loop will be more elegant, but beyond my knowledge.
Any help would be appreciated. Below are some samples of calls to opensprinkler:
Auto: GET /cv?pw=opendoor&en=1&rd=0&rbt=0&mm=0
Manual: GET /cv?pw=opendoor&en=1&rd=0&rbt=0&mm=1
Off: GET /cv?pw=opendoor&en=0
Turn a zone on for 10 minutes: GET /sn1=1&t=600
Turn a zone off: GET /sn1=0
Thanks in advance!
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.