ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant
336 stars 48 forks source link

Support for Radiator valve heating #113

Open Hax1337 opened 1 year ago

Hax1337 commented 1 year ago

Hey,

First of all I wanted to say thanks for this great thermostat, it saved me already a lot of energy costs and keeping the apartment warm anyways (wife is happy too that’s what only counts 😂)

Currently from what I understand the thermostat works only with ON/OFF heatings, means mainly Fan heaters.

With HA and Nodered I converted the setup from ON/OFF to also support radiator valves to open and close. But it’s not perfect yet and I’d like to ask some stuff what could potentially added to support them out of the box. Mostly in Germany and Europe there is a lot of radiator heatings.

Here’s what I did and some suggestions:

I created a helper on/off button for each room / heating. whenever the smart thermostat goes on, it will set the valve temperature to 26 degrees to make sure it opens. whenever the Smart thermostat goes off, the temperature will be set to 5 degree.

Additionally I built in some Door/ window sensors which will turn off smart thermostat and keeps it off for x minutes but that’s just on the side.

One issue I have with this, it doesn’t consider the radiator potentially still very hot before opening the valve again. the nature of radiators is that they are slow. It would be great there to make some kind of calculation whenever the valve is open for x minutes, don’t turn on again for x minutes. With some kind of factor what can be set.

E.g. when my radiator valve was open for 3 minutes then I know it’s pretty hot and doesent need to open again within the next 12 minutes. Factor would be 4.

Additionally in the parameters instead of On/Off trigger, add something like “heating temperature” which would be equivalent to my 26 degrees I set on my valve and valve closed temperature which would be my 5 degrees.

Whenever it would be on it would set climate control to set point 26, whenever off it would set it to 5.

Altenratively I think a temp sensor on the radiator itself can be mounted to determine if the valve should be opened again or not, but I do not have any sensor like this yet.

I hope this made sense, any other quest

ScratMan commented 1 year ago

Hello, by setting pwm: 0 in your YAML and setting the valve entity as heater entity, the thermostat will use the raw 0/100% value from the PID output and write it directly to the valve, so no more need for a switch helper. You may use a group to group valves as a single entity.

Hax1337 commented 1 year ago

Ok, basically the heater will be set to 0-100?

the valve has only values from 5-30 I believe. And is of type climate

Chupaka commented 8 months ago

You can use automation like this:

trigger:
  - platform: state
    entity_id:
      - climate.your_smart_thermostat
    attribute: control_output
variables:
  temp_min: 5
  temp_max: 30
  target_temperature: >-
    {{ trigger.to_state.attributes.control_output / 100 * (temp_max - temp_min) + temp_min }}
action:
  - service: climate.set_temperature
    data:
      temperature: "{{ target_temperature }}"
    target:
      entity_id: climate.your_radiator_entity

@ScratMan probably it worth closing some old issues which are not issues anymore?..