Broadlink RM Mini 3 Weirdness need help

Hi There

I really need help here.

I have configured the RM Mini 3 correctly so far. It picks it up and I am able to learn remotes. However the code it learns is not usable. HA doesn’t like it.

Im using Ubuntu 16.04

Im not sure if there is a length limit??

Either way. I pull the remotes from the econtrol app using this https://github.com/NightRang3r/Broadlink-e-control-db-dump

This is my config file

- platform: broadlink
  host: 10.1.1.137
  mac: 'b4:43:0d:e4:14:b7'
  switches:
    tv:
      friendly_name: "Main Tv"
      command_on: 'JgAyAXI5Dg4PKg8ODw4ODg8ODg4PDg8ODg4PDg8ODg4PKg8ODw4ODg8ODg4PDg8ODg4PDg8qDw4ODg8ODw4ODg8ODw4ODg8qDw4PKg8qDysOKw8NDw4PKg8ODyoPKw4rDisPDg4rDgAJmHI5Dg4PKw4ODw4ODg8ODw4ODg8ODw4ODg8ODg4PKw4ODw4PDQ8ODw4ODg8ODw4ODg8rDg4PDg4ODw4PDQ8ODw4ODg8rDg4PKw4rDisPKg8ODg4PKw4ODysOKw4rDyoPDg4rDwAJl3I5Dw4OKw4PDg4PDg4ODw4PDg4ODw4ODg8ODw4OKw8ODg4PDg4ODw4PDg4ODw4ODw4rDg4PDg8ODg4PDg4ODw4PDg4rDg4PKw4rDyoPKg8ODw4OKw4PDisOKw8qDyoPDg8qDwANBQAAAAAAAA'
      command_off: 'JgAyAXI5Dg4PKg8ODw4ODg8ODg4PDg8ODg4PDg8ODg4PKg8ODw4ODg8ODg4PDg8ODg4PDg8qDw4ODg8ODw4ODg8ODw4ODg8qDw4PKg8qDysOKw8NDw4PKg8ODyoPKw4rDisPDg4rDgAJmHI5Dg4PKw4ODw4ODg8ODw4ODg8ODw4ODg8ODg4PKw4ODw4PDQ8ODw4ODg8ODw4ODg8rDg4PDg4ODw4PDQ8ODw4ODg8rDg4PKw4rDisPKg8ODg4PKw4ODysOKw4rDyoPDg4rDwAJl3I5Dw4OKw4PDg4PDg4ODw4PDg4ODw4ODg8ODw4OKw8ODg4PDg4ODw4PDg4ODw4ODw4rDg4PDg8ODg4PDg4ODw4PDg4rDg4PKw4rDyoPKg8ODw4OKw4PDisOKw8qDyoPDg8qDwANBQAAAAAAAA'

This is my log file


reuben@hass:~/.homeassistant$ cat home-assistant.log
17-04-29 19:33:21 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform broadlink
Traceback (most recent call last):
  File "/home/reuben/.local/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 155, in _async_setup_platform
    entity_platform.schedule_add_entities, discovery_info
  File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/reuben/.local/lib/python3.5/site-packages/homeassistant/components/switch/broadlink.py", line 137, in setup_platform
    device_config.get(CONF_COMMAND_OFF)
  File "/home/reuben/.local/lib/python3.5/site-packages/homeassistant/components/switch/broadlink.py", line 163, in __init__
    self._command_on = b64decode(command_on) if command_on else None
  File "/usr/lib/python3.5/base64.py", line 88, in b64decode
    return binascii.a2b_base64(s)
binascii.Error: Incorrect padding

Now I would like to use this through IFTTT to turn on my tv using Google Home and Im not sure how to call that as well.

Im lost here and any help would be appreciated.

I had this same problem last week. I assume you are pulling the code from the HA frontend card that gets created? That doesn’t work too well, the code gets truncated. So, the full length code is written to the logs as well. After you call the service and press the button, go to your logs and copy the code from there. Everything should work fine after that.

Hi ! I set mine up just yesterday and experienced weirdness also. Luckily my TV is an LG so I was able to use the sample code in the Broadlink components page and work from there.

I was able to capture IR commands and copy them from the cards created on the HA main page without issue.

What I noticed was that commands given in the code samples all ended in either one or two ‘=’, and the captured codes don’t have any. So I started adding ‘=’ to the end of codes until they started working :grinning:.
I had to add one to my captured TV codes and two to my captured amplifier codes.
As an aside I was also able to script consecutive commands with delays in between to create a macro.

I can’t believe this little thing was only $20 !!

Wow I felt real stupid. I was wondering about those =, I will give this a go

Thank you That was my issue. I have it all working now.

I am running a hassio installation on a pi and I do not know what log to look in or where to find the log file to get this code. The one on my home screen is truncated.

Thanks Matt

I had the same issue. If I recall I looked in the home-assistant.log in the .homeassistant folder.

I found it, it filled in a persistent sensor with the code.