Hello. I’m trying to configure my Broadlink RM Mini with Home Assistant. I’ve tried different ways to learn signal from my remote (TV OK):
Copying from EControl -as guide says-
Using service from Home Assistant to Lear signal.
The problem is that signal is different every time I press power button and as a script it doesn’t work and making switch in
switch:
- platform: broadlink
host: 192.168.1.8
mac: ‘xx:xx:xx:xx:xx:xx’
timeout: 15
switches:
condizionatore:
friendly_name: “Condizionatore”
command_on: ‘AAAAA’
command_off: ‘AAAA=’
tv:
friendly_name: “TV”
command_on: ‘AAAA’
command_off: ‘AAAA’
give me this error in Log:
Error while setting up platform broadlink
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/switch/broadlink.py”, line 157, in setup_platform
device_config.get(CONF_COMMAND_OFF)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/switch/broadlink.py”, line 193, in init
self._command_on = b64decode(command_on) if command_on else None
File “/usr/local/lib/python3.6/base64.py”, line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
I’m using broadlink switch in HA and it works normally. So there might be something with your config. If you show your config for the broadlink switch then I can check. When you post your config here please use </> so that I can see if it is correct.
The setting is correct and you need to put type:
Where did you put the switch: , check the ip of your broadlink as well.
Once setup complete, go to configuration>general>check config
ip is correct. I fixed it in my router’s configuration. I’ve tryied adding " type: rm " but it doesn’t work!
Setting:
platform: broadlink
host: 192.168.1.8
mac: ‘78:0f:77:5a:e1:75’
timeout: 15
type: rm
switches:
tv:
friendly_name: “TV”
command_on: ‘JgBYAAABJ5YRFBEUERUQFREUERQROREVEDkRORE5ETgRORE5ERQROREUETkRFBEVEDkRFREUERQROREUETkROREUETkROBE5EQAFJgABKEsRAAxhAAEnSxIADQU’
command_off: ‘JgBYAAABJ5YRFBEUERUQFREUERQROREVEDkRORE5ETgRORE5ERQROREUETkRFBEVEDkRFREUERQROREUETkROREUETkROBE5EQAFJgABKEsRAAxhAAEnSxIADQU’
ERROR from LOG:
Error while setting up platform broadlink
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/switch/broadlink.py”, line 157, in setup_platform
device_config.get(CONF_COMMAND_OFF)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/switch/broadlink.py”, line 193, in init
self._command_on = b64decode(command_on) if command_on else None
File “/usr/local/lib/python3.6/base64.py”, line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
EDIT: I don’t understand why I have problems with </>
The problem with the formatting is that you really need a blank line before and after the code that you are selecting then the </> button will work every time.
To your error the error is binascii.Error: Incorrect padding that means that your base64 string is not divisible by 4 so add enough AA chars to the end of the string to make it divisible by 4 then add == to the end of the string…