Comments (8)
Nice find -
The lazy fix: is it possible to just use the old version of that library - does everything work as expected?
pip3 install python-kasa==0.4.0
I have not updated to 0.4.1 of their library, so everything (of course) works fine for me... 🤦♂️
Otherwise, the first glance at your diff seems like a fine start, indeed!
from homebridge-kasa-lightstrip.
I suppose using 0.4.0 probably would work? But I'm not sure how you'd enforce that, unless package.json has some way of installing pip packages?
If you have thoughts on how I can clean up the async issue, let me know! Would hate to see this wither on the vine. I asked on the Homebridge Discord (#plugin-development), but there wasn't any response. Either way, the (unrelated) string parsing bugfixes dramatically cut down on the number of warning messages in my environment. The async thing is a shame; it works 95% of the time for me, but I don't want to open a PR for code that's not 100% - there must be a way to do it, no?
from homebridge-kasa-lightstrip.
Total js noob here too. But I would think your exec version parsing best belongs in the initial load of the plugin, line 10:17 area:
This way you’re only retrieving and parsing it once.
[maybe even add a fatal error or at least warning log message if the user HASNT installed the Kasa python package… enhancement]
Then, pass a new param (bool or something) that indicates which exec variant to use:
And
.
from homebridge-kasa-lightstrip.
I am having this same issue. when the argument is sent with --lightstrip instead of --type lightstrip, or even just leaving that argument out all together, it works. I can turn it on or off with simply "kasa --host 'ipaddress' on" or "kasa --host 'ipaddress' --type lightstrip on. Turning off works the same except, of course, substituting off for on in both cases issuing the command from CLI of my rpi. I did do the pip3 install python-kasa==0.4.0, which would allow the command to run as is from CLI, but not from the plugin, looks like it still tries to use the newer version of Kasa for some reason. Not sure how to uninstall so only 0.4.0 would be the only one there.
Is there any updates as to when this maybe corrected?? Thanks for all the hard work!!
from homebridge-kasa-lightstrip.
The newest versions of python-kasa prove to be quite unstable in my testing. VERY frequently getting timeout/connection errors in their protocol.py
file.
A known-good version (and the version this was developed against) is 0.4.0.dev3
I recommend everyone pins to that version, using:
sudo pip3 uninstall python-kasa
sudo pip3 install python-kasa==0.4.0.dev3
from homebridge-kasa-lightstrip.
from homebridge-kasa-lightstrip.
I do believe that did it for me. I'm not at home, but doing this by remote. I just did the basic config so on/off is all I can test at the moment. I verified that much by using the Kasa app to check to see if using the dashboard widget turned it on or off and it did so I couldn't think of a reason it wouldn't work in HK. When I get home, I will add the affects switches and then add it to homekit. I have no doubt it will work. Thanks for all you guys do!!
from homebridge-kasa-lightstrip.
Well I thought that would do it, but it only mostly did the trick. I got home, changed the config to include aurora, flicker and rainbow affects and saved it. Added it to Homekit and it won't turn the strip on. It acts like it does and shows it at 22 present brightness but doesn't actually turn the strip on. Funny thing is, any of the 3 affects will turn the light on and actually work for the affect that was chosen. The main tile to turn on/off the strip will actually turn the strip off. Just not on. Any ideas there?
I should note that when I try to turn the strip on with the Homekit tile, I can open the Kasa app and it does show that the strip should be on. Which confuses me even more.
EDIT:
Once the strip is on, I can control colors and brightness through Homekit as well, just won't turn it on for some reason, lol
from homebridge-kasa-lightstrip.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-kasa-lightstrip.