Broadlink S3 hub support

Broadlink have brought out the TC3 switches that work without neutral but there is a requirement to use the Broadlink S3 hub to set up these switches. In the UK it is very difficult to find a good wall switch and the Broadlink TC3 switches are about the best on the market.

The downside is that the Home Assistant Broadlink integration does not support the S3 hub so I would love to see support for the S3 hub so the TC3 switches can be used within Home Assistant.

Really? A buddy of mine who is a Zigbee fan but also uses Z-Wave just recently moved from the UK. I did not hear of him having any issues getting quality devices.

There are switches on the market, both Zigbee, Zwave, Wifi and RF but so many of these do not fit a standard UK back box which really limits your options. This is the same for switch modules which just do not fit. I really do not want to start drilling out for deeper back boxes.

The Broadlink switches are an exception as they fit a standard back box, are a great modern design and do not require a neutral wire.

I see the S3 broadlink hub all over Amazon now, it’s becoming more and more popular. It’s a fantastic hub so I’m glad to see it’s starting to take off. Hopefully there’ll be support for it soon on HomeAssistant

2 Likes

Anyone managed to find any work around for this?

Very much here for this. These were the only switches I could find for my existing cabling/backboxes and really hoping for HA integration as the lighting is fundamental to what I want to achieve with it.

I gave up and bought Zigbee switches instead - there are very good ones without neutral wire requirements. I’m very pleased. Going to try and sell the TC3 ones.

I wish I could up vote this dozens of times. Electrical switches are my Achilles heel, and the TC3 was the first I could install easily without needing to call in an electrician. Support for the S3 hub could (figuratively and literally) become a life saver.

Same hare, waiting for the support to be able to add this on the whole house

Current workaround I have is to create routines in Alexa to turn the switches on/off and then trigger these via home assistant for anyone interested. I’m also looking forward to direct integration to HA.

Which ones did you go for? Only option I’ve seen is Aqara at £40+ each

I’m wondering if it’s a case of broadlink not allowing home assistant integration or not enough people using home assistant Cares for this? Who’s usually the ones making the integrations happen? I’ve got 3 switches now and I’m missing out on some really useful automations.

I’m EU based, bought something off of AliExpress, there’s many types there. Specifically bought these which are great. They look good, they have an on/off led, the switch is very nice to press and they do not required a neutral wire. Pairing was a breeze as well.

Steven, thanks for your work on this, it looks like a really good start. Will you be building this to be an add-on that can be installed?
Great work.

I’ve created a pull request for my branch to be merged into the Broadlink python libraries. One of the maintainers for those libraries is engaged and is pleased with the contribution, luckily he is also a maintainer of the broadlink integration with HA, which uses those libraries. I believe a fully fledged integration with the S3 hub will be implemented in due course.

In the meantime if you’re happy setting up a Docker container running the API that I created above, it all seems to work pretty well with no noticeable delays.

1 Like

Here are the steps involved in setting it up:

Download and deploy docker image: stevendodd/s3-rest-api or follow steps 1 to 4 below.

  1. Check out my branch from GitHub to your local machine https://github.com/stevendodd/python-broadlink/tree/Add_S3_REST_API
  2. Run
python3
import broadlink
device = broadlink.hello('192.168.1.99')
device.auth()

Where the IP address is the IP address of your S3 hub. If you get an unsupported device error you may need to add your device ID to ./broadlink/__init__.py

SUPPORTED_TYPES = {
    s3:  {
        0xa64d:("S3", "Broadlink"),
    },
  1. Run >>> device.get_state("00000000000000000000a043b0d06963") where the input parameter is your device ID of any sub device which you can find in the board link app or via >>> device.get_subdevices() you should get something similar to this: {'pwr1': 0, 'pwr2': 0, 'plugmode': 0, 'hb_timeout': 180, 'lb_online1': 1} in my case this is an LC1 light switch with two gangs. If you have other sub devices I would be interested in seeing the output…

  2. Create a Docker image
    docker build -t stevendodd/s3-rest-api .

  3. Deploy the Docker S3 rest API image and test the GET methods in a browser

http://127.0.0.1:5000/?hub=192.168.1.99
http://127.0.0.1:5000/00000000000000000000a043b0d0783a/1
  1. Update HA configuration.yaml to use your new API.
switch:
    - platform: rest
      resource: http://192.168.1.162:8124/00000000000000000000a043b0d0783a/1
      body_on: '{"active": "true"}'
      body_off: '{"active": "false"}'
      is_on_template: "{{ value_json.is_active }}"

https://www.buymeacoffee.com/stevendodd :rofl:

2 Likes

Hi there!

I tried it and I got this:

import broadlink
device = broadlink.hello(‘192.168.0.76’)
device.auth()
Traceback (most recent call last):
File “”, line 1, in
File “/Users/sdimitrov/Documents/Private/python-broadlink/broadlink/device.py”, line 185, in auth
e.check_error(response[0x22:0x24])
File “/Users/sdimitrov/Documents/Private/python-broadlink/broadlink/exceptions.py”, line 152, in check_error
raise exception(error_code)
broadlink.exceptions.AuthenticationError: [Errno -1] Authentication failed

What am I missing?

Is your device locked?

Hey there. It seems that the device lock was breaking the auth(). I disabled the locking and now I go through the authentication, but now I cannot move forward. Here is an example:

> >>> import broadlink
> 
> >>> device1 = broadlink.hello('192.168.0.76')
> 
> >>> device1.auth()
> 
> True
> 
> >>> device1
> 
> broadlink.device.Device(('192.168.0.76', 80), mac=b'\xa0C\xb0L\xd1,', devtype=42396, timeout=10, name='Smart Hub', model='', manufacturer='', is_locked=False)
> 
> >>> device1.get_subdevices()
> 
> Traceback (most recent call last):
> 
> File "<stdin>", line 1, in <module>
> 
> AttributeError: 'Device' object has no attribute 'get_subdevices'

Not sure if it helps. But I have two s3 hubs - one with 8 devices and one with 5. This is me trying to connect to one of the hubs.

I tried with two branches from this repo:

  • Add_S3_REST_API
  • Add_Support_for_S3_Hub_0xa59c

Both are showing the same error so not sure what I am missing.