I got it! Just have to edit the config/custom_components/climate/broadlink.py, and change the line “REQUIREMENTS = [‘broadlink==0.5’]”
Hi!
Today I updated to 0.67.0 and my Broadlink SP3 stopped working. This is the error I got:
2018-04-14 16:31:49 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package broadlink==0.5.1: Could not find a version that satisfies the requirement broadlink==0.5.1 (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8)
No matching distribution found for broadlink==0.5.1
2018-04-14 16:31:49 ERROR (MainThread) [homeassistant.requirements] Not initializing sensor.broadlink_power because could not install requirement broadlink==0.5.1
2018-04-14 16:31:49 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.broadlink_power: Could not install all requirements.
2018-04-14 16:32:08 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 164, in setup_platform
broadlink_device = broadlink.sp2((ip_addr, 80), mac_addr, None)
TypeError: __init__() takes 3 positional arguments but 4 were given
2018-04-14 16:32:27 ERROR (MainThread) [homeassistant.core] Error doing job: Task was destroyed but it is pending!
So I followed @tanabebr’s advice and changed the custom_component to REQUIREMENTS = ['broadlink==0.5']
, but then this error raised:
2018-04-14 16:11:52 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
2018-04-14 16:12:47 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 164, in setup_platform
broadlink_device = broadlink.sp2((ip_addr, 80), mac_addr, None)
TypeError: __init__() takes 3 positional arguments but 4 were given
2018-04-14 16:12:53 ERROR (SyncWorker_19) [homeassistant.core] Error doing job: Task was destroyed but it is pending!
I also tried changing the line to:
REQUIREMENTS = [
'https://github.com/balloob/python-broadlink/archive/'
'3580ff2eaccd267846f14246d6ede6e30671f7c6.zip#broadlink==0.5.1']
And still no luck. It was working before the update!
Any ideas?
I came across similar errors when updating to 0.67 - I downgraded back to 0.66.1
To downgrade, enable the SSH addon, SSH in and run this command:
curl -d '{"version": "0.66.1"}' http://hassio/homeassistant/update
You guys did see the breaking changes for Broadlink in 0.67?
Added ENTITY_ID_FORMAT import and set entity_id in init (@timmo001 - #13642) (switch.broadlink docs) (breaking change)
I’m not sure I understand what a breaking change is.
Do I have to do something to make it work again, or is it a known bug?
You always need to read the release notes before upgrading. A breaking change means something changed which will break your configuration.
Ok, that’s good to know, thanks
Luckily it’s a switch that I don’t use that much, so I won’t downgrade.
Hi,
I had the same issue as you guys, please download the updated version of “broadlink.py” file from Github
That solved the problem for me:
https://github.com/vpnmaster/homeassistant-custom-components
Yeah, I really do not understand this either…
grabbed the file what do i do with it?
There were several separate issues with broadlink related to HA and also the broadlink library.
https://github.com/home-assistant/home-assistant/issues/14024
For me sp2 stop working after 0.65.5.
It is ok again with 0.68
put it in your custom_components folder:
Hey all, I just upgraded to Hassio 0.68.0 and 0.68.1 and all my Broadlink Switches disappeared.
It seems the breaking change that has occurred is the “switch.broadlink_device” entity names have all changed so they’re no longer the “friendly names”. Have a look for your new broadlink entity IDs and make the relevant changes to your YAML file to make them appear.
NOTE: no need to change any custom components, at least for me!
im having a problem with my broadlink device connecting to home assistant at all.
Here are the errors i’m getting
2018-05-01 14:31:26 WARNING (MainThread) [homeassistant.components.switch] Setup of platform broadlink is taking over 10 seconds.
2018-05-01 14:31:31 ERROR (SyncWorker_3) [homeassistant.components.switch.broadlink] Failed to connect to device
Is this the result of an upgrade? What version? Rolled back?
I’m having logs with similar issues here: Broadlink SP3 Mini stops working after potentially a few days
Did you ever get this fixed on .67 or did you upgrade to a working version? I read the breaking change, but I don’t understand what needs to be done to fix it
I receive this error now
2018-06-11 12:01:21 ERROR (SyncWorker_15) [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 /usr/lib/python3.6/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 /usr/lib/python3.6/site-packages/homeassistant/package_constraints.txt (line 18))
2018-06-11 12:01:21 ERROR (MainThread) [homeassistant.requirements] Not initializing sensor.broadlink_power because could not install requirement broadlink==0.5
2018-06-11 12:01:21 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.broadlink_power: Could not install all requirements.
2018-06-11 12:01:30 ERROR (SyncWorker_18) [homeassistant.util.package] Unable to install package lxml==4.1.1: Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-dwtlybtf/lxml/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-u4hkzi93-record/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-dwtlybtf/lxml/
2018-06-11 12:01:30 ERROR (MainThread) [homeassistant.requirements] Not initializing sensor.amazon_price because could not install requirement lxml==4.1.1
2018-06-11 12:01:30 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.amazon_price: Could not install all requirements.
2018-06-11 12:01:31 DEBUG (Thread-8) [xiaomi_gateway] MCAST (heartbeat) << {‘cmd’: ‘heartbeat’, ‘model’: ‘plug’, ‘sid’: ‘158d000128c617’, ‘short_id’: 15873, ‘data’: ‘{“voltage”:3600,“status”:“off”,“inuse”:“0”,“power_consumed”:“1592”,“load_power”:“0.00”}’}
2018-06-11 12:01:42 ERROR (SyncWorker_12) [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 /usr/lib/python3.6/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 /usr/lib/python3.6/site-packages/homeassistant/package_constraints.txt (line 18))
2018-06-11 12:01:42 ERROR (MainThread) [homeassistant.requirements] Not initializing media_player.broadlink because could not install requirement broadlink==0.5
2018-06-11 12:01:42 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform media_player.broadlink: Could not install all requirements.
What version are you running and what kind of installation?
I’m on hassio with 0.71.0 and everything works fine.
HASSIO on NUC 0.71 (but had the problem also with previous versions of HASS, but forgot to post it here)