vincentwolsink / home_assistant_micronova_agua_iot

Home Assistant integration controlling heating devices connected via the Agua IOT platform of Micronova
Apache License 2.0
25 stars 15 forks source link

How do you schedule ? #41

Open marc-cizeron opened 11 months ago

marc-cizeron commented 11 months ago

Hi,

I wonder how do you schedule the heating with your stove and home hassistant ?

Before the v0.2.0-beta6 version, Here's how I do it:

First, i extract the swith to on/off the stove :

- platform: template
  switches:
    stove_heater:
      value_template: "{{ is_state('climate.poele', 'heat') }}"
      turn_on:
        service: climate.turn_on
        target:
          entity_id: climate.poele
      turn_off:
        service: climate.turn_off
        target:
          entity_id: climate.poele

Then, with the switche i use the Home Assistant's Generic Thermostat (https://www.home-assistant.io/integrations/generic_thermostat/) :

- platform: generic_thermostat
  name: JM Poêl
  heater: switch.stove_heater
  #  target_sensor: sensor.ts0201_i_temperature
  target_sensor: sensor.temperature_moyenne
  ac_mode: false
  min_temp: 15
  max_temp: 26
  cold_tolerance: 0.5
  hot_tolerance: 1
  precision: 0.1
  min_cycle_duration:
    minutes: 10
  home_temp: 20.0
  sleep_temp: 17.0
  activity_temp: 19.0
  comfort_temp: 21.0
  away_temp: 17.0
  target_temp_step: 0.5
  initial_hvac_mode: heat

And finally I use the Scheduler integration for HA (https://community.home-assistant.io/t/scheduler-card-custom-component/217458) to make schedule. For exemple on monday morning set the temperature to 21°C at 6 am.

I try to use disable the generic climate and use the one from the integration and enable the standby mode, but It seems that this mode only stops the stove. So if at 6 am the temp >= 21°C, the stove is startup because of the scedule. It wasn't the case with the generic thermostat.

My question is : How do you manage the planning? Is there any misunderstanding from me?

vincentwolsink commented 10 months ago

Hi @marc-cizeron, I personally do not use scheduling. But the climate entity of your stove shouldn’t have changed between v0.1.8 and the beta version. So the way you were doing it should still be fine?

If you want to use the climate entity from this plugin directly, you need to add some conditions on the temperature in the scheduler component. Unfortunately most stoves just start up even though the desired temperature is equal or below the actual temperature, and then go into power saving or eco mode. Since we cannot change this behaviour, wrapping the climate entity into a generic thermostat is actually quite a nice solution.

marc-cizeron commented 10 months ago

Yes, original behavior is good. With the generic thermostat, it is a little bit better, with more granularity in the setup. But be carrelfull, you can and up in to many start and stop. It is not good for the stove.

Is it possible to get a switch to turn on or off the stove without using the climate provided by the plugin ? For another version, think it's not the priority :)

jipem01 commented 10 months ago

I've plan to do it (as other additional functionnalities found on my nobis stove and probably available with other brands) but i'm waiting my last pr to be accepted (or rejected) to start on good base.

vincentwolsink commented 10 months ago

I don't think we should add separate buttons for turning on/off the stove. This is not how HA envisions things to be done, and also will clutter the integration with entries doing the same thing but for specific use cases.

Actually the way you have done it @marc-cizeron with a template is the way to go.

marc-cizeron commented 10 months ago

@vincentwolsink I see your point.

If it is the right way of thinking, may be I can write a little documentation about this ? Something like "tips and tricks or "go further". It can take place in the ReadMe file or in the wiki section of this project ?

vincentwolsink commented 10 months ago

@marc-cizeron You are very welcome to do so! I think creating a wiki page would be best, we can link to the wiki from the readme 🙂

merlino1975 commented 9 months ago

@vincentwolsink I would like to integrate this post with my necessity. ( i've a unica nobis fire stove)

I would like to schedule a routine:

thankss!!

jipem01 commented 9 months ago

From my side i do like this :   - I've created and input_select (for exemple heating_main_room) with different heating modes :   - Normal   - Eco  - Night     - Etc.. 

Then I use the scheduler integration and scheduler card to define heating_main_room value depending on time frame / day.

Then I use an automation listening to heating_main_room changes to set stove mode / target temperature depending on value of heating_main_room.

Additionnaly but not mandatory I've created input_numbers for each mode to set target temperatures without touching the automation : Eg heating_main_room_normal heating_main_room_eco...

And next step will be not to define time frames only on as fixed planning (that already gives more possibility than stove internal scheduling), but define heating mode depending on each family member planning and presence...(But i have to control my electric heating before with HA, otherwise they will start to heat as backup... economicaly better to use the stove!)

Additionally, as you use a Nobis Unica (as me) could you try the last beta? We've made improvements with Vincent to handle hybrid stoves correctly.

jipem01 commented 9 months ago

Additionnaly, i let the stove internal logic handle ris and eco stop (poinr 2 to 4 in your message). It work correctly so no need to add complexity.

merlino1975 commented 9 months ago

From my side i do like this :   - I've created and input_select (for exemple heating_main_room) with different heating modes :   - Normal   - Eco  - Night     - Etc..  Then I use the scheduler integration and scheduler card to define heating_main_room value depending on time frame / day. Then I use an automation listening to heating_main_room changes to set stove mode / target temperature depending on value of heating_main_room. Additionnaly but not mandatory I've created input_numbers for each mode to set target temperatures without touching the automation : Eg heating_main_room_normal heating_main_room_eco... And next step will be not to define time frames only on as fixed planning (that already gives more possibility than stove internal scheduling), but define heating mode depending on each family member planning and presence...(But i have to control my electric heating before with HA, otherwise they will start to heat as backup... economicaly better to use the stove!) Additionally, as you use a Nobis Unica (as me) could you try the last beta? We've made improvements with Vincent to handle hybrid stoves correctly.

I'm sorry, jipem, you are way ahead of me. additionally... is not what i want to do.... you try to understand that: I dont' want the stove stop when the target is archieved.. i want the stove go in modulation...and only after the second target is archieved then stove off... undertand? The function called "confort" work different.... went the targhet is archieved then stove off...and start when the eviroment temp. is down of 3 or 4 grade.. (It depends on how you set it) If it were possible to write in Italian perhaps I could explain it to you better

jipem01 commented 9 months ago

Understood.

I advice you to still use scheduler integration & card for on/off timeframe (as i explain previously, but only with "on" and "off" mode, not eco night etc...).

Unfortunately, you will not  be able to force modulation via HA. You can only set target temperature and the internal stove logic will go in modulation when reached.

One workaround could be to set power to minimum available, but with your unica hybrid stove, it will not work in wood mode. By using internal logic it will go in RIS mode (lower air intake reducing combustion...).

For setting the stove off when it reach 22°, you'll need create an automation that listen changes on current temp attribute of your stove climate entity, and set the stove off if the stove mode (from scheduler) is on and temp is above 22. It will only work in pellet mode. In wood it will not work or at least it will wait until fire stop (all wood burned) and cooling enough before going off.

You'll need a second similar automation, that set the stove on if temperature is under 18.5° and the stove mode (from scheduler) is on.

If you want reduce power via HA when 20.5° is reached, you'll need a third similar automation that set lower power when temp is between 20.5 and 22°, and the stove mode from scheduler is on.

merlino1975 commented 9 months ago

Optimal.

That's more or less what I had in mind to do... regarding the use of wood it is not important because I usually run the stove with wood when I am at home at the weekend to enjoy the flame and the comfort of wood

the routines you described are excellent, I could also use the temperature sensor of an external sensor, if desired, from Broadlink which is already present as an entity in Home Assistant.

The big problem is that all these ideas: both yours and mine... well... I'm not capable of implementing them... I managed to install the stove and its entities in home assistant and I can turn it on via command on the dashboard, but I have no idea how to build the routines. if I have to modify the yaml file and how or if I have to do something else.

jipem01 commented 9 months ago

You can do all with graphic editor :

First create the input_select by going to integration and devices. Then select the "inputs" (down right, the fourth icon...).Then install scheduler integration and scheduler card via HACS (easy).

Then create automations (parameters -> autoations and scripts). It should be possible to do it also totally with the interface.

Then you will be able to modify things in yaml code mode from gui if you want more complex rules (using templating). But it should not be required at the begining.

If you're stuck i'ill try to post screenshot of my config.

merlino1975 commented 9 months ago

you could help me with an example..or help..where is the editor graphic? there is a video?...I don't find I'm blocked...! sorry