Core: Broadlink remote.send_command problem

Created on 2 Oct 2020  路  17Comments  路  Source: home-assistant/core

The problem


When I set the switch to send the command it works perfectly.

  • platform: broadlink
    host: 192.168.1.48
    mac: '34:ea:34:d0:a6:ab'
    switches:
    !include_dir_merge_named /config/Broadlink/

Inside the merge file
'tv_samsung_key_channelup':
friendly_name: "TV_samsung_KEY_CHANNELUP"
command_on: 'JgBGAJWTEzcTNxM3ExITEhMSExITEhM3EzcTNxMSExITEhMSExITEhM3ExITEhM3ExITEhMSEzcTEhM3EzcTEhM3EzcTNxMABgUNBQ=='

If I use the switch, everything works fine.

The problem is when I try to use the service: remote.send_command
When I go to the menu --> "Developer tools" --> "services"
service: remote.send_command
entity: remote.broadlink_salon_remote
Service Data (YAML, optional):
entity_id: remote.family_room
command: b64:JgBGAJWTEzcTNxM3ExITEhMSExITEhM3EzcTNxMSExITEhMSExITEhM3ExITEhM3ExITEhMSEzcTEhM3EzcTEhM3EzcTNxMABgUNBQ==

When I press the button "CALL SERVICE" it does not send anything (the orange led on Boradlink does not turn on)

The entity "remote.broadlink_salon_remote" is configure with Broadlink integration

Environment

  • Home Assistant Core release with the issue: 0.115.6
  • Last working Home Assistant Core release (if known):
  • Operating environment (OS/Container/Supervised/Core): HassOS 4.13
  • Integration causing this issue: Broadlink
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/broadlink/

Problem-relevant configuration.yaml

Menu --> "Developer tools" --> "services"
service: remote.send_command
entity: remote.broadlink_salon_remote
Service Data (YAML, optional):
entity_id: remote.family_room
command: b64:JgBGAJWTEzcTNxM3ExITEhMSExITEhM3EzcTNxMSExITEhMSExITEhM3ExITEhM3ExITEhMSEzcTEhM3EzcTEhM3EzcTNxMABgUNBQ==


Traceback/Error logs


No logs


Additional information

If I remove this switch, the problem is the same. remote.send_command does not work.

  • platform: broadlink
    host: 192.168.1.48
    mac: '34:ea:34:d0:a6:ab'
    switches:
    !include_dir_merge_named /config/Broadlink/
broadlink

Most helpful comment

Now it is working. Thanks for your help.
The problem was: "I have to go into the device and turn on the entity switch"
Beginner's mistake. Sorry for the inconvenience.
The confusion was due to having the old and new systems active.

All 17 comments

broadlink documentation
broadlink source
(message by IssueLinks)

Hey there @danielhiversen, @felipediel, mind taking a look at this issue as its been labeled with an integration (broadlink) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

You are providing an invalid entity ID (remote.family_room).

Sorry for the example, I used "FILL EXAMPLE DATA" . With remote.broadlink_salon_remote the problem is the same.

Menu --> "Developer tools" --> "services"
service: remote.send_command
entity: remote.broadlink_salon_remote
Service Data (YAML, optional):
entity_id: remote.broadlink_salon_remote
command: b64:JgBGAJWTEzcTNxM3ExITEhMSExITEhM3EzcTNxMSExITEhMSExITEhM3ExITEhM3ExITEhMSEzcTEhM3EzcTEhM3EzcTNxMABgUNBQ==

Can I active any log?

Please make sure the entity is turned on. You cannot learn or send with the remote turned off.

Yes, it is OK. If I use de swicth all is OK, but if I use remote.send_command don't work.

I cannot reproduce this error here. I tested this last config and it works. Are you sure the entity is turned on? What about the entity id, did you check? We changed a lot of things recently. Please read the docs to make sure you are doing everything correct.

Please make sure the entity is turned on. You cannot learn or send with the remote turned off.

I found that mine stopped working, literally reset the whole integration and still no luck, then I saw this comment and found out that HA had turned the entity to "off".

Is this standard behavior? First time I experienced it, what would cause it to turn "off", can we default the value to "always on" somehow?

Now it is working. Thanks for your help.
The problem was: "I have to go into the device and turn on the entity switch"
Beginner's mistake. Sorry for the inconvenience.
The confusion was due to having the old and new systems active.

So I found this as I also had the same issue today and the timing seems too much of a coincidence...

I have 3 Broadlink remotes which have been working fine for a while (used every day), I'm running the 0.116 beta (and have been since last week) but all switched themselves to off seemingly randomly... This has never happened before.

@vdlr26, @Stupco do you happen to live somewhere that had a daylight savings switch over the weekend? That's the only thing out of the ordinary I can think of, that might have caused this to suddenly happen...

Sorry I can't help yo, my problem was very simple. Beginner's mistake.

@vdlr26, @Stupco do you happen to live somewhere that had a daylight savings switch over the weekend? That's the only thing out of the ordinary I can think of, that might have caused this to suddenly happen...

Yup, Australia here so we switched over on Sunday but I'm certain mine was working up until Monday when I happened to be re-organising and moved my Broadlink device which I believe must have triggered it.

Hey @felipediel is the ability to turn on/off a remote even necessary?

For some reason, my remote turned off overnight, so all my blinds didn't open automatically this morning as there was nothing "on" to send commands.

Not sure what triggered the remote to be off, but this is the second time now.

If this is (for some reason) essential coding practice to be able to turn off the remote, I may need to include additional code to detect state changes and force it back on...

Would love your input! 馃憤

Yes, this is necessary. I'm investigating whether an event could be causing the remote controls to turn off on their own. I have a guess: when the device is marked as unavailable, when it comes back the state is off. Could you confirm this by checking your history?

Thanks for the reply, and fair enough, my workaround for forcing it always on by checking state change will remain in place then, which is suitable 馃憤

Here are the logs for both times it happens. Interestingly the first (05/12) it was unavailable -> off, whereas the recent one it was just unavailable.

13 October 2020
RMpro Remote turned on
21:28:27 - 23 hours ago
RMpro Remote became unavailable
21:25:17 - 23 hours ago
RMpro Remote turned on by Stuart
8:35:54 - 1 day ago
12 October 2020
RMpro Remote became unavailable
23:00:36 - 2 days ago
RMpro Remote turned on
2:24:27 - 3 days ago
RMpro Remote became unavailable
2:22:22 - 3 days ago

And the "Daylight savings" event:

RMpro Remote turned on by Stuart
13:24:22 - 1 week ago
RMpro Remote turned off
12:58:00 - 1 week ago
RMpro Remote became unavailable
12:57:00 - 1 week ago
RMpro Remote became unavailable
10:40:53 - 1 week ago

Unfortunately I don't have access to the home-assistant.log for these times as I've done a few server restarts.

Anyways, as mentioned I'm currently using a workaround, happy to help test if needed though.

Hi, same behavior, googling got me to the issue.
Just thinking - it makes sense that remote.send_command is not working when the remote entity is off, but having switches (as described by OP) successfully execute command_on and command_off makes this really hard to troubleshoot... maybe both should fail with an error 'you're trying to use a device that is off, try turning it on first' or something...

The purpose of the on/off button is to allow users to sync states in the UI without sending/learning codes. This is useful for controlling TVs, AC units, etc.

This is not necessary for switches because they don't hold any state.

Was this page helpful?
0 / 5 - 0 ratings