Broadlink RM4 mini Failed to call service remote.learn_command

HA 2023.7.3

I can’t get broadlink RM4 mini working. When I try to run the remote.learn_command I get the error: Failed to call service remote.learn_command. Unknown error.

I can see that it actually learns the code and stores it in broadlink_remote_ec0bae0c97c9_codes

I get the same error trying to run the remote.send_command.

Could you describe how you set up the integration?

basically I just went to Setting / Add Integration and selected Broadlink. The installation completes without any errors

There is an update in that the integration actually work, even it throws the error.

I can call the remote.send_command and it can set the AC temp af turn it on and off based on the learned commands.

Weird. How are you calling the remote.send_command service? The problem might be there rather than in the integration.

I just reinstalled HA, now everthing works. I am calling til remote. commands in the exact same way, only this time it works.

I can see that this time two files are created. The file broadlink_remote_ec0eae0c97c9_flags was not there the first time.

Thanks for the help :slight_smile:

Now it stopper working again.
I call the service from developer tool

Are you getting any error messages? I get quite a lot of these from my RM4:

2023-08-03 14:46:43.421 ERROR (MainThread) [homeassistant.components.broadlink.updater] Error fetching Broadlink remote (RM4 mini at 192.168.1.101) data: [Errno -4000] Network timeout: No response received within 10s

This was the first one I set up - with later ones I specified a longer timeout.

Where do I find the logs?

I get these
ValueError: Enum RemoteKeyCode has no value defined for name 'KEYCODE_sluk'
ValueError: Enum RemoteKeyCode has no value defined for name 'KEYCODE_8grader'

1 Like

I get the same errors, however the script runs, and executes the command successfully.