Wifi thermostat (Beok, Floureon, Beca Energy) component

I also got one yesterday, and don’t have a sticker with ID on it :frowning: perhaps it is easy for you to sniff the encrypted id and reverse it, for me it isn’t lol, I’m using currently this method to integrate it in hass: https://community.openhab.org/t/electronic-heating-thermostat-reverse-engineering-beok-floureon-decdeal/39251/6
because without the ID, your method is not working unfortunately, I would rather use your method.
since the method on the openhab forum is also written in python, can’t the method without needing the ID not be integrated into your code, they are both written in python :stuck_out_tongue:

Hi, I did see this as well but the python involved there is beyond my capabilities I’m afraid…
To sniff the packets, I am using the “Packet Capture” app.

Once your thermostat is installed and configured with your app, you can use “Packet Capture” to see the traffic from the app.

You should see one of the packets being repeated often, which is your encrypted key in hex. You can then use the windows calculator to convert into decimal and the formula in the python code to reverse your product id.

Sounds simple :wink:

this sounds like real nasa science :slight_smile: i think i have packet, but how can i get id from there? “windows calculator” - what is this? sorry for stupid questions…

Right, if you have the packet in hexadecimal, you can google “hexadecimal to decimal” and you will find a free calculator to convert your packet into decimal.

Next, use this formula:
(encrypted ID - 65535) / 65535 - 1 = Product ID

I’ve made a platforme for this thermostat: https://github.com/home-assistant/home-assistant/pull/15363
The PR is still pending, but it work for me :slight_smile:

This platform do not require any ID, and is not based on the thermostat internet connexion (works localy).

Hope you’ll like it :wink:

1 Like

Exciting!!! Much better than my version as I like the non-dependence on the remote servers!

I saw you have an issue with Google assistant, which I managed to solve with mine (see here: Custom components integration with Google Assistant). If I manage to make it work with your code, I’ll send a commit.

sorry, but how can i use this?

I gave this a spin last night and connections to the thermostat timed out… not too sure what the problem is… I do however wonder whether the model I have is different and the API doc is wrong. That would also explain why @typeonegative cannot get my module to work.

@Emmanuel: Have you tried to use the broadlink.discover() function, using the broadlink API ? (not in HA, on a python terminal) ? I think I’ll update my code using this methode, but I’m running out of time this summer :wink:
And I fixed the google assistant issue yesterday !

@typeonegative: You have to create a custom_components/climate folder, on the HA config folder, and put the broadlink thermostat code on it, then add this to your configuration file:
climate:
- platform: broadlink
name: Thermostat
mac: “xx:xx:xx:xx:xx”
host: “xxx.xxx.xxx.xxx”
Finaly restart your HA instance, and you’ll be done :wink:

only file setup.py goes to custom_components/climate ?

There is no setup.py, but broadlink.py : https://github.com/clementTal/home-assistant/blob/add_broadlink_climate/homeassistant/components/climate/broadlink.py

wohooooooo! working! THANK YOUUUUUUUUUUUUUUU :slight_smile:

1 Like

@clementTal
Have a problem with your component on last version hassio

Error while setting up platform broadlink
Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 129, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=hass.loop) File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for return fut.result() File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run result = self.fn(*self.args, **self.kwargs) File “/config/custom_components/climate/broadlink.py”, line 101, in setup_platform config[CONF_ADVANCED_CONFIG],
KeyError: ‘advanced_config’

any suggestions?

Hi, I got a Floureon thermostat for a towel rail and using the module. A couple of suggested improvements:

  • broadlink.py - line 217, should it be “set_advanced”?
  • BroadLinkWifiThemostat: is it possible to add a flag in the configuration to read the external_temp instead of the room_temp?

Otherwise working great!

You’re right, I made the changes !

I’ve fixed the probleme (thank @Emmanuel)

sure, I’ve juste to find some time to do it :wink:

I have a similar error as above (using the updated code) with a Beok 313 Wifi thermostat:

2018-08-24 23:07:17 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform broadlink
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py”, line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.5/asyncio/tasks.py”, line 400, in wait_for
return fut.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/homeassistant/.homeassistant/custom_components/climate/broadlink.py”, line 101, in setup_platform
config[CONF_ADVANCED_CONFIG],
KeyError: ‘advanced_config’

You need to add the advanced configuration options (c.f. clementTal’s github has some examples)

Who would be interested??