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

vtherm over dummy/template switch not working. #414

Closed tbrasser closed 7 months ago

tbrasser commented 8 months ago

Version of the custom_component

latest

Configuration

My VTherm attributes are the following:

hvac_modes:
  - heat
  - "off"
min_temp: 15
max_temp: 25
target_temp_step: 0.1
preset_modes:
  - none
  - frost
  - eco
  - comfort
  - boost
  - activity
current_temperature: 21.1
temperature: 15
hvac_action: idle
preset_mode: none
is_on: true
hvac_mode: heat
type: null
is_controlled_by_central_mode: true
last_central_mode: Auto
frost_temp: 7
eco_temp: 18
boost_temp: 22
comfort_temp: 20
frost_away_temp: 7
eco_away_temp: 7
boost_away_temp: 7
comfort_away_temp: 7
power_temp: null
target_temperature_step: 0.1
ext_current_temperature: 11.07
ac_mode: false
current_power: null
current_power_max: null
saved_preset_mode: none
saved_target_temp: 15
saved_hvac_mode: null
motion_sensor_entity_id: binary_sensor.area_eetkamer
motion_state: "on"
power_sensor_entity_id: null
max_power_sensor_entity_id: null
overpowering_state: null
presence_sensor_entity_id: binary_sensor.area_interior
presence_state: "on"
window_state: "off"
window_auto_state: "off"
window_bypass_state: false
window_sensor_entity_id: null
window_delay_sec: null
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-03-19T10:40:46.745511+01:00"
last_ext_temperature_datetime: "2024-03-19T10:56:10.304835+01:00"
security_state: false
minimal_activation_delay_sec: 10
device_power: 1
mean_cycle_power: 0
total_energy: 0
last_update_datetime: "2024-03-19T10:59:49.124897+01:00"
timezone: Europe/Amsterdam
temperature_unit: °C
is_device_active: false
ema_temp: 21.05
is_used_by_central_boiler: true
is_over_switch: true
is_inversed: false
underlying_switch_0: input_boolean.dummy_eetkamer_trv
underlying_switch_1: null
underlying_switch_2: null
underlying_switch_3: null
on_percent: 0
power_percent: 0
on_time_sec: 0
off_time_sec: 300
cycle_min: 5
function: tpi
tpi_coef_int: null
tpi_coef_ext: null
friendly_name: Eetkamer
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

A clear and concise description of what the bug is.

I'm trying to:

Use vtherm over switch on input boolean to spoof smart TRVs on radiators/areas where I have none yet.

And I expect:

It to toggle the template switch

But I observe this ....

Screenshot_2024-03-19-10-26-35-618_io.homeassistant.companion.android.jpg

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

Debug log

logger:
    default: info
    logs:
        custom_components.versatile_thermostat: info

Deze fout is ontstaan door een aangepaste integratie.

Logger: homeassistant
Bron: custom_components/versatile_thermostat/prop_algorithm.py:81
integratie: Versatile Thermostat (documentation, issues)
First occurred: 10:40:46 (8 gebeurtenissen)
Laatst gelogd: 11:06:14

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 1436, in _async_temperature_changed
    self.recalculate()
  File "/config/custom_components/versatile_thermostat/thermostat_switch.py", line 182, in recalculate
    self._prop_algorithm.calculate(
  File "/config/custom_components/versatile_thermostat/prop_algorithm.py", line 81, in calculate
    self._tpi_coef_int * delta_temp
    ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
jmcollin78 commented 8 months ago

You have not configured TPI:

tpi_coef_int: null
tpi_coef_ext: null

That is the root cause of the error. But it should not be possible. Are you in V6.0 ?

Go to the configuration, select TPI and put some parameters or select "use central configuration" if you have one.

jmcollin78 commented 8 months ago

I cannot reproduce this case.

tbrasser commented 8 months ago

Seems some settings don't persist. For example I loose presence feature every time I re configure a vtherm. I solved it by going top to bottom through all the settings without skipping any page.

jmcollin78 commented 8 months ago

Do you have a Central configuration ?

tbrasser commented 7 months ago

Do you have a Central configuration ?

Yes. Every time I restart home assistant I have to re enable presence in the features of every vtherm.

jmcollin78 commented 7 months ago

Hello, I cannot reproduce your case but I suspect a misconfiguration in the central configuration presence feature. Can you please show me a screen copy of the central configuration presence feature AND the same for a normal VTherm ?

You should have something like that: For central configuration: Capture d’écran 2024-04-01 à 12 45 44

For normal VTherm configuration: Capture d’écran 2024-04-01 à 12 46 35 Then click on presence feature:

Capture d’écran 2024-04-01 à 12 47 24

tbrasser commented 7 months ago

Since the above I've changed 2 things:

  1. No longer use presence feature. Since activity (motion) feature is more important to me.

  2. Stopped using central boiler feature since I can just always put the temperature and current_temperature from the vtherm that has the largest difference (request) and set that on my central boiler (pid/opentherm) thermostat, and leave it on/heating.

Right now I don't have any issues. (Other than I'll need automations to set the preset to activity every time an area becomes unoccupied, otherwise any use of the UI is rendering the system unautomated).

Another thing I'm playing with (just to be complete) is I've added better-thermostat between my actual TRVs and the vtherm, and leave compensation/regulation to better-thermostat. Still I'm seeing changes to manual instead of staying on activity preset, but I'm unsure whether it's coming from the thermostat itself, this integration, or my SO using the physical or home assistant UI. But that's a different issue.

jmcollin78 commented 7 months ago

VTherm have all features from Better Thermostat since 5.4 release. Pure switch device (like yours), BT doesn't do more than VTherm. I don't known why you think it is a good idea to have a BT. Tries without and everything should be fine.

tbrasser commented 7 months ago

I have 3 vtherm over climate for TRVs. And 3 'dummy' vtherm over switch. Then I have 1 non vtherm central boiler climate device (not on-off) on which I set both the target and current temperature with those from the 6 with the highest heating demand. Good to know vtherm fully supercedes bt. Will remove it.

tbrasser commented 7 months ago

Without bt in between my smart TRVs and vtherm over climate I don't get to see the current action of 2 out of 3 of my TRVs (the middle 2 'kantoor' and 'keuken':

Screenshot_2024-04-04-08-50-29-987_io.homeassistant.companion.android.jpg

jmcollin78 commented 7 months ago

I don't get to see the current action of 2 out of 3 of my

To be sure when you said the "current action" you mean the attribute havc_action isn't set ? May I have the attributes of one of this VTherm ? Is the attribute hvac_action set ? Does the TRV climate have this hvac_action attribute itself ?

On possible explanaition is that your TRV don't have the hvac_action attribute but BT expose one hvac_action calculated I don't know exactly how.

tbrasser commented 7 months ago

That is indeed what I think is happening (and why I put better-thermostat in between for those two smart TRVs.

So I own 4 different brands now and not a single one of them is 'perfect'.

Either current hvac action is missing, and none of them allow control of the valve directly.

https://www.zigbee2mqtt.io/devices/SRTS-A01.html#aqara-srts-a01 (allows using external sensor as current_temperature, no valve control, no hvac_action)

https://www.zigbee2mqtt.io/devices/BTH-RA.html#bosch-bth-ra (allows using external sensor as current_temperature, no valve control, do get valve status, do get hvac_action)

https://www.zigbee2mqtt.io/devices/TRVZB.html#sonoff-trvzb (no external sensor support, no valve control, no valve status, do get hvac_action)

https://www.zigbee2mqtt.io/devices/GS361A-H04.html#siterwell-gs361a-h04 (no external sensor support, no valve control, no valve status, no hvac_action).

What setup would you recommend?

jmcollin78 commented 7 months ago

Yes I have users that uses the Shelly TRV with success. The valve is directly controlable and all features are available.

jmcollin78 commented 7 months ago

I will close this issue which not related to VTherm. Reopen if you think I'm wrong.