Beta for Hysen thermostats powered by broadlink

Guys, I have a newbie question. Could somebody explain to me what exactly the auto mode is? I don’t understand this “start” and “temp” variables for all the days. My understanding is that week_period1…week_period6 and weekend_period1…weekend_period2 are for Mon-Sat and Sat-Sun days respectively. But what the “start” and “temp” mean here? E.g. do the following settings
‘week_period1_start’:‘06:30’,
‘week_period1_temp’:‘20.5’,
‘week_period2_start’:‘09:00’,
‘week_period2_temp’:‘17.0’,
‘week_period3_start’:‘13:00’,
‘week_period3_temp’:‘17.0’,

mean that on Monday at 6:30AM a thermostat is set to 20.5C and it keeps this temperature until Tuesday 9:00AM when it’s set to 17 deg. C, so then it keeps this temp until Wednesday 1:00PM then sets it to 17 degC keeps it till next day and so on?

If so, in my case it’s quite useless. I’d rather like to set a “day” temperature to e.g. 23 deg C, then change it for a night to e.g. 20 deg C. And only these settings for a whole week.
Is it possible to do such a thing?

@awr001c,
Depending on how you have set the schedule/loop mode, but assuming you have it Mon-Fri, Sat_Sun
week_period1_start’:‘06:30’,
‘week_period1_temp’:‘20.5’,
‘week_period2_start’:‘09:00’,
‘week_period2_temp’:‘17.0’,
‘week_period3_start’:‘13:00’,
‘week_period3_temp’:‘26.0’,
means at 6:30 set the temp @ 20.5, until 9:00 then set it to 19, then at 13:00 set it to 26 etc. 4 periods in the day, repeat this for Mon-Fri. Sat-Sun are the weekend periods

Mark

Thanks Mark, now I got it. Setting the loop_mode = 2, it means that in order to set only day and night temperature for all 7 days, I need only these settings:
week_period1_start’:‘08:00’,
‘week_period1_temp’:‘23.0’,
‘week_period2_start’:‘22:00’,
‘week_period2_temp’:‘19.0’,

Wojtek

and of course the same settings for weekend_period…
Wojtek

Yep and then set period 3/4/5/6 to 22:00 19.0 so they have no effect

Mark, many thanks once again. I checked, and it seems to work. I have one more question about Power on memory (POn) setting. What is this for? I didn’t find the explanation in the manual and have no idea when it should be changed.

I’m not sure if this is the right topic to ask the following question, but maybe some of you already implemented what I’d like to have. I’m completely new to the HA/yaml/automation. I’m preparing this thermostat thing for my father-in-law, so he could remotely steer the heating. He’s in his 70’s and I don’t think he’d be comfortable with running things in the other way then sliders and buttons. So my question is: did you try to implement a time schedule in a form of sliders/input fields then upload all the settings from the card using one simple button?
I mean, is it possible to set the whole schedule on the UI card, then once it’s done, upload all the settings to the thermostat (instead of calling the service from the menu)? If so, could somebody share the code with me?

Wojtek

Sorry I don’t know of any card to control the schedule, but if you find one let me know :slight_smile: I tend to set the one schedule and then override it if needed. For example I set 4 temps throughout the day and if I think its too cold I use Alexa to set the temp higher/lower “alexa make it warmer” and this then gets reset back to schedule at the next time period.

Thanks Mark. What about the power on memory setting? Do you know what is it used for?

so it just makes sure after a power loss it keeps the settings and does not reset
M

@mark.carter @mairas
Hi, I have BEOK 313 thermostat . Can someone please tell me what do I have to do with initial set up please?

does the below instructions are valid?. I have read several threads and I am still not sure what is the correct path to follow

““You need to create a folder named custom_components in config.
In the custom_components folder, create a folder named hysenheating.
In the hysenheating folder, put the files from:
https://github.com/uspass/hysenheating/tree/master/config/custom_components/hysenheating 9 .
In config folder put the file (climate.yaml) from:
https://github.com/uspass/hysenheating/blob/5665e6c47006df2d2f0190e676c99c57757047a7/config/climate.yaml 6 .
Adapt this file to your needs (Name, IP, Mac address).
Add to configuration.yaml the following line:
climate: !include climate.yaml
Restart system.””

Hi
I’m trying to control a Floureon thermostat and I followed the info above. I read this in the log file: “ERROR (SyncWorker_1) [homeassistant.loader] Error parsing manifest.json file at /config/custom_components/hysenheating/manifest.json: Expecting value: line 7 column 1 (char 6)”.
Can you help me please?
Thanks

Anyone can confirm it works with Version 0.100.x ??
And what about official integration in HA?
thanks

I got my thermostat (BEOK BOT306RF-WIFI) in the mail yesterday and all is working well with the Hysen component on Home Assistant 0.101.2. Made 2 little changes (posted the issues on github) and have this POC of functionality working:


Since I only installed HA yesterday, I’m still learning about lovelace & home assistant, but what you see is working. Getting the schedule state from the thermostat, putting it in the input_number & input_datetime states and then sending it back to the thermostat via the hysen_set_schedule service.

Hi Fox, can you please share your thermostat card (with schedule) configuration?

Hi Fox, tried on my installation but it doesn’t work:

the current temprature is on 0 and the thermostat doesn’t report.

Hi,
I have a BEOK313-WiFi thermostat. I was able to remotely change the schedule and some advanced settings like: min_temp and loop_mode and roomtemp_offset.
Then I turned off the thermostat and both of them remained changed. Then I turned it on and off and the settings were still properly set. However, after another turning it on, all the advanced settings were reset to the default values: min_temp to 5st C, loop_mode and roomtemp_offset to 0 but a schedule remained changed. Has anybody noticed such behavior? Should I change any other settings to make the changes permanent? Here’s my all settings:

hvac_modes: off,heat,auto
current_temperature: 19.5
min_temp: 5
max_temp: 35
target_temp_step: 0.5
temperature: 5
sfw_version: 2.0.1
power_state: 0
away_mode: false
sensor_mode: 0
room_temp: 19.5
external_temp: 0
heating_active: 0
auto_override: 0
external_sensor_temprange: 42
deadzone_sensor_temprange: 1
loop_mode: 0
roomtemp_offset: 0
anti_freeze_function: 1
poweron_mem: 1
remote_lock: 0
clock_hour: 17
clock_min: 32
clock_sec: 33
day_of_week: 2
week_day: [{'start_hour': 7, 'start_minute': 0, 'temp': 21.0}, {'start_hour': 22, 'start_minute': 0, 'temp': 18.0}, {'start_hour': 22, 'start_minute': 0, 'temp': 18.0}, {'start_hour': 22, 'start_minute': 0, 'temp': 18.0}, {'start_hour': 22, 'start_minute': 0, 'temp': 18.0}, {'start_hour': 22, 'start_minute': 0, 'temp': 18.0}]
week_end: [{'start_hour': 7, 'start_minute': 0, 'temp': 21.0}, {'start_hour': 22, 'start_minute': 0, 'temp': 18.0}]
friendly_name: Termostat
supported_features: 1

How do you do it?

Same as awr001c:
Please, Hi Fox, can you please share your thermostat card (with schedule) configuration?

Yeah, sure; was abroad for a while and mail notifications are turned off :wink:

DISCLAIMER: I don’t proviced support since I’m not on this forum alot. This requires you to edit the hysen component, so it’ll probably break if the hysen component is updated (unless my issues on github are merged)!

So, for starters:

  1. You need to modify the hysen component as stated in the 2 issues I posted on github:
    22 -> for the automation
    21 -> Better solution for the state + HVAC_MODE is used by the simple thermostat card
    (As new user I can only add 2 hyperlinks in 1 post, so sorry for not linking to the issues directly)

  2. I’m using the Simple thermostat card

  3. You’ll need to define some inputs in your HA configuration.yaml:
    –datetime for the periods
    input_datetime.week_period1_start
    input_datetime.week_period2_start
    input_datetime.week_period3_start
    input_datetime.week_period4_start
    input_datetime.week_period5_start
    input_datetime.week_period6_start
    input_datetime.weekend_period1_start
    input_datetime.weekend_period2_start
    –numbers for the temps
    input_number.week_period1_temp
    input_number.week_period2_temp
    input_number.week_period3_temp
    input_number.week_period4_temp
    input_number.week_period5_temp
    input_number.week_period6_temp
    input_number.weekend_period1_temp
    input_number.weekend_period2_temp
    –boolean for the toggle switch + I have an automation that gets the current value from the thermostat into the inputs when this boolean changes state
    input_boolean.schedule_control

Once you got that up and running, just add the simple thermostat card and the schedule card:

cards:
      - control:
          _names: false
        entity: climate.main_thermostat
        hide:
          state: true
        icon:
          heating: 'mdi:radiator'
          idle: 'mdi:radiator-disabled'
        name: Thermostat
        sensors:
          - entity: sensor.main_thermostat_auto_override
            name: Auto_Override
        step_size: 0.5
        type: 'custom:simple-thermostat'
      - cards:
          - entities:
              - entity: input_boolean.schedule_control
                icon: 'mdi:calendar-clock'
            type: entities
          - card:
              cards:
                - cards:
                    - entities:
                        - entity: input_datetime.week_period1_start
                          name: 'week1'
                        - entity: input_datetime.week_period2_start
                          name: 'week2'
                        - entity: input_datetime.week_period3_start
                          name: 'week3'
                        - entity: input_datetime.week_period4_start
                          name: 'week4'
                        - entity: input_datetime.week_period5_start
                          name: 'week5'
                        - entity: input_datetime.week_period6_start
                          name: 'week6'
                        - entity: input_datetime.weekend_period1_start
                          name: 'weekend1'
                        - entity: input_datetime.weekend_period2_start
                          name: 'weekend2'
                      type: entities
                    - entities:
                        - entity: input_number.week_period1_temp
                          icon: 'mdi:home-thermometer-outline'
                          name: ' '
                        - entity: input_number.week_period2_temp
                          icon: 'mdi:home-thermometer-outline'
                          name: ' '
                        - entity: input_number.week_period3_temp
                          icon: 'mdi:home-thermometer-outline'
                          name: ' '
                        - entity: input_number.week_period4_temp
                          icon: 'mdi:home-thermometer-outline'
                          name: ' '
                        - entity: input_number.week_period5_temp
                          icon: 'mdi:home-thermometer-outline'
                          name: ' '
                        - entity: input_number.week_period6_temp
                          icon: 'mdi:home-thermometer-outline'
                          name: ' '
                        - entity: input_number.weekend_period1_temp
                          icon: 'mdi:home-thermometer-outline'
                          name: ' '
                        - entity: input_number.weekend_period2_temp
                          icon: 'mdi:home-thermometer-outline'
                          name: ' '
                      type: entities
                  type: horizontal-stack
                - entity: climate.main_thermostat
                  name: Send Schedule
                  show_icon: false
                  show_name: true
                  tap_action:
                    action: call-service
                    service: script.set_thermostat_schedule
                  type: entity-button
              type: vertical-stack
            conditions:
              - entity: input_boolean.schedule_control
                state: 'on'
            type: conditional
        type: vertical-stack

And the automation:

- id: aut_thermostat_schedule
  alias: aut_thermostat_schedule
  trigger:
  - entity_id: input_boolean.schedule_control
    platform: state
  condition:
  action:
  - data_template:
      entity_id: input_number.week_period1_temp
      value: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[0][''temp'']
        }}'
    service: input_number.set_value
  - data_template:
      entity_id: input_number.week_period2_temp
      value: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[1][''temp'']
        }}'
    service: input_number.set_value
  - data_template:
      entity_id: input_number.week_period3_temp
      value: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[2][''temp'']
        }}'
    service: input_number.set_value
  - data_template:
      entity_id: input_number.week_period4_temp
      value: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[3][''temp'']
        }}'
    service: input_number.set_value
  - data_template:
      entity_id: input_number.week_period5_temp
      value: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[4][''temp'']
        }}'
    service: input_number.set_value
  - data_template:
      entity_id: input_number.week_period6_temp
      value: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[5][''temp'']
        }}'
    service: input_number.set_value
  - data_template:
      entity_id: input_number.weekend_period1_temp
      value: '{{ (state_attr(''climate.main_thermostat'', ''week_end'')|from_json)[0][''temp'']
        }}'
    service: input_number.set_value
  - data_template:
      entity_id: input_number.weekend_period2_temp
      value: '{{ (state_attr(''climate.main_thermostat'', ''week_end'')|from_json)[1][''temp'']
        }}'
    service: input_number.set_value
  - data_template:
      entity_id: input_datetime.week_period1_start
      time: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[0][''start_hour'']
        }}:{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[0][''start_minute'']
        }}:00'
    service: input_datetime.set_datetime
  - data_template:
      entity_id: input_datetime.week_period2_start
      time: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[1][''start_hour'']
        }}:{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[1][''start_minute'']
        }}:00'
    service: input_datetime.set_datetime
  - data_template:
      entity_id: input_datetime.week_period3_start
      time: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[2][''start_hour'']
        }}:{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[2][''start_minute'']
        }}:00'
    service: input_datetime.set_datetime
  - data_template:
      entity_id: input_datetime.week_period4_start
      time: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[3][''start_hour'']
        }}:{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[3][''start_minute'']
        }}:00'
    service: input_datetime.set_datetime
  - data_template:
      entity_id: input_datetime.week_period5_start
      time: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[4][''start_hour'']
        }}:{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[4][''start_minute'']
        }}:00'
    service: input_datetime.set_datetime
  - data_template:
      entity_id: input_datetime.week_period6_start
      time: '{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[5][''start_hour'']
        }}:{{ (state_attr(''climate.main_thermostat'', ''week_day'')|from_json)[5][''start_minute'']
        }}:00'
    service: input_datetime.set_datetime
  - data_template:
      entity_id: input_datetime.weekend_period1_start
      time: '{{ (state_attr(''climate.main_thermostat'', ''week_end'')|from_json)[0][''start_hour'']
        }}:{{ (state_attr(''climate.main_thermostat'', ''week_end'')|from_json)[0][''start_minute'']
        }}:00'
    service: input_datetime.set_datetime
  - data_template:
      entity_id: input_datetime.weekend_period2_start
      time: '{{ (state_attr(''climate.main_thermostat'', ''week_end'')|from_json)[1][''start_hour'']
        }}:{{ (state_attr(''climate.main_thermostat'', ''week_end'')|from_json)[1][''start_minute'']
        }}:00'
    service: input_datetime.set_datetime
1 Like

thanks Fox !!.
I got to point 2.
Point 3 I don’t know how to do it, can you help me?
Thanks, Alberto