Page 1 of 1

[SOLVED] Strange Value under State in Setup -> More Options -> Events

Posted: Sunday 03 November 2019 10:47
by sincze
I had a perfectly working watermeter. :D
However since the last update to "app_version" : "4.11415" there is a strange large value visible under
Setup -> More Options -> Events
watermeter.png
watermeter.png (32.32 KiB) Viewed 202 times
I can't find this value in the domoticz DB nor do I see it with the API.

http://domoticz:8080/json.htm?type=devices&rid=1588
Spoiler: show

Code: Select all

{
   "ActTime" : 1572773748,
   "AstrTwilightEnd" : "19:05",
   "AstrTwilightStart" : "05:44",
   "CivTwilightEnd" : "17:47",
   "CivTwilightStart" : "07:03",
   "DayLength" : "09:34",
   "NautTwilightEnd" : "18:26",
   "NautTwilightStart" : "06:23",
   "ServerTime" : "2019-11-03 10:35:48",
   "SunAtSouth" : "12:25",
   "Sunrise" : "07:38",
   "Sunset" : "17:11",
   "app_version" : "4.11415",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 444241.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "Counter" : "444354.878 m3",
         "CounterToday" : "0.029 m3",
         "CustomImage" : 0,
         "Data" : "444354.878 m3",
         "Description" : "Receives pulses from the Wireless Watermeter.\n",
         "Favorite" : 0,
         "HardwareID" : 10,
         "HardwareName" : "Virtual Device",
         "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
         "HardwareTypeVal" : 15,
         "HaveTimeout" : false,
         "ID" : "83588",
         "LastUpdate" : "2019-11-03 10:01:32",
         "Name" : "Watermeter_M3",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Counter Incremental",
         "SwitchTypeVal" : 2,
         "Timers" : "false",
         "Type" : "General",
         "TypeImg" : "counter",
         "Unit" : 1,
         "Used" : 1,
         "ValueQuantity" : "",
         "ValueUnits" : "",
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "1588"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
Updating the Watermeter is still possible by API (adding liters) but the strange number is interfering with my PHP code so I want to update that to the correct value.
What did I miss?

Re: [SOLVED] Strange Value under State in Setup -> More Options -> Events

Posted: Monday 04 November 2019 18:43
by sincze
Solved the issue.

It seems that with the release I was using and after migrating to the newer BETA the incremental counter is functioning again exactly as described in the documentation. https://www.domoticz.com/wiki/Domoticz_ ... 7s#Counter

COUNTER = Integer of the overall total volume.

However I only did send the DELTA since last minute. Like 12 liters or something.....
So I used it incorrectly, however it did always work just fine the way I used to use it since JUNE 06 2018 if incremental counter was used as water meter.

Fun fact... All (virtual)counters are in m3... Only RFXMETER seems to deal with Liters.
Watermeter.JPG
Watermeter.JPG (18.76 KiB) Viewed 194 times
To get the show back on the road I created a virtual FLOWMETER... .
This device can deal with the amount of liters per minute just fine ;-) (delta)

The following thing I needed to do was
- extract the current value from the watermeter...
- add the amount of liters from the flow meter
- and write the new value back to the watermeter..

Solved.