Electronic heating thermostat reverse engineering (Beok, Floureon, Decdeal)

I have no idea. That doesn’t make sense for me :frowning:

1 Like

Fixed it. My bad, didnt pay enough attention to little things
All works now, thanks.

1 Like

Thank you!

How would I go about using MQTT 1.x with this? I can see the units being discovered and I’ve setup static mappings for their IP address and created the systemd file. That all works fine.

Any pointers on how to now get the info into item states with the older MQTT binding?

Thanks!

EDIT: Found an example :slight_smile:


16:40:14.702 [INFO ] [smarthome.event.ItemStateChangedEvent] - Thermo1_Room changed from NULL to 21.50
16:40:14.703 [INFO ] [smarthome.event.ItemStateChangedEvent] - Thermo1_Room_Power changed from NULL to ON
16:40:14.719 [INFO ] [smarthome.event.ItemStateChangedEvent] - Thermo1_Room_Set changed from NULL to 14.00
16:40:14.720 [INFO ] [smarthome.event.ItemStateChangedEvent] - Thermo1_Room_Activ changed from NULL to OFF
16:40:14.721 [INFO ] [smarthome.event.ItemStateChangedEvent] - Thermo1_Room_Mode changed from NULL to OFF

Awesome guys really well done!

See above MQTTv2 config:

So the items in MQTTv1 would be:

Number  TS_temp     "Thermostat Temperature [%.1f °C]"    <temperature>   (Room)    {mqtt="<[mybroker:/broadlink//room_temp:state:default]"}
Number  TS_Set  "Thermostat Setpoint [%.1f °C]"     <heating>   (Room) {mqtt="<[mybroker:/broadlink//thermostat_temp:state:default], <[mybroker:/broadlink//thermostat_temp:command:*:default]"}

You may need to adjust the topics according to your broadlink setup
You may need to use transformations

2 Likes

Thanks Vincent (glad you’re still alive!) I found an example on github which spelt it out nicely also :slight_smile:

Do these thermostats allow heating/cooling options?

I bought some as “Floureon Thermostat” (the “older” ones) but I think it’s really just a different label. Here is a first attempt of a native binding: Broadlink / Floureon/Hysen-Thermostat Binding

Hi All,

Im using this with the virtual thermostat schedule but what I see is that the schedule system sets it, but every minute the thermostat returns to its previous set point, despite being set by the virtual thermo.

Its almost as if theres some kind of override/auto option in play however the ‘Auto mode’ is switched off.

Hello,

i bought 8 Floureon C17.GH3 just to find out that they are only usable with the WeBack app not localy.

Some research in the Internet i found a https://github.com/bikemike/C17GH3Thermostat for a Firmware, which is not maintained.

Based on that i wrote a Firmware for the C17.GH18 to speak with an MQTT-Server.

You could find that firmware here: https://github.com/RobertHerter/C17GH3Thermostat

Nearly everything is working, except the setting of the schedule. Working on 8 Thermostats on my openhab.

Regards

Robert

2 Likes

Hi ahmaddxb,
have you had any luck with this ? Would really like to try to bind BAC-002-ALW with openhab.
thanks :slight_smile:

Hi,
Yes I was able to get the BAC-002-ALW working in Openhab. It involved flashing a custom firmware to get the thermostat to work over MQTT and from there you can integrate with Openhab.

This does mean loosing the use of the original app though. If you go to the link below you will find all the details you need.

3 Likes

Can you eloborate on whats needed here? I’m a little confused. I only have 1 thermostat unit and I know its IP (set via my firewall/dhcp box) but Id like to stop the discovery as I have other broadlink RM devices and hard code this to the IP i need.

Thanks @OhadEytan

So use only d1 in my example with the device IP. That should’nt be a problem.
Or simply do something like:

devices = [ broadlink.gendevice(hysen, ('192.168.1.61', 80), bytearray(b'>\xenn\xebw\x0fx')) ]
#         Your IP goes here -------------------^----------------

I don’t know if anyone else had this problem but on October 29th my script suddenly stopped working. Basically auto discover no longer worked, I kept just getting Reconnect / Connect, reason: 0. I then did a manual discover as explained by OhadEytan and it worked again, although Reconnect / Connect, reason: 0 still appears once after the PID and set time is shown, but then room_temp is listed accordingly.

While fooling around to get my Floureon working again, I noticed some awkward things with the script. Fortunately I had the MAC address written down when auto discover used to work and then realized that what auto discover reported as my MAC address was actually backwards compared to what what it really was as reported by my router or other network tools such as Fing. Moreover, it’s not important to list a byte array of your MAC as in OhadEytan example, you can use a simply string like so:

bytearray(‘1A2B3C4D5E6F’, ‘utf8’)

where 1A2B3C4D5E6F is the MAC address of your device. In fact, you don’t even have to use your MAC address, you can use anything. The only problem with this is the MQTT topic will contain a long, incomprehensible number in place of your MAC address which is confusing. The simple solution is to manually add the byte expression of your MAC address by adding \x before each pair of digits. Thus, the byte expression of your MAC (using the previous example) would be the following:

\x1A\x2B\x3C\x4D\x5E\x6F

Thus, for those having trouble with auto discover, I would suggest the following:

  1. find your proper MAC address using your router, Fing, or any other network scanning tool

  2. as explained by OhadEytan change line 213:

devices = broadlink.discover(timeout=conf.get(‘lookup_timeout’, 5))

to the following by manually creating the byte expression of your MAC address:

hysen = 0x4EAD
d1 = broadlink.gendevice(hysen, (‘192.168.1.61’, 80), bytearray(b’\x1A\x2B\x3C\x4D\x5E\x6F’))
devices = [d1]

Naturally replacing the IP and MAC in the above example with your own.

If all goes well, then the script will not only run properly but will also display your MAC address correctly and not in reverse as with auto discover.

Hope this helps.

I have done the setup as described in Dennis post #6 (except that I am running it on windows 10)

When I start broadlink-thermostat.py it detects my Beok thermostat but generats the following error messages:

C:\Python27\broadlink-thermostat-master>python broadlink-thermostat.py
 broadlink discover
found: 192.168.1.96 128d13a7df24
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main prepare(preparation_data)
  File "C:\Python27\lib\multiprocessing\forking.py", line 510, in prepare '__parents_main__', file, path_name, etc
  File "C:\Python27\broadlink-thermostat-master\broadlink-thermostat.py", line 283, in <module> main()
  File "C:\Python27\broadlink-thermostat-master\broadlink-thermostat.py", line 274, in main unhandeledException(e)
  File "C:\Python27\broadlink-thermostat-master\broadlink-thermostat.py", line 57, in unhandeledException trace = open('/tmp/transfer-unhandled-exception.log', 'w+')
IOError: [Errno 2] No such file or directory: '/tmp/transfer-unhandled-exception.log'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs)
  File "C:\Python27\broadlink-thermostat-master\broadlink-thermostat.py", line 195, in on_kill j.join()
  File "C:\Python27\lib\multiprocessing\process.py", line 147, in join assert self._popen is not None, 'can only join a started process'
AssertionError: can only join a started process
Error in sys.exitfunc:
Traceback (most recent call last):
  File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs)
  File "C:\Python27\broadlink-thermostat-master\broadlink-thermostat.py", line 195, in on_kill j.join()
  File "C:\Python27\lib\multiprocessing\process.py", line 147, in join assert self._popen is not None, 'can only join a started process'
AssertionError: can only join a started process

Does any one has a clue on what I have done wrong?

Does anyone knows, on which protocol and port the floureon wifi thermostat communicates with it’s cloud?
Currently I’m stuck with the firewallconfiguration on openwrt… I guess I need to open some specific port/portforwarding…

I want to use it with it’s default app / beok app on android.

Thanks in advance
Mr Mint

Summary

This text will be hidden

sorry for asking again, but can someone pls help me…?

It appears the script no longer works. This may coincide with the new release of the Heat Room app. In any case, the best it can do is find the IP, MAC, and device type. Then comes the dreaded Reconnect / Connect, reason: 0 message. But this time it only comes once. That’s it. nothing else. :cry:

Anyone still have it working?

hello guys, so is there an easy way to connect the thermostat?

Anyone still successfully using broadlink-thermostat? I have the same issue mentioned by @jhorv :frowning:, but had this running back in 2019. Thanks