Domoticz Adding a Negative to the Log

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
dpcreel
Posts: 47
Joined: Friday 25 November 2016 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Domoticz Adding a Negative to the Log

Post by dpcreel »

I am running the latest version of Domoticz on a pi, mosquitto (Docker) is on the same pi as well as zigbee2mqtt (Docker). I have 2 new zigbee irrigation devices, SonOff SWF-ZFU, it attaches to zigbee2mqtt fine and Domoticz creates the devices fine as well. When the irrigation devices are turned on, after about 5 minutes the irrigation devices sent out a real_time_irrigation_volume. Which can be seen in zigbee2mqtt, mqtt explorer and in the Domoticz device (real_time_irrigation_volume). All looks OK.

However the following day, there is a negative value of exact the same amount in the Domoticz chart and, after checking, in the Domoticz database. There is NO sign that zigbee2mqtt or mosquitto sent this value. I monitored the mqtt traffic using mqtt explorer and no negative values were sent through mosquitto.

I repeated this several times through several days to be sure of the issue.

My question is: why is Domoticz doing this? What am I doing wrong? Can this be fixed?
Screenshot from 2026-08-26 04-55-24.png
Screenshot from 2026-08-26 04-55-24.png (190.73 KiB) Viewed 476 times
Screenshot from 2026-08-28 18-23-55.png
Screenshot from 2026-08-28 18-23-55.png (200.81 KiB) Viewed 476 times
Screenshot from 2026-08-28 18-24-24.png
Screenshot from 2026-08-28 18-24-24.png (194.15 KiB) Viewed 476 times
User avatar
waltervl
Posts: 7020
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Domoticz Adding a Negative to the Log

Post by waltervl »

For a counter Domoticz expects a rolling counter. Not a counter that daily resets to 0. So when zigbee2mqtt sends 0 the next day Domoticz interpretents that as a negative counter value.

Perhaps create a GitHub issue for MQTT Auto Discovery with the config topic so a proper Domoticz device will be created (Custom sensor?). Follow these instructions https://wiki.domoticz.com/MQTT_AD_Report_Problems
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
gizmocuz
Posts: 3026
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Domoticz Adding a Negative to the Log

Post by gizmocuz »

Yep, create a Github issue following the guidelines of the above wiki.
Maybe there a field that we can use for this added in the config.

Does the counter reset all the time?
Quality outlives Quantity!
dpcreel
Posts: 47
Joined: Friday 25 November 2016 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz Adding a Negative to the Log

Post by dpcreel »

It does reset to zero at 12:05 and it seems that Domoticz interprets it as a negative number.
User avatar
waltervl
Posts: 7020
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Domoticz Adding a Negative to the Log

Post by waltervl »

dpcreel wrote: Sunday 30 August 2026 18:33 It does reset to zero at 12:05 and it seems that Domoticz interprets it as a negative number.
Yes, I tried to explain that. Please make a GitHub issue with the requested information so it can be fixed.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
dpcreel
Posts: 47
Joined: Friday 25 November 2016 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz Adding a Negative to the Log

Post by dpcreel »

Thanks for your help, your time is greatly appreciated. As soon as I get a chance, I'll file something with the link you sent. Have a great day!
Post Reply