Closed w4rell closed 3 years ago
I don't have these devices, so if it doesn't currently work for them, yes a dump would be necessary. Does the library work with them, now? Generally it works with any of the tplink devices in this category, so I'd be surprised if it didn't. My support-matrix on the README is "someone verified these things work" so maybe just test all the things with the lib, and we can add them.
Here is a quick test to see what is supported:
# install tool
npm i -g tplink-lightbulb
# scan to get a list of devices
tplight scan
tplight details <IP>
tplight off <IP>
tplight on <IP>
tplight cloud <IP>
# orangish
tplight temp<IP> 1
# blueish
tplight temp <IP> 10000
# red
tplight hex <IP> "#ff0000"
# purple
tplight hsb <IP> 72 58 35
If scan
works, raw
works, and for all the others <IP>
is the ip address listed in scan
for the device. Generally temp
works for non-RGB bulbs and hex
/hsb
works for RGB.
Checking back in on this. Did you try it @w4rell ?
I just received a KL130 and I can confirm it works. thank you.
Nice! Thanks for letting me know. Would you mind making a PR to README for what works in support matrix?
Of course! Coming right up.
It looks like both temp and hsb/hex work for this bulb, despite the README missing the hex/hsb bits in the support matrix. Color temp appears to be limited to range of 2500 to 9000 inclusive. HSB supports hues 0 to 360, saturations 0 to 100, brightnesses 0 to 100. Hex works with the full 0x000000 to 0xFFFFFF color range. Oddly there doesn't seem to be a way to set brightness and color temperature at the same time. Instead I have to use HSB to set the brightness, then change the color with the temp command.
If you have tested, submit a PR for the change in the README. I don't have the devices, so I can't test. it should be noted, hex-rgb is converted to HSL in code, as are all colors. That is odd about temp vs brightness. Usually these are mutually exclusive: brightness + temp, or HSL. Might be a good note to add to the README.
Here is a quick test to see what is supported:
Note that each bulb has different valid range of temperatures, therefore this test will fail for non-RGB bulbs. E.g., KL120 will succeed with temp
only if in range 2700-6500. (PR for KL120 submitted)
My main thing is I don't want to add stuff I haven't personally tested, but if ya'll have verified that it works, I'm happy to take a PR with your findings. I accepted the KL120, and will accept any others. Fundamentally, these are tweaks to the docs that don't effect the actual lib, I just don't want to say I verified something works, when I haven't.
I'm going to close this for now, as there isn't really any "support" I need to add to the library, but feel free to submit updates to the README for the support matrix for KL50 and KL130, if you have tested them.
Hi,
Thanks for you fantastic work, but, are you planing to add support for these models ? If necessary i can do tcpdump for you with these models.
Thanks !