adamkempenich / magichome-python

MagicHome Wifi protocol for python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to change RGB color on type 0 lights (I can turn them on and off)

rAiNTwist opened this issue · comments

Hello there. I have type 0 lights, normal RGB light strips with the magic home wifi controller. I'm running the API through Visual Studio just as a test as I'm trying to do bigger and better things with it once I get it working. I'm able to turn the lights on and off thanks to a comment from another issue that solved my issue of them not turning off or on (Change to if self.device_type <= 1:). Now I'm running into an issue with the RGB request not working. This is my code:
`import time

from MagicHomeAPI import MagicHomeApi

controller1 = MagicHomeApi('192.168.0.142',0)

controller1.get_status()

controller1.turn_on()

controller1.update_device(0,255,255)
If I check the path of controller1.update_device(0,255,255) in visual studio it returns:(method) update_device: (r=0, g=0, b=0, white1=None, white2=None) -> None`
I don't even know where to start on this one as I've looked over update_device and I can't see how the variables are not reaching message = [0x31, r, g, b, white1, 0x00, 0x0f]. I would appreciate the help, thank you.

Btw, I'm also using Python 3.8.10, hints the need for changing the self.device_type to <=1:.

I have this problem too. I have type 1 led strips, and found that I am able to change the "white" value of the lights, but not the rgb values. Strange

I was able to change the default values of white1 to 0 instead of none in line 56 for me to be able to change colors