homebridge-tplink-smarthome
homebridge-tplink-smarthome copied to clipboard
LB130's colour selection issues
Expected Behavior
When selecting a color option in the iOS home app, (either on-demand or as part of an automation schedule), the light bulb connected should change color.
Current Behavior
When selecting a color for a TP Link LB130 device, the result is mixed. Sometimes the light will change color, sometimes it wont - in which case it will default to a standard warm white light. Consistently though, is the fact that when creating scenes in the iOS home app, color options are presented but have no effect on the bulb changing color. I've confirmed via first-party software (Kasa) that the bulbs aren't faulty and do have the ability to change color.
Steps to Reproduce (for bugs)
In the iOS home app, select automation (or create a scene). Try select a color (say blue) and the app appears to have selected it. Select the 'test this scene' option and the lights will default to a white light. When you later re-check , it's apparent the Home app doesn't think the lightbulb has the ability to change color.
Versions
Node, Homebridge and MacOS all current. Clean install.
One thing to check is hue. There are two different hue values being reported from different interfaces, low resolution (0 to 100) and high resolution (0 to 360).
@lordofthegins, upgrade to the newest version (v3.14.1) and let me know if its any better. There was a bug where the color temperature was overriding the color that was set when it read back the values from the bulb. The behavior I was seeing was the bulb was changing to the requested color, but the color picker in the app would default back to white.
@DaveGut, Can you elaborate? The Homekit Hue characteristic is 0-360 and the Hue that is reported from the tp-link bulbs is also 0-360.
Appreciate your work Plasticrake. The color picker seems to be working better, but I do get heaps of UDP errors when triggering automated scenes. This is across multiple bulbs and it's in relation to both color picking and brightness setting.
[1/24/2019, 10:56:22 PM] [TplinkSmarthome] [Kitchen] setHue [1/24/2019, 10:56:22 PM] [TplinkSmarthome] Error: UDP Timeout at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:144:22) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) [1/24/2019, 10:56:22 PM] [TplinkSmarthome] [TV] setColorTemperature [1/24/2019, 10:56:22 PM] [TplinkSmarthome] Error: UDP Timeout at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:144:22) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) [1/24/2019, 10:56:22 PM] [TplinkSmarthome] [TV] setBrightness [1/24/2019, 10:56:22 PM] [TplinkSmarthome] Error: UDP Timeout at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:144:22) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10)
My config json is: { "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" },
"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",
"accessories": [
],
"platforms": [{
"platform": "TplinkSmarthome", "name": "TplinkSmarthome",
"broadcast": "255.255.255.255", "devices": [ { "host": "172.16.0.108" }, { "host": "172.16.0.115" }, { "host": "172.16.0.111" }, { "host": "172.16.0.103" }, { "host": "172.16.0.108" }, { "host": "172.16.0.101" }, { "host": "172.16.0.105" } ], "deviceTypes": ["plug","bulb"], "macAddresses": [], "pollingInterval": 10, "addCustomCharacteristics": false, "inUseThreshold": 0, "switchModels": ["HS100"], "timeout": 3 }
]
}
@lordofthegins when you see those errors are the bulbs still changing color? The 3 second timeout might be a bit low as well.
Does the discovery not work for you? I see you are manually specifying the IP addresses, which could also cause a performance bottleneck especially if the devices also work via discovery (it will be doing double the work every 10 seconds). If the discovery isn't working for you I'd try changing the broadcast address to 172.16.0.255
I added the devices manually to see if that was the issue. My router gives them static addresses and I never had an issue with discovery so I'll remove it.
Config below:
{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" }, "accessories": [
],
"platforms": [{
"platform": "TplinkSmarthome", "name": "TplinkSmarthome",
"broadcast": "172.16.0.255", "deviceTypes": ["plug","bulb"], "macAddresses": [], "pollingInterval": 10, "addCustomCharacteristics": false, "inUseThreshold": 0, "switchModels": ["HS100"], "timeout": 20 }
]
}
I've played around with each light individually and can't get any UDP errors. The errors seem to come on when testing (or triggering) an automation scene (multiple commands at once).
There's still issues with the colour picker. When selecting one light some of the presets from the colour wheel don't work, but if you edit it and get the full colour wheel it works fine.
Thanks in advance, you're awesome.
Output when I use all devices in an automation scene.
1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] [Apple Lamp] device.send() Error: UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] [Apple Lamp] device.send() Error: UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] [TV] device.send() Error: UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] [TV] device.send() Error: UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] [Kitchen] device.send() Error: UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome.API] [Kitchen] device.send() Error: UDP Timeout [1/25/2019, 12:19:54 PM] [TplinkSmarthome] [Apple Lamp] setColorTemperature [1/25/2019, 12:19:54 PM] [TplinkSmarthome] Error: UDP Timeout at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:144:22) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) [1/25/2019, 12:19:54 PM] [TplinkSmarthome] [Apple Lamp] setBrightness [1/25/2019, 12:19:54 PM] [TplinkSmarthome] Error: UDP Timeout at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:144:22) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) [1/25/2019, 12:19:54 PM] [TplinkSmarthome] [TV] setColorTemperature [1/25/2019, 12:19:54 PM] [TplinkSmarthome] Error: UDP Timeout at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:144:22) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) [1/25/2019, 12:19:54 PM] [TplinkSmarthome] [TV] setBrightness [1/25/2019, 12:19:54 PM] [TplinkSmarthome] Error: UDP Timeout at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:144:22) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) [1/25/2019, 12:19:54 PM] [TplinkSmarthome] [Kitchen] setSaturation [1/25/2019, 12:19:54 PM] [TplinkSmarthome] Error: UDP Timeout at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:144:22) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) [1/25/2019, 12:19:54 PM] [TplinkSmarthome] [Kitchen] setHue [1/25/2019, 12:19:54 PM] [TplinkSmarthome] Error: UDP Timeout at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:144:22) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10)
Hi I’m also getting this issue with my KL130 bulbs. Wondering if it’s just a case of the wrong value being passed in, ie a hue instead of a color? It’s pretty hit and miss especially with scenes. Also sometimes if I just go to the home app and try setting the color (ie it is red and I want to set it to blue) it will just bounce back to the original red color, as if it couldn’t connect to the bulb...
Hi there! I see this is an old topic, but the problems described above are exactly the same as I’m experiencing now. I’ve got the LB130. Is there a solution available? Thanks in advance!
The device color picker is indeed being overwritten every time. Will debug and check as well
The device color picker is indeed being overwritten every time. Will debug and check as well
Thanks for replying. Awaiting your findings. I also got a lot of UDP-timeout errors.
Any solution know for this problem?
I fixed a bug in the tplink-smarthome-api package that may be related to this. I don't have multiple bulbs to test myself. If someone could upgrade to v5 of this package and test that would be great!
UPDATE: I updated the plugin, but it broke Homebridge. So I did a complete reinstall. That seemed to work, however; all of my plugs are back online, but the bulbs can't be found automatically.
UPDATE 2: I tried to delete the 'Accesoires' and 'Persists' folder, but that didn't help. So I unistalled Homebridge and all it's files. Reinstalling it went fine. I got access and can install plugins and enter the web interfance. However: the error above keeps popping up, but more important; none of the devices can be found now, except for the bulb, but it can't be added.
After updating to the latest package. Changing colours still does having the same issue. The "temperature" will take over the colour selection if you select it.