dotsam / homebridge-milight

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

No reactions with valid connection and commands #28

Closed crzdg closed 7 years ago

crzdg commented 7 years ago

Hi Guys,

Following Problem,

Setup:

Old RGB LED Strips (probably 3.5 years old) New MiLight V6 Bridge

RGB Strips can be controlled with Simple 1-zone RF controller RGB Strips can be controlled over MiLight 3 App on iOS over MiLight v6 Bridge

Homebridge is running on a Raspberry Pi 2 Rev. B Installed two days ago, so up-to-date.

Config

„bridge“: {
„name“: „Homebridge“,
„username“: „CC:22:2D:E3:DC:22“,
„port“: 51826,
„pin“: „031-67-123“
},

„platforms“: [
{
„platform“:“MiLight“,
„name“:“MiLight“,
„bridges“: [
{
„ip_address“: „192.168.0.212“,
„version“: „v6“,
„lights“: {„rgb“: „Desk“},
„repeat“: 3,
„delay“: 100
}
]
}
]
} 

Output Initialization

[6/14/2017, 7:28:20 PM] Loaded plugin: homebridge-milight
[6/14/2017, 7:28:20 PM] Registering platform 'homebridge-milight.MiLight'
[6/14/2017, 7:28:20 PM] ---
[6/14/2017, 7:28:20 PM] Loaded config.json with 0 accessories and 1 platforms.
[6/14/2017, 7:28:20 PM] ---
[6/14/2017, 7:28:21 PM] Loading 1 platforms...
[6/14/2017, 7:28:21 PM] [MiLight] Initializing MiLight platform...
Milight: {"ip":"192.168.0.212","port":5987,"delayBetweenCommands":10,"commandRepeat":1}
[6/14/2017, 7:28:21 PM] [MiLight] Initializing platform accessory 'Desk'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

Output Milight Initialization

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,0x26,0x0C,0x18,0x5F,0xB8,0x74,0x82,0x00,0x01,0xB2,0x01,0x00], remote=192.168.0.212
Milight: ready for next command
Milight: Session Id: 0xB2,0x01

Output @ On/Off Commands

[6/14/2017, 7:29:18 PM] [MiLight] [Desk] Setting power state to on
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0xB2,0x01,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.0.212
Milight: ready for next command
[6/14/2017, 7:29:19 PM] [MiLight] [Desk] Setting power state to off
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0xB2,0x01,0x00,0x06,0x00,0x31,0x00,0x00,0x05,0x02,0x0A,0x00,0x00,0x00,0x01,0x00,0x43]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x06,0x00], remote=192.168.0.212
Milight: ready for next command
[6/14/2017, 7:29:20 PM] [MiLight] [Desk] Setting power state to on
Milight: bytesSent=22, buffer=[0x80,0x00,0x00,0x00,0x11,0xB2,0x01,0x00,0x07,0x00,0x31,0x00,0x00,0x05,0x02,0x09,0x00,0x00,0x00,0x01,0x00,0x42]
Milight: bytesReceived=8, buffer=[0x88,0x00,0x00,0x00,0x03,0x00,0x07,0x00], remote=192.168.0.212
Milight: ready for next command

First problem, it's very strange. I'm only able to connect with the bridge over port 5978. Also this port was select as default when the port value is not set in the config.

I tried to Link the bulb several times Also tried to connect with an older bridge (think v4, I bought it with the strips 3.5 years ago), but was not able to get it connected with homebridge

I'm out of ideas. So may you got an idea left.

Thank you for your great work. :D

toshibochan commented 7 years ago

"ip_address": "192.168.0.212", "version": "v6", "lights": {"rgbw": ["Desk"]}, "repeat": 3, "delay": 100

If your bridge is the new v6? If not erase "version": "v6" line

toshibochan commented 7 years ago

Your receiver is rgb but use rgbw on your config

toshibochan commented 7 years ago

Send pic of your bridge and receiver

dotsam commented 7 years ago

Hi @sliza,

I think @toshibochan is on the right track here. Many of the RGB strip controllers actually use the RGBW command set. Could you try and switch to that in your config file and see if that helps. If not, could you send a screenshot of what remote in the MiLight 3 app works to control these for you?

As for port 5978, that is the default port for v6 bridges, nothing out of the ordinary there.

Any more details on what isn't working with your older bridge? It should be supported just as well.

toshibochan commented 7 years ago

use "delay": 80 not 100

crzdg commented 7 years ago

Thanks guys!

I tried with RGBW and v6 on or off. No change at all Only thing is if v6 not set I won't get any bytes received from the bridge. So pretty sure I have an v6

The old MiLight bridge could be a v4. Cause if I'm going on the webpage of it I only can land on a page were I can update the firmware. I can't set any settings, assuming that it's running on TCP and cannot receive the UDP packages. I can send bytes to it but will get no back and also no session id creation at the beginning of homebridge-milight start.

Could it be that the 1-zone RGB strip controller is waiting for commands on all zone (0x00)? I only could send commands send with 0x01, so zone 01.

Ok got pictures of my setup. Also including the RF I'm using

rf rfmilight3 0 rgbstripcontroller v6milightbridge oldwifimilightbridge

toshibochan commented 7 years ago

Not sure but I think homebridge-MiLight only works with 4zone remote.

toshibochan commented 7 years ago

img_0340 img_0341

toshibochan commented 7 years ago

This RGB and RGBW will work

crzdg commented 7 years ago

Isn't the type 'RGB' for 1-zone controllers? This type only will pick the first zone out of the config. So sounds legit to me. Or why should I config an RGB controller with 4-zones only as a 1-zone.

Will get an RGB 4-zone controller and test it out. May it's possible to implement the old MiLight Bridge and it might working with the 1-zone over that.

Thanks ans greetings

toshibochan commented 7 years ago

The developer who make homebridge-milight make to work only with 4 zone remote

toshibochan commented 7 years ago

You no need to buy the remote! Just buy the receiver and use the app to control

toshibochan commented 7 years ago

I recommend to buy RGBW receiver! And use RGBWW led strip

crzdg commented 7 years ago

Ok, got a 4-zone RGB controller. Everything works when I set it to "rgbw" in config.

Seems like 1-zone controllers won't work. And also that RGB and RGBW controllers use "rgbw" command set.

Thanks for help

toshibochan commented 7 years ago

Did you connect your controller to your bridger?

toshibochan commented 7 years ago

pair your controller to bridger zone one! Use the app to add the controller

toshibochan commented 7 years ago

This is my config old version

img_0361

toshibochan commented 7 years ago

New version

img_0362

crzdg commented 7 years ago

Everything works fine thanks!

Used a similar config as your second one. Works like a charm at the moment, will adjust delay and repeat settings in future.

Conclusions:

  1. homebridge-milight seems not to support 1-zone RGB controllers
  2. 4-zone RGB and RGBW controllers use both the "rgbw" type command sets
  3. Not sure if the 4-zone RGB controller would work with the older v4 MiLight Bridge