dotsam / homebridge-milight

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

Error in Logs and other color issues #31

Open turbidWaters opened 7 years ago

turbidWaters commented 7 years ago

I am getting the following error in my logs at startup:

Jul 22 16:07:38 pi homebridge[19564]: Unhandled rejection Error: no response timeout Jul 22 16:07:38 pi homebridge[19564]: at Timeout._onTimeout (/usr/lib/node_modules/homebridge-milight/node_modules/node-milight-promise/src/milight-v6-mixin.js:123:26) Jul 22 16:07:38 pi homebridge[19564]: at ontimeout (timers.js:488:11) Jul 22 16:07:38 pi homebridge[19564]: at tryOnTimeout (timers.js:323:5) Jul 22 16:07:38 pi homebridge[19564]: at Timer.listOnTimeout (timers.js:283:5)

Additionally, when i use siri to turn the color of the lights, only the first 'fullcolor' zone turns color. I have to give the command again for the rest of the lights to make them turn color. And at times when i say (for ex.) "make all the lighs blue", it takes almost 4-8 seconds for lights to turn blue zone by zone and then at least one zone is left unchanged. When i give the same command again the zone that was left unturned, turns blue this time. Please let me know if youd like a video of the same in any specific order of commands to help me out.

heres my config.json:

"platforms": [{
        "platform": "MiLight",
        "name": "Lights",
        "bridges": [{
                "ip_address": "172.20.1.99",
                "version": "v6",
                "lights": {
                    "rgbw": ["Foyer", "Lobby", "Bedroom Mirror", "Picture"],
                    "fullColor": ["Cove", "Chandelier", "Kitchen", "Wash"]
                },
                "repeat": 1,
                "delay": 30
            },
        ]
    },

Also, when changing the color back to white, most of the time i need to give the command twice otherwise some of the zones change to a dim orange and stay that way.

Would appreciate any help! thanks!

mwittig commented 7 years ago

Regarding the unhandled exception error this is a bug in the base library and will be fixed asap

https://github.com/mwittig/node-milight-promise/issues/26

turbidWaters commented 7 years ago

Thank you for pointing that out. I should have checked before putting that up.

As for the rest of issues I have mentioned, I tried deleting persist, cachedaccesories, changed username and HomeKit pairing code, deleted all homes from HomeKit and re-added homebridge and all accessories. The behaviour still seems to be the same. I tried increasing the repeat time and milli seconds (to 3 and 90). Still the same result.

Additionally, is it possible to add a option to the config.json to set the lights to "warm white/cold white" by default for CT Bulbs? This is technically a feature request I guess. Will be good to have it included.

dotsam commented 7 years ago

Hi @chietanjain,

This sounds like a similar issue to #27 and other issues related to the order in which different HomeKit apps send commands. I think that ultimately this requires the sort of re-structuring that I was thinking about all the way back in #3.

But if you could still provide some logs for the issues with only the first fullColor bulb changing when sending a "all lights" command, that will still be helpful.

Also, I'll be fully implementing colour temperature control for fullColor bulbs in #26.

dotsam commented 7 years ago

I've pushed version 1.1.0 which I'm hoping addresses both of these issue, but as I don't have a v6 bridge or RGBW+CCT bulb, I can't say for sure. Please update and let me know if things are working better.

turbidWaters commented 7 years ago

Hi @dotsam

Thank you for your feedback.

Based on my understanding I have put together four scenarios (headings as 'PART 1', 'PART 2' ...) and included the logs for the same. Note that the Cove and Chandelier are 8W MiLight RGB+CT bulbs and the Kitchen and Wash are 12W RGB+CT Milight Downlights. I think there are some issues with these lights wrt color as sometimes the color on these lights don't match - between the bulbs and the downlights (I have not included the logs for this particular simulation). Perhaps some issues with their firmware. I am also saying this because I know for sure that one of the four downlights I am using (though they are all connected to the same light switch) behaves differently in many scenarios. I am conveying this so if there are issues with the lights you are using for testing, this info may be of help. I have written to my source of purchase of the MiLights and awaiting a reply.

Please let me know if these logs are what youre looking for. If not let me know if you need any other specific simulation. Oh, and yes, please do ignore the logs generated by other plugins. Ive tried to avoid most of them.

Simulations and Logs:

HB_MiLight_Simulation_Logs_23072017.zip

config.json used for this simulation:

[{ "platform": "MiLight", "name": "Lights", "bridges": [{ "ip_address": "172.20.1.99", "version": "v6", "lights": { "fullColor": ["Cove", "Chandelier", "Kitchen", "Wash"] }, "repeat": 2, "delay": 30 } ] },

turbidWaters commented 7 years ago

Hi @dotsam After making the last post, I created a scene with two lights (the cove and the chandelier). When using to siri to issue the command to execute that scene (when the lights have already been switched on using siri and turned to white), every time I use siri to execute turning on the scene, only the cove lights turn color, the chandelier still remains white. The same thing when using the scene button. But, when I use the scene button in HomeKit when the lights are off (switched off using Siri/Homekit Buttons) it works perfectly. I am including the logs for both the scenarios. Hope its useful. Thanks!

HB_MiLight_Simulation_Logs_Relax_Scene_23072017.zip