dotsam / homebridge-milight

MiLight/LimitlessLED/Easybulb Plugin for Homebridge
MIT License
63 stars 12 forks source link

Can't control but app + remote works #32

Closed buschco closed 7 years ago

buschco commented 7 years ago

Hello, I have ...

I attached an image which shows my setup. Control via iPhone app and the Mi-Light remote works fine. My config.json contains these relevant lines:

         {
            "platform":"MiLight",
            "name":"MiLight",
            "repeat": 3,
            "delay": 80,
            "bridges": [
              {
                "ip_address": "192.168.178.93",
                "lights": {"rgbw": ["Zimmer"]}
              }
            ]
        },

I tried all versions (v1-6), rgb and rgbw but nothing works. I don't know now what I should do. I tried almost everything from the other issues. Thank you for your help I hope you guys now a solution.

img_1747

dotsam commented 7 years ago

This LED strip controller seems to be the newer 4-zone version (http://www.futlight.com/productdetails.aspx?id=201&typeid=146) which should respond to RGBW commands. Your WiFi bridge is v6. I believe this setup was confirmed working in #28 (where there were issues with a single-zone RGB controller, but not this one).

A working config should look like this (assuming you've paired the controller to zone 1):

         {
            "platform":"MiLight",
            "name":"MiLight",
            "bridges": [
              {
                "ip_address": "192.168.178.93",
                "version": "v6",   
                "lights": {"rgbw": ["Zimmer"]}
              }
            ]
        },

The only other problem I've seen reported is that some bridges are set to TCP, while the node-milight-promise library uses all UDP. See #23 for how to change that setting.

buschco commented 7 years ago

Thank you for your reply, but it didn't helped me. So I switched to UDP in the iBox and tried version 1-6 but none worked. App and remote are still working. I am also wondering if that thing will work (I always thought that is the version 6)https://www.amazon.de/gp/product/B01N1I6ZK0/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

dotsam commented 7 years ago

All of the "iBox" versions use what I'm referring to as the v6 protocol. Can you try running homebridge as MILIGHT_DEBUG=true homebridge -D and provide the output to confirm that a session can be established with the bridge, to see if the problem lies in the connection or in the commands being sent.

buschco commented 7 years ago
[7/23/2017, 8:17:28 AM] [MiLight] Initializing MiLight platform...
Milight: {"ip":"192.168.178.93","port":5987,"delayBetweenCommands":100,"commandRepeat":1}
[7/23/2017, 8:17:28 AM] [MiLight] Initializing platform accessory 'Zimmer'...

Milight: initializing socket
Milight: initializing socket done
Milight: bytesSent=27, buffer=[0x20,0x00,0x00,0x00,0x16,0x02,0x62,0x3A,0xD5,0xED,0xA3,0x01,0xAE,0x08,0x2D,0x46,0x61,0x41,0xA7,0xF6,0xDC,0xAF,0xD3,0xE6,0x00,0x00,0xC9]

Milight: bytesReceived=22, buffer=[0x28,0x00,0x00,0x00,0x11,0x00,0x02,0xF0,0xFE,0x6B,0x3B,0xD4,0x62,0x35,0x14,0xEF,0x87,0x00,0x01,0x7F,0x03,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: Session Id: 0x7F,0x03

[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Setting power state to on
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Ommiting 'on' command as we've sent it to this bulb most recently
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Setting brightness to 100
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Sending brightness up command
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Sending brightness up command
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Sending brightness up command
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Sending brightness up command
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Sending brightness up command
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Sending brightness up command
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Sending brightness up command
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Sending brightness up command
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Sending brightness up command
[7/23/2017, 8:17:35 AM] [MiLight] [Zimmer] Sending brightness up command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x05,0x00,0x31,0x00,0x00,0x05,0x02,0x09,0x00,0x00,0x00,0x01,0x00,0x42]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x05,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x06,0x00,0x31,0x00,0x00,0x05,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x3A]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x06,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x07,0x00,0x31,0x00,0x00,0x05,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x3A]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x07,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x08,0x00,0x31,0x00,0x00,0x05,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x3A]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x08,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x09,0x00,0x31,0x00,0x00,0x05,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x3A]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x09,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x0A,0x00,0x31,0x00,0x00,0x05,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x3A]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x0A,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x0B,0x00,0x31,0x00,0x00,0x05,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x3A]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x0B,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x0C,0x00,0x31,0x00,0x00,0x05,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x3A]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x0C,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x0D,0x00,0x31,0x00,0x00,0x05,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x3A]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x0D,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x0E,0x00,0x31,0x00,0x00,0x05,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x3A]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x0E,0x00], remote=192.168.178.93
Milight: ready for next command
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x0F,0x00,0x31,0x00,0x00,0x05,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x3A]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x0F,0x00], remote=192.168.178.93
Milight: ready for next command
[7/23/2017, 8:17:41 AM] [MiLight] [Zimmer] Setting power state to off
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0x7F,0x03,0x00,0x10,0x00,0x31,0x00,0x00,0x05,0x02,0x0A,0x00,0x00,0x00,0x01,0x00,0x43]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x10,0x00], remote=192.168.178.93
Milight: ready for next command
buschco commented 7 years ago

Ok I have an update: I bought this bridge: https://www.amazon.de/gp/product/B01N1I6ZK0/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1 I set it up and changed to UDP (they are apparently all shipped with TCP as default). It didn't worked. So I changed back to UDP played around with version and light Type (rgb, rgbw, fullColor) and like magic this configuration works:

"platform":"MiLight",
           "name":"MiLight",
           "bridges": [
             {
               "ip_address": "192.168.178.95",
               "version": "v6",
               "lights": {"fullColor": ["Zimmer"]}
             },
             {
               "ip_address": "192.168.178.93",
               "version": "v6",
               "lights": {"fullColor": ["Bad"]}
             }
           ]

As you can see I also got the old bridge to work. But keep in mind: Both bridges run on TCP. I hope I can help somebody with my experience.

mwittig commented 7 years ago

I set it up and changed to UDP (they are apparently all shipped with TCP as default). It didn't worked. So I changed back to UDP played

You changed back to >> TCP <<, right? I am not sure what these modes, aka. UDP versus TCP are good for, but as far I can tell there no need to change the factory settings. So, TCP mode works with UDP clients.

buschco commented 7 years ago

as described in https://github.com/dotsam/homebridge-milight/issues/23 I changed it to UDP because it was not working. But it seems that this not helped so I changed back to the factory settings (TCP) and it works now.