Broadlink SP3S Power consumption sensor

@DanielXYZ2000, sorry for not replying. My account was suspended for unknown reasons. I’m glad that you resolved your problem by yourself.

@Walhalla, I have Broadlink SP3S and Sonoff POW. What I don’t like about Broadlink is that it uses 3rd party servers, also sometimes I get timeouts in HA logs, but it controls OK. What I like about Sonoff POW is custom firmware, which can be adapted to my needs. Also, I have other hardware, which runs Sonoff-Tasmota firmware, so I prefer unified software in my home cloud, altough I have no plans on changing Broadlink SP3S.

1 Like

@walhalla, I also like the custom firmware for the sonoff (pow), but the compact design of the SP3S is optically nicer and further the SP3S is quite cheap. (no connectors must be added to the sonoff pow)
What I don’t like at the SP3S is the initial configuration with the app and that it looks like that its calling home - that’s why I don’t let this device into the internet (firewall rule)
I did not try the HS110 because of the price (SP3S is very cheap at aliexpress)

1 Like

Hi !

Thanks for sharing !
I just received my power plug too, and tried to install it in HA, but i got :

Unable to install package broadlink==0.5: Could not find a version that satisfies the requirement pycrypto==1000000000.0.0 (from -c /usr/lib/python3.6/site-packages/homeassistant/package_constraints.txt (line 20)) (from versions: 2.0.1, 2.1.0, 2.2, 2.3, 2.4, 2.4.1, 2.5, 2.6, 2.6.1)
No matching distribution found for pycrypto==1000000000.0.0 (from -c /usr/lib/python3.6/site-packages/homeassistant/package_constraints.txt (line 20)) 

I’m not very comfortable with Python yet, so any idea ?

The switch works fine by the way :wink:

Have you tried updating your Home Assistant installation?

Yes! I’m on version 0.64.3.
I’ll try to install the missing lib manually…

I tried this :

from this thread :
https://community.home-assistant.io/t/broadlink-not-working-since-0-64/

And it works !

Thanks for your time !

2 Likes

yep, me too, I like that it plugs directly into the outlet in the wall and that you don’t have to solder anything. BTW: I got the TP-Link ones, because I was able to get them with a new customer voucher for 22,90 Euro. Was a nobrainer, because you get 3 years of warranty from TP-Link.

1 Like

Does anyone have this working with the SP2?

The sensor appears but it always shows the usage as 0.01 W.

  - platform: broadlink_power
    host: 10.0.0.165
    mac: 'B4:43:0D:10:XX:XX'
    friendly_name: 'Computer'

Same here.
I get no errors from SP2 but the sensor always shows 0w.

Any chance to get it working?

I’m sorry, but I do not own SP2, so I cannot say for sure.

Thx anyway!

I’ve the SP3s but the same problem. It shows always 0.01 W

PS
just updated to 0.67 and now give some error:
2018-04-14 17:50:13 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform broadlink
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 82, in async_setup
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 “/usr/lib/python3.6/site-packages/homeassistant/components/switch/broadlink.py”, line 165, in setup_platform
switches = [BroadlinkSP2Switch(friendly_name, broadlink_device)]
File “/usr/lib/python3.6/site-packages/homeassistant/components/switch/broadlink.py”, line 260, in init
super().init(friendly_name, device, None, None)
TypeError: init() missing 1 required positional argument: ‘command_off’

https://github.com/home-assistant/home-assistant/issues/13864

Hi.
I am on 67.1 and still get errors:
[homeassistant.util.package] Unable to install package broadlink==0.5: Could not find a version that satisfies the requirement pycrypto==1000000000.0.0 (from -c /srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/package_constraints.txt (line 18)) (from versions: 2.0.1, 2.1.0, 2.2, 2.3, 2.4, 2.4.1, 2.5, 2.6, 2.6.1)
No matching distribution found for pycrypto==1000000000.0.0 (from -c /srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/package_constraints.txt (line 18))
2018-04-23 12:04:39 ERROR (MainThread) [homeassistant.requirements] Not initializing sensor.broadlink_power because could not install requirement broadlink==0.5
2018-04-23 12:04:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.broadlink_power: Could not install all requirements.

Even altering the broadlink==0.5 to become broadlink==0.5.1 hasn’t solved.

Read for file location to install
https://github.com/home-assistant/home-assistant/issues/13998

File to copy and replace init.py is
https://github.com/mjg59/python-broadlink/blob/master/broadlink/init.py

After change my mp1 show correctly on frontend.

Thx for the suggestion.
I have already tried but without success.
My sp2 and sp3 switches do show up in the frontend but don’t work.
The sensors do not even show up.

SP2 - If you see from the issue aboved. The temporary fix has been tested with sp2. So you might put the file wrong place.

Sensor - do you mean the temperature from broadlink as climate?

No, I meant sensor for power consumption.

As for the fix I put it in /home/pi/python-broadlink/broadlink/_ init_.py

for the file I put the link. It is located in the directory below / and this is for home assistant site packages directory not custom_component.

/etc/homeassistant/deps/lib/python3.6/site-packages/broadlink/init.py

For power consumption sensor if it is the custom_component then you have to check from where you get the custom_component from.

Hello guys,
Try updated component https://github.com/algirdasc/homeassistant-backup/blob/master/custom_components/sensor/broadlink_power.py. Problem should be solved.