rob121 / broadlinkgo Goto Github PK
View Code? Open in Web Editor NEWBroadlink golang http server
License: MIT License
Broadlink golang http server
License: MIT License
Finally some good software for this hardware. Even Broadlink can't manage that on their own hardware. Great software, thanks a lot! I have two features in mind that could make it even better. Maybe you could consider to:
Again, great work! Thanks a lot.
Hi! Thank you for this! It seems to work however I haven't been able to successfully train an RM4 Mini. I added a known device like so:
knownDevice{deviceType: 0x648d, name: "Broadlink RM Mini 4", supported: true, ir: true, rf: false, power: false},
However learning always times out. I looked at the PR for the RM3, found the code for the RM4, and I am able to discover it however learning never work. Any pointers?
I placed broadlinkgo in a docker container along with some other code wrapped around it. Altough broadlinkgo is cross-platform already and Docker won't add any value for that matter. It is great to manage Broadlinkgo in an existing infrastructure along other Docker containers (also mostly API's), with tools such as Portainer.
I could share some thoughts on it if you'd like. It would be fairly simple to arrange this. It basically only requires one configuration file and some documentation in the case of this project.
Good day,
I feel like I am missing a step or something getting this to work for me. I figured I have a Windows 10 machine constantly on and might as well use the .exe in the releases. So I downloaded v1.09 (the one that says for RM4) and fire off the .exe and it appears to be doing what it should but shows that it finds an "Unknown device (0x649d)" at the IP address that my RM4 Mini has. I checked out the "known_devices" file in the source code and I don't see any RM4 devices in there, so is the RM4 Mini not supported in the RM4 version of v1.09?
Thanks!
**Please disregard -- I am finding new ways around issues I am having
Rob,
Thanks for creating this package. It seems very useful.
I'm running broadlinkgo in a KVM Linux host guest running Ubuntu 20.04. I have multiple host interfaces provided by KVM. By default broadlinkgo, opens a listenPort on 0.0.0.0. This doesn't seem to work for me.
If I hard code in "my.host.ip.addr:" instead of "" into the TWO ListenPort call in the v1.09 codebase then discovery works. Could we add support for flag providing a specific host interface IP for binding instead of listening on 0.0.0.0?
Anyhow, after I worked around that issue v1.09, it was complaining about not knowing what the new RM3 mini model number. Which looks to me a prior reported issue in the ISSUES. So I added that to knowndevices.go. It worked and discovered it fine, but I could not learn IR from my newer RM3 mini. Looking at the RM4 Update branch, I see that perhaps these new devices use a different kind of protocol header exchange. OK, so I checked out the RM4 Update branch and try to same hard coded host interface modification to the now THREE ListenPort calls. Sadly, discovery fails and I can not add these devices via the --mode manual either.
Rob,
Do you have any suggestions on how to make this work with the new RM3 Mini using a Ubuntu 20.04 host? I'd like to have it work inside Ubuntu 20.04 KVM guest with multiple interfaces. However, if you have a path less resistance recommendation, I'm all ears. I don't know what requirements are to compile from the v2.0 tag and newer tags, but Ubuntu 20.04 doesn't seem to have it ( i.e go net.embed package) isn't included in the go lang package in the 20.04 distro. TIA
btw, I was able to get broadlinkmanager working from within a docker release, but had a similiar issues with picking the right network interface from the multi interface KVM guest. That works now, so I know my setup can work inside a multi interface KVM guest.
IR works great but RF not at all. It stays on 'Waiting for remote presses....' (red LED turns on on Broadlink) until I get the message 'Error: error while calling learn: learning timeout'
I have held the remote button continuously (I believe it continually transmits during this time as it has a transmit indicator and has long press functionality). Tried pulsing the remote button and also pressed the remote button before the button on the web interface.
I tried with another 433MHz remote as well.
In both cases, I had no issues learning RF commands using the Broadlink app IHC.
My device model is RM pro+.
Your logs say Found a supported Broadlink RM3 Pro Plus, device type 10141 (0x279d)
'Broadlink Manager' another program I tried to use also won't capture RF and my device is identified as 'RM2 Pro Plus3' in that software.
I keep gettig this error when I try to add a device (RM4 Pro, or RM3 mini)
Any thoughts / suggestions ??
Error creating new device: error making authentication request: error while waiting for device response: received a packet with a length of 56 which is too short
Both compiled from souirce as well as precompiled binary on Raspberry PI 4
I think this is pretty standard device from broadlink, it would be fantastic if you could support it.
I wish I had time to do it myself!
First of all I would like to thank you for making this available and let you know that I have been using your device handler (1 Rm Pro and 1 RM mini) for over 6 months at least without any hiccups.
Last week I have decided to buy some new devices to expand my system capabilities and I believe I have hit some kind of snag here.
I have bought 1 new Pro plus and two RM mini 3. The Pro plus installed fine without any problems but both Rm mini 3 are returning with the message "unknown device (0x5f36)" (see picture attached);
The RM mini 3 I have bought are like picture below:
I have done some digging here and I discovered that these new ones (although having the same FCC ID as my existent RM mini 3, apparently are manufactured in a different factory and for some reason, your device handler is not picking up on them being Rm mini 3’s.
I have the feeling that maybe all that needs to be done is adding these new models to the RM mini 3 library and the handler will identify these new Rm mini 3’s as Rm mini 3’s too.
I would really appreciate it if you could solve this issue.
I feel like this is what’s going on but I have no idea how to fix this myself. I am running this program on a raspberry Pi 4B.
Thanks in advance
It seems to connect to my RM Mini 3 up to the point of trying to enter learn mode where it returns error 65526, I have no idea what this means, can someone help? Presumably it means that function is unavailable, but I don't know why.
[0][08:49:43]~/go/broadlinkgo/cmd(master)*$ go run test.go
2021/02/13 08:49:44 Listening to address 0.0.0.0:44771
2021/02/13 08:49:44 Received packet of length 128 bytes from 192.168.10.40:80
2021/02/13 08:49:44 Found a supported Broadlink RM Mini, device type 10039 (0x2737) at address 192.168.10.40, MAC 34:ea:34:e3:ab:8e
send a request to the device and wait for response
{0 []}
retries: 1
SENDING PACKET
PACKET SENT to 192.168.10.40:80
+++READING PACKET
INSIDE READPACKET
packet length 88
2021/02/13 08:49:44 Device 34:ea:34:e3:ab:8e ready - updating to a new key e43a6269e43a62691baed85851214f48 and new id 07000000
=== resp
(broadlinkgo.Response) {
Type: (broadlinkgo.ResponseType) 1,
Data: ([]uint8) <nil>
}
=== resp
2021/02/13 08:49:49 Found 1 devices
2021/02/13 08:49:49 Devices Found
k is 34:ea:34:e3:ab:8e
v is [192.168.10.40 10039]
Calling Learn...
===== Dump deviceExistsAndIsKnown
(*broadlinkgo.device)(0xc0000ee000)({
conn: (*net.PacketConn)(<nil>),
remoteAddr: (string) (len=13) "192.168.10.40",
timeout: (int) 5,
deviceType: (int) 10039,
mac: (net.HardwareAddr) (len=6 cap=8) 34:ea:34:e3:ab:8e,
count: (int) 29400,
key: ([]uint8) (len=16 cap=16) {
00000000 e4 3a 62 69 e4 3a 62 69 1b ae d8 58 51 21 4f 48 |.:bi.:bi...XQ!OH|
},
iv: ([]uint8) (len=16 cap=16) {
00000000 56 2e 17 99 6d 09 3d 28 dd b3 ba 69 5a 2e 6f 58 |V...m.=(...iZ.oX|
},
id: ([]uint8) (len=4 cap=4) {
00000000 07 00 00 00 |....|
}
})
===== Dump deviceExistsAndIsKnown
device 34:ea:34:e3:ab:8e is of device type 10039 (0x2737) and IS capable of sending and receiving IR
inside d.learn
deadline is 2021-02-13 08:50:49.304681991 +0000 GMT m=+65.160959137
before enterLearningPayload
send a request to the device and wait for response
{0 []}
retries: 1
SENDING PACKET
PACKET SENT to 192.168.10.40:80
+++READING PACKET
INSIDE READPACKET
packet length 72
returning processedPayload 349
=== resp
(broadlinkgo.Response) {
Type: (broadlinkgo.ResponseType) 0,
Data: ([]uint8) <nil>
}
=== resp
after enterLearningPayload
making CheckData request
=== payload ===
{106 [4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]}
(broadlinkgo.unencryptedRequest) {
command: (uint8) 106,
payload: ([]uint8) (len=16 cap=16) {
00000000 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
}
}
=== payload ===
send a request to the device and wait for response
{0 []}
retries: 1
SENDING PACKET
PACKET SENT to 192.168.10.40:80
+++READING PACKET
INSIDE READPACKET
packet length 72
%%%%% Returning error payload %%%%% 65526
=== resp
(broadlinkgo.Response) {
Type: (broadlinkgo.ResponseType) 2,
Data: ([]uint8) <nil>
}
=== resp
!! some kind of problem happened !!
err => <nil>
resp.Type => 2
DeviceError => 2
making CheckData request
Hey @rob121 what's up.
Would you mind adding a license to this code? I suggest you to use MIT license.
This would encourage me to contribute to it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.