Erriez / milight_ibox2_control_python

MiLight iBox2 Controller interface with Python by using UDP socket
MIT License
5 stars 4 forks source link

RGB+CCT don't responde with lamptype 0x08 #1

Closed gerby77 closed 2 years ago

gerby77 commented 3 years ago

Hi,

Just wanted to give a comment. I'm currently developing a lightcontrol for a Photobooth and i'm using a C# project which seems to be derived from your's or is simular. It has taken a while to get a Milight/Miboxer Wallwasher (RGB+CCT) to work with the ibox2. I could get connection to the box, but no light would be turned on. Finally i found out that one of the main reasons was that the lamptype wasn't ok. In your example for CCT you would use 0x08, but in my case it is 0x07.

Check my examples: static readonly byte[] ON = { 0x31, 0x00, 0x00, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00 }; static readonly byte[] OFF = { 0x31, 0x00, 0x00, 0x07, 0x03, 0x02, 0x00, 0x00, 0x00 }; static readonly byte[] LINK = { 0x31, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00 }; static readonly byte[] UNLINK = { 0X31, 0X00, 0X00, 0X07, 0X00, 0X00, 0X00, 0X00, 0X00 };

    static readonly byte[] WHITE =      { 0x31, 0x00, 0x00, 0x07, 0x03, 0x05, 0x00, 0x00, 0x00 };
    static readonly byte[] BLUE =       { 0x31, 0x00, 0x00, 0x07, 0x01, 0xBA, 0xBA, 0xBA, 0xBA };
    static readonly byte[] AQUA =       { 0x31, 0x00, 0x00, 0x07, 0x01, 0x85, 0x85, 0x85, 0x85 };
    static readonly byte[] RED =        { 0x31, 0x00, 0x00, 0x07, 0x01, 0xFF, 0xFF, 0xFF, 0xFF };
    static readonly byte[] LAVENDER =   { 0x31, 0x00, 0x00, 0x07, 0x01, 0xD9, 0xD9, 0xD9, 0xD9 };
    static readonly byte[] GREEN =      { 0x31, 0x00, 0x00, 0x07, 0x01, 0x7A, 0x7A, 0x7A, 0x7A };
    static readonly byte[] LIME =       { 0x31, 0x00, 0x00, 0x07, 0x01, 0x54, 0x54, 0x54, 0x54 };
    static readonly byte[] ORANGE =     { 0x31, 0x00, 0x00, 0x07, 0x01, 0x1E, 0x1E, 0x1E, 0x1E };
    static readonly byte[] YELLOW =     { 0x31, 0x00, 0x00, 0x07, 0x01, 0x3B, 0x3B, 0x3B, 0x3B };
    static readonly byte[] BRIGHTNESS = { 0x31, 0x00, 0x00, 0x07, 0x02, 0x64, 0x00, 0x00, 0x00 };

    static readonly byte[] MODE =       { 0x31, 0x00, 0x00, 0x07, 0x06, 0x02, 0x00, 0x00, 0x00 };
    static readonly byte[] MODEDECREASE = { 0x31, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00 };
    static readonly byte[] MODEINCREASE = { 0x31, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00 };

Cheers Eric

Erriez commented 3 years ago

Hi @gerby77,

Thanks for posting your solution. I was not aware that the iBox2 support other bulbs as well. It's a long time ago since I made this library. In the meantime, the iBox2 has been replaced with WL-Box1. See https://www.futlight.com. Which WiFi box do you use? I'm wondering if they are compatible with each other.

Thanks, Erriez

gerby77 commented 3 years ago

Hi Erriez,

At this moment i use the ibox2 and i’ve bought the wl-box1, but this one is for online use only, as i found out until now. And i want to address the Wallwasher (Milight/Miboxer RGB+CCT lights) and normally only switch it on and off and maybe with the DiscoMode, but that’s all. So no remote from out of the internet needed ;-)

Met vriendelijke groet, Mit freundlichem Gruß, With kind regards,

Eric Gerbers

Erriez commented 2 years ago

Lamp type added to API: https://github.com/Erriez/milight_ibox2_control_python/pull/8

@gerby77 The lamp_type variable can be set as function argument, for example: ibox.send_light_on(zone, lamp_type=LampType.WALLWASHER_TYPE). Do you have time to test this with your setup?

Erriez commented 2 years ago

Lamp type 8 added in updated API. Closing issue.