Wifi thermostat (Beok, Floureon, Beca Energy) component

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??

hi, I have bough a beca app controlled thermostat. If I read this correctly, I am supposed to create the folder in the following path,

config/custom_components/climate

After that I should create a broadlink.py file and copy and paste the text from: https://github.com/clementTal/home-assistant/blob/add_broadlink_climate/homeassistant/components/climate/broadlink.py

Once done I will insert the below in my configuration.yaml file.

- platform: broadlink
  name: Thermostat
  mac: “xx:xx:xx:xx:xx”
  host: “xxx.xxx.xxx.xxx”

Is this correct??

Hi @clementTal
 is the above steps correct


Hi Emmanuel,

I’m (very) new to this and I’m only good at PHP and some other trippy script languages. If I wouldn’t be in the middle of exams right now I would definitely figure this out on my own, but I’m getting the same error:

I have added the advanced configuration options to my config:

Could you guide me/us here? I might be missing something. I am keen to learn Python on my own but for now I would really appreciate some help here.

Thanks!

Sorry, I was on hollday

Can you send logs ?

I think it is because of your mac address.
It should be like: “XX:XX:XX:XX:XX:XX”, with only hexa instead of XX.

Here is an Work In Progress documentation:

@clementTal can you check it with latest version. I tried to use it at 0.77.2, now 0.77.3, and the component is not starting. Log

root@hass:/home/homeassistant/.homeassistant# cat home-assistant.log 
2018-09-07 10:18:22 WARNING (MainThread) [homeassistant.loader] You are using a custom component for climate.broadlink which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-09-07 10:18:23 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform broadlink
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/climate/broadlink.py", line 109, in setup_platform
STATE_AUTO
  File "/srv/homeassistant/lib/python3.6/site-packages/BroadlinkWifiThermostat/__init__.py", line 26, in __init__
self.loop_mode = json.loads(advanced_config)["loop_mode"]
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 90 (char 89)

Home assistant runs on Ubuntu 18.04 in LXC container in Python virtualenv

(homeassistant) homeassistant@hass:/srv/homeassistant$ python3 -m pip list
Package                 Version   
----------------------- ----------
aiohttp                 3.4.0     
aiohttp-cors            0.7.0     
asn1crypto              0.24.0    
astral                  1.6.1     
async-timeout           3.0.0     
attrs                   18.1.0    
bcrypt                  3.1.4     
boto3                   1.7.47    
botocore                1.10.47   
broadlink               0.9       
BroadlinkWifiThermostat 1.0.1     
certifi                 2018.8.13 
cffi                    1.11.5    
chardet                 3.0.4     
cryptography            2.3.1     
curve25519-donna        1.3       
distro                  1.3.0     
docutils                0.14      
ecdsa                   0.13      
ed25519                 1.4       
envs                    1.2.6     
future                  0.16.0    
geojson                 2.3.0     
gTTS-token              1.1.1     
HAP-python              2.2.2     
home-assistant-frontend 20180903.0
homeassistant           0.77.3    
idna                    2.7       
idna-ssl                1.1.0     
influxdb                5.0.0     
Jinja2                  2.10      
jmespath                0.9.3     
jsonrpc-async           0.6       
jsonrpc-base            1.0       
jsonrpc-websocket       0.6       
MarkupSafe              1.0       
multidict               4.3.1     
mutagen                 1.41.0    
netdisco                2.0.0     
netifaces               0.10.7    
pip                     18.0      
pkg-resources           0.0.0     
pycparser               2.18      
PyCRC                   1.21      
pycryptodome            3.6.6     
PyJWT                   1.6.4     
pyotp                   2.2.6     
pyowm                   2.9.0     
PyQRCode                1.2.1     
python-dateutil         2.7.3     
python-jose-cryptodome  1.3.2     
pytz                    2018.5    
PyXiaomiGateway         0.9.5     
PyYAML                  3.13      
requests                2.19.1    
s3transfer              0.1.13    
samsungctl              0.7.1     
setuptools              39.0.1    
six                     1.11.0    
SQLAlchemy              1.2.10    
tlslite-ng              0.7.5     
typing                  3.6.4     
ua-parser               0.8.0     
urllib3                 1.23      
user-agents             1.1.0     
voluptuous              0.11.5    
voluptuous-serialize    2.0.0     
wakeonlan               1.0.0     
warrant                 0.6.1     
websocket-client        0.48.0    
wheel                   0.31.1    
xmltodict               0.11.0    
yarl                    1.2.6     
zeroconf                0.20.0 

Testing configuration

climate:
  - platform: broadlink
    name: "termostat_obyvak"
#    friendly_name: 'Termostat v obĂœvĂĄku'
    mac: "84:F3:EB:52:53:F8"
    host: "192.168.0.110"
#    name: Thermostat
#    mac: "xx:xx:xx:xx:xx"
#    host: "xxx.xxx.xxx.xxx"
    advanced_config: '{"loop_mode": 0, "sen": 2, "osv": 42, "dif": 2, "svh": 35, "svl": 5, "adj": 0.1, "fre": 01, "pon": 0}'
    schedule_week_day: '[{"start_hour":6, "start_minute":30, "temp":20}, {"start_hour":9, "start_minute":0, "temp":17}, {"start_hour":12, "start_minute":0, "temp":20 }, {"start_hour":14, "start_minute":0, "temp":17}, {"st$
    schedule_week_end: '[{"start_hour":8, "start_minute":30, "temp":20}, {"start_hour":23, "start_minute":0, "temp":17}]'

Any idea?
Sorry, if formatting is not good, but even if I am not a beginner, I don’t use forums much.

Hi,

do we need to create config/custom_components/climate from the github page or can we just proceed with adding the below to our confiuration.yaml

  climate:
     - platform: broadlink
       name: xxx
       mac: xxxx
       host: xxxx

Clément,

Do you think your component will work with the gaz heating boiler version of those chinese thermostats ?
For instance, the BEOK BOT-313WIFI (here on ali), which seems to be the same, except for a dry (??) relay instead of the live port ?

I’m looking for a non-internet dependant solution in HA !