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

Controlling 230 V valve over switch #498

Closed martin131 closed 1 month ago

martin131 commented 2 months ago

Hi, is there any better way how can I control my thermostat? I am using 230 V valves (https://www.elektrobock.cz/termoelektricky-pohon/p1734) controlled by the Sonoff board.

It takes a few minutes to open valves and vtherm is controlling switches too often, I think.

image

config:

hvac_modes: heat, off
min_temp: 15
max_temp: 27
target_temp_step: 0.1
preset_modes: none, eco, comfort, boost
current_temperature: 23.9
temperature: 24
hvac_action: idle
preset_mode: none
is_on: true
hvac_mode: heat
type: null
is_controlled_by_central_mode: true
last_central_mode: null
frost_temp: 0
eco_temp: 18
boost_temp: 25
comfort_temp: 23
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: 17.131989
ac_mode: false
current_power: null
current_power_max: null
saved_preset_mode: none
saved_target_temp: 24
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.0xa4c13810e6f2f587_contact
window_delay_sec: 5
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.2
security_default_on_percent: 0.1
last_temperature_datetime: 2024-09-16T10:59:55.598320+02:00
last_ext_temperature_datetime: 2024-09-16T11:00:12.394970+02:00
security_state: false
minimal_activation_delay_sec: 300
device_power: 0
mean_cycle_power: null
total_energy: 0
last_update_datetime: 2024-09-16T11:00:12.441464+02:00
timezone: Europe/Prague
temperature_unit: °C
is_device_active: false
ema_temp: 23.84
is_used_by_central_boiler: false
is_over_switch: true
is_inversed: false
keep_alive_sec: 0
underlying_switch_0: switch.sonoff_dualr3_relay_2
underlying_switch_1: null
underlying_switch_2: null
underlying_switch_3: null
on_percent: 0.45
power_percent: 45
on_time_sec: 0
off_time_sec: 300
cycle_min: 5
function: tpi
tpi_coef_int: 3
tpi_coef_ext: 0
friendly_name: Ložnice
supported_features: 401
jmcollin78 commented 2 months ago

Hello @martin131 ,

I'm sorry but I don't understand what you think is wrong and what you want. Can you follow the template please ? "I see ..." but "I want that ..."

martin131 commented 2 months ago

@ jmcollin78 As it takes about 2 minutes for the valve to open, the switch should not be turned on as often as shown in the screenshot. Is there any way to set a minimum time for the switch to be on?

I don't think it behaved like this last winter, is it possible?

jmcollin78 commented 2 months ago

You have some parameters like: min activation delay (in advanced menu) that can help. Your configuration seems correct: minimal_activation_delay_sec: 300. So it means the activation of the switch is for 5 min at minima.

But I understand you have a valve (a TRV ?). I wonder if controling a valve through a switch is a good idea. A switch is reputed to be instantaneous on or off not to take 2 minutes to open.

martin131 commented 2 months ago

It is not TRV. There are only two positions - OPEN and CLOSE.

Are you sure the parameter minimal_activation_delay_sec is working correctly? image

boroczkigabor commented 1 month ago

That is indeed a TRV. It requires a couple minutes to fully open or fully close. Obviously, using a switch is not the greatest idea, however there doesn't seem to be a good plugin to overcome the limitations with it. So I'm also using this thermostat on a single TRV.

jmcollin78 commented 1 month ago

Are you sure the parameter minimal_activation_delay_sec is working correctly?

Yes. I do a test today and it is working as expected.

There is a problem in your configuration: the minimal_activation_delay is 5 min (300 sec) but the cycle is also 5 min. So the activation will occurs only if the on_percent is 100%.

This parameter should be configured having in mind this rules: at each cycle, the algo calculates a on_time_sec which is the on_percent x cycle. If the resulting value is < minimal_activation_delay, then the activation of the switch is canceled.

If your valve take 5 minutes to opens (!! how is that possible ...) , you should set the minimal_activation_delay to 5 min but the cycle to let says 15 min. So that, it will never start opening the valve for less that 5 minutes.

martin131 commented 1 month ago

Thank you very much :-) I just changed the cycle time to 15 minutes, we will see.

And yes, it really does take 5 minutes to open. It is a slow but absolutely silent valve.

jmcollin78 commented 1 month ago

I will close the issue. Please reopen if you think there is still an issue