Support for rainrate?

Moderator: leecollings

Post Reply
sundberg84
Posts: 52
Joined: Sunday 17 May 2015 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Support for rainrate?

Post by sundberg84 »

Error: MySensors: Unhandled sensor (sub-type=7), please report with log!

Im also trying to use v_rain but i dont know how to handle it... what should i report to domoticz?
This is from my node (rain and rainrate)

Code: Select all

send: 6-6-0-0 s=3,c=1,t=6,pt=7,l=5,sg=0,st=ok:6.6
send: 6-6-0-0 s=3,c=1,t=7,pt=7,l=5,sg=0,st=ok:58.0
Domoticz sees it :
(MySensors Ethernet) Rain (Rain)
but if i report 6.6 its not the same number in the device.

Any clues?
Controller: Domoticz (Raspberry PI)
Gateways: MySensors (Ethernet W5100), RFLink
sundberg84
Posts: 52
Joined: Sunday 17 May 2015 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Re: Support for rainrate?

Post by sundberg84 »

I still doesnt get the rain and how to post this to Domoticz :(

Everything i sent and recieved in domotiocz, but when i send 18.0 i get 6.5mm in the device.

Serial log from raingauge (bucket tips):

Code: Select all

send: 6-6-0-0 s=3,c=1,t=6,pt=7,l=5,sg=0,st=ok:16.5
Rain
send: 6-6-0-0 s=3,c=1,t=6,pt=7,l=5,sg=0,st=ok:17.0
Rain
send: 6-6-0-0 s=3,c=1,t=6,pt=7,l=5,sg=0,st=ok:17.5
Rain
send: 6-6-0-0 s=3,c=1,t=6,pt=7,l=5,sg=0,st=ok:18.0
Rain
Domotiocz log:

Code: Select all

2015-09-07 20:51:04.472 (MySensors Ethernet) Rain (Regn)
2015-09-07 20:51:05.542 (MySensors Ethernet) Rain (Regn)
2015-09-07 20:51:11.000 Hardware Monitor: Fetching data (System sensors)
2015-09-07 20:51:19.594 (MySensors Ethernet) Rain (Regn)
2015-09-07 20:51:21.645 (MySensors Ethernet) Rain (Regn)
2015-09-07 20:51:22.694 (MySensors Ethernet) Rain (Regn)
Controller: Domoticz (Raspberry PI)
Gateways: MySensors (Ethernet W5100), RFLink
User avatar
gizmocuz
Posts: 2492
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Support for rainrate?

Post by gizmocuz »

you need to send to domoticz the counter value, this counter need to always increase!
(you can use V_VAR1 to send/request the last counter value)

What domoticz will show, is the amount of rain received for the day

for example, the first counter value is

1.0

and the last counter value is

3.0

then there is 2.0 rain that day

please have a look at the water meter pulse example, it is the same for the rain (only a rain sensor)
Quality outlives Quantity!
sundberg84
Posts: 52
Joined: Sunday 17 May 2015 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Re: Support for rainrate?

Post by sundberg84 »

Ok, so all you have to send is the counter value?
Not v_rain?

I uploaded the waterpulsemeter and got this:

Code: Select all

Received last pulse count from gw:16
pulsecount:16
send: 6-6-0-0 s=1,c=1,t=24,pt=5,l=4,sg=0,st=ok:16
volume:0.016
send: 6-6-0-0 s=1,c=1,t=6,pt=7,l=5,sg=0,st=ok:0.016
Domoticz shows -0.7mm

I think i need to define how much one pulse stands for... (0.5mm in my case) but what is what in the code?
The volume sums up just as the counter...
Controller: Domoticz (Raspberry PI)
Gateways: MySensors (Ethernet W5100), RFLink
User avatar
gizmocuz
Posts: 2492
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Support for rainrate?

Post by gizmocuz »

You need to send the rain counter with V_RAIN

the counter is in millimeter (mm)
Quality outlives Quantity!
sundberg84
Posts: 52
Joined: Sunday 17 May 2015 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Re: Support for rainrate?

Post by sundberg84 »

Im sorry - feel so stupid :idea:

So i request the counter with v_var1... every time the bucket tips i add another to this counter-variable and then also sends that new counter-variable with v_rain?
Controller: Domoticz (Raspberry PI)
Gateways: MySensors (Ethernet W5100), RFLink
User avatar
gizmocuz
Posts: 2492
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Support for rainrate?

Post by gizmocuz »

you should use/request the V_VAR1 when your node starts (powers up), so the last counter value is retrieved
dont send anything until you got this

next, when you have a pulse (bucket drop), add this value to the counter, send it with V_RAIN, and also send the counter as V_VAR1 (could also do this every minute or so)

now, this counter is in 'mm', and your system is in 0.5
so you need 2 times 0.5 to add '1' to the counter
Quality outlives Quantity!
sundberg84
Posts: 52
Joined: Sunday 17 May 2015 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Re: Support for rainrate?

Post by sundberg84 »

Clear as water!! Thank you!! :D

One last q: Can i send 0.5 to the counter, or do the counter only have full numbers (1,2,3,4 and not 1,5 2,5...)
Controller: Domoticz (Raspberry PI)
Gateways: MySensors (Ethernet W5100), RFLink
User avatar
gizmocuz
Posts: 2492
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Support for rainrate?

Post by gizmocuz »

the counter is in mm, not 0.5mm, therefor you have to count internally until you have 1 mm, and then add it/send the counter
what hardware do you use that supports 0.5mm rain counter ?
Quality outlives Quantity!
sundberg84
Posts: 52
Joined: Sunday 17 May 2015 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Re: Support for rainrate?

Post by sundberg84 »

Im trying... but no luck.

I send V_Rain every 0.5 (= 1 bucket) and counter every 1 (= 2 buckets)
So I send it like this:

V_rain 0.5
V_rain 1.0
Counter 1.0
V_Rain 1.5
V_Rain 2.0
Counter 2.0 and so on...

But in domoticz its updated with 0.6 and 0.7 mm every time i add 1 to the counter.
Its never updated when i send V_RAIN.

I want domoticz to change with 0.5mm intevalls since my bucket = 0.5mm
What am i missing??
Controller: Domoticz (Raspberry PI)
Gateways: MySensors (Ethernet W5100), RFLink
sundberg84
Posts: 52
Joined: Sunday 17 May 2015 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Re: Support for rainrate?

Post by sundberg84 »

Trying to understand the logic - please help!
Which one is correct?

(V_RAIN resets, but counter goes on)
Day1................Day2
V_rain 0.5 ............ V_rain 0.5
V_rain 1.0 ............ V_rain 1.0
Counter 1.0 ............ Counter 3.0
V_Rain 1.5 ............ V_Rain 1.5
V_Rain 2.0 ............ V_Rain 2.0
Counter 2.0 ............ Counter 4.0

(V_RAIN resets, counter resets)
Day1 ................ Day2
V_rain 0.5 ............ V_rain 0.5
V_rain 1.0 ............ V_rain 1.0
Counter 1.0 ............ Counter 1.0
V_Rain 1.5 ............ V_Rain 1.5
V_Rain 2.0 ............ V_Rain 2.0
Counter 2.0 ............ Counter 2.0

(V_RAIN counts on, counter counts on)
Day1 ................ Day2
V_rain 0.5 ............ V_rain 2.5
V_rain 1.0 ............ V_rain 3.0
Counter 1.0 ............ Counter 3.0
V_Rain 1.5 ............ V_Rain 3.5
V_Rain 2.0 ............ V_Rain 4.0
Counter 2.0 ............ Counter 4.0
Controller: Domoticz (Raspberry PI)
Gateways: MySensors (Ethernet W5100), RFLink
sundberg84
Posts: 52
Joined: Sunday 17 May 2015 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Re: Support for rainrate?

Post by sundberg84 »

I figured it out - its the third example thats correct.
V_Rain and V_VAR1 (Counter) continues over time and never resets.

Example with a bucketsize of 0.5 mm:
(V_RAIN counts on, counter counts on)
Day1 ................ Day2
V_rain 0.5 ............ V_rain 2.5
V_rain 1.0 ............ V_rain 3.0
Counter 1.0 ............ Counter 3.0
V_Rain 1.5 ............ V_Rain 3.5
V_Rain 2.0 ............ V_Rain 4.0
Counter 2.0 ............ Counter 4.0
Controller: Domoticz (Raspberry PI)
Gateways: MySensors (Ethernet W5100), RFLink
macieiks
Posts: 36
Joined: Tuesday 07 July 2015 12:00
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Support for rainrate?

Post by macieiks »

Hello

Could you please share your sketch for Rain Meter ? I am thinking about building rain meter to add to my existing weather station ;). I will be using it with Ethernet Gateway.

Best regards :)
Maciek
RPI2 + RFLink + PiFace D2 + Aeon Z-Wave Gen5 + Foscams FI9821P&R2 + MySensors + UPS APC Back-UPS 950VA
RPI2 + RFXtrx433e + Foscams FI9821P + MySensors + UPS APC Back-UPS 950VA
RPIB+ + TP-Link MR3420 + Huawei E173 GarageDomoticz :)
sundberg84
Posts: 52
Joined: Sunday 17 May 2015 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Re: Support for rainrate?

Post by sundberg84 »

Hi Maciek!

http://forum.mysensors.org/topic/1950/d ... rain-gauge

Its a normal MySensors node with a reed switch connected.
GND ---- Reed Switch ----- Pin 3
Controller: Domoticz (Raspberry PI)
Gateways: MySensors (Ethernet W5100), RFLink
macieiks
Posts: 36
Joined: Tuesday 07 July 2015 12:00
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Support for rainrate?

Post by macieiks »

Thx man :D I will test it in the upcoming weekend ;)
RPI2 + RFLink + PiFace D2 + Aeon Z-Wave Gen5 + Foscams FI9821P&R2 + MySensors + UPS APC Back-UPS 950VA
RPI2 + RFXtrx433e + Foscams FI9821P + MySensors + UPS APC Back-UPS 950VA
RPIB+ + TP-Link MR3420 + Huawei E173 GarageDomoticz :)
Kajzer
Posts: 5
Joined: Tuesday 07 June 2016 12:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Support for rainrate?

Post by Kajzer »

Hello,
i have another problem with my domoticz v 3.4834 on RaspberryPi. I've build weather station and last time i've installed rain gauge meter. My Domoticz use MySensors Gateway USB version 1.5.4 on Arduino. Here is the problem: Domoticz doesn't show rainrate value, still is 0. On serial monitor i see what is send to MySensors Gateway USB:

Code: Select all

send: 6-6-0-0 s=3,c=1,t=6,pt=7,l=5,sg=0,st=ok:6.6
send: 6-6-0-0 s=3,c=1,t=7,pt=7,l=5,sg=0,st=ok:58.0
In Domoticz's log I see:

Code: Select all

MySensors: Unhandled sensor (sub-type=7), please report with log!
Regards.
User avatar
gizmocuz
Posts: 2492
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Support for rainrate?

Post by gizmocuz »

I think the rain-rate should be globally implemented for all rain sensors in domoticz, not just for mysensors.
I think it is just taking the last counter value, minus the counter value from the last our, and we have a rainrate / hour correct?
Now time is my problem to implement this ;), but it cant be hard
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest