OpenSprinkler Plugin Update for firmware 2.1.3+

It certainly would be feasible to grab the programs people have programmed into OS and their names and create child UI elements for those like we do for the manual valves. Then you could basically start a program from a vera scene. But it still remains to be seen if that’s really necessary when you can schedule those programs so easily in OS.

Bruce[/quote]

Yea I see where your coming from. Maybe this is more then enough in Vera for most and use the OS app for the rest. I’m playing with Virtual Panel also and this might be a good place to setup a tile with all of this and multistring to get some current data in there too. Like count down timer and such.

A few thoughts:

  • Yeah, I edited the XML, so that worked great. Thanks…
  • As far as scheduling? I use OS’s builtin feature to turn sprinklers on/off. Would be cool though, to be able to disable/enable sprinklers from the plugin. Think remotely/on vacation. Plus I love that it gives me the ability to turn the stations on/ff if I wanted to. Say just for fun, or because I detect motion, etc.

The author is right, there’s no reason to duplicate any functionality in OS, but what e has there now seems to be a good match. Perhaps the only thing I 'd do is move the debugging log leves up to the UI level. In any case, I love having this plugin, and appreciate the effort involved.

I think what your asking for is on the master plugin already no?

Summer is coming, and it’s time to update my plugin and firmware…

One question i had… are/were you guys using the virtual rain sensor along with this plugin? Worked great… but seems like potential overkill now that it’s built into OS. (and i could use the same weather underground key).

Ironically, that’s also the key reason i wanted Vera integration in the first place. So (as you are discussing already on this thread), do i really need this plugin that much, other than additional control from one main interface for all my HA stuff?

What am i missing?

Also, i see that my version for the plugin (with auto update) is v1.4. what version is the latest?

I don’t use this product (yet), but one practical application of having Vera talk to any irrigation system is for scene/mode integration.

As others have stated, let the sprinkler do what it does best (schedules, zone control, moisture sensing, etc) but allow your HA system to override the scheduling. Perfect example: you have a party or just know know that people are coming over, you activate your “party” mode or scene on Vera (disables auto-locking on the doors, puts some music on, maybe lighting, etc) and that in turn also temporarily suspends any zones scheduled on the sprinkler.

Another use case is approaching or leaving the house, your geo-location or alarm arm scenes/modes could also temporarily suspend watering.

If people are already using the present plugin in this fashion, awesome. I look forward to adding an irrigation system to my home this spring.

[quote=“tomgru, post:44, topic:185261”]Ironically, that’s also the key reason i wanted Vera integration in the first place. So (as you are discussing already on this thread), do i really need this plugin that much, other than additional control from one main interface for all my HA stuff?

What am i missing?

Also, i see that my version for the plugin (with auto update) is v1.4. what version is the latest?[/quote]

The plugin basically gives you some manual control over the valves from vera and also lets vera know when valves are turned on. So, if that information is useful for scenes, etc. it’s available.

As far as the version, if you are getting it from the marketplace, then you have the version that runs with the older OS firmware. This update I did is for the latest firmware on which they’ve changed so many things, the plugin you have would not work anymore.

Bruce

[quote=“TC1, post:45, topic:185261”]As others have stated, let the sprinkler do what it does best (schedules, zone control, moisture sensing, etc) but allow your HA system to override the scheduling. Perfect example: you have a party or just know know that people are coming over, you activate your “party” mode or scene on Vera (disables auto-locking on the doors, puts some music on, maybe lighting, etc) and that in turn also temporarily suspends any zones scheduled on the sprinkler.

Another use case is approaching or leaving the house, your geo-location or alarm arm scenes/modes could also temporarily suspend watering.

If people are already using the present plugin in this fashion, awesome. I look forward to adding an irrigation system to my home this spring.[/quote]

Certainly doable. The current version of the plugin has the ability to enable/disable OS, which is probably what you would want to do in the scenes you describe. Temporarily disable the unit for the conditions you mention, then re-enable them later.

Bruce

[quote=“brucehvn, post:46, topic:185261”][quote=“tomgru, post:44, topic:185261”]Ironically, that’s also the key reason i wanted Vera integration in the first place. So (as you are discussing already on this thread), do i really need this plugin that much, other than additional control from one main interface for all my HA stuff?

What am i missing?

Also, i see that my version for the plugin (with auto update) is v1.4. what version is the latest?[/quote]

The plugin basically gives you some manual control over the valves from vera and also lets vera know when valves are turned on. So, if that information is useful for scenes, etc. it’s available.

As far as the version, if you are getting it from the marketplace, then you have the version that runs with the older OS firmware. This update I did is for the latest firmware on which they’ve changed so many things, the plugin you have would not work anymore.

Bruce[/quote]

Thanks Bruce.

Based on their new firmware, is there any reason to run the virtual rain sensor any longer?

[quote=“tomgru, post:48, topic:185261”]Thanks Bruce.

Based on their new firmware, is there any reason to run the virtual rain sensor any longer?[/quote]

Probably not. Since OS can now query the weather and adjust watering levels based on the conditions, I personally don’t see much need for it.

Bruce

[quote=“brucehvn, post:49, topic:185261”][quote=“tomgru, post:48, topic:185261”]Thanks Bruce.

Based on their new firmware, is there any reason to run the virtual rain sensor any longer?[/quote]

Probably not. Since OS can now query the weather and adjust watering levels based on the conditions, I personally don’t see much need for it.

Bruce[/quote]

Kinda what i figured… but it’s a great add-on plugin!!!

Upgraded today… seems to be working great. As i’m on U15 still, i didn’t upload the v17 jason file. (right?)

one thing that is off. on the main OS device, i have the enable and disable buttons, and they are controlling the OS perfectly. But they are not reflected the actual “state” of the device after selection. They remain grey, no matter which choice i currently have selected.

any ideas?

I performed the upgrade today on UI5, and went ahead and uploaded all three files, and things seemed to work fine for me, with the buttons showing the expected states.

Thanks for putting together this plug-in update!

Good work, Bruce! Got my OS integrated fairly simply with Vera UI5 using this plugin and the latest OS firmware. Spent some time messing around with PLEG to try and manage watering schedules but in the end, I just decided it was easier to let OS do it.

I re-used a Hunter Rain Clik sensor I had with my irrigation system and modified a few lines of Bruce’s xml code to pull its status out of OS and into a Vera variable (compliments of a previous poster’s code mod).

I have a scene that runs some lua code at 4am to comparatively check the physical rain sensor and the trip status of the Virtual Sensor plugin. They both have to match indicating no rain before Vera enables the irrigation system. Probably overkill but it works for my application.

Thanks again to Bruce for updating this plugin …

Just an FYI in case anyone else runs into this issue.

OpenSprinkler firmware v2.1.4 came out a few days ago. I performed the update, re-imported my OS configuration and all my settings restored just fine. But afterwards my Vera no longer pulled the proper status from the OS and it couldn’t control it either. Even after restarting both the OS and Vera it still didn’t work. The solution I found was to simply change my OpenSprinkler password in the OS app or web interface, then re-save it. Then they started talking again.

[quote=“tomgru, post:51, topic:185261”]Upgraded today… seems to be working great. As i’m on U15 still, i didn’t upload the v17 jason file. (right?)

one thing that is off. on the main OS device, i have the enable and disable buttons, and they are controlling the OS perfectly. But they are not reflected the actual “state” of the device after selection. They remain grey, no matter which choice i currently have selected.

any ideas?[/quote]

I finally got my sprinklers turned on, and started running today. I can confirm that neither the master (enable/disable) or the individual sprinklers report their actual states when operating. Buttons all work, but no indication in the UI that they are on/off. any help greatly appreciated.

What is your RefreshStatusSec variable set to? Are there any errors in the Vera log?

What is your RefreshStatusSec variable set to? Are there any errors in the Vera log?[/quote]

RefreshStatusSec is set to 30. But i’d assume that if you changed a state directly from the dashboard, the refresh status of button state would be instant, no? (this worked fine before i upgraded).

Attached is a log snippet. I ran a zone direction from U15, then turned off from U15.

When I run a zone manually from Vera it can take several seconds for the button state in the Vera UI to reflect the change. Not sure if it waits for the next refresh or not, but either way it definitely shouldn’t take more than 30 seconds and shouldn’t be greyed out.

What firmware version do you have on your OpenSprinkler? Are you using the plugin from the app store or did you upload the files from the first post in this thread?

Also, I’m not on expert on this plugin but I don’t see anything in your log related to the OpenSprinkler. Are you viewing your log remotely or from your LAN?

[quote=“MLabuda, post:58, topic:185261”]When I run a zone manually from Vera it can take several seconds for the button state in the Vera UI to reflect the change. Not sure if it waits for the next refresh or not, but either way it definitely shouldn’t take more than 30 seconds and shouldn’t be greyed out.

What firmware version do you have on your OpenSprinkler? Are you using the plugin from the app store or did you upload the files from the first post in this thread?

Also, I’m not on expert on this plugin but I don’t see anything in your log related to the OpenSprinkler. Are you viewing your log remotely or from your LAN?[/quote]

I overwrote the app store version after upgrading to 2.1.3 with the files from the beginning of this post.

Interesting … I noticed an weird reoccurring line in my logs that I posted a question about in another thread.
LuaInterface::CallFunction_Timer-5 function poll_status_cycle failed [string “…”]:365: attempt to call field ‘decode’ (a nil value) <

One suggestion was that it might have something to do with the Etherrain plugin. On that thought, I ran the logs again, and disabled OS from the U15 dash, and saw this line. makes me think they are now connected.
LuaInterface::CallFunction_Job device 148 function SOpenSprinkler1_OpenSprinkler1_SetModeTarget_job failed [string “…”]:365: attempt to call field ‘decode’ (a nil value) <0x2b950000>
01 05/19/15 19:38:49.145 Lua_Job::Run job#882 : dev:148 (0x24eaff0) P:50 S:0 failed <0x

Lots of info in the logs I don’t understand, but looks like something is not working.

And yes, I was logging in remotely earlier, but am now home.

Yeah there seems to be a communication problem somewhere. I noticed that your logs don’t show that it is polling the OS, or at least not successfully. If you go to the advanced tab of the OS Controller device in Vera, do you have the IP and MAC address in there?

Just for reference, every 30 seconds (because that is my refresh interval) I have this in my log:

50 05/19/15 15:34:24.101 luup_log:96: OpenSprinkler: Debug: poll_status_cycle : Enter <0x2f5d7680> 50 05/19/15 15:34:24.101 luup_log:96: OpenSprinkler: Debug: poll_status : Enter : DeviceID: 96 <0x2f5d7680> 50 05/19/15 15:34:24.119 luup_log:96: OpenSprinkler: Debug: os_http_call: statusCode=200, resp={"devt":1432049660,"nbrd":1,"en":1,"rd":0,"rs":0,"rdst":0,"loc":"pws:[REDACTED]","wtkey":"[REDACTED]","sunrise":362,"sunset":1241,"eip":845188410,"lwc":1432049005,"lswc":1432049005,"sbits":[0,0],"ps":[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0]],"lrun":[6,1,558,1432011163]} <0x2f5d7680> 50 05/19/15 15:34:24.129 luup_log:96: OpenSprinkler: Debug: poll_status: resp=table: 0x14b2498 <0x2f5d7680> 50 05/19/15 15:34:24.140 luup_log:96: OpenSprinkler: Debug: os_http_call: statusCode=200, resp={"sn":[0,0,0,0,0,0,0,0],"nstations":8} <0x2f5d7680> 50 05/19/15 15:34:24.143 luup_log:96: OpenSprinkler: Debug: poll_status: resp=table: 0x1417e78 <0x2f5d7680> 50 05/19/15 15:34:24.143 luup_log:96: OpenSprinkler: Debug: poll_status: number of program data = 9 <0x2f5d7680> 06 05/19/15 15:34:24.143 Device_Variable::m_szValue_set device: 96 service: urn:fowler-cc:serviceId:OpenSprinkler1 variable: ModeStatus was: Enable now: Enable #hooks: 0 upnp: 0 v:0xb6aef8/NONE duplicate:1 <0x2f5d7680> 06 05/19/15 15:34:24.144 Device_Variable::m_szValue_set device: 96 service: urn:fowler-cc:serviceId:OpenSprinkler1 variable: StatusMessage was: Idle now: Idle #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2f5d7680> 50 05/19/15 15:34:24.144 luup_log:96: OpenSprinkler: Debug: poll_status: Max Stations: 8 <0x2f5d7680> 06 05/19/15 15:34:24.145 Device_Variable::m_szValue_set device: 96 service: urn:fowler-cc:serviceId:OpenSprinkler1 variable: Status was: 0 now: 0 #hooks: 0 upnp: 0 v:0xb6aeb8/NONE duplicate:1 <0x2f5d7680> 50 05/19/15 15:34:24.148 luup_log:96: OpenSprinkler: Debug: poll_status : Exit <0x2f5d7680> 50 05/19/15 15:34:24.148 luup_log:96: OpenSprinkler: Debug: poll_status_cycle : Exit