Page 1 of 1

[mysensors] puzzled by so tragic domoticz rain sensor

Posted: Wednesday 08 October 2025 12:45
by nonecz
Version: 2025.1
Build Hash: 89d5c900d
Compile Date: 2025-05-05 09:02:49
dzVents Version: 3.1.8
Python Version: 3.13.3 (main, Aug 14 2025, 11:53:40) [GCC 14.2.0]
Active User: admin

Platform: ubuntu 25.04
Plugin/Hardware: mysensors, rain sensor V_RAIN/S_RAIN
Description:

OMG it could not be more complicated... than domoticz rain sesors.
I am very flustrated by the understandong how it is supposed to work.

OK,my sensor is reporting incremental rain mm value - volume of my rain guage bucket. Every time the bucket switch the magnetic switch the sensor send incremented value by 0.2 which rain rate mm/m2 corresponding to my bucket and guage size.

When I list the db...
sqlite3 ~/domoticz/domoticz.db "SELECT Date, Total, Rate FROM Rain WHERE DeviceRowID=43 ORDER BY Date DESC LIMIT 50;"
2025-10-08 10:35:00|13473.2|20
2025-10-08 10:30:00|13473.2|20
2025-10-08 10:25:00|13473.2|20
2025-10-08 10:20:00|13473.2|20
2025-10-08 10:15:00|13473.2|20
2025-10-08 10:10:00|13473.2|20
2025-10-08 10:05:00|13473.2|20
2025-10-08 10:00:00|13473.2|20
2025-10-08 09:55:00|13473.2|20
2025-10-08 09:50:00|13473.2|20
2025-10-08 09:45:00|13473.2|20
2025-10-08 09:40:00|13473.0|0
2025-10-08 09:35:00|13473.0|0
2025-10-08 09:30:00|13473.0|0
2025-10-08 09:25:00|13473.0|0
2025-10-08 09:20:00|13473.0|0
2025-10-08 09:15:00|13473.0|0
2025-10-08 09:10:00|13473.0|0
2025-10-08 09:05:00|13473.0|0
2025-10-07 16:40:00|13472.8|100
2025-10-07 16:35:00|13472.8|100
2025-10-07 16:30:00|13472.8|100
2025-10-07 16:25:00|13472.8|100
2025-10-07 16:20:00|13472.8|100
2025-10-07 16:15:01|13472.8|100
2025-10-07 16:10:00|13472.8|100
2025-10-07 16:05:00|13472.8|100
2025-10-07 16:00:01|13472.8|100
2025-10-07 15:55:00|13472.8|100


There are visible three events - at
#1 0.2mm - 2025-10-07 16:40:00
#2 0.2mm - 2025-10-08 09:05:00
#3 0.2mm - 2025-10-08 09:45:00

1) the domoticz logs FALSE EVENTS in the db - WTF?
2) how this looks in chart?
- OK I have no ide how upload image to this forum... but not by the image icon above or paste from my clip board... tragic again
I will describe it :
- daily chart
- x axis is divided by 2 hours (OK)
- now is Oct 8 12:36 ... so lot of time to get the chart updated
- two columns in daily chart :
Oct 7 16:00 - first column 0.2mm high
Oct 8 9:00 - second column 0.2mm high (0.4 expected?????)

WTF again - not as you could expect - two columns, first at #1 0.2mm high, second #2,#2 at 9h 0.4mm high

3) I would appreciated to have in the db at least time when the controller got the rain event message.
4) There is obviously some strange calculation behind it - WTF why?
5) How someone can this expect useful ?
6) Could be the calculation can be done later?

All this is tragic, why not just drop the event in the db and make a calculations as you wish...

7) I do try to visualize the chart in dashticz because the domotiz layout is again so tragic... But it is so overcomplicated the thousands of CSS to override color and chart definition is so complicated and not-working.

I am sure many others have the SAME FEELINGS. Or is there some secret idea behind this?

Thank you for your time...

Captain's log - Wednesday :I spent several days on this already... no solution or even small improvements.

Re: puzzled by so tragic domoticz rain sensor

Posted: Wednesday 08 October 2025 22:29
by waltervl
mysensors is not the most up to date hardware integration. You have to check the code or ask in my sensors forum how this should work.

I also have put this in the mysensors subforum so hopefully someone with some knowledge can help you.

And as a first time user we unfortunately have to limit the forum functionality for posting links and attachments as spammers really enjoy filling our precious forum with garbage.

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Thursday 09 October 2025 8:55
by nonecz
Hello waltervl, thank you for the response.

Mysensors are more general framework than sensors standard. I am using the rain gauge as simple as possible - when the bucket is full I send a volume number as S_RAIN / V_RAIN. I do afraid there is issue with mysensors.

1)
OK another question, does someone use rain gauge in domoticz at all?

2)
You are satisfied ?

3)
How it works ? - What actually domoticz expects from rain sensor ?

4)
Does someone use dashticz to show rain bar type graph?

I bet the state is unmaintained and nobody use it, knows, or it does not work at all.
I will try to find a person who defined this.

BR, Jan

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Thursday 09 October 2025 12:36
by waltervl
This is how it looks for me for a rain gauge, filled by an internet weather service ( Dutch buienradar). I am happy with this.... :)
I do not use Dashticz, better ask a question in the dastcz sub forum.
Screenshot_20251009-123212.Firefox.png
Screenshot_20251009-123212.Firefox.png (180.37 KiB) Viewed 179 times
Screenshot_20251009-123253.Firefox.png
Screenshot_20251009-123253.Firefox.png (212.11 KiB) Viewed 179 times

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Thursday 09 October 2025 15:21
by waltervl
Additional, what a rain device is expecting is explained in the API documentation https://wiki.domoticz.com/Domoticz_API/ ... L%27s#Rain
RAINRATE = amount of rain in last hour in [mm x 100]
RAINCOUNTER = continues counter of fallen Rain in [mm]
How this is implemented in mysensors? Look in the sourcecode for mysensor (there are various types) https://github.com/domoticz/domoticz/tr ... t/hardware

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Thursday 09 October 2025 20:54
by kimot
I think, Domoticz counters counts only integers.
Is 0.2mm integer?
You mus send 20 instead, I think.
You can also use a normal incremental counter where you adjust the units and divisors

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Friday 10 October 2025 20:14
by nonecz
Hello kimnot,

the float is fine.
I have incremental value - that is correct.

I think there is problem with db handling and chart processing.

I have 5 events in the db (now Oct 10, no rain last two days) :
#1 0.2mm - 2025-10-07 15:55:00 (+9 db records of the same value after 5min intervals)
#2 0.2mm - 2025-10-08 09:05:00 (+7 db records of the same value after 5min intervals)
#3 0.2mm - 2025-10-08 09:45:00 (+12 db records of the same value after 5min intervals)
#4 0.2mm - 2025-10-09 15:50:00
#5 0.4mm - 2025-10-09 15:55:00 (+12 db records of the same value after 5min intervals)

- my db query:
sqlite3 ~/domoticz/domoticz.db "
SELECT Date, Total, Rate
FROM Rain
WHERE DeviceRowID=43
ORDER BY Date DESC"

The graph:
1) Daily graph - looks OK now
- it spans from 15:00 Oct 7 to 13:00 Oct 10
- it is 3 days long
- data are OK as in the db

2) Week graph is OK
- Wed / Oct 8 - 0.2 mm (expected 0.4 mm - see db notes #2,#3)
- Thu / Oct 9 - 0.4 mm (expected 0.6 mm - see db notes #4,#5)
- Fri (today) not shown (why?)

Issues:
- graph show less (one db record less 0.2mm ?)
- both charts (day and week) does not show current day when there is no record/update in the db
- the chart algorithm obviously does not expect small count of records in the db

After few days the chart looks better.
Sorry I am still unable send images.
Jan

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Wednesday 15 October 2025 15:41
by nonecz
The sensor processing (rain volme) seems works for now - still no rain. Sending incremental value solved my issue. I will update this thread asap.

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Friday 17 October 2025 9:02
by nonecz
Hi, rain guage issue details. It still fails but not in the mysensors. It is clear the domoticz is the root cause.
I attaching a clear picture of a chart and db list.

- Today hit the sensor twice according to the database.
- The chart does not show the events at all
- it is 9:00 now and the chart show 11:00 ??? WTF
- interresting also is the bucket increments by 0.2 and I see in the db it incremented by 0.1 ? (bucket size is constant in my guage and I do only addition)

honza@u2504:~/dev/domiticz-db-backups$ ./rain.sh
2025-10-17 08:50:00|13475.3|20 <<<< 1x
2025-10-17 08:45:00|13475.1|0 <<<< 4x
2025-10-15 11:45:00|13474.4|0
2025-10-15 11:40:00|13474.4|0
2025-10-15 11:35:00|13474.4|0
2025-10-15 11:30:00|13474.4|0
2025-10-15 11:25:00|13474.4|0
2025-10-15 11:20:00|13474.4|0
2025-10-15 11:15:00|13474.4|0
2025-10-15 11:10:00|13474.4|0
2025-10-15 11:05:00|13474.4|0
2025-10-15 11:00:00|13474.4|0
2025-10-15 10:55:00|13474.4|0
2025-10-15 10:50:00|13474.4|0
2025-10-14 23:15:00|13474.2|20
2025-10-14 23:10:00|13474.2|20
2025-10-14 23:05:00|13474.2|20
2025-10-14 23:00:00|13474.2|20
2025-10-14 22:55:00|13474.2|20
2025-10-14 22:50:00|13474.2|20
2025-10-14 22:45:00|13474.2|20
2025-10-14 22:40:00|13474.2|20
2025-10-14 22:35:00|13474.2|20
2025-10-14 22:30:00|13474.2|20
2025-10-14 22:25:00|13474.2|20
2025-10-14 22:20:00|13474.2|20
2025-10-14 22:15:00|13474.0|0
2025-10-14 22:10:00|13474.0|0
2025-10-14 22:05:00|13474.0|0
2025-10-14 22:00:00|13474.0|0


Does someone use rain guage with mysensors?
BR, Jan

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Friday 17 October 2025 9:04
by nonecz
honza@u2504:~/dev/domiticz-db-backups$ ./rain.sh
2025-10-17 09:05:00|13475.9|80
2025-10-17 09:00:00|13475.9|80 <<< 2x
2025-10-17 08:55:00|13475.5|40 <<< 1x
2025-10-17 08:50:00|13475.3|20 <<< 1x
2025-10-17 08:45:00|13475.1|0 <<< 6x
2025-10-15 11:45:00|13474.4|0
2025-10-15 11:40:00|13474.4|0
2025-10-15 11:35:00|13474.4|0
2025-10-15 11:30:00|13474.4|0

---
total: 10x bucket size 0.2 => 2 mm/m2 rain fall this morning

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Friday 17 October 2025 9:08
by nonecz
The cahrt shows 0.8 mm rain fall instead of 2 mm. Not a mysensors issue.

I propose on the rain chart solve the bug by bold huge res or orange warning on top :

DOMOTICZ DRAW THE RAIN CHART INCORRECTLY BUT BE PATIENT ONE DAY IT WILL DRAW BETTER.

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Friday 17 October 2025 9:21
by nonecz
I expect at least something like my ascii art chart :
honza@u2504:~/dev/domiticz-db-backups$ ./chart.sh rain day
Terminal size detected: 125x37 -> Chart size: 115x12

Code: Select all

rain.1 (#43) samples=115 range=0.00..0.40 [2025-10-17 08:45:00 -> 2025-10-17 09:19:12]
   0.40 ┤                                                  *                                                                
   0.36 ┤                                                  *                                                                
   0.33 ┤                                                  *                                                                
   0.29 ┤                                                  *                                                                
   0.25 ┤                                                  *                                                                
   0.22 ┤                                                  *                                                                
   0.18 ┤                 *                *               *                                 *                              
   0.15 ┤                 *                *               *                                 *                              
   0.11 ┤                 *                *               *                                 *                              
   0.07 ┤                 *                *               *                                 *                              
   0.04 ┤                 *                *               *                                 *                              
   0.00 ┤*******************************************************************************************************************
       |----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----
       17 08    17 08      17 08       17 08      17 08       17 09      17 09      17 09       17 09      17 09       17 09

Re: [mysensors] puzzled by so tragic domoticz rain sensor

Posted: Friday 17 October 2025 9:25
by nonecz
The label should fix the issue definitely... The chart is finally better - the domoticz only ignores the first record, so the number is -1 bucket.

2025-10-17 09:20:00|13476.1|100
2025-10-17 09:15:00|13476.1|100
2025-10-17 09:10:00|13476.1|100
2025-10-17 09:05:00|13475.9|80
2025-10-17 09:00:00|13475.9|80
2025-10-17 08:55:00|13475.5|40
2025-10-17 08:50:00|13475.3|20
2025-10-17 08:45:00|13475.1|0
2025-10-15 11:45:00|13474.4|0
2025-10-15 11:40:00|13474.4|0
2025-10-15 11:35:00|13474.4|0