techno-tim / techno-broadlink Goto Github PK
View Code? Open in Web Editor NEWA Docker container for BroadLink devices with a REST API and React UI
Home Page: https://www.youtube.com/watch?v=4MJW29mR-Xc
License: MIT License
A Docker container for BroadLink devices with a REST API and React UI
Home Page: https://www.youtube.com/watch?v=4MJW29mR-Xc
License: MIT License
Really great project! Was so easy to set up!
But now I want to use the API but I'm not sure how to do it. Based on the postman file I'm trying to understand what a curl request might look like, but I'm completely new to using APIs at that level and I'v never user postman either, so I'm kinda stuck. Could you explain the basic structure of how the API is addressed and perhaps provide an example?
Do I understand correctly that the API cannot be used by simply calling a URL in the browser?
In case it matters, what I'm actually trying to do is adress your app via OpenHAB.
Hello,
first of all, thank you very much for your work.
However, unfortunately I am not able to add my Broadlink RM4 mini.
Is it possible that there is a problem if the Rancher VM and the WLAN with the Broadlink RM4 mini are in different networks? The WLAN has a different address range than the server LAN. I have already reset the Broadlink several times. Unfortunately, it is still not displayed / recognised in the UI. There are no restrictions within the networks. All connections among each other are allowed.
Iam using the Rancher / Kubernetes Version
With HOST_IP Value of Rancher
I hope you can support ;)
Kind regards
Schmandre
megashub
Question -- is there any way to manually re-add a device to Tim's Broadlink Control dockerized API service? I have it running on my NAS and all was working fine, but then I replaced my home network with better gear, and added a properly isolated IoT network with WAN only access, with my LAN devices able to see devices on the IoT network. Works great. My NAS is on my main LAN network, and the Broadlink RM4 mini is on the IoT network. I manually joined the RM4 mini to the IoT network, but now, the Broadlink Control service on the NAS can't discover the RM4... so /command json commands fail out with 'null' results.
TechnoTim
This is a tough one since you want these broadcasted packets to traverse vlans / networks. I think it might be possible with mDNS. I would look into that for your firewall.
megashub
yeah that's what I was afraid of... mDNS is a little brute force on Ubiquiti's Dream Machine Pro, I'm afraid. Could the container service be made to work strictly via static IP vs. requiring broadcast packet discovery? or are the commands sent to the RM4 via broadcast?
TechnoTim
possibly but I think you need to discover the device at least once to do some sort of handshake, I can't remember the details.
megashub
hmm that makes sense.. it creates a json file per discovered MAC... so I was hoping I could just edit the IP in the existing file and it would pick it up.. but that hasn't worked.
{"ip": "<RM4 IoT Network IP>", "mac": "<RM4 MAC>", "model": "RM4 mini", "manufacturer": "Broadlink", "commands": [{"id": "00e854ff-145a-4ac8-b25b-5ce84051368b", "name": "Vizio TV Power", "data": "260050000001268f1411151014351410151014101510150f153514351410153513361435143515341510141015101534141114101510141015341535143513121435133614351435150005120001274714000d05000000000000"}], "name": "", "temperature": 0.0, "humidity": 0.0}
TechnoTim
I think I understand why, but I would have to rework some stuff to make it work. If you open an issue on github I can try to take look sometime! That would be super helpful, that way someone else could possibly provide a fix too
Hi, Im using the docker version on unraid. I watched the video and read what I could find. My logs are blank no files are in my appdata folder but I can reach the webui however no devices are found. I have a RM 4 mini. Any advice?
I'm sure i'll get this eventually. Learning python now to use the console for commands.
Hi,
I run this command:
docker run -e HOST_IP=192.168.0.37 -p 10981:10981 -v /opt/broadlink/config:/app/config --network host timothystewart6/techno-broadlink:latest
I have the warning:
docker : WARNING: Published ports are discarded when using host network mode
Au caractère Ligne:1 : 1
+ docker run -e HOST_IP=192.168.0.37 -p 10981:10981 -v /broadlink/confi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (WARNING: Publis...st network mode:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
It's installed correctly in docker desktop but I can't access the webpage.
But I still have this issue:
What is wrong?
Thanks,
Figure out how to make dependabot work with python dependencies
Hi,
I'm getting an error message when discovering devices. See under log. "Discovered 0 devices" is displayed on the screen.
All my devices are found when using Broadlink Manager https://github.com/t0mer/broadlinkmanager-docker.
Devices:
RM2
RM3/mini
A1
I using the docker image.
Best Regards,
Cato
RM2
Device file data (to be used with --device @filename in broadlink_cli) :
sensors = {'temperature': 26.6}
broadcast ip is: 192.168.1.255
args: Namespace(dst_ip='192.168.1.255', ip='192.168.1.104', timeout=2)
Discovering...
devices [<rm: Broadlink RM pro/pro+ (0x2712) at 192.168.1.205:80 | b4:43:0d:38:fb:9c | 智能遥控 | Unlocked>, <a1: Broadlink e-Sensor (0x2714) at 192.168.1.239:80 | b4:43:0d:70:21:8e | 空气质量仪 | Unlocked>]
found [<rm: Broadlink RM pro/pro+ (0x2712) at 192.168.1.205:80 | b4:43:0d:38:fb:9c | 智能遥控 | Unlocked>, <a1: Broadlink e-Sensor (0x2714) at 192.168.1.239:80 | b4:43:0d:70:21:8e | 空气质量仪 | Unlocked>]
###########################################
RM2
Device file data (to be used with --device @filename in broadlink_cli) :
sensors = {'temperature': 26.6}
broadcast ip is: 192.168.1.255
args: Namespace(dst_ip='192.168.1.255', ip='192.168.1.104', timeout=2)
Discovering...
ERROR:api:Exception on /discover [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "./api.py", line 60, in discover
return jsonify(discover_devices(host_ip))
File "/app/broadlink_service.py", line 85, in discover_devices
humidity = sensors['humidity']
KeyError: 'humidity'
In Dockerfile there is this command: COPY frontend/build .
but build folder is missing in GitHub repo.
Docker now a limit on access tokens that can be used per account. Pushes will fail until this is resolved.
See https://github.com/techno-tim/techno-broadlink/actions/runs/1121057275
Currently, the discovery only works on /24 networks, so it doesn't pick up my broadlink.
As title says, I cant discover the device throught the web-UI but when i get in the bash env of the container and go to the CLI folder i can use/connect to the rm-mini. Any idea how to add the device manually in the webui??
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.