**** Update 03/01/2015 ****
OpenSprinkler just released their unified firmware 2.1.3 which means that the API should now be stabilized between the regular OS, the OSPi, and the OSBBB. They also added hashed md5 passwords to the API.
The files that are attached here are now only compatible with firmware 2.1.3 and above. They should work now no matter what version of the OS you have as long as you can run firmware 2.1.3.
*************************
Based on the discussion here, I’m posting some updated files for the OpenSprinkler plugin to allow it to work with the latest firmware (mine is running 2.1.2). This is a rough beta, but appears to be doing what it should. The instructions I’m going to give below are for UI5 because that’s what I use. I can’t really answer any questions on UI7 installation.
The first step is to install the current OpenSprinkler plugin from the app store if you haven’t already. The files I’m putting here are just updates to the existing files so there’s no formal install for them yet.
Next you should backup the files that we are about to overwrite. Go to Apps->Develop Apps->Luup Files and download the following three files:
I_OpenSprinkler1.xml
D_OpenSprinkler1.json
D_OpenSprinkler1_UI7.json
Save them somewhere so you can restore them later if necessary.
Because the new firmware for OS returns everything in JSON, I opted to use akbooer’s JSON parser library. You will need to install this to /usr/lib/lua (usually done via scp or sftp). If you use any of akbooer’s other programs/plugins, you may have it installed already. You can get the file from here. That’s the official thread for the parser and the latest version will be available there.
Once those steps are done, you are ready to upload my updated versions of the three files you backed up above (you did back them up, right?)
Using the same Apps->Develop Apps->Luup Files screen, browse for my copy of the three files attached here so they show up in the right hand side of that screen, ready for upload. Check the “Restart Luup after upload” check box and hit the “Go” button. Vera will restart the luup engine.
In order to see the UI changes, you might need to refresh the vera page in your browser, or maybe even clear your browser cache and reload. When it’s working right, the main OpenSprinkler controller device will only have “Disable” and “Enable” buttons next to each other instead of “Off”, “Manual”, and “Auto” in one column.
Debugging is turned on, so there will probably be lots of feedback in the logs which could be helpful to me if you see any issues.
Configuration is pretty much the same as for the old plugin. You can look at the original thread for more info. I’ve added one new variable called ManualMaxMinutes which by default is set to 1. If you want to control the valves manually with vera, then set this to some number that is probably more realistic. The valves will run no longer than this amount when you turn them on manually. I had to do this because the new API requires a time be passed in when turning on a valve manually. You can always still turn them off early, however.
I have been using 20 seconds for the status update time as opposed to the default 2 seconds. That seems plenty for me and cuts down on some network traffic and vera overhead.
So, give it a whirl and see how it goes. Let me know of any issues or other features you might like to see.