Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.60.1
Python release (python3 --version):
Python 3.4.2
Component/platform:
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
Manual installation on a Raspberry Pi:https://home-assistant.io/docs/installation/raspberry-pi/
Install Broadlink module:
git clone https://github.com/mjg59/python-broadlink.git
cd python-broadlink
sudo pip3 install -r requirements.txt
sudo pip3 setup.py install
Description of problem:
Haas have error in log file(/home/homeassistant/.homeassistant/home-assistant.log):
2018-01-14 10:10:14 WARNING (MainThread) [homeassistant.bootstrap] Python 3.4 support has been deprecated and will be removed in the beginning of 2018. Please upgrade Python or your operating system. More info: https://home-assistant.io/blog/2017/10/06/deprecating-python-3.4-support/
2018-01-14 10:10:16 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=19 from 2018-01-14 02:00:56.606075)
2018-01-14 10:10:17 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform broadlink
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for
return fut.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/switch/broadlink.py", line 174, in setup_platform
broadlink_device.auth()
File "/srv/homeassistant/lib/python3.4/site-packages/broadlink/__init__.py", line 203, in auth
response = self.send_packet(0x65, payload)
File "/srv/homeassistant/lib/python3.4/site-packages/broadlink/__init__.py", line 258, in send_packet
payload = self.encrypt(payload)
File "/srv/homeassistant/lib/python3.4/site-packages/broadlink/__init__.py", line 162, in encrypt_pyaes
return "".join([aes.encrypt(bytes(payload[i:i+16])) for i in range(0, len(payload), 16)])
TypeError: sequence item 0: expected str instance, bytes found
Expected:
Problem-relevant configuration.yaml entries and steps to reproduce:
# Haas Configure Broadlink Module:
switch:
- platform: broadlink
host: 192.168.1.101
mac: '34:EA:34:C7:33:F3'
monitored_conditions:
- 'temperature'
switches:
tv_phillips:
friendly_name: "Phillips Tv Power"
command_on: 'JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA='
command_off: 'JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA='
Traceback (if applicable):
Additional info:
Not sure, but i think you have cannot mix the switch and the sensor.
They are separate components.
@VDRainer Hi,Think you very much. I may have found the cause of the problem.i think python-broadlink not support python3. please tell me Home Assistant is support python2.7 ?
just try to set your mac address like the this
mac: '34EA34C733F3'
this may slove your problem.
following your instructions .. error
sudo pip3 setup.py install
ERROR: unknown command "setup.py"
Sir,
I am planning to make automation in my home. Am new to this field. I have searched lot of device in web. And I found broadlink rm pro+ gateway in Indian web. Which has IR , RF & WIFI. Am planning to use more RF sensors and relay switches in my home. My query is
Kindly give ur suggestions plz
ARVINTH
[email protected]
Please don't use the issue tracker for support questions. If you need help please use our help channels:
https://home-assistant.io/help/#communication-channels
Thanks!
I openned a similar bug with different log. I provide a solution by simply updating the broadlink library to the latest version. You can find it here
This is a duplicate of https://github.com/home-assistant/home-assistant/issues/11418.
Most helpful comment
just try to set your mac address like the this
mac: '34EA34C733F3'this may slove your problem.