jmcollin78 / versatile_thermostat

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

Eurotronic SPZB0001: set max to 255 and not 100% #432

Closed fablerII closed 6 months ago

fablerII commented 6 months ago

Version of the custom_component

6.1.0

Configuration

My VTherm attributes are the following:

hvac_modes:
  - heat
  - "off"
min_temp: 12
max_temp: 25
target_temp_step: 0.1
preset_modes:
  - none
  - frost
  - eco
  - comfort
  - boost
current_temperature: 21.4
temperature: 21.5
hvac_action: heating
preset_mode: none
is_on: true
hvac_mode: heat
type: null
is_controlled_by_central_mode: true
last_central_mode: null
frost_temp: 12
eco_temp: 19
boost_temp: 25
comfort_temp: 21
frost_away_temp: 0
eco_away_temp: 0
boost_away_temp: 0
comfort_away_temp: 0
power_temp: null
target_temperature_step: 0.1
ext_current_temperature: 11.3
ac_mode: false
current_power: null
current_power_max: null
saved_preset_mode: none
saved_target_temp: 21.5
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: binary_sensor.wohnzimmer_fenster
window_delay_sec: 15
window_auto_enabled: false
window_auto_open_threshold: 3
window_auto_close_threshold: 0
window_auto_max_duration: 30
window_action: window_turn_off
security_delay_min: 90
security_min_on_percent: 0.7
security_default_on_percent: 0.3
last_temperature_datetime: "2024-03-30T22:07:32.790703+01:00"
last_ext_temperature_datetime: "2024-03-30T22:17:54.446820+01:00"
security_state: false
minimal_activation_delay_sec: 300
device_power: 1
mean_cycle_power: 0.62
total_energy: 0
last_update_datetime: "2024-03-30T22:17:54.451144+01:00"
timezone: Europe/Berlin
temperature_unit: °C
is_device_active: true
ema_temp: 21.36
is_used_by_central_boiler: false
valve_open_percent: 56
is_over_valve: true
underlying_valve_0: number.eg_links_wohnzimmer_thermostat_valve_position
underlying_valve_1: null
underlying_valve_2: null
underlying_valve_3: null
on_percent: 0.62
on_time_sec: 1119
off_time_sec: 680
cycle_min: 30
function: tpi
tpi_coef_int: 0.8
tpi_coef_ext: 0.05
auto_regulation_dpercent: 10
auto_regulation_period_min: 5
last_calculation_timestamp: "2024-03-30T22:12:39.083508+01:00"
friendly_name: Wohnzimmer
supported_features: 401

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

Describe the bug

At first: It's a really great project, so far, thank you for that! I'm using it on two setups for few days and almost everything is working as expected, as long as I'm using the over_climate method e.g. for TRV's that don't support direct valve controlling or AC. However I do also have few of Eurotronic SPZB0001 and those support the direct valve postion method, but the range for the numbers is not 0-100 but 0-255. This leads to mismatch between the calculated position and the real position on the TRV and therefore the temperature is not reached in time or not reached at all. Is it possible to add support/ configuration to adopt the range on personal needs? Unfortunately it is also not possible to publish to pi_heating_demand any values, at it's just a sensor in home-assistant and in Z2MQTT it's also a read-only parameter.

I'm trying to: Control all Eurotronic SPZB0001 with this Thermostat implementation

And I expect: Thermostat to be fully controlled (open if heat is requested)

But I observe this .... Valve is not open more than 50% even if there is a big difference between the actual and the desired temperatures. As you can see in the screenshot, the pi_heating_demand value is not high, even if versatile_thermostat thinks so looking at valve_open_percent

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

Screenshot_valve_position
jmcollin78 commented 6 months ago

Hello @fablerII ,

However I do also have few of Eurotronic SPZB0001 and those support the direct valve postion method, but the range for the numbers is not 0-100 but 0-255.

Yes this should be possible easliy. Can you please check if the entity (a number entity) controling the valve have min and max set to 0 and 255 ? If yes it will be very easy to use the max.

What is pi_heating_demand ? I don't understand this part.

fablerII commented 6 months ago

Hi @jmcollin78,

However I do also have few of Eurotronic SPZB0001 and those support the direct valve postion method, but the range for the numbers is not 0-100 but 0-255.

Yes this should be possible easliy. Can you please check if the entity (a number entity) controling the valve have min and max set to 0 and 255 ?

Yes, the min is set to 0, max to 255

min: 0
max: 255
step: 1

What is pi_heating_demand ? I don't understand this part.

I think this can be ignored. As far as I can see, this is the value the TRV is reporting the current heat distribution. It's a nice sensor when using the automatic mode from the TRV to get an idea of what the TRV is actually doing.

jmcollin78 commented 6 months ago

https://github.com/jmcollin78/versatile_thermostat/releases/tag/6.2.0

fablerII commented 5 months ago

Thank you for quicky poviding the fix! Very appreciated!

Not sure if it's still the same type of bug, but even if VT is reporting only a small valve percentage, the real valve is sometimes opened fully. Additionally if a window is open VT is at first shutting down (which is expected) but after a time things are happening, which should not be the case. (Thermostat Valve position is number controlled by VT on a over_valve device)

Screenshot 2024-04-07 at 20 50 53

I do have a second setup, where over_climate is used and the window open bug is happening there, too. Not sure if I should open a separate Issue for that. Espacially when using a schedule it seems like the open window is ignorred in case the schedule kicks in. In this example the window was opened around 19:30 and closed around 4:30 next day. However as a new schedule begins at 4:00 the heater started to heat even the window was still opened. (Thermostat Position in the diagram is the position reported by the real TRV on a over_climate setup)

Screenshot 2024-04-07 at 20 56 19
jmcollin78 commented 5 months ago

I not sure to understand the point. I guess there is 3 point in your post. Isn't it ?

1.

even if VT is reporting only a small valve percentage, the real valve is sometimes opened fully

Do you mean that valve percent open in Vtherm and real valve open percent are different (small in Vtherm but 100% in the real valve) ? If yes this should be not possible. Does Eurotronic SPZB0001 have internal regulation mecanisms allowing it to change the valve position itself ? If yes, this is a problem for correct use of VTherm, because you have 2 controllers for the same valve.

2.

Additionally if a window is open VT is at first shutting down (which is expected) but after a time things are happening, which should not be the case. (Thermostat Valve position is number controlled by VT on a over_valve device)

Can you check when this happens that the window is still detected as open ? You can send me the attributes of the VTherm when this happens.

3.

I do have a second setup, where over_climate is used and the window open bug is happening there, too. Not sure if I should open a separate Issue for that.

idem, please send me the attributes of the VTherm when this happens. When window is open, the VTherm should turn off the VTherm (may be you have configure it differently) and then it should not take preset change into account.