sidoh / esp8266_milight_hub

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

UDP interface sending RGBCCT commands to RGBW device #829

Open charlie1135 opened 1 month ago

charlie1135 commented 1 month ago

My home automation system (Vera) sends UDP commands to an iBOX that then controls RGBW LED strings using FUT038s. I installed a few more locations and set up a NodeMCU esp8266 milight hub to control them. They work well from the WEB page, but nothing from the UDP commands. Started sniffing and found the iBox sends RGBW commands to the FUT038s while the hub was sending RGBCCW. Checked with the Windows LimitlessLED WiFi Bridge app and the same thing was happening. Starting poking around in the code and kept running in circles - I never used either C++ or PlatformIO. Looks to me that the input command from whatever source is decoded then sent on to the LED based on the remote type. I have not found how the remote type is determined for UDP, but for the WEB page, it is input.
It looks like there is a method to store a named Device, Group and Type. Is is possible that the remote type (RDB, RGBW, RGBCCT...) could be selected by what is set up from this stored name based on Device ID and Group and drop back to current detection method if it doesn't exist?

charlie1135 commented 1 month ago

Found where in the code "void MiLightClient::prepare( const MiLightRemoteConfig* config, const uint16_t deviceId, const uint8_t groupId)" where I could substitute the passed MiLightRemoteConfig with a different one (I used FUT096Config). It now handles FUT038 controllers from UDP V6 commands. Have not yet found how to look up the named bulb configurations set up from the web page to get the type from the deviceID and groupID..