Beta for Hysen thermostats powered by broadlink

btw, I’m running 0.89.2

@Raasu2
The configuration should have, as stated in climate.yaml:

climate:
  - platform: hysenheating
    name: Bathroom
    host: 192.168.07.44
    mac: '75:1a:xx:yy:zz:ww'
    timeout: 10
    scan_interval: 10

No:

target_temp_default,
update_timeout
target_temp_step

Those are from another movie :slight_smile:

Cheers,
us

Seems to be working well. Thank you!
Some things seem different though, had to modify some sensors in HA.
Sensor_mode attribute is now just sensor. Also the room_temp attribute seems to be just temperature now (the internal sensor)?

@Raasu2
Temperature is sensor mode dependent.
For example, if you use the internal sensor or internal sensor control with external sensor limit, temperature reflects the internal sensor measured temperature. If you use external sensor, temperature reflects the external sensor.
It is exactly as in the phone application.
On the other hand, we need to have temperature called “temperature” in order to have a proper graphic representation of the thermostat in lovelace or classic HA
Cheers,
us

Temperature is sensor mode dependent yes, but, you have 3 different attributes for temperature that i see availabe in HA.

Im using the device in external sensor mode.

temperature - displays a different reading then the others so im guessing the internal sensor reading ??
external temperature - displays external sensor reading
current_temperature - displays the temperature depending on sensor mode (reading is same as external_temp)

When i look at climate.py i don’t see that the attribute “temperature” would reflect the internal senor. I dont see an attribute for internal sensor at all. There is one mention of room_temp, in the “def current_temp” but it is not defined as an attribute itself.

How can i get the internal senor reading when i’m in external sensor mode?

@Raasu2

Let’s start from scratch, assuming you don’t know anything about how the thermostat works.
I’m sorry if I will say things that you already know, but I want to clear up things.
There are 3 working configurations:

  1. Internal sensor
    In this mode the thermostat doesn’t take in consideration the external sensor (if exists).
    Thus, the external_temp is irrelevant.
    current_temperature = room_temp, that is, the temperature read by the internal sensor (that small black component, one can see through the hole at the bottom of the thermostat)
    target_temperature is the temperature you set in manual mode or taken from the schedule in auto mode
    The thermostat tries to bring the current_temperature = room_temp to the target_temperature (taking into account the hysteresis).
    That means, it opens the valve until it gets there and then closes the valve.
  2. External sensor
    In this mode the thermostat doesn’t take in consideration the internal sensor.
    Thus, the room_temp is irrelevant.
    current_temperature = external_temp, that is, the temperature read by the external sensor (the sensor situated outside the thermostat and linked to the connector found at the back of the thermostat)
    target_temperature is the temperature you set in manual mode or taken from the schedule in auto mode
    The thermostat tries to bring the current_temperature = external_temp to the target_temperature (taking into account the hysteresis).
    That means, it opens the valve until it gets there and then closes the valve.
    Independently, if the current_temperature = external_temp reaches the external_limit_temp it closes the valve, no matter what.
  3. Internal sensor control with external sensor limit
    This is a little bit tricky. The Chinese doc. is rubbish but eventually I understood how it works.
    current_temperature = room_temp, that is, the temperature read by the internal sensor.
    Exactly like the internal sensor mode.
    target_temperature is the temperature you set in manual mode or taken from the schedule in auto mode
    The thermostat tries to bring the current_temperature = room_temp to the target_temperature (taking into account the hysteresis).
    That means, it opens the valve until it gets there and then closes the valve.
    But:
    Independently, if the external_temp reaches the external_limit_temp it closes the valve, no matter what.

That’s it.
There is another thing you need to know.
In any sensor configuration, if you are in auto mode (where the target_temperature is taken from the schedule), you may temporarily manually change the target_temperature. A blinking hand might be seen on thermostat’s display.
Changing the mode back to auto changes back the target_temperature to the scheduled one.
Pressing again to get to manual mode (NOT temporary manual) changes the target_temperature to what it was set in manual mode (NOT temporary manual).

If there is something I have not been clear enough, I will be more than happy to help.

Cheers,
us

PS. temperature is the display name HA gives to current_temperature. That is, internally uses current_temperature and exposes temperature.

This is great, thank you for taking the time to explain this in detail.

But, still how do you get the internal temperatuse value as a sensor to HA when using thermostat in external sensor mode. This is just to know what the temperature in the room is. I don’t want to regulate the room temp (internal sensor) using the thermostat, i regulate the floor temp (external sensor), but i do want to return the room temp as a sensor value in HA.

Both external_temp and current temp return te external sensor value (as you explain). How do i get the internal sensor value or the room_temp value, while in external senor mode.

When using mairas/hysen component i could just return the value using room_temp attribute.

@Raasu2

In climate.py,

at line 538, insert the following line (Make sure to keep the alignment with the following lines):

            ATTR_ROOM_TEMP: float(self._hysen_device.room_temp),

at line 217, insert the following line:

ATTR_ROOM_TEMP = ‘room_temp’

Restart HA. You’re good to go.

You’re right, it myght be usefull. I will make the changes in github.

Cheers,
us

I saw you updated the climate.py file, but for me the room_temp attribute is not showing up. (i added the new file to my HA, did not add the lines myself)

Where do you look for room_temp?
You should see it in Developer Tools, states, climate.whatever_name_you_have_given

Yes, i’m looking in dev tools - states.

@Raasu2
Did you restart HA after replacing climate.py?

Thank you @uss! Problem was on my side, something went wrong while replacing the file. deleted and readded the file + restart fixed it.

Thank you @uss for pointing me in the direction of this.

I have 1 small snag, randomly the thermostat seems to get a call from homeassistant and lights up, this is a problem for my wife as the thermostat is located in the bedroom and she’s a light sleeper.

Any idea’s how to prevent it doing this?

Thanks

I do.
Please comment (put a # in front of each line) the last 8 lines in climate.py, starting with:

        _weekday = int(dt_util.as_local(dt_util.now()).strftime('%w'))

like this:

#            _weekday = int(dt_util.as_local(dt_util.now()).strftime('%w'))
#            if self._device_available:
#                if _weekday == 0:
#                    _weekday = 7
#                if (self._hysen_device.clock_weekday != _weekday) or \
#                   (self._hysen_device.clock_hour != int(dt_util.as_local(dt_util.now()).strftime('%H'))) or \
#                   (self._hysen_device.clock_min != int(dt_util.as_local(dt_util.now()).strftime('%M'))):
#                    await self.async_set_time_now()

reboot Home Assistant and you’ll be fine.

Those lines auto sync the device’s clock.

Cheers,
us

Thank you @uss that’s a great help.

HI Guys. I’m struggilng to get running FLOUREON FL-TH-012. The device is exactly like below

I’m using custom component hysen together with Raspbian installation. The configuration is below
climate:
- platform: hysenheating
name: Pastuszkowy
host: 192.168.0.66
mac: ‘84:0D:8E:94:XX:XX’
timeout: 10
scan_interval: 10

New entity is visible in states view - but it is still unavailable. I connected it to my wifi by “weback” application - so the thermostat is accessible via Chinese servers but in logs I can see authentication error each time the component wants to update :(((

Question is - is this thermostat working with hysen ?? or this is not the way??
Any comments and help is welcome.

Try to restart the Home assistant.
Can you please check the log?

Cheers,
us

Hi guys,
everything worked extremly well here until I updated to 0.92 in hass.io

I have the newest climate.py in custom_components/hysen/climate.py
When adding:

climate:

  • platform: hysen
    devices:
    main_thermostat:
    name: Fussbodenheizung
    host: 192.168.0.xx
    mac: “34:ea:34:9f:xx:xx”

to my config and I click “Check configuration” I now get:
Integration hysen not found when trying to verify its climate platform.

I can’t make heads and tails of that as everything worked extremly well before. What am I missing?

Thanks!