IrrigationCaddy plugin

An “IrrigationCaddy” plugin to try out. It’s pretty minimalist:

  1. System On/Off:
    Turn OFF all the sprinkler programs - it’s raining / it’s winter.
    Turn ON all the sprinkler programs - the garden is dry.

  2. Run a Zone sequence, as set up in sprinkler programs 1, 2 or 3. ie the functionality of the “Run Now” button on each Sprinkler Program. This would allow a Vera user to run the three different sequences determined by a Vera Schedule, via the plugin.

  3. The “Control” tab has a link to the IrrigationCaddy web page

This plugin assumes you have IrrigationCaddy firmware version: “ICEthS1-1.3.223” or better. If you haven’t, it won’t work. If you upgrade your IrrigationCaddy firmware be careful!

You can read a bit more here:

http://forum.micasaverde.com/index.php/topic,7583.msg115007.html#msg115007

and checking the weather forecast here:

http://forum.micasaverde.com/index.php/topic,10909.15.html

Note: I’m not responsible for any excessive water bills or bricked IrrigationCaddies.

Ver 0.51
This plugin has been tested using the Vera U15 interface and Firefox 21.0 only. Installation for UI5:

Go to UI5–>APPS–>Develop Apps–>Luup files and upload the five files.

Select the “Create device” button on the same page. Enter ‘D_IrrigationCaddy1.xml’ into the ‘Upnp Device Filename’ entry box and select the ‘Create device’ button immediately below. Do a few reloads using the Reload button.

Once the device can be seen in the User Interface go the “Advanced” tab and enter the IP address for the IrrigationCaddy. If you have changed the port address (unlikely), you can add that on to the end of the IP address. Do a few reloads using the Reload button.

NOTE: Lua outputs all headers in lowercase. However the Irrigation Caddy firmware is sensitive to header case and will not correctly recognise lowercase headers. It therefore does not fully conform to:

http://www.ietf.org/rfc/rfc2616.txt

“…Each header field consists of a name followed by a colon (”:“) and the field value. Field names are case-insensitive.”

More details here:

http://forum.micasaverde.com/index.php/topic,13081.msg96734.html#msg96734

To resolve this conflict and to get the Irrigation Caddy to co-operate you MUST download this file:

http://forum.micasaverde.com/index.php?action=dlattach;topic=13081.0;attach=15212

and use it to replace the existing /usr/lib/lua/socket/http.lua in Vera.

Ver 0.53

[ul][li]Minor fixes and additions[/li][/ul]

This code is on GitHub here:

You can install the plugin from the ‘Alternate App Store’, which works together with ‘ALTUI’:
http://forum.micasaverde.com/index.php/topic,38102.0.html
Delete any existing ‘IrrigationCaddy’ device before installing from the ‘Alternate App Store’.

Note that ‘ALTUI’ is highly recommended to all users.

This plugin requires the use of a modified “http.lua” file in Vera. Use the repository file to replace the file located in “/usr/lib/lua/socket/”
Be sure to update this file after each Vera firmware update.

Thanks, i’m installing some sprinkler heads for my lawn but have not yet purchased a controller. this looks very promising!

Hey a-lurker
I am trying to decide between etherrain and irrigationcaddy and the plug in is really import since this is a vacation house.

I loaded your plugin and looked at it. How do you define the zone sequence? is that set up through IrragationCaddy s website and the plugin calls on it?

Thanks Jason

The zone sequence is set up through the IrrigationCaddy web page. As mentioned, I see this as a pretty minimalist plugin. You could set up three different sequences and run them when you want, using the plugin. Or the IrrigationCaddy could do it. Perhaps the biggest advantage is being able to turn the sprinklers off when it is raining or going to.

Authorization isn’t used, so if you were going to use it remotely with a password, the plugin probably couldn’t reach it. I would have to look at how that’s all handled.

is it possible to see the status of a zone? or of a sequence? status on/off status might be useful.

I got my caddy and I’m bench testing it with my two valves. I’ll try to get it installed this weekend.

Hi, wanted to find out if anyone has the plugin running successfully? I have the latest firmware in the IC and have disable authentication on the IC but no luck, as mentioned earlier in the post this would be a great product to integrate. I have a number of irrigation zones around my house, which I would like to trigger depending on which alarm PIR is triggered.

Cross-posting is not allowed. Your post from “MiCasaVerde Forum ?General ?Irrigation Control ?IrrigationCaddy” has been removed

Has anyone been able to get this to work with the Ul6 update?

[quote=“a-lurker, post:1, topic:175826”]An “IrrigationCaddy” plugin to try out. It’s pretty minimalist:

  1. System On/Off:
    Turn OFF all the sprinkler programs - it’s raining / it’s winter.
    Turn ON all the sprinkler programs - the garden is dry.

  2. Run a Zone sequence, as set up in sprinkler programs 1, 2 or 3. ie the functionality of the “Run Now” button on each Sprinkler Program. This would allow a Vera user to run the three different sequences determined by a Vera Schedule, via the plugin.

  3. The “Control” tab has a link to the IrrigationCaddy web page

This plugin assumes you have IrrigationCaddy firmware version: “ICEthS1-1.3.223” or better. If you haven’t, it won’t work. If you upgrade your IrrigationCaddy firmware be careful!

You can read a bit more here:

http://forum.micasaverde.com/index.php/topic,7583.msg115007.html#msg115007

and checking the weather forecast here:

http://forum.micasaverde.com/index.php/topic,10909.15.html

Note: I’m not responsible for any excessive water bills or bricked IrrigationCaddies.

Ver 0.51
This plugin has been tested using the Vera U15 interface and Firefox 21.0 only. Installation for UI5:

Go to UI5–>APPS–>Develop Apps–>Luup files and upload the five files.

Select the “Create device” button on the same page. Enter ‘D_IrrigationCaddy1.xml’ into the ‘Upnp Device Filename’ entry box and select the ‘Create device’ button immediately below. Do a few reloads using the Reload button.

Once the device can be seen in the User Interface go the “Advanced” tab and enter the IP address for the IrrigationCaddy. If you have changed the port address (unlikely), you can add that on to the end of the IP address. Do a few reloads using the Reload button.[/quote]

Bummer! I got it installed and configured the IP, but turning it off does not cause my caddy to turn off. I’m trying to use this in combination with Virtual Rain Sensor to prevent watering when it’s not needed.

In UI5 for the plugin; on the Control Tab does the “IrrigationCaddy web page” link work? And you are using what firmware? And the hardware: WiFi or LAN connected?

Just got back in town…

Link works fine, firmware IC-W1-1.1.1668, Wifi(works fine through web interface)

I’ve not tried this on the WiFi version. If the link in the plugin works, that’s a good start. Do the any of the buttons do anything and do you see any errors in the log when they are operated?

I just updated firmware to the latest release. I’ll try it out this weekend and post my results.

a-lurker,
Thanks for creating this plug-in. I have security (username & password) enabled for my IrrigationCaddy and I’d prefer not to turn it off.

Do you know where parameters for authentication would need to be added to your scripts and the formatting based on what you’ve developed here? This would be very helpful.

Thanks!

The plugin could be modified to allow a username and password to be used but these would probably end up MIOS servers. Someone else could no doubt verify that. So it may not be advantageous to make any changes.

@a-lurker
I am using ui7(1.7.374) and I have made a run at getting v 0.51 to work with my ic-w1 running the latest firmware. First, thank you for your effort regarding this plug-in. The plug-in installs a wave device called irrigation caddy. It has on/off and three run sequences. I have tested all the buttons and the only control I get is to turn the irrigation caddy on when it is off. None of the other controls seem to do anything. Was only looking to have on/off control and I’m getting half of that. Would be nice to have control to turn off the caddy when it is on. Any advice?

I’ve no idea if the IC plugin works in UI7. But you could try installing the infoviewer plugin:

http://forum.micasaverde.com/index.php/topic,13477.0.html

and see if it indicates any trouble in the log file. Note not sure if the infoviewer plugin works in UI7 either. I assume you have full control of the caddy via the caddy web page?

a-lurker

I have installed the info viewer in ui7 and also re-installed the irrigation caddy plug-in. I have checked the logs after attempting to turn off the irrigation caddy and it does not seem to have any problem changing the state from 1 to 0, however the condition of the unit does not change from on to off. The only change I get is when the irrigation caddy is turned off manually and then turned on with the plug-in. The web site for the IC in the plug-in works with full control of the irrigation caddy. The curl commands listed by PJJP work from vera to turn off/on for the Irrigation caddy.

Thanks for the info. I did some testing and saw once the scenario whereby the unit doesn’t actually change from on to off although the plugin says it has. Looks like some weird start up thing. I’m inclined to think if you restart the Lupp engine ie the “Reload” in the Vera browser page it might work. Regardless I have added some debug code to keep an eye on things. Just upload the attached Lua file (see further below) and do the “Reload”. No other files need to be changed or reinstalled. The log file should show items similar to the following. Record the log entries if the problem reoccurs and post them here.

50 10/02/14 13:22:12.246 luup_log:77: IrrigationCaddy debug: setTarget running <0x31e92680> 50 10/02/14 13:22:12.246 luup_log:77: IrrigationCaddy debug: newTargetValue: 0 <0x31e92680> 50 10/02/14 13:22:12.247 luup_log:77: IrrigationCaddy debug: URL: http://ABC.DE.EF.GH:80/stopSprinklers.htm?rand=1412220132 <0x31e92680> 50 10/02/14 13:22:12.247 luup_log:77: IrrigationCaddy debug: Posted: stop=off <0x31e92680> 50 10/02/14 13:22:12.400 luup_log:77: IrrigationCaddy debug: URL request result: r = 1 <0x31e92680> 50 10/02/14 13:22:12.401 luup_log:77: IrrigationCaddy debug: URL request result: c = 200 <0x31e92680> 50 10/02/14 13:22:12.401 luup_log:77: IrrigationCaddy debug: URL request result: h = table: 0x1203498 <0x31e92680> 50 10/02/14 13:22:12.402 luup_log:77: IrrigationCaddy debug: Returned web page data is: <0x31e92680>

Thank you for helping me get this sorted. I uploaded the file you sent and re-started the vera. I tried to turn the irrigation caddy off with the plug-in. The result was that it did not turn off. The log file is as follows:

08 10/02/14 10:22:47.483 JobHandler_LuaUPnP::HandleActionRequest device: 5 service: urn:upnp-org:serviceId:SwitchPower1 action: SetTarget <0x2dac4680>
08 10/02/14 10:22:47.483 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=5 <0x2dac4680>
08 10/02/14 10:22:47.484 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:SwitchPower1 <0x2dac4680>
08 10/02/14 10:22:47.484 JobHandler_LuaUPnP::HandleActionRequest argument action=SetTarget <0x2dac4680>
08 10/02/14 10:22:47.484 JobHandler_LuaUPnP::HandleActionRequest argument newTargetValue=0 <0x2dac4680>
50 10/02/14 10:22:47.485 luup_log:5: IrrigationCaddy debug: setTarget running <0x2dac4680>
50 10/02/14 10:22:47.485 luup_log:5: IrrigationCaddy debug: newTargetValue: 0 <0x2dac4680>
50 10/02/14 10:22:47.486 luup_log:5: IrrigationCaddy debug: URL: http://123.456.7.890:80/stopSprinklers.htm?rand=1412270567 <0x2dac4680>
50 10/02/14 10:22:47.486 luup_log:5: IrrigationCaddy debug: Posted: stop=off <0x2dac4680>

50 10/02/14 10:22:47.517 luup_log:5: IrrigationCaddy debug: URL request result: r = 1 <0x2dac4680>
50 10/02/14 10:22:47.518 luup_log:5: IrrigationCaddy debug: URL request result: c = 200 <0x2dac4680>
50 10/02/14 10:22:47.518 luup_log:5: IrrigationCaddy debug: URL request result: h = table: 0xe7a1e0 <0x2dac4680>
50 10/02/14 10:22:47.518 luup_log:5: IrrigationCaddy debug: Returned web page data is: <0x2dac4680>
06 10/02/14 10:22:47.519 Device_Variable::m_szValue_set device: 5 service: urn:upnp-org:serviceId:SwitchPower1 variable: Status was: 1 now: 0 #hooks: 0 upnp: 0 skip: 0 v:0xe0dbd8/NONE duplicate:0 <0x2dac4680>/quote]

Interesting - if you compare my log with yours, it’s exactly the same but mine works but yours does not. As Curl and the IC web page both work for you, it looks like another case of this:

http://forum.micasaverde.com/index.php/topic,13081.msg96734.html#msg96734

Go to the bottom of the above thread and download “http.lua” and use it to replace /usr/lib/lua/socket/http.lua.

You can try a normal Lupp engine restart with the “Reload” via the browser first and see if it all works. However a hard Vera power on/off may be required to pick up the changed http.lua. I’m not sure on this, so please let us know.

I suspect that IC does not like a lowercase ‘content-length’ header. Using same, I also experience the problems reported.