home-assistant-comfoconnect icon indicating copy to clipboard operation
home-assistant-comfoconnect copied to clipboard

reporting 0 values

Open kroeckx opened this issue 1 year ago • 7 comments

It seems that sometimes all variables are reported as 0 for a very short time. My guess is that there was some communication problem. Can it be avoided that those values are added to the history.

At least the total energy usage doesn't properly handle that. If you add a 0 value, it assumes it reseted the value, and if you than get a non 0 value again it will than think you used all the energy it has used ever in that day.

The total energy usage also stays 0 until an extra kWh has been used. That is it was at 100, was than 0 for about 14 hours and than changed to 111, resulting in claiming having used 111 kWh that day while it uses less than 1 a day.

kroeckx avatar Oct 17 '24 00:10 kroeckx

This is actually a bug in the Comfoconnect LAN (or even the ventilation unit). During connection, it seems to emit 0 values while there should be a real value.

0 values can't simply be avoided, since this could happen with temperature sensors, and those could very well report 0 degreees celcius. Since I noticed these issues only when reconnecting (due to restarting home assistant, or due to restarting the bridge), I've worked around this in the aiocomfoconnect library to hold initial sensor updates for a few seconds during startup.

You could look at using helper template sensors to filter out 0 values if needed, although I don't notice this issue on my setup.

When keeping track of the energy usage, i recommend to look at https://github.com/michaelarnauts/home-assistant-comfoconnect/issues/88.

michaelarnauts avatar Nov 06 '24 09:11 michaelarnauts

Couldn't it be filtered by only allowing 0 values only if multiple zero values are consecutively reported?

simonwestenholz avatar Nov 06 '24 11:11 simonwestenholz

I don't remember the details, but I think sensors don't update when the value doesn't change, so there won't be 2nd 0-value.

This would cause all 0 values to be filtered out, what could be problematic for some sensors (like the 0-10V sensors).

michaelarnauts avatar Nov 06 '24 11:11 michaelarnauts

But feel free to play with the code, and check if the behaviour is different and another way to filter only the incorrect 0 values can be used.

michaelarnauts avatar Nov 06 '24 11:11 michaelarnauts

One notice, when 0 is reported, then humidity is also reported as 0. Humidity = 0 are unreal. Maybe this is way to filter it out?

image

krzyl2 avatar Nov 14 '24 13:11 krzyl2

I wouldn't say it's 100% issue on gateway side, but it might be triggered by it. Currently I'm able to reproduce the issue by introducing some disruptions on network level. Just for few seconds. After this the issue starts and the way to fix it is to restart HA. So I would say issue might be triggered by unit or network issue, but it's sustained by the integration.

Maybe we could try to invent some mechanism to restart the connection to unit after reaching issue?

dkossako avatar Mar 05 '25 11:03 dkossako

This issue is very bothering for me. In my case, I also believe it is caused by minor network disruptions or overloads. I'm thinking that maybe we could apply a filter to differentiate between real 0 values and artificial ones (regardless of the source of the error). For example, most of the temperature magnitudes vary slowly, let's say that if the temperature has been above 5 degrees in the last hour, it is unlikely that it may drop to 0 in a minute. In the case of moisture, it is almost impossible to drop to zero. The value I would most interested in fixing is RMOT. Given that this is a 24-hour average, the rate of change is even slower. As a workaround, Has anybody developed a HA template that filters zeros?

llo871 avatar Aug 27 '25 20:08 llo871