moonliightz / magic-home Goto Github PK
View Code? Open in Web Editor NEWA CLI and library written in Go for controlling Magic Home (Magic Hue) LED Strip Controllers.
License: MIT License
A CLI and library written in Go for controlling Magic Home (Magic Hue) LED Strip Controllers.
License: MIT License
This is my output of the discovery command.
10.0.0.11 | B4E8421C2D5C | AK001-ZJ2145
I was able to debug your code and found that in the SetColor function this line below is causing the issue.
bytesToSend = append(bytesToSend, byte(sum&0xff))
Once I commented that out the lights change color like normally.
Not sure why that doesn't work for my controller, if you need anything else from me feel free to ask.
discovery and state work fine to turn the light's on and off, but when i try to us the color argument it turns the light off rather than change the color eg: $ magic-home c 192.168.1.7 255 0 0 0
Hey!
First off, this library looks amazing! I'm looking to upgrade my lighting at home, and can't find any solution that fits my needs, so I'm thinking of DIY-ing it, I like go, so this seems to fit my needs perfectly!
Since I'm new to all of this, I do have a few questions.
Can I use this library without having to use the "Magic Home" app? I've seen a few videos where you have to go through the app in order to connect the controller to wifi. Is it possible to do the setup with this library or any alternative solution without the app?
Also, just to make sure, this library is for controlling these kind of devices?
Hello, I have 3 controllers on same network, the discovery doesnt find them, no network activity on wireshark.
Also I can turn them on/off but not change colors. here is info:
D:_SUITE\magichome>magichue discover
Discovering..........
No devices discovered.
D:_SUITE\magichome>magichue status --json 192.168.1.150
{"DeviceType":51,"State":1,"LedVersionNumber":10,"Mode":97,"Slowness":5,"Color":{"R":186,"G":255,"B":90,"W":0}}
D:_SUITE\magichome>magichue status --json 192.168.1.242
{"DeviceType":51,"State":0,"LedVersionNumber":10,"Mode":97,"Slowness":10,"Color":{"R":129,"G":82,"B":28,"W":0}}
D:_SUITE\magichome>magichue status --json 192.168.1.241
{"DeviceType":51,"State":1,"LedVersionNumber":10,"Mode":97,"Slowness":5,"Color":{"R":164,"G":62,"B":3,"W":0}}
Hello,
I have some magic home devices with v9 firmware that don't seem to be responding to requests to change color. I am able to turn the lights on and off and get status back from the lights. I am attempting to investigate myself to implement a fix but I haven't been able to find the issue yet. I have other devices which are v8 firmware that work fine.
I arpspoofed the phone app to intercept packages. I took a few notes:
power off:
0000 3b 24 00 00 00 00 00 00 00 00 00 00 5f
23 gray:
0000 31 17 17 17 00 00 0f 85
candle mode orange:
0000 39 d1 ff 2f 00 0a 32 03 77
candle mode blue:
0000 39 d1 04 00 ff 0a 32 03 4c
candle mode blue slow:
0000 39 d1 04 00 ff 1f 32 03 61
candle mode blue fast:
0000 39 d1 04 00 ff 01 32 03 43
red/green cross fade speed 77%:
0000 81 33 23 2d 23 01 81 00 00 00 0a 00 f0 a3
0000 38 2d 07 2f 9b
red/green cross fade speed 77%:
0000 38 2d 01 64 ca
The CLI tools says this for discovery:
Address | ID | Model
---------------------------------------
192.168.1.140 | B4E842996A9A | AK001-ZJ2146
My controller is 6pin. It supports RGB + WW + CW. Sending the command: color IP 0 0 0 255 enabled only WW. Will there be CW support?
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.