COP sensor keeps logging repeated values even when the plugin does not call Update()

Python and python framework

Moderator: leecollings

Post Reply
User avatar
Ragdag
Posts: 169
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

COP sensor keeps logging repeated values even when the plugin does not call Update()

Post by Ragdag »

Hi all,

I’m developing a Python plugin for a Luxtronik heat pump controller and I’ve run into an odd behavior with Custom Sensor devices (Type=243, SubType=31).

What I’m doing
  • I calculate COP (Coefficient of Performance) only when the compressor is actually running.
  • When COP is not meaningful (cooling/no requirement/standby), the plugin intentionally does not call Update() for the COP devices.
  • The plugin logs “Skipping update … (no valid value)” in those cases.
The problem
Even though the plugin is not calling Update(), Domoticz still shows repeated identical COP values at 5-minute intervals in the graph export. Example:

Code: Select all

"2025-10-19 13:00:00";3,15
"2025-10-19 13:05:00";3,15
"2025-10-19 13:10:00";3,15
"2025-10-19 13:15:00";3,15
"2025-10-19 13:20:00";3,15
"2025-10-19 13:25:00";3,15
"2025-10-19 13:30:00";3,15
During that same period, the plugin logs clearly show no Update() calls for COP:

Code: Select all

2025-10-19 13:30:12.103 Status: WP: [DEVICE] Skipping update for COP total (no valid value).
2025-10-19 13:30:12.124 Status: WP: [DEVICE] Skipping update for COP heating (no valid value).
2025-10-19 13:30:12.125 Status: WP: [DEVICE] Skipping update for COP DHW (no valid value).
...
Sometimes Domoticz does produce a proper gap (no points) during long idle periods, so it’s not 100% consistent. Example of a gap between:

Code: Select all

2025-10-19 00:35:00  ->  2025-10-19 08:40:00
The last seen time does reflect the proper last data point.

What I would expect
If Update() is not called, no new datapoint should be stored. I’m trying to avoid flat “carry-forward” tails for COP because they skew daily/monthly averages.

Image

Questions
  • Does Domoticz internally “carry forward” the last known value for Custom Sensor devices into 5-minute buckets even if Update() was not called?
  • If so, is there any setting or device flag to disable that behavior per device?
  • Is there a recommended device type or Update() pattern for metrics like COP where “no datapoint” is preferred during idle periods?
Implementation notes (in case helpful)
  • COP devices are Custom Sensor (Type=243, SubType=31).
  • When COP is N/A I return None from the converter and the plugin never calls Update() for those units.
  • I also mark COP devices as non-graphing in my own tracker logic to avoid periodic forced updates.
  • I gate COP on:
    • Mode (heating/DHW only),
    • Passive cooling flag,
    • Compressor frequency > 1 Hz,
    • Power > 50 W and Heat Output > 100 W (to ignore standby/noise).
Any guidance on whether Domoticz is expected to backfill/carry-forward values in graphs when no Update() occurs, and how to opt out of it, would be greatly appreciated. If there’s a better device type or approach for COP, I’m happy to adjust the plugin.
User avatar
gizmocuz
Posts: 2709
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: COP sensor keeps logging repeated values even when the plugin does not call Update()

Post by gizmocuz »

That's correct, Domoticz keeps using the last value
You can prevent this by going to Settings->Log History and enabling 'Only add newly received values to the Log'
Quality outlives Quantity!
User avatar
Ragdag
Posts: 169
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: COP sensor keeps logging repeated values even when the plugin does not call Update()

Post by Ragdag »

gizmocuz wrote: Sunday 19 October 2025 14:04 That's correct, Domoticz keeps using the last value
You can prevent this by going to Settings->Log History and enabling 'Only add newly received values to the Log'
Awesome, thanks will try that.
There is no way to do that at a per device level?

Does not fully explain why it still did a gap in my current setup.
User avatar
Ragdag
Posts: 169
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: COP sensor keeps logging repeated values even when the plugin does not call Update()

Post by Ragdag »

@Gizmocus, will that setting then also effect the calculation and reports?
User avatar
Ragdag
Posts: 169
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: COP sensor keeps logging repeated values even when the plugin does not call Update()

Post by Ragdag »

gizmocuz wrote: Sunday 19 October 2025 14:04 That's correct, Domoticz keeps using the last value
You can prevent this by going to Settings->Log History and enabling 'Only add newly received values to the Log'
So far it works indeed. It would be really great if this was a per device option instead of system-wide.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest