
Then you just use the extracted value to define if that exact nozzle is activated and based on that do something. So a string.len function to find the length of your binary string then a string.sub to extract each individual value. I don't think it'll be terribly difficult, but reference is non-existent. I've done a bunch searches, but just can't find where to start as far as the coding this. Any example code of other virtual devices would help. You can do it by means of a simple loop and a short pieces of seek-and destroy code which takes the first digit out of the binary string, checks if the number is a one or a zero and then updates the zone status, then it removes that digit and starts over until there are no more digits in the binary string. Then just create an array with a value for each digit. But I'm not sure if fibaro will handle a binary value as a number by default, so you probably need to decode it for the box. So a 1 is an active zone and a 0 is an inactive zone? Because then it will be pretty easy to decode that string of ones and zeros into a functioning scene. Turn a zone on for 10 minutes: GET /sn1=1&t=600 Below are some samples of calls to opensprinkler:Īuto: GET /cv?pw=opendoor&en=1&rd=0&rbt=0&mm=0 I suspect running LUA code to execute or get zone states and loop will be more elegant, but beyond my knowledge.Īny help would be appreciated. Trying to add multiple lines to shutoff all other zones before turning one on does not run anything. 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. There should be an extra line that gives some details about the adapter. Plug in the USB adapter and wait a few seconds.
#Opensprinkler pi default login how to
I understand if nobody has used this, but just wonder how to handle a return value from an HTTP get to retrieve a state. That is the default USB setup of your Pi.
#Opensprinkler pi default login update
What I'm looking for is how to retrieve a status into a variable to update the state of the icon. 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. 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. Next, either use the mobile app, or open a browser and type in the IP address (e.g.

It allows me to toggle from auto to manual to off and turn each zone on and off. For example, your OpenSprinkler’s IP address might be 192.168.1.22.

I've created a simple virtual device to integrate opensprinkler into HC2.
