Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid sensor values reported when equipment is offline #22

Open
zlangbert opened this issue Feb 11, 2024 · 4 comments
Open

Invalid sensor values reported when equipment is offline #22

zlangbert opened this issue Feb 11, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@zlangbert
Copy link
Owner

When equipment stops reporting, for example due to being powered off, the values for at least some sensors go to their max values. I've seen outdoor unit temperature sensors at 215 after flipping the breaker.

We should likely return None from the sensor in these cases. The tedious part will be determining the max values for different API fields so they can be filtered out.

@zlangbert zlangbert added the bug Something isn't working label Feb 11, 2024
@wirecuttr
Copy link
Contributor

I'm seeing this too. I'll try to help with finding the max values.

@wirecuttr
Copy link
Contributor

Did some testing and it was kind of a bust.

Method was this...
In Developer tools, Templates:

{% set attribs = ['preset_mode', 'min_temp', 'max_temp','current_temperature', 'temperature', 'target_temp_high', 'target_temp_low', 'current_humidity', 'hvac_action'] %}
{%- for att in attribs %}climate.main_basement_thermostat.{{ att }},{{ state_attr('climate.main_basement_thermostat',att) }}
{% endfor -%}
{% for state in states %}
  {%- if 'main_basement' in state.entity_id %}
    {{- state.entity_id + ","+ state.state }}
  {% endif %}
{%- endfor %}

ran 4 conditions and pasted the results of the above template into the attached spreadsheet.
Conditions:

  1. Column B: All equipment ON
  2. Column C: turn OFF breakers to both heat pumps, wait 5-10 min
  3. Column D: All equipment ON, wait 5-10 min
  4. Column E: turn OFF breakers to both heat pumps AND both furnaces, wait >30min

DaikinOne Integration Power Loss testing.xlsx

When everything is off, the Daikin Android app showed the thermostats offline after 5 or so minutes.
Surprisingly, the api is still showing as if online with most values looking normal when all breakers have been off for over 30 minutes. I highlighted in red a few high/suspect values in the file.

@wirecuttr
Copy link
Contributor

OK, so took another look. What seems to happen is that there is a temporary spike in a lot of values when the equipment is powered ON or OFF. The values do not remain high while the equipment is powered off.

I looked at the history graphs for the 4 devices (Thermostat, Heat pump, Furnace, EEV). You can see the spikes in the images:

Thermostat
EEV
HeatPump1
HeatPump2
Furnace

You can't really tell from the pics which lines are spiking. The middle area of the graph between the spikes is when all the equipment is powered off (breakers off).

I went through each of the graphs and these are the ones that spike high temporarily at power on or off transitions:
Heat Pump Total Runtime
Heat Pump Compressor Speed Target
Heat Pump Compressor Speed
Heat Pump Outdoor Fan Speed
Heat Pump Outdoor Fan Target Speed
Heat Pump Suction Pressure
EEV Coil Pressure
Heat Pump EEV Opening
Heat Pump Heat Demand
Heat Pump Cool Demand
Heat Pump Fan Demand
Heat Pump Dehumidify Demand
Heat Pump Fan Airflow Demand
Heat Pump Air Temperature
Heat Pump Coil Temperature
Heat Pump Discharge Temperature
Heat Pump Liquid Temperature
Heat Pump Defrost Sensor Temperature
EEV Coil Indoor Superheat Temperature
EEV Coil Liquid Temperature
EEV Coil Suction Temperature
Heat Pump Power Usage
Heat Pump Compressor Current
Furnace Airflow
Furnace Fan Demand Requested
Furnace Fan Demand Current
Furnace Heat Demand Requested
Furnace Heat Demand Current
Furnace Humidification Demand Requested
Furnace Cool Demand Requested
Furnace Cool Demand Current
Furnace Dehumidification Demand Requested
Furnace Power Usage

So the high values on those sensors should be ignored.

As for detecting when the devices have lost power (or internet), the other thing that happens is that there are actually no updates while the equipment is off. When I download the history graphs and look at the timestamps on each data point that is obvious.
It looks like that if thermostat is powered on then Home Assistant gets updates from pretty much exactly once per minute. The other devices have more variable timing between updates.
Perhaps you could do something like put in a timeout and just mark all of the devices/sensors Unavailable if the last thermostat update is more than a few minutes old?

@alankfreeman
Copy link

I’ve been seeing this behavior as well. I’m guessing the equipment has returning a value of -1, as all of the spiked values are 2^x -1. For example, several fields return 65535, or the max value in a 16 bit field.
This makes several of my graphs useless for 24 hours until the spike leaves the default view. I agree that it would be great to show zero or none in place of the -1 / high value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants