Broadlink integration for SP4

You should have a least the HA component broadlink. Might be that it only gets the broadlink library first time a device is created. But since you already tried, it should be there, otherwise how could the HA component tell you that it doesn’t know your device type ? They are in the broadlink library, (init.py lists the supported types) not in the HA component !

As homeassistant user, you can search if the broadlink library is there

homeassistant@services:~$ pip list | grep broad
broadlink               0.16.0

You can install the library with

pip install broadlink[=='0.16.0']

The part between [] is optional as 16 is the latest version.

Ofcourse, you make an excellent point! It must be somewhere otherwise it could not throw this error , stupid me…:roll_eyes:

After some troubleshooting a was able to confirm 0.16.0 is installed.

  • Login via SSH & web Terminal
  • docker exec -it homeassistant /bin/bash
  • pip list | grep broad
    result > broadlink 0.16.0

Still no clue were those files are…

After checking Github i also confirm that this version does NOT contain the line
0x618b: (sp4s, “SP4L-EU”, “Broadlink”),

When I check the master branch it DOES contain this line.
However it seems this code is not “released” as a “version” yet. (I’m all new to this…).
Is it also possible to install this master branch in stead of a stable version?

It works! Thank a lot for you support @Mister_Slowhand

pip install broadlink[=='0.16.0']

I’m not exactly sure if that command did the trick.
I also found another command that I used.

docker exec -it homeassistant /bin/bash
pip3 install git+https://github.com/felipediel/python-broadlink.git --force-reinstall --no-deps

But at least after a reboot it is now working and I can add these Smart plugs. :slight_smile: :slight_smile:

The only downside is that the build-in light is not available. That’s maybe because this model is referenced to another model in the code that does not have a light? It not a big deal for now.

1 Like

Thanks for this. Helped me finally get my BG Electrical AHC/U-01 integrated into HA!

Latest updates have not yet been added to the library. I don’t know why.
Neither has the HA component.

The command line you entered upgraded the library to the dev one, including your device. I installed 0.16 and manually modified files as needed.
Nightlight doesn’t work in HA, but the command line tool works (broadlink_cli in git). I tried to create a shell script to integrate but didn’t pursue as in fact I don’t need this light (and i’m kinda lazy) :wink:

Home Assistant OS 5.12
supervisor-2021.03.4
core-2021.3.4
SP4L-EU from BoradLink android app:
firmware v57061
SDK2.16.8 Plug-in ver. 1.5.6
Lock device OFF

I see in my files:

# cat /mnt/data/docker/overlay2/534611ac6893a4194850a643d3f8b0f8c1ad71b3e955f4a1f32e662263071684/diff/usr/local/lib/python3.8/site-packages/broadlink/__init__.py|grep SP4L-EU
    0x7579: (sp4, "SP4L-EU", "Broadlink"),
    0x618B: (sp4b, "SP4L-EU", "Broadlink"),

and also did Frank_R tricks and still got “Device not supported”.
Any other cloes, what to check/try?
Maybe I should make some change in Smart Plug before integration w HA?

2 Likes

So as you might all might be aware of the integration for the SP4L devices has been added to HA recently. The interesting thing I realized with my SP4L-EU’s is that they seemed to ‘merge’ into a single IP, making it impossible to control any of the other plugs, except the ‘master’ device which is directly connected to the appointed SSID.

I pointed this out earlier in this GitHub thread as well.

Today I briefly searched for the full manual of this device, and indeed it seems there is support for master/slave configuration over 802.11. Broadlink calls this protocol “FasCon” (page 2 of manual).

I’d either like to be able to switch this master/client config off, or otherwise make the HA Broadlink integration aware of multiple nested devices. According to the manual (page 31-32) sub/slave/client devices should be listable in the broadlink app on the master device, but I seem to be unable to obtain this info.

Has anyone come across the same phenomenon and found a way to deal with it?
PS: I don’t count setting up multiple SSIDs as a viable and clean solution ;).

Issues about this kind of thing are best handled in python-broadlink from my experience.

I have the same problem! But I didn’t find any secondary device in the Broadlink App.

Yeah, I have the same issue. I tried to get these devices working before and was hoping the new updated integration would work but no luck. The master device is now detected automatically (nice!) but a second “slave” device is not… Using the Broadlink app I can use them both, using the app device info I can see they both use the same IP but have a different MAC. In my Unifi network I only see the master IP.

The HA broadlink integration only seems to recognize the master device. Is there any manual tuning possible here? Any solution yet?

Hi there i have a broadlink sp4l and Im not able to add it to home assistant and get 1 error device not supported!

image