jmcollin78 / versatile_thermostat

A full featured Thermostat for Home Assistant: presets, window, motion, presence and overpowering management
MIT License
327 stars 34 forks source link

Setting temperature manually no longer updates VTherm #359

Closed mwitkow closed 9 months ago

mwitkow commented 10 months ago

Version of the custom_component

5.3.3

Configuration

My VTherm attributes are the following:

vac_modes: off, heat
min_temp: 7
max_temp: 35
target_temp_step: 0.5
preset_modes: none, frost, eco, comfort, boost
current_temperature: 21.6
temperature: 23
preset_mode: none
is_on: true
hvac_action: null
hvac_mode: heat
type: null
is_controlled_by_central_mode: false
last_central_mode: null
frost_temp: 8
eco_temp: 18
boost_temp: 30
comfort_temp: 22
frost_away_temp: 10
eco_away_temp: 18
boost_away_temp: 30
comfort_away_temp: 22
power_temp: 13
target_temperature_step: 0.5
ext_current_temperature: 8.1
ac_mode: false
current_power: null
current_power_max: null
saved_preset_mode: none
saved_target_temp: 23
saved_hvac_mode: null
motion_sensor_entity_id: null
motion_state: null
power_sensor_entity_id: null
max_power_sensor_entity_id: null
overpowering_state: null
presence_sensor_entity_id: null
presence_state: null
window_state: off
window_auto_state: off
window_bypass_state: false
window_sensor_entity_id: null
window_delay_sec: 30
window_auto_enabled: false
window_auto_open_threshold: null
window_auto_close_threshold: null
window_auto_max_duration: null
window_action: window_turn_off
security_delay_min: 60
security_min_on_percent: 0.5
security_default_on_percent: 0.1
last_temperature_datetime: 2024-01-22T14:16:25.057974+01:00
last_ext_temperature_datetime: 2024-01-22T13:56:18.799202+01:00
security_state: false
minimal_activation_delay_sec: 10
device_power: 1
mean_cycle_power: null
total_energy: 0
last_update_datetime: 2024-01-22T14:16:25.063241+01:00
timezone: Europe/Zurich
temperature_unit: °C
is_device_active: true
ema_temp: 21.61
is_used_by_central_boiler: false
is_over_climate: true
start_hvac_action_date: null
underlying_climate_0: climate.office_thermostat
underlying_climate_1: null
underlying_climate_2: null
underlying_climate_3: null
is_regulated: true
regulated_target_temperature: 27.5
auto_regulation_mode: auto_regulation_strong
regulation_accumulated_error: 50
auto_fan_mode: auto_fan_none
current_auto_fan_mode: auto_fan_none
auto_activated_fan_mode: null
auto_deactivated_fan_mode: null
friendly_name: Versatile Office Thermostat
supported_features: 17

Underylying climate entity (MQTT TVR):

hvac_modes: off, heat
min_temp: 5
max_temp: 30
target_temp_step: 0.5
preset_modes: none, auto, manual, holiday
current_temperature: 25.1
temperature: 25
preset_mode: manual
friendly_name: Office Thermostat
supported_features: 17

If it is releveant to regulation performance or optimisation some curves are needed

To have a great curves demonstrating what you think is a problem, please install and configure what is described here: Even better with Plotly to tune your Thermostat Regulation STrong

Describe the bug

I have a MQTT TVR connected underlying a Climate-backed VTherm. Previously in 5.2.2 I could change the setting on the underlying thermostat's physical buttons and it would get reflected in the VTherm setting. With 5.3.3 not anymore.

Here's

I'm trying to: Change the Vtherm setting by using physical buttons to adjust VTherm setting.

And I expect: Minimum: be able to adjust temperature up/down with physical button, but see the target temperature on the underlying thermostat Ideal: be able to adjust the temperature up/down with physical buttons but see the VTherm target temperature.

But I observe this .... I see the target temperature of the underlying thermostat change, but not the VTherm thermostat. Screenshot 2024-01-22 at 14 20 54

VTherm value doesn't get updated.

Note: this changed since 5.2.2 because it worked then (not always, but most times).

I read the documentation on the README.md file and I don't find any relevant information about this issue.

Note: Better Thermostat actually used the number.office_thermostat_local_temperature_calibration to make the display of the TRV match the target temp of Better thermostat.

=

jmcollin78 commented 10 months ago

Hello, I don't intend to change this on 5.3.3. I will have a look (but because I have many automated test, I'm pretty sure it is working as in 5.2.2).

There is mecanisms to avoid infinite loops, so if you change the temp just after VTherm have change the target, it may not works (10 sec). Please give another try and ensure VTherm doesn't change the target temp just before.

Else, have you try to have a look on the logs ?

You should have some clear logs that says the device temperature changes. Can you give me these logs please ? (around the time you change on the TRV).

jmcollin78 commented 10 months ago

See : https://github.com/jmcollin78/versatile_thermostat/issues/331#issuecomment-1890376863

mwitkow commented 10 months ago

Ok so this time the versatile thermostat stayed the course and later on overwritten the underlying thermostat's temperature.

Jan 22 20:28:41 cerberus docker[1678]: 2024-01-22 20:28:41.874 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:28:41 cerberus docker[1678]: 2024-01-22 20:28:41.886 WARNING (MainThread) [custom_components.versatile_thermostat.binary_sensor] VersatileThermostat-Central boiler - the entities to calculate the boiler state are not initialized. Boiler state cannot be calculated
Jan 22 20:28:41 cerberus docker[1678]: 2024-01-22 20:28:41.908 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:28:41 cerberus docker[1678]: 2024-01-22 20:28:41.909 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Calling ThermostatClimate._send_regulated_temperature force=False
Jan 22 20:28:41 cerberus docker[1678]: 2024-01-22 20:28:41.909 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - period (0.0) min is < 5 min -> forget the regulation send
Jan 22 20:28:41 cerberus docker[1678]: 2024-01-22 20:28:41.913 INFO (MainThread) [homeassistant.components.light] Setting up light.template
Jan 22 20:29:11 cerberus docker[1678]: 2024-01-22 20:29:11.835 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:29:37 cerberus docker[1678]: 2024-01-22 20:29:37.812 INFO (MainThread) [deebot_client.command] Device is offline. Could not execute command "getBattery"
Jan 22 20:29:41 cerberus docker[1678]: 2024-01-22 20:29:41.837 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:30:09 cerberus docker[1678]: 2024-01-22 20:30:09.296 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Underlying climate climate.office_thermostat changed. Event.new_hvac_mode is heat, current_hvac_mode=heat, new_hvac_action=None, old_hvac_action=None
Jan 22 20:30:09 cerberus docker[1678]: 2024-01-22 20:30:09.593 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Underlying climate climate.office_thermostat changed. Event.new_hvac_mode is heat, current_hvac_mode=heat, new_hvac_action=None, old_hvac_action=None
Jan 22 20:30:10 cerberus docker[1678]: 2024-01-22 20:30:10.286 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Underlying climate climate.office_thermostat changed. Event.new_hvac_mode is heat, current_hvac_mode=heat, new_hvac_action=None, old_hvac_action=None
Jan 22 20:30:10 cerberus docker[1678]: 2024-01-22 20:30:10.595 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Underlying climate climate.office_thermostat changed. Event.new_hvac_mode is heat, current_hvac_mode=heat, new_hvac_action=None, old_hvac_action=None
Jan 22 20:30:11 cerberus docker[1678]: 2024-01-22 20:30:11.193 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Underlying climate climate.office_thermostat changed. Event.new_hvac_mode is heat, current_hvac_mode=heat, new_hvac_action=None, old_hvac_action=None
Jan 22 20:30:11 cerberus docker[1678]: 2024-01-22 20:30:11.839 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:30:11 cerberus docker[1678]: 2024-01-22 20:30:11.992 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Underlying climate climate.office_thermostat changed. Event.new_hvac_mode is heat, current_hvac_mode=heat, new_hvac_action=None, old_hvac_action=None
Jan 22 20:30:12 cerberus docker[1678]: 2024-01-22 20:30:12.789 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Underlying climate climate.office_thermostat changed. Event.new_hvac_mode is heat, current_hvac_mode=heat, new_hvac_action=None, old_hvac_action=None
Jan 22 20:30:13 cerberus docker[1678]: 2024-01-22 20:30:13.988 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Underlying climate climate.office_thermostat changed. Event.new_hvac_mode is heat, current_hvac_mode=heat, new_hvac_action=None, old_hvac_action=None
Jan 22 20:30:17 cerberus docker[1678]: 2024-01-22 20:30:17.992 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:30:18 cerberus docker[1678]: 2024-01-22 20:30:17.995 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:30:18 cerberus docker[1678]: 2024-01-22 20:30:17.996 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Calling ThermostatClimate._send_regulated_temperature force=False
Jan 22 20:30:18 cerberus docker[1678]: 2024-01-22 20:30:17.997 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - period (1.6) min is < 5 min -> forget the regulation send
Jan 22 20:30:38 cerberus docker[1678]: 2024-01-22 20:30:38.130 INFO (MainThread) [deebot_client.command] Device is offline. Could not execute command "getBattery"
Jan 22 20:30:41 cerberus docker[1678]: 2024-01-22 20:30:41.841 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:31:11 cerberus docker[1678]: 2024-01-22 20:31:11.844 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:31:38 cerberus docker[1678]: 2024-01-22 20:31:38.283 INFO (MainThread) [deebot_client.command] Device is offline. Could not execute command "getBattery"
Jan 22 20:31:41 cerberus docker[1678]: 2024-01-22 20:31:41.846 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:32:11 cerberus docker[1678]: 2024-01-22 20:32:11.848 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:32:38 cerberus docker[1678]: 2024-01-22 20:32:38.411 INFO (MainThread) [deebot_client.command] Device is offline. Could not execute command "getBattery"
Jan 22 20:32:41 cerberus docker[1678]: 2024-01-22 20:32:41.851 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:33:11 cerberus docker[1678]: 2024-01-22 20:33:11.853 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:33:16 cerberus docker[1678]: 2024-01-22 20:33:16.402 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:33:16 cerberus docker[1678]: 2024-01-22 20:33:16.404 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:33:16 cerberus docker[1678]: 2024-01-22 20:33:16.405 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Calling ThermostatClimate._send_regulated_temperature force=False
Jan 22 20:33:16 cerberus docker[1678]: 2024-01-22 20:33:16.406 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - period (4.6) min is < 5 min -> forget the regulation send
Jan 22 20:33:38 cerberus docker[1678]: 2024-01-22 20:33:38.564 INFO (MainThread) [deebot_client.command] Device is offline. Could not execute command "getBattery"
Jan 22 20:33:41 cerberus docker[1678]: 2024-01-22 20:33:41.856 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:33:41 cerberus docker[1678]: 2024-01-22 20:33:41.877 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:33:41 cerberus docker[1678]: 2024-01-22 20:33:41.878 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Calling ThermostatClimate._send_regulated_temperature force=False
Jan 22 20:33:41 cerberus docker[1678]: 2024-01-22 20:33:41.879 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - regulation calculation will be done
Jan 22 20:33:41 cerberus docker[1678]: 2024-01-22 20:33:41.879 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Regulated temp have changed to 24.5. Resend it to underlyings
Jan 22 20:33:41 cerberus docker[1678]: 2024-01-22 20:33:41.921 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Underlying climate climate.office_thermostat changed. Event.new_hvac_mode is heat, current_hvac_mode=heat, new_hvac_action=None, old_hvac_action=None
Jan 22 20:34:11 cerberus docker[1678]: 2024-01-22 20:34:11.858 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:34:16 cerberus docker[1678]: 2024-01-22 20:34:16.602 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:34:16 cerberus docker[1678]: 2024-01-22 20:34:16.605 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:34:16 cerberus docker[1678]: 2024-01-22 20:34:16.606 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Calling ThermostatClimate._send_regulated_temperature force=False
Jan 22 20:34:16 cerberus docker[1678]: 2024-01-22 20:34:16.607 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - period (0.6) min is < 5 min -> forget the regulation send
Jan 22 20:34:38 cerberus docker[1678]: 2024-01-22 20:34:38.706 INFO (MainThread) [deebot_client.command] Device is offline. Could not execute command "getBattery"
Jan 22 20:34:41 cerberus docker[1678]: 2024-01-22 20:34:41.860 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>
Jan 22 20:35:08 cerberus docker[1678]: 2024-01-22 20:35:08.751 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:35:08 cerberus docker[1678]: 2024-01-22 20:35:08.753 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Versatile Office Thermostat - Window auto event is ignored because bypass is ON or window auto detection is disabled
Jan 22 20:35:08 cerberus docker[1678]: 2024-01-22 20:35:08.755 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - Calling ThermostatClimate._send_regulated_temperature force=False
Jan 22 20:35:08 cerberus docker[1678]: 2024-01-22 20:35:08.755 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Versatile Office Thermostat - period (1.4) min is < 5 min -> forget the regulation send
Jan 22 20:35:11 cerberus docker[1678]: 2024-01-22 20:35:11.862 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 126] Required key not available, transport: <_SelectorDatagramTransport fd=98 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=98, family=2, type=2, proto=0, laddr=('0.0.0.0', 43368)>

Screenshot 2024-01-22 at 21 35 04

Still, that actually makes the manual adjustment impossible to use :(

jmcollin78 commented 10 months ago

@mwitkow you have the self-regulation activated. So the VT will send regularly a new target set-point. This is the way the self-regulation works.

You cannot have two source of truth: the VT with self-regulation and the TRV itself. This cannot works by principle.

With your TRV have you a number entity which allow to set directly the valve open percent (and by passing all internal regulation mecanism) ?

mwitkow commented 9 months ago

Sadly, no it doesn't have a valve percent control.

I understand it makes the algorithm significantly more complicated to be able to take the on-device changes into account. Is there no other way to read the manually set state?

jmcollin78 commented 9 months ago

The only way is to de-activate the self-regulation. Then the TRV will display the VTherm target temp. But you will loose the self-regulation algorithm. This can be an issue if the internal regulation of your TRV is bad (or its internal temp sensor is mostly wrong).

jmcollin78 commented 9 months ago

Feel free to reopen if you think the answer is not accurante.