MoonLiightz / magic-home

A CLI and library written in Go for controlling Magic Home (Magic Hue) LED Strip Controllers.
MIT License
51 stars 8 forks source link

Color change doesn't like on my Controller. #5

Open dyllan500 opened 3 years ago

dyllan500 commented 3 years ago

This is my output of the discovery command.

Address | ID | Model

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.

MoonLiightz commented 3 years ago

Hey, thanks for your advice. Normally this line generates the required checksum, interesting that it works without. Can you maybe send me the output of the following command?

./magic-home status --json 10.0.0.11
dyllan500 commented 3 years ago

Here you go. {"DeviceType":51,"State":0,"LedVersionNumber":9,"Mode":97,"Slowness":1,"Color":{"R":182,"G":182,"B":182,"W":0}}

JetSetDoritos commented 2 years ago

Color change SetColor doesn't work for me either, commenting out that line didn't change anything. Powering on and off works fine.

My output, {"DeviceType":51,"State":1,"LedVersionNumber":8,"Mode":97,"Slowness":1,"Color":{"R":255,"G":0,"B":0,"W":0}}

I believe I have this controller