[userModule] Virtual Rain Sensor (Updated 2016/07/31)

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
maros
Posts: 103
Joined: 05 Apr 2014 11:21

[userModule] Virtual Rain Sensor (Updated 2016/07/31)

Post by maros »

This plugin creates a virtual binary rain sensor, that indicates whether it currently rains or not. The sensor can query
If one of the input sources evaluates to true, then the sensor will be tripped and an event will be emitted. Optionally users can set a timeout for the rain state after rain has stopped. Furthermore a list of window sensors can be added. Once rain starts and an open window is detected, a notification will be created.

The events produced by this module can be caught and processed by the EventWatcher module.

Tested with Z-Way version v2.2.2
Bug/Issue tracker at https://github.com/maros/Zway-Rain/issues
Documentation at https://github.com/maros/Zway-Rain/blob ... /README.md
Download at https://github.com/maros/Zway-Rain/releases

Installation can be done directly via git or via the the Zway App-Store.
Last edited by maros on 04 Feb 2017 15:21, edited 2 times in total.
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: [userModule] Virtual Rain Sensor (Updated 2016/01/08)

Post by Mike Yeager »

Maros,

Would it be possible to store the off delay in the device metrics in such a way that it would survive a reboot? I'm looking at using this module for putting my sprinklers on rain delay with it. Need to be able to do something like a 36-hour delay or so. I can probably figure it out and do it for myself but I believe it would be a great feature for the module. Would be happy to provide code...

Mike
maros
Posts: 103
Joined: 05 Apr 2014 11:21

Re: [userModule] Virtual Rain Sensor (Updated 2016/01/08)

Post by maros »

Yes, it certainly is possible. However, I'm not sure if this is the right approach: Rain sensor should indicate when it actually rains + timeout (eg. when the rain becomes too weak to detect, therefore the timeout should be in the range of couple of minutes and not days).
Maybe you could manager the 36h timeout required for your irrigation with my "Auto Off Inactive", "Security Zone" (using cancelable delayed alarms) or "Event Watcher" (using delays) modules instead. Some of them should retain their state on reboot (if not I'd be happy to accept patches/pull requests).
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: [userModule] Virtual Rain Sensor (Updated 2016/01/08)

Post by Mike Yeager »

I'll look into those modules. I'm already using the Virtual Rain Sensor with the ForecastIO module and it works great. I am using it with a short timeout but was looking at the longer timeout for use with the sprinkler system. Needless to say, if it rained all afternoon, I don't need the sprinkler running a few hours later (or even the next morning). I figured I'd just name it differently than the first so I knew which was which although the system would know which was which. Most of the modules I've examined so far appear to simply set a timer and watch for it to expire. These obviously won't survive a reboot and as I like to program and play, that doesn't work well for me.
maros
Posts: 103
Joined: 05 Apr 2014 11:21

Re: [userModule] Virtual Rain Sensor (Updated 2016/01/08)

Post by maros »

Maybe you need to create a dedicated module that also tracks rain quantity and duration as well as irrigation capacity (and maybe solar intensity and humidity - and hence evaporation). Security Zone and Auto Off Inactive are "reboot-safe". EventWatcher isn't yet.
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: [userModule] Virtual Rain Sensor (Updated 2016/01/08)

Post by Mike Yeager »

I wasn't planning on getting that involved with the rain sensor. Most commercial offerings just give a few (24/36/48 hour typically) delay options and that's it. I don't know as I plan to add a physical rain sensor and if I do it will most likely be a simple one. The ones that allow you to track the amount of rainfall and all that are quite susceptible to dirt contamination and other things that make them a maintenance nightmare. I could use the data from ForecastIO to do all of that but it's representative and not necessarily accurate either. By the way, what happens if you install more than one of the weather service modules?
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [userModule] Virtual Rain Sensor (Updated 2016/01/08)

Post by pz1 »

Mike Yeager wrote:I don't know as I plan to add a physical rain sensor and if I do it will most likely be a simple one.
I am quite happy with this Hydreon RG11 rainsensor, that can be programmed for different operation modes. Serves me well since Nov-2013.
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: [userModule] Virtual Rain Sensor (Updated 2016/01/08)

Post by Mike Yeager »

I have looked into that sensor more than once, I'm just not sure I want to add a physical sensor at this point. Just out of curiosity, how are you using it? Is it interfaced (obviously by you) to ZWay or just hooked to your sprinkler controller?
maros
Posts: 103
Joined: 05 Apr 2014 11:21

Re: [userModule] Virtual Rain Sensor (Updated 2016/01/08)

Post by maros »

I do have a physical binary sensor (http://www.rapidonline.com/b-b-sensors- ... or-50-3709) attached to a FGBS-001 to detect rain (for window control). However this sensor is not suitable for irrigation, since it only detects if it rains, and not the rain quantity.

Fibaro RGB switch offers 4 x 10V inputs that could be hooked up with a 0-10V sensor to measure soil moisture regardless of previous rainfall. (ie. http://www.alibaba.com/product-detail/H ... 75765.html)
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [userModule] Virtual Rain Sensor (Updated 2016/01/08)

Post by pz1 »

Mike Yeager wrote:I have looked into that sensor more than once, I'm just not sure I want to add a physical sensor at this point. Just out of curiosity, how are you using it? Is it interfaced (obviously by you) to ZWay or just hooked to your sprinkler controller?
I have connected it to a Fibaro Universal Sensor (FUS). The detector is set to create a signal "it rains" (Link refers to an outdated OpenRemote document, but still shows the essence). Literaly the first drop of rain that hits the dome sets the signal and creates an alarm on the FUS.
Post Reply