QuentinCG / Milight-Wifi-Bridge-3.0-Python-Library

[Done] Milight 3.0 python library (LimitlessLED Wifi Bridge v6.0): Control milight wireless lights with wifi (Python and shell library, multi-platform)
MIT License
16 stars 7 forks source link

IBox Bridge Color ? #1

Closed therealmysteryman closed 6 years ago

therealmysteryman commented 6 years ago

I was wondering if the API can change the Color and Disco Mode of the IBox Bridge ? I'm able to Turn On and Off but not changing the color.

Thanks

QuentinCG commented 6 years ago

Hello,

I did not find any documentation about in the Milight 3.0 specification when I designed this library even though it was possible to change the Ibox color with the official milight3.0 Android app... (Chinese protocol, here we are =P)

Here is the specification I followed: http://www.limitlessled.com/dev/ (protocol v6)

If you can provide me the frame request used to switch the Ibox color, I could integrate it.

Cheers, Quentin

therealmysteryman commented 6 years ago

I didn't test it, but I found the frame request on that page [https://github.com/domoticz/domoticz/blob/master/hardware/Limitless.cpp]

V6_Bridge_SetColor[10] = { 0x31, 0x00, 0x00, 0x00, 0x01, 0xBA, 0xBA, 0xBA, 0xBA, 0x01 }; V6_Bridge_SetBrightnessLevel[10] = { 0x31, 0x00, 0x00, 0x00, 0x02, 0xBE, 0x00, 0x00, 0x00, 0x01 }; V6_Bridge_White_On[10] = { 0x31, 0x00, 0x00, 0x00, 0x03, 0x05, 0x00, 0x00, 0x00, 0x01 }; V6_Bridge_Disco_Mode[10] = { 0x31, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x01 }; V6_Bridge_Mode_Speed_Up[10] = { 0x31, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x01 }; V6_Bridge_Mode_Speed_Down[10] = { 0x31, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x01 };

Thanks :)

QuentinCG commented 6 years ago

Perfect,

I'll do the change in few days (in a test branch).

Thank you for your help

QuentinCG commented 6 years ago

Hey ;)

As discussed, it is now available since commit https://github.com/QuentinCG/Milight-Wifi-Bridge-3.0-Python-Library/commit/33e63577100d00ca348d38d92051fa942e079689 I pushed this in master as it doesn't break any other features.

Note that I could not check with a real module as I don't have it with me right now. --> Could you check if it works for you? (the 6 new shell commands)

Cheers, Quentin

therealmysteryman commented 6 years ago

Just tested it work for me perfectly :) Thanks this much appreciated :)

QuentinCG commented 6 years ago

Perfect ! Thank you for your help :kissing_heart:

Tell me if something is strange with those new features, I prefer to fix an issue than leave a non working feature :smile: