Maciek90 wrote: ↑Sunday 01 September 2024 21:41
Sorry, there is one left parenthesis too much. Please remove the "(" before the word resultCounter. Then it should work.
I did it and the logs showed something like this:
Code: Select all
2024-09-01 21:39:31.464 dzVents: Debug: Water Counter Script: Processing device-adapter for Water: Counter device adapter
2024-09-01 21:39:31.464 dzVents: Debug: Water Counter Script: Processing device-adapter for test: Counter device adapter
2024-09-01 21:39:31.464 dzVents: Debug: Water Counter Script: Water: 1497.183
2024-09-01 21:39:31.464 dzVents: Debug: Water Counter Script: Garden: 339.457
2024-09-01 21:39:31.464 dzVents: Debug: Water Counter Script: Daily Water: 0.518
2024-09-01 21:39:31.464 dzVents: Debug: Water Counter Script: Daily Garden: 0.069
2024-09-01 21:39:31.464 dzVents: Debug: Water Counter Script: Total difference: 1157.726
2024-09-01 21:39:31.464 dzVents: Debug: Water Counter Script: Daily difference: 0.449
2024-09-01 21:39:31.464 dzVents: Debug: Water Counter Script: resultCounterToday: 0
2024-09-01 21:39:31.464 dzVents: Debug: Water Counter Script: resultCounter : 1157.726
I assume you get the above output multiple times per day and each time the Total Difference is slightly higher, the resultCounter is slightly higher but resultCounterToday remains zero? (ref. my previous explanation that counterToday is not updated during the script but will be visible at the next run)
I have no idea why this does not work. The resultCounter is updated correctly and therefore Domoticz itself should calculate and show counterToday value correctly. I do this all the time in my installation.
The only strange thing I see in your first post is that the total value is shown in m3 while the daily total is show with unit Liter (even if it is 0).
I assume you are multiplying the value with the divider of the resultcounter during the update? It was mentioned before and otherwise the total also would not be correct.
Try making a second resultcounter and update that one in the same way. Maybe somehow something is wrong with the device.