Closed webworxshop closed 4 years ago
Hey there @danielhiversen, mind taking a look at this issue as its been labeled with a integration (broadlink
) you are listed as a codeowner for? Thanks!
I have the same problem and I can add my experience since I hope it will be useful to understand and solve the problem. I'm using a Broadlink RM Mini 3 and until yesterday I didn't have any problem while sending IR packets. I've upgraded the mini3 firmware from 55 to 56 and I discovered my broadlink device wasn't able anymore to turn on/off my air conditioner nor learning IR codes. I did a hardware reset and downgraded the firmare to 55 again, but it didn't solve the problem. So, I used the python broadlink library, but with version 0.11.0[1] my device was not discovered! Instead, using version 0.10 from CLI is fine, also for learning/sending codes. I've then installed broadlink 0.10 in my HA (hass.io) with "custom deps" addon and I can send IR codes, but I still can't use the broadlink.learn service (The message "Failed to connect to device" is posted in the logs.)
Any update? Need help testing anything?
Same problem here, just bought the RM Mini 3 and thought it was going to work. Do you suggest to replace it with another similar device? Which one?
I already had an rm pro2 now i learn the codes with that one and pass them on to the mini in home assistant, works great.
i bought a second RM Mini 3, i seem to be having same issue with the new one. If i try Broadlink.learn i get the same error as OP. However the broadlink library is now on 0.12 and i can learn codes just fine using the CLI. Im also still using my older RM mini 3 to learn codes which works but is not fun!
Hello
I bought "Broadlink RM4c mini" but it doesn't work with Home Assustant
Failed connection to device.
Best regards ArchGalileu
@ArchGalileu currently the only solution is to use the software Broadlink Manager on Windows to learn the codes you need. Then you can embed them in Home Assistant broadlink actions as you need: it is only the broadlink.learn service that is broken.
@Vinz87 the same happens can't connect...
Device works perfect, i can command AC and Projector...
Just can't get the codes from it :-1:
I think I am suffering from the same problem. HASSIO install inside a VM. HA version: 0.102.1 Hass.io Supervisor: 192
I have a RM mini 3, Firmware: 44057 (according to the ihc app), connected it to my wifi using the ihc app. I was able to use the broadlink.learn service once, but not anymore afterwards (always getting the error message now). The RM mini 3 is connected to a 1A 5V power supply.
Same problem here, RM mini 3, Firmware 44057 with the app works fine but it doesn't work on hassio. broadlink.lear and broadlink.send don't work. Any news?
Same problem here, RM mini 3, the app works but not working in Home Assistant in 0.102.3. Neither broadlink send nor learn are working.
My RM pro is working.
I figured out how to fix this and hoping will be helpful for you all:
env: HomeAssistant installed in venv
, Rpi 1, RM mini3 latest FW.
I have manually installed openssl-1.1.1
, linked libssl.so.1.1
and libcrypto.so.1.1
files in /usr/lib/arm-linux-gnueabihf/
Reinstalled cryptography
pip uninstall cryptography
pip install cryptography
Edited lib/python3.7/site-packages/homeassistant/components/broadlink/__init__.py
as specified in PR made by @bmfurtado https://github.com/home-assistant/home-assistant/pull/27341
And after a full restart I got everything working: learn, send and other features.
Great! A solution seems to have been found for this issue. Is there a developer who can integrate this fix into the official Broadlink integration for HA? Perhaps @Danielhiversen ?
Same for me, RM Mini 3 firmware 44057, it works fine in IHC App but nothing is responding in home asssistant (not even error logs). Neither remote.learn_command and remote.send_command nor broadlink.learn and broadlink.send. The RM led does not blink in white as it does when I configure from the app so I suspect it's not contacted at all. I can't seem to configure via the python library neither.
Many different problems are being mentioned in this issue.
@webworxshop Here is a detailed view of your packets. Make sure to disable line wrap to get a good view of it. The packets are exactly the same, except for the device IDs. I couldn't decrypt the first packet because I don't have the key, but look at the payload checksum. Same size, same content. Even so, the information you sent is incomplete. To understand the problem, I need you to run this script, learn a code and send me the file debug.txt.
Related issues: RM Mini 3 0x5f36 and RM4 series are solved and waiting to be merged.
Not sure if it's of any value here as I am unaware of the current HA implementation but I implemented a custom switch that sends a simple request to an local API that supports Broadlink IR devices very well. I just made a Docker image available to easily deploy it:
https://github.com/brianpierson2020/broadlinkgo-docker
Since it's an API and in Docker now, it should make it really easy to integrate with HA for other users.
I use this in combination with my TP link Energy Monitoring where I determine the current Watt usage of the IR controlled devices so see if they are on or off. This way I can use triggers and toggle switches for an otherwise dumb IR. :) If you want I can publish those custom switches and sensors later too.
@brianpierson2020 Thanks for the suggestion.
We are using python-broadlink. It is written in Python and supports a wider range of devices.
But I found the broadlinkgo an interesting project. I can contribute by adding support for the RM Mini 3 0x5f36 and RM4 series, as long as @rob121 adopts the MIT license.
Home Assistant release with the issue: 0.97.2
Last working Home Assistant release (if known): Potentially whatever release contained python-broadlink 0.10 (but perhaps not, see below)
Operating environment (Hass.io/Docker/Windows/etc.): Docker
Component/platform: Broadlink
Description of problem: When calling the
broadlink.learn
service, the service does not appear to be called. The message "Failed to connect to device" is posted in the logs. The Broadlink device LED does not go white (for learning mode).Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):I've double checked both the IP and MAC and they are working elsewhere (see below).
Traceback (if applicable): None, just the error message above.
Additional information: From looking at the code, the message appears when the device fails the auth method. I tried the command line tool from the python-broadlink library and it failed in a similar way with the latest version (see mjg59/python-broadlink#274). I fixed the issue in the library by going back to initialising the AES objects on every call as per the last working version (see mjg59/python-broadlink#276).
The problem is that the issue persists in HASS even if I use my fixed version of the library. I installed my version inside my Docker container with:
...and then restarted HASS. Trying the
broadlink.learn
service results in the same message. A visual inspection of the broadlink module inside the container confirms it is the right code. I even added a print statement to it to make sure!A tcpdump yields the following initial packet sent by HASS (MAC address redacted):
The
broadlink_cli
tool with the working library version yields this initial packet:As you can see the encrypted payload part of the packet is completely different! For some reason HASS is still sending a mangled packet. I'm completely stumped as to why, since it is using the fixed library version.
Hopefully someone else has more idea than me! Please let me know if I can provide any more information.