Beta for Hysen thermostats powered by broadlink

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

After double checking my hass version is 0.88.1 sorry for the confusion.

@Toto

No problem,
In the configuration I have shown you, should work with .88 too

I got:

Configuration invalid
Platform not found: climate.hysen2pfc

That’s the reason why I had this initial tree structure.

show me again your config directory.
btw. I have 16 devices running no problem for at least 2 months

image

do a restart. Not a hass restart but a system restart.
A folder named pycache should show in the hysen2pfc folder

Sorry for the possibly disappointing reply, but even going as far as unpluggin-replugging my raspberry pi did not solve the problem.
I’ve also commented the tts lines (text to speech section) (in case of)

Did you download the git? Or you copy and paste the raw files?