Closed thevinz62 closed 5 years ago
Hi
Are you sure you use python 3? (This error seems related to python 2.7 which is not supported by this library).
Try to do this: python3 MilightWifiBridge.py -i 192.168.0.211 --getMacAddress
You'll maybe have to install python3 if it's not done: http://www.knight-of-pi.org/installing-python3-6-on-a-raspberry-pi/
If you use python3 and that the problem remains, please tell me and I'll investigate deeper.
Yes thank you that was the problem !!
It work great !
But I have one question. In the case of I set up 4 wc white light bulbs and 4 RGBW bulbs , how can I select even white or color channel ? (with the firts version I had 4 channels of white bulbs and 4 channels of color bulbs, and I was able to select even the color or the white ) Thank you !
how can I select even white or color channel ? (with the firts version I had 4 channels of white bulbs and 4 channels of color bulbs, and I was able to select even the color or the white )
I'm not aware of the existence of "4 white channels + 4 color channels" with Milight protocol. I'm pretty sure there is only 4 channels in total where you can put white and color on every channel. If you set the color, only RGBW bulbs will react (and maybe white bulbs will also change their "white color" also, I don't know). On common requests , both color and white bulbs should react (saturation, intensity, link, disco mode, ...).
I may be wrong (I don't know all about the protocol since it is quite hard to find a "full documentation" of it...). If you have any piece of documentation or tools to help me, I could integrate it to the lib.
Ok, thank you for the answer ! It seem's that it is not possible with the ibox2 and the milight protocol v3 ! With the old on it was possible ....
Yes, it's difficult to find a good documentation ! But I think your script will help me ! thank you ! My goal it to rewrite it in PHP ;-)
Nice ! Good luck on it.
This lib implements all possible features of the protocol I found and should help you for your project ;)
If you can share your php project on Github, it may be interesting for some people (me included).
Hello ! I'm trying to use this script with a ibox2 controler . When I try to use this command for test i have an error.
pi@domos:~/Milight-Wifi-Bridge-3.0-Python-Library/MilightWifiBridge$ ./MilightWifiBridge.py -i 192.168.0.211 --getMacAddress Traceback (most recent call last): File "./MilightWifiBridge.py", line 1223, in
main()
File "./MilightWifiBridge.py", line 1108, in main
macAddress = milight.getMacAddress()
File "./MilightWifiBridge.py", line 655, in getMacAddress
returnValue = self.startSession().mac
File "./MilightWifiBridge.py", line 324, in startSession
mac=str("{}:{}:{}:{}:{}:{}".format(format(data[7], 'x'),
ValueError: Unknown format code 'x' for object of type 'str'
pi@domos:~/Milight-Wifi-Bridge-3.0-Python-Library/MilightWifiBridge$
Can you tell me if I have made a mistake ? thank you !