home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.04k stars 31.07k forks source link

Values not updating otgw #46327

Closed ForumHulp closed 3 years ago

ForumHulp commented 3 years ago

The problem

After the message deprecated entities, I changed those entities to their new name. For example relative_mod_level_thermostat or ch_water_temp_thermostat. Those sensor gets updated at start of homeassistant or some times in between. Mostly they stay in the same value.

I deleted, reloaded and renamed this integration already but nothing seems to work. In otmonitor I see the values changing. How to solve this please.

What is version of Home Assistant Core has the issue?

2021.2.2

What was the last working version of Home Assistant Core?

last december was working

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

OpenTherm Gateway

Link to integration documentation on our website

https://www.home-assistant.io/integrations/opentherm_gw

Example YAML snippet

# Put your YAML below this line

Anything in the logs that might be useful for us?

# Put your logs below this line
Nothing in the logs
probot-home-assistant[bot] commented 3 years ago

opentherm_gw documentation opentherm_gw source (message by IssueLinks)

probot-home-assistant[bot] commented 3 years ago

Hey there @mvn23, mind taking a look at this issue as its been labeled with an integration (opentherm_gw) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

mvn23 commented 3 years ago

Try using the related _boiler sensors instead. Are they updating as expected? These values (relative_mod_level and ch_water_temp) are reported by the boiler and the gateway may request these reports more often than the thermostat. In this case the _thermostat sensor only gets updated when the thermostat is asking for the report. The _boiler sensor is updated every time the boiler reports the value.

ForumHulp commented 3 years ago

Thanks mvn, problem solved. You may also close the topics in home assistant forum.

EddyK69 commented 3 years ago

I have the same issues with several sensors (e.g. room_temp_boiler & outside_temp_boiler). Those are also only updating when the integration (re)starts...

See logs from both HA (top) and pyotgw example (bottom) (https://pypi.org/project/pyotgw/#usage-example) Notice the difference in values at the same timestamp for room_setpoint, room_temp, ch_water_pressure, ch_water_temp, return_water_temp

HA-logging: 2021-02-17 17:56:58 DEBUG (MainThread) [homeassistant.components.opentherm_gw] Received report: {'boiler': {'control_setpoint': 46.0, 'ch_water_temp': 41.5, 'master_ch_enabled': 0, 'master_dhw_enabled': 1, 'master_cooling_enabled': 0, 'master_otc_enabled': 0, 'master_ch2_enabled': 0, 'slave_fault_indication': 0, 'slave_ch_active': 1, 'slave_dhw_active': 0, 'slave_flame_on': 1, 'slave_cooling_active': 0, 'slave_ch2_active': 0, 'slave_diagnostic_indication': 0, 'remote_transfer_dhw': 1, 'remote_transfer_max_ch': 0, 'remote_rw_dhw': 1, 'remote_rw_max_ch': 0, 'slave_max_relative_modulation': 0.0, 'slave_max_capacity': 0, 'slave_min_mod_level': 0, 'room_setpoint': 18.5, 'relative_mod_level': 0.0, 'ch_water_pressure': 1.59765625, 'room_temp': 18.62, 'dhw_temp': 0.0, 'outside_temp': 10.4, 'return_water_temp': 35.0, 'slave_dhw_max_setp': 63, 'slave_dhw_min_setp': 38, 'slave_ch_max_setp': 0, 'slave_ch_min_setp': 0, 'dhw_setpoint': -0.00390625, 'max_ch_setpoint': 0.0, 'burner_starts': 0, 'ch_pump_starts': 0, 'dhw_pump_starts': 0, 'dhw_burner_starts': 0, 'burner_hours': 0, 'ch_pump_hours': 0, 'dhw_pump_hours': 0, 'dhw_burner_hours': 0, 'slave_service_required': 0, 'slave_remote_reset': 0, 'slave_low_water_pressure': 0, 'slave_gas_fault': 0, 'slave_air_pressure_fault': 0, 'slave_water_overtemp': 0, 'slave_oem_fault': 255}, 'gateway': {'otgw_about': 'OpenTherm Gateway 4.3', 'otgw_build': '14:30 07-01-2021', 'otgw_clockmhz': '4 MHz', 'otgw_mode': 'G', 'otgw_smart_pwr': 'Low power', 'otgw_thermostat_detect': 'D', 'otgw_dhw_ovrd': 'A', 'otgw_setpoint_ovrd_mode': 'N', 'otgw_gpio_a': 3, 'otgw_gpio_b': 4, 'otgw_led_a': 'F', 'otgw_led_b': 'X', 'otgw_led_c': 'O', 'otgw_led_d': 'M', 'otgw_led_e': 'P', 'otgw_led_f': 'C', 'otgw_ignore_transitions': 1, 'otgw_ovrd_high_byte': 1, 'otgw_setback_temp': 16.0, 'otgw_vref': 3}, 'thermostat': {'master_ch_enabled': 1, 'master_dhw_enabled': 1, 'master_cooling_enabled': 0, 'master_otc_enabled': 0, 'master_ch2_enabled': 0, 'slave_fault_indication': 0, 'slave_ch_active': 0, 'slave_dhw_active': 0, 'slave_flame_on': 0, 'slave_cooling_active': 0, 'slave_ch2_active': 0, 'slave_diagnostic_indication': 0, 'control_setpoint': 10.0, 'remote_transfer_dhw': 1, 'remote_transfer_max_ch': 0, 'remote_rw_dhw': 1, 'remote_rw_max_ch': 0, 'slave_max_relative_modulation': 0.0, 'slave_max_capacity': 0, 'slave_min_mod_level': 0, 'room_setpoint': 19.0, 'relative_mod_level': 0.0, 'ch_water_pressure': 1.4, 'room_temp': 18.96875, 'ch_water_temp': 40.0, 'dhw_temp': 0.0, 'outside_temp': 10.40234375, 'return_water_temp': 39.0, 'slave_dhw_max_setp': 63, 'slave_dhw_min_setp': 38, 'slave_ch_max_setp': 0, 'slave_ch_min_setp': 0, 'dhw_setpoint': 0.0, 'max_ch_setpoint': 90.0, 'burner_starts': 0, 'ch_pump_starts': 0, 'dhw_pump_starts': 0, 'dhw_burner_starts': 0, 'burner_hours': 0, 'ch_pump_hours': 0, 'dhw_pump_hours': 0, 'dhw_burner_hours': 0, 'rovrd_man_prio': 0, 'rovrd_auto_prio': 0}}

pyotgw logging: 2021-02-17 17:56:58.574915 Received a status update: {'boiler': {'control_setpoint': 46.0, 'ch_water_temp': 41.5, 'master_ch_enabled': 0, 'master_dhw_enabled': 1, 'master_cooling_enabled': 0, 'master_otc_enabled': 0, 'master_ch2_enabled': 0, 'slave_fault_indication': 0, 'slave_ch_active': 1, 'slave_dhw_active': 0, 'slave_flame_on': 1, 'slave_cooling_active': 0, 'slave_ch2_active': 0, 'slave_diagnostic_indication': 0, 'remote_transfer_dhw': 1, 'remote_transfer_max_ch': 0, 'remote_rw_dhw': 1, 'remote_rw_max_ch': 0, 'slave_max_relative_modulation': 0.0, 'slave_max_capacity': 0, 'slave_min_mod_level': 0, 'room_setpoint': 19.0, 'relative_mod_level': 0.0, 'ch_water_pressure': 1.59765625, 'room_temp': 18.92, 'dhw_temp': 0.0, 'outside_temp': 10.4, 'return_water_temp': 35.0, 'slave_dhw_max_setp': 63, 'slave_dhw_min_setp': 38, 'slave_ch_max_setp': 0, 'slave_ch_min_setp': 0, 'dhw_setpoint': -0.00390625, 'max_ch_setpoint': 0.0, 'burner_starts': 0, 'ch_pump_starts': 0, 'dhw_pump_starts': 0, 'dhw_burner_starts': 0, 'burner_hours': 0, 'ch_pump_hours': 0, 'dhw_pump_hours': 0, 'dhw_burner_hours': 0, 'slave_service_required': 0, 'slave_remote_reset': 0, 'slave_low_water_pressure': 0, 'slave_gas_fault': 0, 'slave_air_pressure_fault': 0, 'slave_water_overtemp': 0, 'slave_oem_fault': 255}, 'gateway': {'otgw_about': 'OpenTherm Gateway 4.3', 'otgw_build': '14:30 07-01-2021', 'otgw_clockmhz': '4 MHz', 'otgw_mode': 'G', 'otgw_smart_pwr': 'Low power', 'otgw_thermostat_detect': 'D', 'otgw_dhw_ovrd': 'A', 'otgw_setpoint_ovrd_mode': 'N', 'otgw_gpio_a': 3, 'otgw_gpio_b': 4, 'otgw_led_a': 'F', 'otgw_led_b': 'X', 'otgw_led_c': 'O', 'otgw_led_d': 'M', 'otgw_led_e': 'P', 'otgw_led_f': 'C', 'otgw_ignore_transitions': 1, 'otgw_ovrd_high_byte': 1, 'otgw_setback_temp': 16.0, 'otgw_vref': 3}, 'thermostat': {'master_ch_enabled': 1, 'master_dhw_enabled': 1, 'master_cooling_enabled': 0, 'master_otc_enabled': 0, 'master_ch2_enabled': 0, 'slave_fault_indication': 0, 'slave_ch_active': 0, 'slave_dhw_active': 0, 'slave_flame_on': 0, 'slave_cooling_active': 0, 'slave_ch2_active': 0, 'slave_diagnostic_indication': 0, 'control_setpoint': 10.0, 'remote_transfer_dhw': 1, 'remote_transfer_max_ch': 0, 'remote_rw_dhw': 1, 'remote_rw_max_ch': 0, 'slave_max_relative_modulation': 0.0, 'slave_max_capacity': 0, 'slave_min_mod_level': 0, 'room_setpoint': 19.0, 'relative_mod_level': 0.0, 'ch_water_pressure': 1.5, 'room_temp': 18.96875, 'ch_water_temp': 36.5, 'dhw_temp': 0.0, 'outside_temp': 10.40234375, 'return_water_temp': 35.5, 'slave_dhw_max_setp': 63, 'slave_dhw_min_setp': 38, 'slave_ch_max_setp': 0, 'slave_ch_min_setp': 0, 'dhw_setpoint': 0.0, 'max_ch_setpoint': 90.0, 'burner_starts': 0, 'ch_pump_starts': 0, 'dhw_pump_starts': 0, 'dhw_burner_starts': 0, 'burner_hours': 0, 'ch_pump_hours': 0, 'dhw_pump_hours': 0, 'dhw_burner_hours': 0, 'rovrd_man_prio': 0, 'rovrd_auto_prio': 0}}

mvn23 commented 3 years ago

Please read my previous reply about the values and their sources. It is expected behavior that the thermostat and boiler values don't always match, as this is exactly what is happening on the OpenTherm Gateway as well. If you want to get useful values from the provided sensors then please read up on the OpenTherm protocol and how the OpenTherm Gateway deals with it. This will give you some more insight on which sensors you want to use.

EddyK69 commented 3 years ago

Thanks for your comment. I read your previous post, but there one thing I don't understand: The OTGW integration in HA makes use of the pyotgw package; when I make a simple python-script (like the example on pyotgw page) with makes use of the same package, I DO get the right results: I see al the values mentioned before changing the way is should. Only the HA integration seems to 'cache' the old values until I restart the integration.

Can you explain this behavior? (that is: the difference between the example-script and the HA integration with pyotgw)

p.s: The only difference I can see is the pyotgw version in HA is 1.0b1 and the latest is 1.0b2

mvn23 commented 3 years ago

There should be no major difference between the example script and the HA integration logging wise. I think I see your issue. Both log messages you posted earlier were taken at the same time, implying that the example script and HA were connected to the gateway at the same time. This is not a supported scenario. There should be only 1 connection to your gateway at any time. I am aware that some (mostly network) connectivity solutions for the gateway allow more than 1 simultaneous connection, but please keep in mind that the gateway itself was originally designed with only a serial/USB TTL connection in mind. I will update the documentation to include this limitation soon.

EDIT: related PR home-assistant/home-assistant.io#16635

EddyK69 commented 3 years ago

@mvn23 Thanks for your explanation. Solved my issue!

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.