Wifi thermostat (Beok, Floureon, Beca Energy) component

Hi guys
Sorry i’m pretty new to home assistant but i’m doing my best.
I’m tryng to control my beok thermostate but i had no luck. This is what i did:

  • Create a brand new virtualbox image with the one supplied in home assistant
  • updated it to the last home assistant version 0.91.3
  • created a custom_config/ directory under my config directory
  • created a broadlink directory under custom_config
  • downloaded the broadlink.py and init.py from the above link and moved it to their directory
  • edited the config file whit my thermostate info.

So i assume i’ve done everything in the right way, but when i check my conf i get this error:

File “”, line 219, in _call_with_frames_removed
File “/config/custom_components/broadlink/init.py”, line 7

^

SyntaxError: invalid syntax

Anyone can help me? Thanks to everyone for this wonderful comunity

i was using the component but after update to 0.91.3 it stop working. climate.broadlink not found.

Checked on https://ru.aliexpress.com/item/Beok-TGR87-Wi-Fi-16A/32933138700.html - works perfectly!

In fhem, there is a module to communicate with the thermostat directly. I tried to kinda understand it, but it’s really hard to understand imo. It’s using the broadlink stuff too, but to communicate with it directly.

after updating hassio, i’m having this errors:

Platform not found: climate.broadlink
Unable to find platform broadlink. Search path was limited to path of component: homeassistant.components

i have this folder
\hassio\config\custom_components\broadlink

in this folder, I’ve copied this files:
__init__.py
climate.py

in my configuration.yaml I have

climate:
   - platform: broadlink
     friendly_name: Boiler
     mac: "34:EA:xx:xx:xx:xx"
     host: 192.168.1.123

what I’m doing wrong?

I’ve not got the MAC address in speech marks and i’m running 0.91.2

i had the configured mac like that (with quotation marks) forever and it always worked.
i think is related to changes on how custom_components are loaded in hassio

Hi, I have an issue since day one of using this component, in previous and current version.
Every time I restart home assistant (quite frequent since I’m adding bits and pieces to my config), the thermostats time gets set one day before the current date. The time remains correct, but the day of the week is always moved one day back.
I haven’t found the reason, is it possible to call a service to set the correct time and date in an automation at the start of home assistant?

thanks

@gaggio
Hi,
There’s an error in clementTal’s code.

def set_time(self):
    try:
        device = self.connect()
        if device.auth():
            now = datetime.now()
            device.set_time(now.hour, now.minute, now.second, now.weekday())
    except timeout:
        _LOGGER.error("set_schedule timeout")

The now.weekday starts with 0 for Sunday.
The device’s weekday starts with 1 for Monday. Thus, Sunday is actually 7.
See:

file climate.py

async def async_set_time_now(self):
    """Set device time to system time."""
    clock_weekday = int(dt_util.as_local(dt_util.now()).strftime('%w'))
    if clock_weekday == 0:
        clock_weekday = 7
    clock_hour = int(dt_util.as_local(dt_util.now()).strftime('%H'))
    clock_min = int(dt_util.as_local(dt_util.now()).strftime('%M'))
    clock_sec = int(dt_util.as_local(dt_util.now()).strftime('%S'))
    await self._try_command(
        "Error in set_time", 
        self._hysen_device.set_time, 
        clock_hour, 
        clock_min, 
        clock_sec, 
        clock_weekday)

Cheers,
us

Ha, I’ve just spotted that on mine as well !
Tho I don’t use the timer function on the thermostat at all

sorry to pester you - can you show me you directory for this component?
I’ve tried many configurations, this is how I have it

\\hassio\config\custom_components\broadlink
__init__.py
broadlink.py
climate.py
const.py
sensor.py
switch.py

where climate.py is the one coming from @clementTal

Mine looks like this.

/homeassistant/custom_componets/broadlink/
climate.py
__init__.py
1 Like

I believe Monday is 0, Tuesday is 1 etc in in datetime.now().weekday(). In fact it happens if I restart regardless of the day of the week, not only on Sunday.
Yours is different because you use dt_util from homeassistant.util.dt.
Being quite trivial is maybe better to wait for a fix from ClementTal (or I’ll to contributre for the first time!) rather than finding a workaround with automations.

Thanks

Should your component work with this thermostat ?

Thanks!

I’m trying to upgrade from 0.87.
As I have plenty of Broadlink devices (MP1, SC1, RM…) including other custom components based on those (Broadlink IR media player, now SmartIR), I tried a different approach and I wonder what consequences there could be.
I’ve created the custom component in beok/climate.py and used “platform : beok” to declare the climate device. Seems to work fine as of 0.91.4. Didn’t work in 0.92, can’t figure out why !

It should.

Cheers,
us

Help, I upgraded to 0.92 and cannot get this component to work anymore…

  • This is the error

Log Details (ERROR)

Fri Apr 26 2019 10:56:04 GMT+0100 (British Summer Time)

Platform not found: climate.broadlink

  • My “/config/custom_components/broadlink” folder has these two files in:
  • My configuration.yaml is (formatting note: the blob below is a ‘-’ and there is no extra line below ‘climate’):

climate:

  • platform: broadlink
    friendly_name: Man Cave Thermostat
    mac: 34:EA:34:9F:AB:02
    host: 192.168.1.17
    external_temp: False

I am sure I am missing something obvious here…

Do you have other Broadlink devices ? If so, the __init__.py should be different.(see repo)
Or, see my post above, I renamed the platform, didn’t need more than renaming the folder (broadlink -> broadlink1 or test or beok, whatever you like) and match the climate declaration “platform: broadlink1”

The renaming trick worked… very odd as I definitely don’t have any other broadlink devices…

I have absolutely no idea why this works !! :rofl:
I guess HA sees the component as something different from existing ones. But then, this defeats the point of the “great migration” as upgrades of internal component may break the custom component ? So it cannot be that simple. :confused: