Yeah, sure; was abroad for a while and mail notifications are turned off
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:
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)
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:
Hi fox,
I tried to insert the code in a card but it doesn’t work.
I inserted a card thermostat and in that I see the circle with ok temperatures and it works if I change the temperatures.
But the card you attached can’t get it to work despite having added all the changes.
Can you tell me something more?
Good evening,
I just can’t replicate the Fox card and I can’t understand why.
I added a card and I simply pasted the code and the card shows only the part of the thermostat ignoring everything else:
ERROR (MainThread) [custom_components.hysen.climate] Failed to connect to Broadlink Hysen device MAC:XX:XX:XX:XX:XX:XX, IP:192.168.150.41, Error:timed out
The thermostat at the moment is bound to the Thermostat App and connected to the local WiFi. I could not follow the instructions for manually setting the IP as depicted in https://github.com/mairas/hysen since the thermostat has different buttons that the ones described (e.g. there is no “Time” button).
I performed a portscan to the thermostat as well as other devices within the same WiFi network to determine that the router/access point is not blocking any ports. I found that the thermostat at the IP bound to the network has no inbound ports active, thus the HA plugin (which works at port 80) cannot connect and times out.
Do you have any recommendations how I can make it work with HA and forget about the horrible temp app?
After performing packet capture and analyzing, I have determined that the hysen HA component is incompatible with this thermostat (Hysen HY08-1).
Instead, the tuya HA integration (https://www.home-assistant.io/integrations/tuya/) runs perfectly. Use the Tuya Smart app (available at Google Play Store) instead of Smart RM app to register the device within WiFi and the Tuya IoT platform and use the credentials to setup the tuya HA integration!
hello I have HY08 that seems to be incompatible with this component in fact it doesnt use Smart RM but instead it uses smart Heating app and it seems that it is not compatible with tuya either any ideas how to make it work with HA?
Have you defined the input_boolean.term1_schedule_control?
Because it’s a conditional card based on that boolean input to show/hide it. I’m not a HA-expert so I don’t know if it’ll work without it, but that’s one of the things you didn’t mention
I haven’t really been following this discussion too closely; sorry about that. And kudos to Mark Carter and others for providing great support and updating the component as needed. I recently switched my own installation from a manual one to Hass.io. I wasn’t totally comfortable dragging the old custom component to that world because I think it’s a bit finicky and I don’t want to create a tight dependency between that and the Hass.io HA installation. Instead, I rewrote the Hysen component into a separate MQTT gateway that can be run as a Docker container of its own. In other words, a separate Hass.io add-on. This should help in providing greater resilience either way: there is no tight coupling between HA and the hysen libraries. If HA APIs are updated, the gateway still works, and if the gateway decides to no longer work, it won’t take all of HA down with it.
I’ve run my own two-device installation for a few days with the new gateway and it seems to work well enough for my purposes. I’d appreciate if any courageous people would be willing to give it a spin: https://github.com/mairas/hysen-mqtt
@mairas lol I wish you had said, the first component I wrote for this was a docker plugin to hassio, and could have given you that one. I ditched that because at the time home assistant did not support some of the functions I wanted out of the box with the generic component. I have to say I’m moving away from these thermostats and building my own mqtt based ones per room based on either esp32/8266 or ardunio. I cant stand the hystisis range on them, I find the room either to hot or to cold on the 1.5 degree swings
I suppose you’re not using external temperature sensors? Their use is hard-coded in the codebase at the moment. I can easily add a configuration variable for switching all thermostats between reporting the internal or external temperature. If you’d rather have that configured for individual devices, that’d require a bit more thought. What say you?
Heh, great minds think alike. And mine is hobbling somewhere behind. Oh well, it’s done now.
I share your distaste with these sensors. In addition to the high hysteresis, they’re insecure, the manufacturer app is iffy, and the existing Python integration modules are not so great. I’m not keen on DIYing on permanent electrical installations in our house, though.
I think I’ve found a solution: check out the Beca thermostats (or any other similar); they’re based on ESP8266 and there’s already open source firmware available for them: https://github.com/klausahrenberg/WThermostatBeca
After update Home Assistant (Hassio) from 0.107.5 to 0.107.6 in log happens the next error:
Logger: custom_components.hysen.climate
Source: custom_components/hysen/climate.py:891
Failed to get Data from Broadlink Hysen Device:climate.main_thermostat,:No module named ‘PyCRC’
same problem here:
ERROR (SyncWorker_38) [custom_components.hysen.climate] Failed to get Data from Broadlink Hysen Device:climate.main_thermostat,:No module named ‘PyCRC’