Where broadlink remote commands are stored?

I am playing with broadlink remote type, I wrote the code to learn IR codes with

- service: remote.learn_command

and then send the learned IR packet with

- service: remote.send_command

and all works fine. But I have a doubt… where are the learned commands stored? How can I delete the stored commands?

The learned IR command string is shown in a notification if I remember correctly. You can copy it and paste it in a yaml file. You can use them e.g. in automations or template media players.

1 Like

No, I just get a notification to press the remote command button for every learning code I declared with remote.learn_command" but the IR packet isn’t showed anywhere. I can call it using “remote.send_command” later, and it works, , but I can’t see the data.

The IR packet must be stored in any place, as I can call it.

You are correct, my info was old. From the docs: The packet will be printed as a persistent notification in the States page of the web interface.

1 Like

I can see the script name, state and atributes in the states page of the interfacxe, but I can’t see the packet….how can I access to the packet?

I too would like to know where the new remote command system is storing it’s commands, this seems like a bit of a step backwards from being able to paste IR packets into scripts, switches etc.

Edit: Upon actual use I found it’s a good idea, as the packet need only be stored once then called from anywhere. The list is good though to see what names have been used and to edit packets. Perhaps they will integrate a command store in the GUI in the future.

Edit 2: I’ve found that editing the codes file breaks everything. Read-only.

Wasn’t actually hard to find…

/config/.storage/broadlink_remote_34##########d_codes

2 Likes

Hello,
how to delete a command stored in file? if i remove manually this reapper at reboot

That sounds strange. I’m sorry to ask but did you save the file?

Anyways the json file is just a file with the codes you have learnt, it’s not what is actually in your configuration if I understand it correctly.
So there is no harm in keeping old codes there.

I would like to know too. So I would just copy the codes to another broadlink.

Did you figure how to delete old codes? My naming convention is wrong and I would like to start over on some of the codes learned already.

This has all changed in 0.115 and for the better IMHO.

Previously I used the Broadlink Manager Windows program to lean key presses and then paste these into yaml switches/scripts. Now you can use the remote.learn_command service in developer tools to learn codes much quicker:

All codes for a remote get stored in a file within the \config.storage folder:

image

Even better you can then send a code by calling the remote.send_command service and specify the remote name and command name in the service data rather than a long b64 code. Its all in the docs:

Yes, I understand. I want to delete some of the codes in the broadlink_remote_24dfa7f1167e_codes file and start over since I labeled it incorrectly.

If you re-learn an existing command with a new code then the command will be overwritten.

If you want to change the name of commands, e.g. to make them better or more consistent, then I don’t know how you would do that without editing the file (or deleting the Integration and starting from scratch). The docs say not to do it so take care if you decide to proceed.

I would suggest that you first make a backup copy of the file so that you can restore it in case you mess up. Also start with a small easy change first to check that you can edit the file successfully, don’t try and do everything all at once.

Seems like there is no easy way to remove selective ir code in the .storage folder than to delete the device(s) from the Broadlink integration. Likely, I only started with one Broadlink device.

You just have to change remote.send_command by remote.delete_command

1 Like

At the time of the question, this function had not yet been implemented.

Now, my doubt is: if I copy the codes from one file and paste it in another, will it work? I have two broadlink and two identical remote controls… I didn’t want to have to copy all the codes again

I’m able to learn and send IR codes okay but I don’t seem to have a /config/.storage/ folder. I have checked in File editor and via Samba and cannot see any folder.
Where else can I look?

I don’t seem to have this folder or is it hidden?

It is hidden. Any time you see a file name starting with period (.), it’s usually a hidden folder. If you are using samba, there is a view tab on top of windows explorer. Click on it and check box that says Hidden Items