Beta for Hysen thermostats powered by broadlink

Thank you Mark, this forum is so reactive, such a pleasure.

@nek1970, PM me your config.yaml to take a look.
Difficult for me to test multiple thermostats as I only have one at present

Mark, do you think your script can work well with a wifi air conditioner? I have a model Innova 2.0 wifi included. It is based on esp01. I tried to configure it but it does not work. Do you think you can make some changes to your script?

I confirm it goes well with 0.89.1.
Thanks mark for your work.
Do you think one day this module could be integrated as official HA component?

@nek1970, can’t see anything obviously wrong in your config. with the sensors have you tried it inside your config.yaml instead of external? are you getting any errors when you add the second thermostat? on your first for the entityid I would suggest using _ for the name like Termostato_Fondital_S_Reparata just in case this is causing any issues?

@isodal, thanks for confirming. As to getting this into the official build I wanted to get most of the bugs out first, and I’m not in a position yet to do that for example I only have one thermostat so I am relying on others to test multiples. Also there is another hysen component that has been submitted for including in the HA, but not seen it yet in there Wifi thermostat (Beok, Floureon, Beca Energy) component

All, anyone else of .89.1, can you confirm the call service button is not working?

Ok just me I think, just no flash banner saying service is being called anymore

My is working correctly

( e r a s e d )

I solved. It was a syntax error. 1 space instead of 2

Mark, do you think your script can work well with a wifi air conditioner? I have a model Innova 2.0 wifi included. It is based on esp01. I tried to configure it but it does not work. Do you think you can make some changes to your script?

@Toto, its very hard to code for you thermostat as I don’t have one of those Beok TDS23WIFI-AC , first thing try setting it up with this code and see if it finds it

@nek1970, again its hard to say, but I doubt this code will work on that device based on esp01, its probably a whole different protocol than the broadlink thermostats

Hello Mark,

Thanks for caring. it seems that your module seem to see something but parameters might be incorrectly applied.

I went back to a lower level programming, I’ve installed raspberry pi and python 2.7 in a virtual machine to be in the conditions of this tutorial:


but I end up with this situation:

Later, I’ve tried those commands under python

import broadlink

set this variables

strHost = ‘xxx.xxx.xxx.xxx#ip device
strMac = ‘xx:xx:xx:xx:xx:xx:’ #mac device

other stuff:

strType = ‘0x4ead’ #HYSEN THERMOSTAT TYPE

#convert mac string
macbytes = bytearray.fromhex(strMac.replace(’:’,’’))

#get the broadlink hysen device
device = broadlink.hysen((strHost,80),macbytes,strType)

get auth for futher comunications

device.auth()

#from now you can talk with the device, for example read the complete status :
data = device.get_full_status()

But the closest parameter “auto” that shows up , does not seem to change when manually selecting the auto mode on the thermostat itself.

since at the end, I want something robust and home assistant still undergoes some important change (still version 0.XX instead of 1.XX) , I preferred a hard solution with a sonoff under tasmotat + rule and the use of gpio3 as switch, I’m waiting some 220V AC to 3.3V DC converter from aliexpress to validate the complete functionality of the setup.

Once I’m happy with this, I’m ok to buy you this thermostat so that you can do coding because I don’t see much support outhere for fan coil AC thermostat like this beok tds23 (which is very beatiful by the way).

Thank you again Mark.

@Toto, does your thermostat successfully connect if you set it up in HA using my code?

If so I can add a attribute that shows all the data coming back from the get_full_status request to see if we can see any new parameters.

A full functions Hysen Thermostat.

Hello uss,

thank your contribution, this is my tree structure

image

and in configuration.yaml, I’ve added :

climate: !include climate.yaml

is it all correct ?

(I’m still kind of new in home assistant, by the way I’m using v0.89 )

Hello mark,

no make this parameter dump as you’re proposing, should I use your original script or the one of {Mark+Marais) ?

Thanks.

@Toto
first of all, do you have a heating device or a 2 pipe fan coil ?

Precisely: 2 pipe fan coil

http://www.xmhysen.com/products_detail/productId=201.html

@Toto
I reckon you have some problems there:
first, as stated in the 0.89 doc you should have:

  •  ---custom_components
    
  •       ---hysen2pfc
    
  •           --- climate.py
    
  •           --- hysen2pfc_device.py
    
  •           --- __init__.py
    
  •           --- services.yaml
    

take care, services_yaml_template should be services.yaml
And yes, the climate: !include climate.yaml is ok
Of course you need to put your IP and mac inside

Change all that and give it a try :slight_smile:

Cheers,
us