dotsam / homebridge-milight

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

More than 4 zones? #39

Open fghekman opened 7 years ago

fghekman commented 7 years ago

Hi,

I am using the new 8 zone remote in combination with the latest WiFi box v6 (iBox2). When selecting the 8 zone remote in the milight phone app I can assigning the RGBCCT lights to the 8 zones. When I use your software to control the light by homebridge I can only assign 4 zones. When I use more than 4 zones, the 5th zone is overwriting the 1st one.

It would be great if more than 4 zones are allowed in your script. Would this be possible in any way? If not and I want to control my lights with homebridge I have to buy 4 more iBoxes because of the limitations of the software.

Thanks!

mwittig commented 7 years ago

Hi,

I am the developer of the base package node-milight-promise used as part of homebridge-milight. I have RGBW/WW/CW Full Color bulbs, an ibox1 controller and the latest iPhone App. When I select the 8-zone remote in the App as shown below I am not able to link it with bulbs I have. Thus, I am wondering which bulbs you have and whether or not you're referring to the same remote model? Do you have the physical remote or are using the App?

Apparently, the 8-zone remote uses a different command-set which might not be support by the iBox controller I have (possibly a firmware issue) and/or the bulbs I have. @Oggymator do yohave some information about the support of the 8-zone remote?

image

fghekman commented 7 years ago

Thanks for your answer,

The lightbulbs I use are the 4W GU10 RGB+CCT LED Spotlight (FUT103) and I am referring to the same remote as you mentioned in your picture. I'm only using the 8 zone remote in the app at the moment. When I select the remote I can link (using my iBox2 see picture) 8 zones to the remote. Alle the lights I linked do respond when I use the Milight app and use these zones.

I do have an older wifi iBox1 which I don't use anymore. When I try this older box I cannot link the 8 zones either.

If you need any other information please let me know.

img_0955 ibox2

mwittig commented 7 years ago

@fghekman Thanks for the response. As you say your ibox1 doesn't work either it seems like this is a firmware issue. I think I can add support for 8-zone control though, but I'll need your help with testing stuff at some point. The first step for me will be to decode the on the wire protocol (using a packet sniffer). For correspondence please use the linked ticket.

pauleec commented 6 years ago

Hi guys I have learnt that some of the early RGB-CCT Milight bulbs (early 9w stock) have firmware that is not compatible with 8-zones. Ive spoken with the manufacturer who have informed me that all the latest RGB-CCT products that have been manufactured after July 2017 support operating in an 8-Zone configuration.

pauleec commented 6 years ago

I noticed that the milight-ESP8266 guys have also encountered this problem and have captured some traces (see here: https://github.com/sidoh/esp8266_milight_hub/issues/95). I have a full house of RGB-CCT lights from Milight configured for 8-zone panel and handheld remotes (as well as the milight bridge). Let me know if there is any assistance I can provide to help find a speedy fix to this. Thanks

pauleec commented 6 years ago

Latest Node-Mi-Light-promise has now been updated to include 8 zone Full Color support. When will the update be included in the home bridge-Mi-Light plugin. Can you include a sample config.json which shows 8 full Color zone support in the documentation? Please :-/

dotsam commented 6 years ago

I've pushed out an update with support for the 8 zone code in node-milight-promise. This is untested as I don't have a v6 bridge/fullColor bulbs.

Basic usage is simply to add up to 8 bulbs per fullColor/v6 definition. There's an info message added to the homebridge console to advise that not all bulbs/bridges support this. To silence that warning, or disable the support (really, you should just remove the extra bulbs...) add use8Zone: true to the bridge definition.

Can someone please test and let me know if this is working correctly?

fghekman commented 6 years ago

@dotsam At installing it throws an error code (128). This is the output: npm ERR! code 128 npm ERR! Command failed: /usr/bin/git clone -q git://github.com/mwittig/node-milight-promise.git /root/.npm/_cacache/tmp/git-clone-12003ec6 npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-12003ec6': Permission denied npm ERR!

I've used "sudo npm install -g homebridge-milight" to install.

mwittig commented 6 years ago

fyi, released node-milight-promise@0.3.0

dotsam commented 6 years ago

@fghekman With @mwittig pushing the 8-zone support to the registry, I've switched back to that, so you should be able to try installing again and hopefully not experience the git permission issues you had before

fghekman commented 6 years ago

@dotsam The new installer finishes correctly. I did not receive any more errors. But the new 8-zone support by @mwittig does not seem to work quite as I expected.

In order to see if there was something wrong on my end I deleted the ‘persist’-folder. This was without any effect. After that I did a full reset of the milight-plugin. No effect. Finally I reinstalled my Raspberry Pi with homebridge. Also no effect.

If you like more info or if I wrote something that is not clear to you please let me know.

dotsam commented 6 years ago

@fghekman Thanks for testing and the details notes. I see the problem with commands not being sent for bulbs correctly, and I can push out a change to resolve this shortly. I'll also add a pass-through for the bridge timeout option so you can experiment with setting it lower.

For version 1.1.0 of my plugin, the version syntax I'm using should match node-milight-promise version 0.2.32, and functionality should be exactly the same.

Finally, I'll have to do a little more investigation with the "commands going to different bridges" issue. It may be resolved by my fix for your first issue, or it could be related to #42, or it could be related to now setting fullSync to false for the node-milight-promise controller. I'll make this fullSync property also pass through from the config so it can be played with as well.

pauleec commented 6 years ago

@dotsam Ive had better results than @fghekman. I can control all 8 zones successfully they are only showing as white lights and switch on to the last settinthey were on.

dotsam commented 6 years ago

Hi @fghekman and @pauleec,

I've just published version 1.1.4, which should set up 8-zone fullColor bulbs correctly now.

In addition, you can now pass through the fullSync, sendKeepAlives, and sessionTimeout options to node-milight-promise (defaults found in the source). Tweaking these may help with the timeout issues.

fghekman commented 6 years ago

Hi @dotsam,

I see this issue is still open. I think it can be closed now. The 8 zones are working correctly. I had some tweaking to do but the are working flawlessly. I'm not sure that the 'Unhandled rejection Error' @mwittig is referring to has got something to do with the 8 zone setup. I do see the error, and sometimes not all the lights respond directly to all the commands I send at once but I think it is a different kind of problem.

Thank you @dotsam and @mwittig for your effort in adding this future to the software.

pauleec commented 6 years ago

Hi - I'm not sure if my last post got through - it seems to have dissappeared. I updated to the latest level of the homebridge-milight plugin and it no longer seems to be accepting 8 zone configurations.

here is a snippet of the config.json.

{ "platform":"MiLight", "name":"MiLight", "use8Zone" : true, "bridges": [ { "version": "v6", "lights": {"fullColor": ["Kitchen Downlighters", "Kitchen Bulbs", null, "Bathroom", "Bedside Downlighters", "Bedside Lamps", "Guest Bathroom", "Workshop"], "rgbw": [null,null, "Kitchen LED Strips", null, null, null, null, null]}, "repeat": 1, "delay": 100 } ] },

I have tried playing about and placing it in about every place a variable can be put in.. but its still giving the same error:

[2018-4-14 05:36:32] Loaded plugin: homebridge-alexa [2018-4-14 05:36:32] Registering platform 'homebridge-alexa.Alexa' [2018-4-14 05:36:32] --- [2018-4-14 05:36:32] Loaded plugin: homebridge-broadlink-rm [2018-4-14 05:36:32] Registering platform 'homebridge-broadlink-rm.BroadlinkRM' [2018-4-14 05:36:32] --- [2018-4-14 05:36:33] Loaded plugin: homebridge-milight [2018-4-14 05:36:33] Registering platform 'homebridge-milight.MiLight' [2018-4-14 05:36:33] --- [2018-4-14 05:36:33] Loaded plugin: homebridge-server [2018-4-14 05:36:33] Registering platform 'homebridge-server.Server' [2018-4-14 05:36:33] --- [2018-4-14 05:36:33] Loaded config.json with 0 accessories and 4 platforms. [2018-4-14 05:36:33] --- [2018-4-14 05:36:33] Loading 4 platforms... [2018-4-14 05:36:33] [Alexa] Initializing Alexa platform... [2018-4-14 05:36:33] [MiLight] Initializing MiLight platform... [2018-4-14 05:36:33] [MiLight] Only a maximum of 4 zones per bulb type are supported per bridge. Only recognizing the first 4 zones. 2018-04-14T05:36:33.154Z Milight: {"ip":"255.255.255.255","port":5987,"delayBetweenCommands":100,"commandRepeat":1,"fullSync":true,"sendKeepAlives":true,"type":"v6","broadcastMode":true} [2018-4-14 05:36:33] [MiLight] Only a maximum of 4 zones per bulb type are supported per bridge. Only recognizing the first 4 zones. [2018-4-14 05:36:33] [MiLight] Initializing platform accessory 'Kitchen Downlighters'... [2018-4-14 05:36:33] [MiLight] Initializing platform accessory 'Kitchen Bulbs'... [2018-4-14 05:36:33] [MiLight] Initializing platform accessory 'Bathroom'... [2018-4-14 05:36:33] [MiLight] Initializing platform accessory 'Kitchen LED Strips'... [2018-4-14 05:36:33] [Broadlink RM] Initializing BroadlinkRM platform... [2018-4-14 05:36:33] [Broadlink RM] Curtains Accessory Ready [2018-4-14 05:36:33] [Broadlink RM] Initializing platform accessory 'Learn'... [2018-4-14 05:36:33] [Broadlink RM] Initializing platform accessory 'Scan Frequency'... [2018-4-14 05:36:33] [Broadlink RM] Initializing platform accessory 'Curtains'... [2018-4-14 05:36:33] [Homebridge Server] Initializing Server platform... [2018-4-14 05:36:33] Loading 0 accessories...

I've retested node-milight-promise at the newer 0.3.0 level and its still fine with the 8 zone test. Am I entering the use8Zone:true setting correctly? Why is it being ignored in the later update? Is there a regression?

pauleec commented 6 years ago

I’ve resolved the issue by reinstalling a new orangepi. Can you let me know where the use8zone is set (perhaps with an example file to show it)?