Open ninadpchaudhari opened 2 years ago
After spending the entire afternoon after this, I came to the same conclusions and ended up getting the commands from the .storage
file.
I listened to all the events HA is firing when sending an IR command and the base64
is not present in any of them. So I guess there is no way with the current integration to get them as in the past.
It would be nice to create a fork of this project and at least push these findings.
I managed to get it running locally so it could be run as a docker container or an add-on.
Building on your work @ninadpchaudhari and @victorigualada I've forked and updated the project. I've made a PR to merge those changes back but in the mean time you can use it at https://callumgare.github.io/BroadlinkIRTools/
@victorigualada thing is, it was using a ≠ service, from the broadlink direct integration, that did return the command.
Now, these new services do not return it. That's why we'll prolly always need to parse from the .storage
file.
As this tool was broken for new versions of HA, Tried to change the WebSocket API and the commands to work with the new versions :
Sadly, the new
learn_command
does not give back, it only stores the same into the file. I confirmed this via the source code in HA Core's Broadlink integration: Function async_learn_command, LineScreenshot after the change! Command is sent successfully, but the response is just the notification!
Even earlier the HA's remote.py's learn command function did not return anything, but based on this project, I think, we are expecting an event type of state changed with the irCode
let irCode = message.replace("Received packet is: ", "");
Perma Link to the function As of now, only thing that HA send back isI wonder
.storage
directory