sidoh / esp8266_milight_hub

Replacement for a Milight/LimitlessLED hub hosted on an ESP8266
MIT License
937 stars 220 forks source link

UDP server "ALL GROUP ON/OFF" are backwards #65

Closed MichaelDanCurtis closed 7 years ago

MichaelDanCurtis commented 7 years ago

If you send the UDP signal for "ALL ON" (42 00 55 - All On) it turns everything off

If you Send the UDP signal for "ALL OFF" (41 00 55 - All Off) it turns everything on

Group UDP functions correctly:

45 00 55 - Zone 1 On 46 00 55 - Zone 1 Off 47 00 55 - Zone 2 On 48 00 55 - Zone 2 Off 49 00 55 - Zone 3 On 4A 00 55 - Zone 3 Off 4B 00 55 - Zone 4 On 4C 00 55 - Zone 4 Off

Version 5

Tested with app first, then with UDP Sender...

Used RGBW Bulbs with Zone 1 and RGBW LED Driver with Zone 2

No further devices tested as I don't have any

g-rom-info commented 7 years ago

According to limitless documentation, you are right !

LimitlessLED RGBW

41 00 55 - All Off 42 00 55 - All On 43 00 55 - Speed Down (One Step Slower Disco) 44 00 55 - Speed Up (One Step Faster Disco) 45 00 55 - Zone 1 On 46 00 55 - Zone 1 Off .........

It can be easily corrected by editing vars on V5MiLightUdpServer.h

Replace

  UDP_RGBW_ALL_ON            = 0x41,
  UDP_RGBW_ALL_OFF           = 0x42,

By

  UDP_RGBW_ALL_ON            = 0x42,
  UDP_RGBW_ALL_OFF           = 0x41,
sidoh commented 7 years ago

Good find.

Happy to look at a PR if someone wants to toss one up. Otherwise I'll get to it over the next few days.

MichaelDanCurtis commented 7 years ago

PR sent as requested, would have done that earlier... but for some reason, I fail at git.

sidoh commented 7 years ago

Thanks! Looks good. I'll test it with the bulbs I have later today.

g-rom-info commented 7 years ago

Just tested it with my bulbs and this quick fix, it's OK :)

sidoh commented 7 years ago

Gonna close this since it sounds like it's fixed. Thanks, @phigmeta!

g-rom-info commented 7 years ago

@sidoh 1.2.3 version still have this issue :-(

sidoh commented 7 years ago

Hmm... should've been fixed in 654b4f5380ae47ead5fe0d24cf7d0bba5a2b8e82. I'll test when I'm home. Maybe some later change swapped it back somehow.

g-rom-info commented 7 years ago

Yes but not in the master branch :) See here.

sidoh commented 7 years ago

Argh. Crud. I must've done something goofy with git. I just manually reapplied it and released 1.2.4.