New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lights not working #46

Closed
MrJoki007 opened this Issue Dec 10, 2017 · 10 comments

Comments

Projects
None yet
6 participants
@MrJoki007

MrJoki007 commented Dec 10, 2017

Hello,
yesterday i installed homebridge and the milight addon.
Now i can see the two lamps in the home app, but i cant controll them.
I can controll them over the MiLight iPhone App and the remote.
Its an v6 Bridge with RGB-LED-Strip-Controllers

My code is:
{ "platform":"MiLight", "name":"MiLight", "bridges": [ { "ip_address": "192.168.178.145", "version": "v6", "lights": {"rgbw": ["Bett", "Tisch"]}, "repeat": 1, "delay": 100 } ] }
What do i have to set in the bridge? UDP and port 5987 right?

@tystik4056

This comment has been minimized.

tystik4056 commented Dec 10, 2017

Looks like your code is off. Should look more like this I think...

{
"platform":"MiLight",
"name":"MiLight",
"bridges": [
{
"ip_address": "192.168.1.6",
"version": "v6",
"lights": {"fullColor": ["Name Of Device","Name Of Device","Name Of Device","Name Of Device"]},

              "repeat": 1,
              "delay": 100
            }
          ]

Make sure your IP address is correct for your wifi box also. Where it says "Name Of Device" each wifi box/remote can control up to 4 channels. So you might have Kitchen on 1, Night Stand on 2 etc. If your not using a channel put "null". Here's an example of what I mean:

{
"platform":"MiLight",
"name":"MiLight",
"bridges": [
{
"ip_address": "192.168.1.6",
"version": "v6",
"lights": {"fullColor": ["Kitchen ","Bedroom","Null,"Null"]},

              "repeat": 1,
              "delay": 100
            }
          ]

Also I'm using port 51826. Not sure if that will make a difference.

@MrJoki007

This comment has been minimized.

MrJoki007 commented Dec 10, 2017

Looks like this for me
e9a327aa-6f3d-47fc-b3b5-7a06e89c04c8

@jenswet

This comment has been minimized.

jenswet commented Dec 11, 2017

Hello,
I have the same problem.

I bought a new Milight Ibox2 and RGBW strip + controller.
Via the Milight App I can control my strip without any problems.
Via Homekit it does not work.

I use the following settings in the Milight Config:

Network Parameters setting
Protocol: UDP
Port ID: 8899
Server Address: 192.168.178.32
TCP Time Out Setting: 300

This is my homebridge platform config:

{
    "platform": "MiLight",
    "bridges": [
        {
            "ip_address": "192.168.178.32",
            "version": "v6",
            "lights": {
                "rgbw": [
                    "Wohnzimmer"
                ]
            },
            "repeat": 1,
            "delay": 100
        }
    ]
}

When I apply any setting in Homekit I get this in the debug log:

Dec 11 22:11:21 volumio homebridge[6200]: 2017-12-11T22:11:21.080Z 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]
Dec 11 22:11:21 volumio homebridge[6200]: 2017-12-11T22:11:21.159Z Milight: bytesReceived=22, buffer=[0x28,0x00,0x00,0x00,0x11,0x00,0x02,0xF0,0xFE,0x6B,0x48,0xE7,0x6A,0x12,0xA2,0x30,0xA5,0x00,0x01,0xF8,0x00,0x00], remote=192.168.178.32
Dec 11 22:11:21 volumio homebridge[6200]: 2017-12-11T22:11:21.259Z Milight: ready for next command

But nothing changes.

Any ideas how to fix that?

Thanks and cheers from Germany

@jenswet

This comment has been minimized.

jenswet commented Dec 17, 2017

I just checked the Limitless LED Admin tool and get the following information about the protocol:
UDP,Server,8899,192.168.178.32
Following is the log when I switch the zone 1 on:

Start Wifi Bridge Session...
Send UDP commands to 192.168.178.32 port 5987
Sent: 20 00 00 00 16 02 62 3A D5 ED A3 01 AE 08 2D 46 61 41 A7 F6 DC AF D3 E6 00 00 1E
listenEndPoint udp datagram received length is 22
Received: 28 00 00 00 11 00 02 F0 FE 6B 48 E7 6A 12 A2 30 A5 00 01 9C 01 00
LimitlessLEDWifiBridgeSessionID1 is 9C (receivedBytes[19])
LimitlessLEDWifiBridgeSessionID2 is 01 (receivedBytes[20])
The incoming UDP Packet received was from listenEndPoint.Address IP 192.168.178.32 (send-to IP could have been a broadcast IP .255, so we don't know how many bridges might respond)
MAC Address is F0:FE:6B:48:E7:6A ( (receivedBytes[7]..receivedBytes[12])
Send Packet in this format [ 80 00 00 00 11(length in hex) (17 01)(WB1WB2) 00 SN 00 (31 00 00 08 04 01 00 00 00)(v6CommandString) 01(zone) 00 3F(chksum) ]
v6CommandString for this button is: 31 00 00 08 04 01 00 00 00 
Length is: 17 cmd[4] = cmd.Length - 5; set packet length (excluding 5 packet header bytes)
WB1 is: 156 cmd[5] = (byteWifiBridgeSessionID1)
WB2 is: 1 cmd[6] = (byteWifiBridgeSessionID2)
Sequence Number is 61 cmd[8] = SequenceNumber
Checksum is 3F For i = 10 To 20 {intChecksum += cmd[i]} byteChecksum = CByte(intChecksum & 0xFF); cmd[21] = byteChecksum; 
Sent: 80 00 00 00 11 9C 01 00 61 00 31 00 00 08 04 01 00 00 00 01 00 3F
Command SUCCESSFUL.
Received: 88 00 00 00 03 00 61 00
Command completed.

This uses port 5987?

In homebridge I can see this result for the same command:

Dec 17 17:57:23 volumio homebridge[529]: 2017-12-17T17:57:23.160Z 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]
Dec 17 17:57:23 volumio homebridge[529]: 2017-12-17T17:57:23.199Z Milight: bytesReceived=22, buffer=[0x28,0x00,0x00,0x00,0x11,0x00,0x02,0xF0,0xFE,0x6B,0x48,0xE7,0x6A,0x12,0xA2,0x30,0xA5,0x00,0x01,0x73,0x00,0x00], remote=192.168.178.32

The command bytes seem wrong, any ideas where this comes from? Is the v6 really fully supported?
Thanks in advance!

@MrJoki007

This comment has been minimized.

MrJoki007 commented Dec 23, 2017

I had it working on my old install of homebridge.
Its the exact same config.
How does the bridge know what controller is the first one and whats the second?

@dotsam

This comment has been minimized.

Owner

dotsam commented Dec 25, 2017

All v6/iBox 2 bridges should be using UDP port 5987 for communication, so I'm not sure where these references to 8899 come from.

@jenswet All of the logs from Homekit that you've posted are only showing session setup commands and responses (starting with 0x20 and 0x28) not any actual light commands.

@jenswet and @MrJoki007 Can you try again and provide more logs that show light commands and (hopefully) responses. They'll start with 0x80 and 0x88.

@garrettks

This comment has been minimized.

garrettks commented Jan 17, 2018

I am having the exact same problem. I have 1 iBox2 bridge and 4 LED strips. It works perfectly fine in the Milight app, however in home kit I get no response.

@MrJoki007

This comment has been minimized.

MrJoki007 commented Jan 20, 2018

How does the bridge know, what lamp is the first, second, third etc and how do i link the bulbs to the bridge?

@romaindufour

This comment has been minimized.

romaindufour commented Feb 6, 2018

I don't arrive to control my lights with HomeBridge :
{
"platform": "MiLight",
"name": "MiLight",
"bridges": [{
"ip_address": "192.168.0.7",
"version": "v1",
"lights": {"rgbw": ["Kitchen","TT","Bedroom","Hallway"]},
"repeat": 1,
"delay": 100
}]
}

],

"accessories": [


]

I don't have any error when I launch homebridge and click on the application buttons. Any help please ?

[2018-2-5 19:19:44] Homebridge is running on port 51826.
[2018-2-5 19:20:10] [MiLight] [Hallway] Setting power state to on
[2018-2-5 19:20:10] [MiLight] [Hallway] Setting brightness to 100
[2018-2-5 19:20:14] [MiLight] [Hallway] Setting power state to off
[2018-2-5 19:20:15] [MiLight] [Bedroom] Setting power state to on
[2018-2-5 19:20:15] [MiLight] [Bedroom] Setting brightness to 100
[2018-2-5 19:20:16] [MiLight] [Kitchen] Setting power state to on
[2018-2-5 19:20:16] [MiLight] [Kitchen] Setting brightness to 100
[2018-2-5 19:20:18] [MiLight] [TT] Setting power state to on
[2018-2-5 19:20:18] [MiLight] [TT] Setting brightness to 100
[2018-2-5 19:20:18] [MiLight] [Hallway] Setting power state to on
[2018-2-5 19:20:18] [MiLight] [Hallway] Setting power state to off
[2018-2-5 19:20:19] [MiLight] [Bedroom] Setting power state to off
[2018-2-5 19:20:19] [MiLight] [Kitchen] Setting power state to off
[2018-2-5 19:20:20] [MiLight] [TT] Setting power state to off

@MrJoki007

This comment has been minimized.

MrJoki007 commented Feb 6, 2018

Ive got a fix for this problem.
First open the official milight app on your phone.
Then open the link/unlink settings.
Unlink all your milight devices from the bridge. (Make sure all zones are cleared)
Now take something like a pen and press the RST (reset) button 10 secounds on your bridge while its plugged in.
Now open the officical milight app and remove the old bridge.
Add a new bridge select the Smart Link mode and type your wifi name and password in and click start.
After few secounds it should say configured.
Now find out the ip of the bridge and open its web gui.
Make sure its set to UDP and port 5987 on other settings and click save and restart.
Now open the milight app again and select your bridge.
Now link all the devices in the zones you like.
Now open homebridge settings and make your the ip of your bridge and port 5987 are set correctly.
(MiLight rgb strip controllers have to be set to fullColor)
restart your homebridge and it should work

@MrJoki007 MrJoki007 closed this Feb 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment