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!
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.
Status: ZWave-AD: Counter Looped detected on first received value for: PN1 (PN1_electric_kwh_value)/zwavejs2mqtt_0xfe88fc1e_8-50-0-value-65537, could be an old retained value?
This status is repeatedly reported for every zwave module with an electric_kwh_value device (even though the devics are unused) and thus flooding the log.
Can somebody help me to explain what the cause of this is and how to prevent it?
The error ZWave-AD: Counter Looped detected for your energy meter (PN1) usually means:
Cause
- The meter value rolled over (e.g., exceeded 65535 and reset to 0 or 65537).
- An old retained MQTT value was republished.
- A Z-Wave communication glitch.
Possible Fix
1. Clear retained MQTT messages for the topic:
//There could be an anoying situation with MQTT retained messages
//If a user enabled a retained message, and later sends a new value not-retained,
//the retained message is still here, and contains a old value.
//So if we detect a loop on the first message, we ignore the previous value
Log(LOG_STATUS, "Counter Looped detected on first received value for: %s/%s, could be an old retained value?", pSensor->name.c_str(), pSensor->unique_id.c_str());
If you do not want to ignore it check your MQTT retained messages for this sensor and delete them. See wiki page https://wiki.domoticz.com/MQTT#Delete_retained_topic
If you do not have retained messages then something else is wrong.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
I analyzed/tested things last night and this morning: I get (got) the log messages at every poll with the actual value being 0. As soon as the accumulted value is non-zero, the message no longer appears.
So I made sure that the 'faulty' devices had a non-zero kWh value and I have a clean log now. Makes me wonder though what would happen with new devices?
With new devices you would see this status message until it increases...
Is it your own MQTT/Device? Why does the counter not increase at the device point? Nothing connected?
We could silence this warning when it is 0.... maybe that is better
This happened at regular z-wave devices but indeed not connected or connected device not used (yet). Silence the warning would be a good idea to prevent future concerns.