diff --git a/Lights/Arduino/Generic_Dimmable_Light/README.md b/Lights/Arduino/Generic_Dimmable_Light/README.md new file mode 100644 index 00000000..bcdfad4f --- /dev/null +++ b/Lights/Arduino/Generic_Dimmable_Light/README.md @@ -0,0 +1,36 @@ +# Custom light instruction + +This build is for: https://github.com/mariusmotea/diyHue/tree/master/Lights/Arduino/Generic_Dimmable_Light + +1. try out your parts and plan pathways + +2. solder gnd/- pathway and the 1k OHM resistors in place + +3. fasten wemos headers, and connect G pin to ground pathway + +4. Bring a wires from GPIO pins to the paths with resistors + +5. Fasten the blue cables (these go to the - of your strip(s)) (the board in the picture will have 2 individual controlable lights, you can have multiple strips on each) + +7. Fasten 3 pin headers for mosfets + +8. Connect the various paths to 3 pin headers + +9. Done + + +This build is very simular to the Generic RGBW light build. (didnt take picture with the mosfets and wemos inserted, but i guess this can be imagined) make sure the G pin on the wemos hits the grounded path. + +![Top](https://github.com/mariusmotea/diyHue/blob/master/Lights/Arduino/Generic_Dimmable_Light/images/Over.jpg?raw=true) +![Back](https://github.com/mariusmotea/diyHue/blob/master/Lights/Arduino/Generic_Dimmable_Light/images/Under.jpg?raw=true) + +## Components +[IRLB8721-TO220 MOSFETS (2x)](https://www.aliexpress.com/item/10PCS-IRLB8721-TO220-IRLB8721PBF-TO-220-free-shipping/32714364118.html) + +[Wemos D1 mini (1x)](https://www.aliexpress.com/item/ESP8266-ESP12-ESP-12-WeMos-D1-Mini-WIFI-Dev-Kit-Development-Board-NodeMCU-Lua/32653918483.html) + +[1k OHM resistor (2x)](https://www.aliexpress.com/item/100pcs-1-4W-Metal-Film-Resistor-1K-ohm-1KR-1-Tolerance-Precision-RoHS-Lead-Free-In/1851964338.html) + +[Female Headers (2x)](https://www.aliexpress.com/item/10-10-pcs-Single-Row-Pin-Female-Header-Socket-2-54mm-Pitch-1-10p-12p-20p/32783590196.html) + +[Prototyping board (1x)](https://www.aliexpress.com/item/20pcs-5x7-4x6-3x7-2x8-cm-double-Side-Copper-prototype-pcb-Universal-Board-for-Arduino/1847727667.html) diff --git a/Lights/Arduino/Generic_Dimmable_Light/images/Over.jpg b/Lights/Arduino/Generic_Dimmable_Light/images/Over.jpg new file mode 100755 index 00000000..3049bc8b Binary files /dev/null and b/Lights/Arduino/Generic_Dimmable_Light/images/Over.jpg differ diff --git a/Lights/Arduino/Generic_Dimmable_Light/images/Under.jpg b/Lights/Arduino/Generic_Dimmable_Light/images/Under.jpg new file mode 100755 index 00000000..87c44567 Binary files /dev/null and b/Lights/Arduino/Generic_Dimmable_Light/images/Under.jpg differ diff --git a/Lights/Arduino/Generic_ON_OFF_device_433Mhz/Generic_ON_OFF_device_433Mhz.ino b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/Generic_ON_OFF_device_433Mhz.ino new file mode 100644 index 00000000..4a839d14 --- /dev/null +++ b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/Generic_ON_OFF_device_433Mhz.ino @@ -0,0 +1,234 @@ + + +/* + This can control bulbs with 5 pwm channels (red, gree, blue, warm white and could wihite). Is tested with MiLight RGB_CCT bulb. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +RCSwitch mySwitch = RCSwitch(); + +#define devicesCount 4 + +uint8_t devicesPins[devicesCount] = {12, 13, 14, 5}; + +uint8_t transmitterPin = 4; //Pin the Transmitter is attached to +uint8_t transmitterDelay = 100; // Delay between sending commands +uint8_t repeatTransmit = 2; // Number of Transmit attempts (sometimes one Transmit is not enough) + +char* deviceId[] = {"10000", "01000", "00100", "00010"}; // Button Codes +char* houseCode = "11110"; //Housecode set in Handheld Remote +int c; + + + + +// if you want to setup static ip uncomment these 3 lines and line 72 +//IPAddress strip_ip ( 192, 168, 10, 95); +//IPAddress gateway_ip ( 192, 168, 10, 1); +//IPAddress subnet_mask(255, 255, 255, 0); + +bool device_state[devicesCount]; +byte mac[6]; + +ESP8266WebServer server(80); + +void handleNotFound() { + String message = "File Not Found\n\n"; + message += "URI: "; + message += server.uri(); + message += "\nMethod: "; + message += (server.method() == HTTP_GET) ? "GET" : "POST"; + message += "\nArguments: "; + message += server.args(); + message += "\n"; + for (uint8_t i = 0; i < server.args(); i++) { + message += " " + server.argName(i) + ": " + server.arg(i) + "\n"; + } + server.send(404, "text/plain", message); +} + +void SwitchOn433(uint8_t c) { + + for (int x = 0; x < repeatTransmit; x++) { + + mySwitch.switchOn(houseCode, deviceId[c]); + delay(transmitterDelay); + + } + +} +void SwitchOff433(uint8_t c) { + + for (int x = 0; x < repeatTransmit; x++) { + + mySwitch.switchOff(houseCode, deviceId[c]); + delay(transmitterDelay); + + } +} + + +void setup() { + EEPROM.begin(512); + Serial.begin(115200); + mySwitch.enableTransmit(transmitterPin); + + for (uint8_t ch = 0; ch < devicesCount; ch++) { + pinMode(devicesPins[ch], OUTPUT); + } + + //WiFi.config(strip_ip, gateway_ip, subnet_mask); + + + if (EEPROM.read(1) == 1 || (EEPROM.read(1) == 0 && EEPROM.read(0) == 1)) { + for (uint8_t ch = 0; ch < devicesCount; ch++) { + digitalWrite(devicesPins[ch], OUTPUT); + } + + } + + WiFiManager wifiManager; + wifiManager.autoConnect("New Hue Device"); + + WiFi.macAddress(mac); + + // Port defaults to 8266 + // ArduinoOTA.setPort(8266); + + // Hostname defaults to esp8266-[ChipID] + // ArduinoOTA.setHostname("myesp8266"); + + // No authentication by default + // ArduinoOTA.setPassword((const char *)"123"); + + ArduinoOTA.begin(); + + + server.on("/set", []() { + uint8_t device; + + for (uint8_t i = 0; i < server.args(); i++) { + if (server.argName(i) == "light") { + device = server.arg(i).toInt() - 1; + } + else if (server.argName(i) == "on") { + if (server.arg(i) == "True" || server.arg(i) == "true") { + if (EEPROM.read(1) == 0 && EEPROM.read(0) != 1) { + EEPROM.write(0, 1); + EEPROM.commit(); + } + device_state[device] = true; + digitalWrite(devicesPins[device], HIGH); + SwitchOn433(device); + } + else { + if (EEPROM.read(1) == 0 && EEPROM.read(0) != 0) { + EEPROM.write(0, 0); + EEPROM.commit(); + } + device_state[device] = false; + digitalWrite(devicesPins[device], LOW); + SwitchOff433(device); + } + } + } + server.send(200, "text/plain", "OK, state:" + device_state[device]); + }); + + server.on("/get", []() { + uint8_t light; + if (server.hasArg("light")) + light = server.arg("light").toInt() - 1; + String power_status; + power_status = device_state[light] ? "true" : "false"; + server.send(200, "text/plain", "{\"on\": " + power_status + "}"); + }); + + server.on("/detect", []() { + server.send(200, "text/plain", "{\"hue\": \"bulb\",\"lights\": " + String(devicesCount) + ",\"modelid\": \"Plug 01\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); + }); + + server.on("/", []() { + float transitiontime = 100; + if (server.hasArg("startup")) { + if ( EEPROM.read(1) != server.arg("startup").toInt()) { + EEPROM.write(1, server.arg("startup").toInt()); + EEPROM.commit(); + } + } + + for (uint8_t device = 0; device < devicesCount; device++) { + + if (server.hasArg("on")) { + if (server.arg("on") == "true") { + device_state[device] = true; + digitalWrite(devicesPins[device], HIGH); + + SwitchOn433(device); + + if (EEPROM.read(1) == 0 && EEPROM.read(0) != 1) { + EEPROM.write(0, 1); + EEPROM.commit(); + } + } else { + device_state[device] = false; + digitalWrite(devicesPins[device], LOW); + SwitchOff433(device); + if (EEPROM.read(1) == 0 && EEPROM.read(0) != 0) { + EEPROM.write(0, 0); + EEPROM.commit(); + } + } + } + } + if (server.hasArg("reset")) { + ESP.reset(); + } + + + String http_content = ""; + http_content += ""; + http_content += ""; + http_content += ""; + http_content += ""; + http_content += "Light Setup"; + http_content += ""; + http_content += ""; + http_content += ""; + http_content += "
"; + http_content += "

Light Setup

"; + http_content += "
"; + http_content += "
"; + http_content += ""; + http_content += "ON"; + http_content += "OFF"; + http_content += "
"; + http_content += "
"; + http_content += ""; + http_content += ""; + http_content += ""; + + server.send(200, "text/html", http_content); + + }); + + + server.onNotFound(handleNotFound); + + server.begin(); +} + +void loop() { + ArduinoOTA.handle(); + server.handleClient(); +} + + diff --git a/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/Fritzing.JPG b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/Fritzing.JPG new file mode 100644 index 00000000..46c74ee0 Binary files /dev/null and b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/Fritzing.JPG differ diff --git a/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/PCB1.jpg b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/PCB1.jpg new file mode 100644 index 00000000..0cbc8c46 Binary files /dev/null and b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/PCB1.jpg differ diff --git a/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/PCB2.jpg b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/PCB2.jpg new file mode 100644 index 00000000..82fcbaf3 Binary files /dev/null and b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/PCB2.jpg differ diff --git a/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/Schematic.JPG b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/Schematic.JPG new file mode 100644 index 00000000..6b0fc26e Binary files /dev/null and b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/images/Schematic.JPG differ diff --git a/Lights/Arduino/Generic_ON_OFF_device_433Mhz/readme.md b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/readme.md new file mode 100644 index 00000000..a97ac2aa --- /dev/null +++ b/Lights/Arduino/Generic_ON_OFF_device_433Mhz/readme.md @@ -0,0 +1,39 @@ +# 433Mhz Power Socket - Control (Hue Bulb Emulation) +This ESP-8266 Firmware controls generic 433Mhz Power Sockets. +Showing up as regular Hue Bulbs with ON/OFF feature. + +* I used one of those cheap Transmitters. [Ebay-Link](https://www.ebay.com/itm/5pcs-433Mhz-RF-transmitter-and-receiver-kit-for-Arduino/381374427148?epid=2037463354&hash=item58cbaff00c:g:8wEAAOSw6EhUN9s-) +* Controlling cheap 433mhz Power Sockets [Picture below] + +* Directly connected to VCC(+3,3V) GPIO4 (Data) and GND. +* You need to Edit your **"House Code"** in order to control the correct Sockets! + + +
+ +
+
+ +
+
+ +
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+ +
diff --git a/Lights/Arduino/Generic_RGBW_Light/Generic_RGBW_Light.ino b/Lights/Arduino/Generic_RGBW_Light/Generic_RGBW_Light.ino index ed79d3d8..c8a7094e 100644 --- a/Lights/Arduino/Generic_RGBW_Light/Generic_RGBW_Light.ino +++ b/Lights/Arduino/Generic_RGBW_Light/Generic_RGBW_Light.ino @@ -102,36 +102,12 @@ void convert_hue() void convert_xy() { - float Y = bri / 250.0f; - float z = 1.0f - x - y; - float X = (Y / y) * x; - float Z = (Y / y) * z; - // sRGB D65 conversion - float r = X * 3.2406f - Y * 1.5372f - Z * 0.4986f; - float g = -X * 0.9689f + Y * 1.8758f + Z * 0.0415f; - float b = X * 0.0557f - Y * 0.2040f + Z * 1.0570f; - - if (r > b && r > g && r > 1.0f) { - // red is too big - g = g / r; - b = b / r; - r = 1.0f; - } - else if (g > b && g > r && g > 1.0f) { - // green is too big - r = r / g; - b = b / g; - g = 1.0f; - } - else if (b > r && b > g && b > 1.0f) { - // blue is too big - r = r / b; - g = g / b; - b = 1.0f; - } + float r = x * 3.2406f - y * 1.5372f - z * 0.4986f; + float g = -x * 0.9689f + y * 1.8758f + z * 0.0415f; + float b = x * 0.0557f - y * 0.2040f + z * 1.0570f; // Apply gamma correction r = r <= 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * pow(r, (1.0f / 2.4f)) - 0.055f; @@ -167,7 +143,7 @@ void convert_xy() g = g < 0 ? 0 : g; b = b < 0 ? 0 : b; - rgbw[0] = (int) (r * 255.0f); rgbw[1] = (int) (g * 255.0f); rgbw[2] = (int) (b * 255.0f); rgbw[3] = 0; + rgbw[0] = (int) (r * bri); rgbw[1] = (int) (g * bri); rgbw[2] = (int) (b * bri); rgbw[3] = 0; } void convert_ct() { diff --git a/Lights/Arduino/Generic_RGBW_Light/README.md b/Lights/Arduino/Generic_RGBW_Light/README.md new file mode 100644 index 00000000..ca4f8d9f --- /dev/null +++ b/Lights/Arduino/Generic_RGBW_Light/README.md @@ -0,0 +1,47 @@ +# Custom light instruction + +![Circuit Diagram](https://github.com/mariusmotea/diyHue/blob/master/Lights/Arduino/Generic_RGBW_Light/images/schematic.JPG) + +Start with placing components on your board to make sure you got room for the paths/wires without soldering yourself into trouble :) + +1. Solder Wemos headers + +2. Solder the resistors in correct place. Make sure to leave room for the GPIO wire that will come later + +3. Solder the path for gnd/negative across the board + +4. Solder path for resistor <-> ground + +5. Solder/wire the G pin on Wemos to the ground strip running across the board for common ground + +6. Solder wires from GPIO pins to correct places: D1 = white, D7 = green, D6 = red, D5 = blue + The wires go between the resistor and the 3 pin header for the mosfets and everything connects to the left leg of the mosfet + +7. Solder the 3 pin female headers + +8. Solder wires with correct colors to the middle pin of the header + +9. Insert Wemos and mosfets + +You can use any 12v RGBW or RGBWW strip that has 5 connectors for this build. I recomend the RGBWW strips from what i have experienced so far, the RGBW ones dont make proper yellow/warm light. + + +![Top](https://github.com/mariusmotea/diyHue/blob/master/Lights/Arduino/Generic_RGBW_Light/images/Over.jpg) +![Back](https://github.com/mariusmotea/diyHue/blob/master/Lights/Arduino/Generic_RGBW_Light/images/Under.jpg) + +## Components + +[IRLB8721-TO220 MOSFETS (4x)](https://www.aliexpress.com/item/10PCS-IRLB8721-TO220-IRLB8721PBF-TO-220-free-shipping/32714364118.html) + +[Wemos D1 mini (1x)](https://www.aliexpress.com/item/ESP8266-ESP12-ESP-12-WeMos-D1-Mini-WIFI-Dev-Kit-Development-Board-NodeMCU-Lua/32653918483.html) + +[1k OHM resistor (4x)](https://www.aliexpress.com/item/100pcs-1-4W-Metal-Film-Resistor-1K-ohm-1KR-1-Tolerance-Precision-RoHS-Lead-Free-In/1851964338.html) + +[Female Headers (4x)](https://www.aliexpress.com/item/10-10-pcs-Single-Row-Pin-Female-Header-Socket-2-54mm-Pitch-1-10p-12p-20p/32783590196.html) + +[Prototyping board (1x)](https://www.aliexpress.com/item/20pcs-5x7-4x6-3x7-2x8-cm-double-Side-Copper-prototype-pcb-Universal-Board-for-Arduino/1847727667.html) + + +# Feican RGBW bulb + +https://raw.githubusercontent.com/mariusmotea/diyHue/master/Images/Color_Dream_bulb_with_flash_replaced.jpg diff --git a/Lights/Arduino/Generic_RGBW_Light/images/Over.jpg b/Lights/Arduino/Generic_RGBW_Light/images/Over.jpg new file mode 100755 index 00000000..15e93bfc Binary files /dev/null and b/Lights/Arduino/Generic_RGBW_Light/images/Over.jpg differ diff --git a/Lights/Arduino/Generic_RGBW_Light/images/Under.jpg b/Lights/Arduino/Generic_RGBW_Light/images/Under.jpg new file mode 100755 index 00000000..54e131fa Binary files /dev/null and b/Lights/Arduino/Generic_RGBW_Light/images/Under.jpg differ diff --git a/Lights/Arduino/Generic_RGBW_Light/images/schematic.JPG b/Lights/Arduino/Generic_RGBW_Light/images/schematic.JPG new file mode 100755 index 00000000..4e656039 Binary files /dev/null and b/Lights/Arduino/Generic_RGBW_Light/images/schematic.JPG differ diff --git a/Lights/Arduino/Generic_RGB_CCT_Light/Generic_RGB_CCT_Light.ino b/Lights/Arduino/Generic_RGB_CCT_Light/Generic_RGB_CCT_Light.ino index 608d4b64..c996a7c2 100644 --- a/Lights/Arduino/Generic_RGB_CCT_Light/Generic_RGB_CCT_Light.ino +++ b/Lights/Arduino/Generic_RGB_CCT_Light/Generic_RGB_CCT_Light.ino @@ -109,6 +109,7 @@ void convert_hue() void convert_xy() { + int optimal_bri = int( 10 + bri / 1.04); float Y = y; @@ -153,8 +154,9 @@ void convert_xy() r = r < 0 ? 0 : r; g = g < 0 ? 0 : g; b = b < 0 ? 0 : b; - + rgb_cct[0] = (int) (r * optimal_bri); rgb_cct[1] = (int) (g * optimal_bri); rgb_cct[2] = (int) (b * optimal_bri); rgb_cct[3] = 0; rgb_cct[4] = 0; + } void convert_ct() { diff --git a/Lights/Arduino/SK6812HueStrip/.DS_Store b/Lights/Arduino/SK6812HueStrip/.DS_Store deleted file mode 100644 index 8695987f..00000000 Binary files a/Lights/Arduino/SK6812HueStrip/.DS_Store and /dev/null differ diff --git a/Lights/Arduino/SK6812HueStrip/SK6812HueStrip.ino b/Lights/Arduino/SK6812HueStrip/SK6812HueStrip.ino index 8ba333b1..7b6b99d0 100644 --- a/Lights/Arduino/SK6812HueStrip/SK6812HueStrip.ino +++ b/Lights/Arduino/SK6812HueStrip/SK6812HueStrip.ino @@ -8,7 +8,11 @@ #include #define lightsCount 3 -#define pixelCount 30 +#define pixelCount 60 + +#define use_hardware_switch false // on/off state and brightness can be controlled with above gpio pins. Is mandatory to connect them to ground with 10K resistors. +#define button1_pin 4 // on and bri up +#define button2_pin 5 // off and bri down // if you want to setup static ip uncomment these 3 lines and line 72 //IPAddress strip_ip ( 192, 168, 10, 95); @@ -93,37 +97,15 @@ void convert_hue(uint8_t light) void convert_xy(uint8_t light) { - float Y = bri[light] / 250.0f; - - float z = 1.0f - x[light] - y[light]; - - float X = (Y / y[light]) * x[light]; - float Z = (Y / y[light]) * z; + float Y = y[light]; + float X = x[light]; + float Z = 1.0f - x[light] - y[light]; // sRGB D65 conversion float r = X * 3.2406f - Y * 1.5372f - Z * 0.4986f; float g = -X * 0.9689f + Y * 1.8758f + Z * 0.0415f; float b = X * 0.0557f - Y * 0.2040f + Z * 1.0570f; - if (r > b && r > g && r > 1.0f) { - // red is too big - g = g / r; - b = b / r; - r = 1.0f; - } - else if (g > b && g > r && g > 1.0f) { - // green is too big - r = r / g; - b = b / g; - g = 1.0f; - } - else if (b > r && b > g && b > 1.0f) { - // blue is too big - r = r / b; - g = g / b; - b = 1.0f; - } - // Apply gamma correction r = r <= 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * pow(r, (1.0f / 2.4f)) - 0.055f; g = g <= 0.0031308f ? 12.92f * g : (1.0f + 0.055f) * pow(g, (1.0f / 2.4f)) - 0.055f; @@ -158,7 +140,7 @@ void convert_xy(uint8_t light) g = g < 0 ? 0 : g; b = b < 0 ? 0 : b; - rgbw[light][0] = (int) (r * 255.0f); rgbw[light][1] = (int) (g * 255.0f); rgbw[light][2] = (int) (b * 255.0f); rgbw[light][3] = 0; + rgbw[light][0] = (int) (r * bri[light]); rgbw[light][1] = (int) (g * bri[light]); rgbw[light][2] = (int) (b * bri[light]); rgbw[light][3] = 0; } void convert_ct(uint8_t light) { @@ -233,6 +215,24 @@ void apply_scene(uint8_t new_scene, uint8_t light) { } } +void process_lightdata(uint8_t light,float transitiontime) { + transitiontime *= 16 - (pixelCount / 40); //every extra led add a small delay that need to be counted + if (color_mode[light] == 1 && light_state[light] == true) { + convert_xy(light); + } else if (color_mode[light] == 2 && light_state[light] == true) { + convert_ct(light); + } else if (color_mode[light] == 3 && light_state[light] == true) { + convert_hue(light); + } + for (uint8_t i = 0; i <= 3; i++) { + if (light_state[light]) { + step_level[light][i] = ((float)rgbw[light][i] - current_rgbw[light][i]) / transitiontime; + } else { + step_level[light][i] = current_rgbw[light][i] / transitiontime; + } + } +} + void lightEngine() { for (int i = 0; i < lightsCount; i++) { if (light_state[i]) { @@ -266,6 +266,50 @@ void lightEngine() { if (in_transition) { delay(6); in_transition = false; + } else if (use_hardware_switch == true) { + if (digitalRead(button1_pin) == HIGH) { + int i = 0; + while (digitalRead(button1_pin) == HIGH && i < 30) { + delay(20); + i++; + } + for (int light = 0; light < lightsCount; light++) { + if (i < 30) { + // there was a short press + light_state[light] = true; + } + else { + // there was a long press + bri[light] += 56; + if (bri[light] > 254) { + // don't increase the brightness more then maximum value + bri[light] = 254; + } + } + process_lightdata(light,4); + } + } else if (digitalRead(button2_pin) == HIGH) { + int i = 0; + while (digitalRead(button2_pin) == HIGH && i < 30) { + delay(20); + i++; + } + for (int light = 0; light < lightsCount; light++) { + if (i < 30) { + // there was a short press + light_state[light] = false; + } + else { + // there was a long press + bri[light] -= 56; + if (bri[light] < 1) { + // don't decrease the brightness less than minimum value. + bri[light] = 1; + } + } + process_lightdata(light,4); + } + } } } @@ -321,7 +365,8 @@ void setup() { pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH - + pinMode(button1_pin, INPUT); + pinMode(button2_pin, INPUT); server.on("/switch", []() { server.send(200, "text/plain", "OK"); @@ -378,7 +423,7 @@ void setup() { server.on("/set", []() { uint8_t light; - float transitiontime = 4; + int transitiontime = 4; for (uint8_t i = 0; i < server.args(); i++) { if (server.argName(i) == "light") { light = server.arg(i).toInt() - 1; @@ -455,22 +500,8 @@ void setup() { transitiontime = server.arg(i).toInt(); } } - transitiontime *= 16 - (pixelCount / 40); //every extra led add a small delay that need to be counted + process_lightdata(light, transitiontime); server.send(200, "text/plain", "OK, x: " + (String)x[light] + ", y:" + (String)y[light] + ", bri:" + (String)bri[light] + ", ct:" + ct[light] + ", colormode:" + color_mode[light] + ", state:" + light_state[light]); - if (color_mode[light] == 1 && light_state[light] == true) { - convert_xy(light); - } else if (color_mode[light] == 2 && light_state[light] == true) { - convert_ct(light); - } else if (color_mode[light] == 3 && light_state[light] == true) { - convert_hue(light); - } - for (uint8_t j = 0; j <= 3; j++) { - if (light_state[light]) { - step_level[light][j] = ((float)rgbw[light][j] - current_rgbw[light][j]) / transitiontime; - } else { - step_level[light][j] = current_rgbw[light][j] / transitiontime; - } - } }); server.on("/get", []() { @@ -661,5 +692,3 @@ void loop() { server.handleClient(); lightEngine(); } - - diff --git a/Lights/Arduino/WS2812BHueStrip/.DS_Store b/Lights/Arduino/WS2812BHueStrip/.DS_Store deleted file mode 100644 index 0aa3531a..00000000 Binary files a/Lights/Arduino/WS2812BHueStrip/.DS_Store and /dev/null differ diff --git a/Lights/Arduino/WS2812BHueStrip/WS2812BHueStrip.ino b/Lights/Arduino/WS2812BHueStrip/WS2812BHueStrip.ino index 48780923..e36cfe39 100644 --- a/Lights/Arduino/WS2812BHueStrip/WS2812BHueStrip.ino +++ b/Lights/Arduino/WS2812BHueStrip/WS2812BHueStrip.ino @@ -109,7 +109,6 @@ void convert_xy(uint8_t light) float g = -X * 0.9689f + Y * 1.8758f + Z * 0.0415f; float b = X * 0.0557f - Y * 0.2040f + Z * 1.0570f; - // Apply gamma correction r = r <= 0.04045f ? r / 12.92f : pow((r + 0.055f) / (1.0f + 0.055f), 2.4f); g = g <= 0.04045f ? g / 12.92f : pow((g + 0.055f) / (1.0f + 0.055f), 2.4f); diff --git a/Lights/PlatformIO/Generic_RGBW_Light/src/Generic_RGBW_Light.cpp b/Lights/PlatformIO/Generic_RGBW_Light/src/Generic_RGBW_Light.cpp index 8de51e8f..84e74d0c 100644 --- a/Lights/PlatformIO/Generic_RGBW_Light/src/Generic_RGBW_Light.cpp +++ b/Lights/PlatformIO/Generic_RGBW_Light/src/Generic_RGBW_Light.cpp @@ -100,36 +100,12 @@ void convert_hue() void convert_xy() { - float Y = bri / 250.0f; - float z = 1.0f - x - y; - float X = (Y / y) * x; - float Z = (Y / y) * z; - // sRGB D65 conversion - float r = X * 1.656492f - Y * 0.354851f - Z * 0.255038f; - float g = -X * 0.707196f + Y * 1.655397f + Z * 0.036152f; - float b = X * 0.051713f - Y * 0.121364f + Z * 1.011530f; - - if (r > b && r > g && r > 1.0f) { - // red is too big - g = g / r; - b = b / r; - r = 1.0f; - } - else if (g > b && g > r && g > 1.0f) { - // green is too big - r = r / g; - b = b / g; - g = 1.0f; - } - else if (b > r && b > g && b > 1.0f) { - // blue is too big - r = r / b; - g = g / b; - b = 1.0f; - } + float r = x * 3.2406f - y * 1.5372f - z * 0.4986f; + float g = -x * 0.9689f + y * 1.8758f + z * 0.0415f; + float b = x * 0.0557f - y * 0.2040f + z * 1.0570f; // Apply gamma correction r = r <= 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * pow(r, (1.0f / 2.4f)) - 0.055f; @@ -165,7 +141,7 @@ void convert_xy() g = g < 0 ? 0 : g; b = b < 0 ? 0 : b; - rgbw[0] = (int) (r * 255.0f); rgbw[1] = (int) (g * 255.0f); rgbw[2] = (int) (b * 255.0f); rgbw[3] = 0; + rgbw[0] = (int) (r * bri); rgbw[1] = (int) (g * bri); rgbw[2] = (int) (b * bri); rgbw[3] = 0; } void convert_ct() { @@ -459,7 +435,7 @@ void setup() { }); server.on("/detect", []() { - server.send(200, "text/plain", "{\"hue\": \"bulb\",\"lights\": 1,\"type\": \"rgb\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); + server.send(200, "text/plain", "{\"hue\": \"bulb\",\"lights\": 1,\"modelid\": \"LCT001\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); }); server.on("/", []() { diff --git a/Lights/PlatformIO/Generic_RGB_CCT_Light/src/Generic_RGB_CCT_Light.cpp b/Lights/PlatformIO/Generic_RGB_CCT_Light/src/Generic_RGB_CCT_Light.cpp index 1ff652d8..7d5bf148 100644 --- a/Lights/PlatformIO/Generic_RGB_CCT_Light/src/Generic_RGB_CCT_Light.cpp +++ b/Lights/PlatformIO/Generic_RGB_CCT_Light/src/Generic_RGB_CCT_Light.cpp @@ -102,36 +102,12 @@ void convert_hue() void convert_xy() { - float Y = bri / 250.0f; - float z = 1.0f - x - y; - float X = (Y / y) * x; - float Z = (Y / y) * z; - // sRGB D65 conversion - float r = X * 1.656492f - Y * 0.354851f - Z * 0.255038f; - float g = -X * 0.707196f + Y * 1.655397f + Z * 0.036152f; - float b = X * 0.051713f - Y * 0.121364f + Z * 1.011530f; - - if (r > b && r > g && r > 1.0f) { - // red is too big - g = g / r; - b = b / r; - r = 1.0f; - } - else if (g > b && g > r && g > 1.0f) { - // green is too big - r = r / g; - b = b / g; - g = 1.0f; - } - else if (b > r && b > g && b > 1.0f) { - // blue is too big - r = r / b; - g = g / b; - b = 1.0f; - } + float r = x * 3.2406f - y * 1.5372f - z * 0.4986f; + float g = -x * 0.9689f + y * 1.8758f + z * 0.0415f; + float b = x * 0.0557f - y * 0.2040f + z * 1.0570f; // Apply gamma correction r = r <= 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * pow(r, (1.0f / 2.4f)) - 0.055f; @@ -167,7 +143,7 @@ void convert_xy() g = g < 0 ? 0 : g; b = b < 0 ? 0 : b; - rgb_cct[0] = (int) (r * 255.0f); rgb_cct[1] = (int) (g * 255.0f); rgb_cct[2] = (int) (b * 255.0f); rgb_cct[3] = 0; rgb_cct[4] = 0; + rgb_cct[0] = (int) (r * bri); rgb_cct[1] = (int) (g * bri); rgb_cct[2] = (int) (b * bri); rgb_cct[3] = 0; rgb_cct[4] = 0; } void convert_ct() { @@ -455,7 +431,7 @@ void setup() { }); server.on("/detect", []() { - server.send(200, "text/plain", "{\"hue\": \"bulb\",\"lights\": 1,\"type\": \"rgb\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); + server.send(200, "text/plain", "{\"hue\": \"bulb\",\"lights\": 1,\"modelid\": \"LCT001\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); }); server.on("/", []() { diff --git a/Lights/PlatformIO/Generic_RGB_Light/src/Generic_RGB_Light.cpp b/Lights/PlatformIO/Generic_RGB_Light/src/Generic_RGB_Light.cpp index 51760b2c..d36d11d0 100644 --- a/Lights/PlatformIO/Generic_RGB_Light/src/Generic_RGB_Light.cpp +++ b/Lights/PlatformIO/Generic_RGB_Light/src/Generic_RGB_Light.cpp @@ -99,36 +99,12 @@ void convert_hue() void convert_xy() { - float Y = bri / 250.0f; - float z = 1.0f - x - y; - float X = (Y / y) * x; - float Z = (Y / y) * z; - // sRGB D65 conversion - float r = X * 1.656492f - Y * 0.354851f - Z * 0.255038f; - float g = -X * 0.707196f + Y * 1.655397f + Z * 0.036152f; - float b = X * 0.051713f - Y * 0.121364f + Z * 1.011530f; - - if (r > b && r > g && r > 1.0f) { - // red is too big - g = g / r; - b = b / r; - r = 1.0f; - } - else if (g > b && g > r && g > 1.0f) { - // green is too big - r = r / g; - b = b / g; - g = 1.0f; - } - else if (b > r && b > g && b > 1.0f) { - // blue is too big - r = r / b; - g = g / b; - b = 1.0f; - } + float r = x * 3.2406f - y * 1.5372f - z * 0.4986f; + float g = -x * 0.9689f + y * 1.8758f + z * 0.0415f; + float b = x * 0.0557f - y * 0.2040f + z * 1.0570f; // Apply gamma correction r = r <= 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * pow(r, (1.0f / 2.4f)) - 0.055f; @@ -164,6 +140,43 @@ void convert_xy() g = g < 0 ? 0 : g; b = b < 0 ? 0 : b; + rgb[0] = (int) (r * bri); rgb[1] = (int) (g * bri); rgb[2] = (int) (b * bri); +} + + // Apply gamma correction + r = r <= 0.04045f ? r / 12.92f : pow((r + 0.055f) / (1.0f + 0.055f), 2.4f); + g = g <= 0.04045f ? g / 12.92f : pow((g + 0.055f) / (1.0f + 0.055f), 2.4f); + b = b <= 0.04045f ? b / 12.92f : pow((b + 0.055f) / (1.0f + 0.055f), 2.4f); + + if (r > b && r > g) { + // red is biggest + if (r > 1.0f) { + g = g / r; + b = b / r; + r = 1.0f; + } + } + else if (g > b && g > r) { + // green is biggest + if (g > 1.0f) { + r = r / g; + b = b / g; + g = 1.0f; + } + } + else if (b > r && b > g) { + // blue is biggest + if (b > 1.0f) { + r = r / b; + g = g / b; + b = 1.0f; + } + } + + r = r < 0 ? 0 : r; + g = g < 0 ? 0 : g; + b = b < 0 ? 0 : b; + rgb[0] = (int) (r * 255.0f); rgb[1] = (int) (g * 255.0f); rgb[2] = (int) (b * 255.0f); } @@ -458,7 +471,7 @@ void setup() { }); server.on("/detect", []() { - server.send(200, "text/plain", "{\"hue\": \"bulb\",\"lights\": 1,\"type\": \"rgb\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); + server.send(200, "text/plain", "{\"hue\": \"bulb\",\"lights\": 1,\"modelid\": \"LCT001\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); }); server.on("/", []() { diff --git a/Lights/PlatformIO/SK6812HueStrip/src/SK6812HueStrip.cpp b/Lights/PlatformIO/SK6812HueStrip/src/SK6812HueStrip.cpp index e2633ac1..9fdb0f53 100644 --- a/Lights/PlatformIO/SK6812HueStrip/src/SK6812HueStrip.cpp +++ b/Lights/PlatformIO/SK6812HueStrip/src/SK6812HueStrip.cpp @@ -95,42 +95,20 @@ void convert_hue(uint8_t light) void convert_xy(uint8_t light) { - float Y = bri[light] / 250.0f; - - float z = 1.0f - x[light] - y[light]; - - float X = (Y / y[light]) * x[light]; - float Z = (Y / y[light]) * z; + float Y = y[light]; + float X = x[light]; + float Z = 1.0f - x[light] - y[light]; // sRGB D65 conversion - float r = X * 1.656492f - Y * 0.354851f - Z * 0.255038f; - float g = -X * 0.707196f + Y * 1.655397f + Z * 0.036152f; - float b = X * 0.051713f - Y * 0.121364f + Z * 1.011530f; - - if (r > b && r > g && r > 1.0f) { - // red is too big - g = g / r; - b = b / r; - r = 1.0f; - } - else if (g > b && g > r && g > 1.0f) { - // green is too big - r = r / g; - b = b / g; - g = 1.0f; - } - else if (b > r && b > g && b > 1.0f) { - // blue is too big - r = r / b; - g = g / b; - b = 1.0f; - } + float r = X * 3.2406f - Y * 1.5372f - Z * 0.4986f; + float g = -X * 0.9689f + Y * 1.8758f + Z * 0.0415f; + float b = X * 0.0557f - Y * 0.2040f + Z * 1.0570f; // Apply gamma correction r = r <= 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * pow(r, (1.0f / 2.4f)) - 0.055f; g = g <= 0.0031308f ? 12.92f * g : (1.0f + 0.055f) * pow(g, (1.0f / 2.4f)) - 0.055f; b = b <= 0.0031308f ? 12.92f * b : (1.0f + 0.055f) * pow(b, (1.0f / 2.4f)) - 0.055f; - + if (r > b && r > g) { // red is biggest if (r > 1.0f) { @@ -160,7 +138,7 @@ void convert_xy(uint8_t light) g = g < 0 ? 0 : g; b = b < 0 ? 0 : b; - rgbw[light][0] = (int) (r * 255.0f); rgbw[light][1] = (int) (g * 255.0f); rgbw[light][2] = (int) (b * 255.0f); rgbw[light][3] = 0; + rgbw[light][0] = (int) (r * bri[light]); rgbw[light][1] = (int) (g * bri[light]); rgbw[light][2] = (int) (b * bri[light]); rgbw[light][3] = 0; } void convert_ct(uint8_t light) { @@ -293,9 +271,10 @@ void setup() { for (int j = 0; j < 200; j++) { lightEngine(); } - WiFiManager wifiManager; - wifiManager.autoConnect("New Hue Light"); } + WiFiManager wifiManager; + wifiManager.autoConnect("New Hue Light"); + if (! light_state[0]) { infoLight(white); while (WiFi.status() != WL_CONNECTED) { @@ -491,7 +470,7 @@ void setup() { }); server.on("/detect", []() { - server.send(200, "text/plain", "{\"hue\": \"strip\",\"lights\": " + (String)lightsCount + ",\"type\": \"rgb\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); + server.send(200, "text/plain", "{\"hue\": \"strip\",\"lights\": " + (String)lightsCount + ",\"modelid\": \"LST001\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); }); server.on("/", []() { diff --git a/Lights/PlatformIO/WS2812BHueStrip/platformio.ini b/Lights/PlatformIO/WS2812BHueStrip/platformio.ini index 0b9b1fca..d70bd80b 100644 --- a/Lights/PlatformIO/WS2812BHueStrip/platformio.ini +++ b/Lights/PlatformIO/WS2812BHueStrip/platformio.ini @@ -1,12 +1,3 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; http://docs.platformio.org/page/projectconf.html [common] lib_deps_external = @@ -18,21 +9,18 @@ platform = espressif8266 framework = arduino board = nodemcuv2 build_flags = -Wl,-Tesp8266.flash.4m1m.ld -D FIRMWARE_VARIANT=nodemcuv2 -lib_deps = - ${common.lib_deps_external} +lib_deps = ${common.lib_deps_external} [env:d1_mini] platform = espressif8266 framework = arduino board = d1_mini build_flags = -Wl,-Tesp8266.flash.4m1m.ld -D FIRMWARE_VARIANT=d1_mini -lib_deps = - ${common.lib_deps_external} +lib_deps = ${common.lib_deps_external} [env:esp12] platform = espressif8266 board = esp12e framework = arduino build_flags = -Wl,-Tesp8266.flash.4m1m.ld -D FIRMWARE_VARIANT=esp12 -lib_deps = - ${common.lib_deps_external} +lib_deps = ${common.lib_deps_external} diff --git a/Lights/PlatformIO/WS2812BHueStrip/src/WS2812BHueStrip.ino b/Lights/PlatformIO/WS2812BHueStrip/src/WS2812BHueStrip.ino index e987c5d3..f01d0bd1 100644 --- a/Lights/PlatformIO/WS2812BHueStrip/src/WS2812BHueStrip.ino +++ b/Lights/PlatformIO/WS2812BHueStrip/src/WS2812BHueStrip.ino @@ -23,6 +23,8 @@ int transitiontime[lightsCount], ct[lightsCount], hue[lightsCount], bri[lightsCo float step_level[lightsCount][3], current_rgb[lightsCount][3], x[lightsCount], y[lightsCount]; byte mac[6]; + + ESP8266WebServer server(80); RgbColor red = RgbColor(255, 0, 0); @@ -94,36 +96,14 @@ void convert_hue(uint8_t light) void convert_xy(uint8_t light) { - float Y = bri[light] / 250.0f; - - float z = 1.0f - x[light] - y[light]; - - float X = (Y / y[light]) * x[light]; - float Z = (Y / y[light]) * z; + float Y = y[light]; + float X = x[light]; + float Z = 1.0f - x[light] - y[light]; // sRGB D65 conversion - float r = X * 1.656492f - Y * 0.354851f - Z * 0.255038f; - float g = -X * 0.707196f + Y * 1.655397f + Z * 0.036152f; - float b = X * 0.051713f - Y * 0.121364f + Z * 1.011530f; - - if (r > b && r > g && r > 1.0f) { - // red is too big - g = g / r; - b = b / r; - r = 1.0f; - } - else if (g > b && g > r && g > 1.0f) { - // green is too big - r = r / g; - b = b / g; - g = 1.0f; - } - else if (b > r && b > g && b > 1.0f) { - // blue is too big - r = r / b; - g = g / b; - b = 1.0f; - } + float r = X * 3.2406f - Y * 1.5372f - Z * 0.4986f; + float g = -X * 0.9689f + Y * 1.8758f + Z * 0.0415f; + float b = X * 0.0557f - Y * 0.2040f + Z * 1.0570f; // Apply gamma correction r = r <= 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * pow(r, (1.0f / 2.4f)) - 0.055f; @@ -159,7 +139,7 @@ void convert_xy(uint8_t light) g = g < 0 ? 0 : g; b = b < 0 ? 0 : b; - rgb[light][0] = (int) (r * 255.0f); rgb[light][1] = (int) (g * 255.0f); rgb[light][2] = (int) (b * 255.0f); + rgb[light][0] = (int) (r * bri[light]); rgb[light][1] = (int) (g * bri[light]); rgb[light][2] = (int) (b * bri[light]); } void convert_ct(uint8_t light) { @@ -292,9 +272,10 @@ void setup() { for (int j = 0; j < 200; j++) { lightEngine(); } - WiFiManager wifiManager; - wifiManager.autoConnect("New Hue Light"); } + WiFiManager wifiManager; + wifiManager.autoConnect("New Hue Light"); + if (! light_state[0]) { infoLight(white); while (WiFi.status() != WL_CONNECTED) { @@ -486,7 +467,7 @@ void setup() { }); server.on("/detect", []() { - server.send(200, "text/plain", "{\"hue\": \"strip\",\"lights\": " + (String)lightsCount + ",\"type\": \"rgb\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); + server.send(200, "text/plain", "{\"hue\": \"strip\",\"lights\": " + (String)lightsCount + ",\"modelid\": \"LST001\",\"mac\": \"" + String(mac[5], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[0], HEX) + "\"}"); }); server.on("/", []() { diff --git a/README.md b/README.md index ac9cfe9d..dd2ce3c7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This project emulates a Philips Hue Bridge that is able to control ZigBee lights - ~~Working directly with ZigBee lights, switches and sensors with RaspBee module~~ - ~~control IKEA Trådfri lights from HUE applications~~ - ~~Create ESP8266 bridge device to add MI Lights to Hue Bridge emulator.~~ - - On/Off control for other home devices using virtual lights + - ~~On/Off control for other home devices using virtual lights~~ - Alarm (~~email notification~~ + eps8266 horn) ## Working futures: @@ -25,9 +25,41 @@ This project emulates a Philips Hue Bridge that is able to control ZigBee lights - Go to sleep - Switches (custom esp8266 switches) - Autodiscover lights + +## Working devices and applications: + - Amazon Alexa (control only the lights) + - Logitech Harmony + - Tradfri Gateway + - Hue Bridge (original + other emulators) + - Home Assistant + - Domoticz + - Openhab + - Philips Ambilight TV's + - Kodi Hue Ambilight + + ## Working smartphone applications: + - Hue (official application) + - hueManiac + - OnSwitch + - HueSwitcher + - LampShade ## Not working: - - Home & Away futures (require remote api that is not public) + - Home & Away future from Hue app (require remote api) + - Google Home (require remote api) + - Eneco Toon (very likely it use cloud service detection) + +## Supported lights: + - WS2812B and SK6812 smart led strips + - Pwm RGB-CCT + - Pwm RGBW + - Pwm RGB + - Pwm CCT + - Pwm Dimming (up to 6 lights for every esp8266) + - On/Off plugs/lights (up to 6 lights for every esp8266) + - On/Off 433Mhz devices (multiple devices for every esp8266). Credits Mevel + +Please submit [here](https://github.com/mariusmotea/diyHue/issues/27) any other device/application that is working with this emulator. Check [Wiki page](https://github.com/mariusmotea/diyHue/wiki) for more details