Boradlink RM devices- entitiy IDs of switches not showing up/getting added

Hi
I have 2x RM3 and 1x RM Pro+.

RM Pro+ work great with all IR and RF devices added as switches to HA. I got one RM3 working in HA (called Kitchen) but none of my second RM3’s (Living Room) entities for Switches are recognized in HA. I can confirm that the Mac address and IP are correct.

I restarted and try to refresh several times but entities of my second RM3 (living room) are not getting added. All devices controlled via the second RM3 work with IHC and E-control app

Running HA ver 0.71 or latest
Much appreciate your help
My switches.YAML and Scripts.YAML attaches. I include the script in Groups and the call in front end

NOTE: I do not get any errors in checking my config files in Hass.IO (I am running on RP3)

scripts.yaml (2.1 KB)
switches.yaml (17.1 KB)

Any error on check config? Also on rm for living room can you # out from timeout line like the other two.

In the script on living room. I see a double turn on of switch kodibox_power.

Also the broadlink switch component require command_on and command_off. However, you said you group up the script to call from front end instead of switch. So you can actually ask rm to send command via script for only device that doesn’t have command_on and command_off .

Do you see any errors pop up in the log file after restarting HA regarding the Broadlink devices?

Thanks for the reply. No errors in check config - configuration valid

timeout line was there but commented it with # to check. Added back and no difference

removed double turn on of switch kodibox_power and restarted - no difference

Not sure what you mean by “Also the broadlink switch component require command_on and command_off. However, you said you group up the script to call from front end instead of switch. So you can actually ask rm to send command via script for only device that doesn’t have command_on and command_off .” However if you see my swtiches.YAML file for RM Pro+ there are swtiches that has on’s only and they all work correct. They all have switch entity created and in developer tools-> services I can select the entity and call service and that work. Also I could trigger them via front end.

Not sure why entities are getting add to any of the switches I created for livingroom RM3. This is my first broadlink device and it is working well. Just wondering if I need to reset and check. e-control app and ICH app and Google Home (for the scenes I have added to ICH) work perfectly

Thanks for the reply. I do not get any errors in check config. In developer tools->info section I see the following

Error handling request
19:55 core.py (ERROR)
Error handling request
19:55 core.py (ERROR)
Found malformed XML at http://192.168.0.154:9080: status=ok
19:49 ssdp.py (WARNING)
Error while setting up platform broadlink
19:48 components/switch/broadlink.py (ERROR)
Error doing job: Task exception was never retrieved
19:48 helpers/entity_platform.py (ERROR)
Error doing job: Task exception was never retrieved
19:48 helpers/entity_platform.py (ERROR)
Error doing job: Task exception was never retrieved
19:48 helpers/entity_platform.py (ERROR)
Error doing job: Task exception was never retrieved
19:48 helpers/entity_platform.py (ERROR)
Setup of config is taking over 10 seconds.
19:48 bootstrap.py (WARNING)

Home-asstant.log-
2018-06-18 20:04:22 WARNING (MainThread) [homeassistant.config] Incomplete core configuration. Auto detected elevation: 15
2018-06-18 20:04:46 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
2018-06-18 20:04:50 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 301, in _async_add_entity
‘Invalid entity id: {}’.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Invalid entity id: sensor.broadlink_s1c_motion.living
2018-06-18 20:04:50 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 301, in _async_add_entity
‘Invalid entity id: {}’.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Invalid entity id: sensor.broadlink_s1c_laundry.room
2018-06-18 20:04:50 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 301, in _async_add_entity
‘Invalid entity id: {}’.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Invalid entity id: sensor.broadlink_s1c_door.frontdoor
2018-06-18 20:04:50 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 301, in _async_add_entity
‘Invalid entity id: {}’.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Invalid entity id: sensor.broadlink_s1c_kitchn.door
2018-06-18 20:05:00 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 129, in _async_setup_platform
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 157, in setup_platform
device_config.get(CONF_COMMAND_OFF)
File “/usr/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/lib/python3.6/base64.py”, line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
2018-06-18 20:05:27 WARNING (SyncWorker_16) [netdisco.ssdp] Found malformed XML at http://192.168.0.154:9080: status=ok
2018-06-18 20:05:34 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting

Have you try put the type of rm mini in the switches.yaml

- platform: broadlink  
  host: 192.168.0.129
  mac: '34:EA:34:58:8F:C9'
  timeout: 15
  type: rm_mini
  switches:
    livingroom_ac: # swtich off the A/C
      command_off: 'JgDKAJGQEzQRExE1EjYSEhAUEDUSEhISETUTEhESEjQTNRETEDcSERM0EjURNhI2ERIRNhI1EzMTEhISERMRExE0EhMSERE1EzQSNRMREhISERISEhIRExESExESNRM0EjURNhI1EayQkBM0EhISNRE3ERISEhE1ERITERM0ExEVDxE1EzURExA2EhISNRE2EjQQNxMSEjQSNBQ0FBESERESEhMPNhEUERISNRI2EjMTEhISEhERFBEREhITERISETUSNhE1EjUSNRMADQUAAAAAAAAAAAAAAAAAAA==' 

The entities from the rm mini living room will be.
switch follow by the name of the switch you given

switch.livingroom_ac
switch.livingroom_ac_state
switch.kodibox_power
switch.kodibox_mute and so on

Also did you find the broadlink send and received packet of the rm mini in livingroom from service?

As a switch it need command_on and command_off if you need only on or off command just fill in

  command_on: 'base64commandon'
  command_off: ''

added type: rm_mini and also added off and on for each switch. still same- none of the switches appear as entity. The error log

2018-06-18 20:57:37 WARNING (MainThread) [homeassistant.config] Incomplete core configuration. Auto detected elevation: 0
2018-06-18 20:58:01 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
2018-06-18 20:58:15 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 129, in _async_setup_platform
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 157, in setup_platform
device_config.get(CONF_COMMAND_OFF)
File “/usr/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/lib/python3.6/base64.py”, line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
2018-06-18 20:58:43 WARNING (SyncWorker_2) [netdisco.ssdp] Found malformed XML at http://192.168.0.154:9080: status=ok

in the front end → developer tools-> info
Found malformed XML at http://192.168.0.154:9080: status=ok
20:58 ssdp.py (WARNING)
Error while setting up platform broadlink
20:58 components/switch/broadlink.py (ERROR)
Setup of config is taking over 10 seconds.
20:58 bootstrap.py (WARNING)

so something is preventing the switches defined under livingroom RM3 not getting added

Thanks all. I searched for /usr/lib/python3.6/base64.py”, line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding and came across this article https://github.com/home-assistant/home-assistant/issues/7669

As such I removed all swtiches but the ac which I know is working with my kitchen RM3. With that livingroom_ac switch is working and no errors. Now I will add one by one and see which one is failing. Bit of work but I will learn something out of this

OK. Found the solution. I just added == at the end of the codes read from RM3 where there was no = at the end and entities got added. This is a tricky one as check config has no errors but broadlink component is having issues. This is discussed in this article https://github.com/home-assistant/home-assistant/issues/7669

I believe there was a breaking change in the broadlink config - so that friendly names had to be removed from the config. You will need to take that out for any switch and then specify the friendly name through customize.yaml

Thanks. I did that. My error was fixed by adding == at the end of the code captured. Nothing else fixed it.