steveredden / homebridge-kasa-lightstrip Goto Github PK
View Code? Open in Web Editor NEWA homebridge plugin for controlling Kasa Light Strips :zap:
License: MIT License
A homebridge plugin for controlling Kasa Light Strips :zap:
License: MIT License
First off, thank you for the great plugin!
I'm having issues with some custom effects. Some work, some do not if you change any parameter (using only the brightness parameter in these examples). This varies between effects so I'm including two that I've tried setting up multiple ways with one (Ocean) that always works after any modification from within the Kasa app, and the other (Flicker) which doesn't work (lights just flash like crazy at 100% brightness) if anything is modified within the Kasa app.
Examples:
Ocean effect seems to work no matter what. Here is the custom effect JSON after setting Ocean to 15% brightness within the Kasa app (default brightness for Ocean effect is 30 which works as intended):
{'custom':0,'id':'oJjUMosgEMrdumfPANKbkFmBcAdEQsPy','brightness':15,'name':'Ocean','segments':[0],'expansion_strategy':1,'enable':1,'type':'sequence','duration':0,'transition':2000,'direction':3,'spread':16,'repeat_times':0,'sequence':[[198,84,30],[198,70,30],[198,10,30]]}
Flicker effect without any modification (works fine)
{'custom':0,'id':'bCTItKETDFfrKANolgldxfgOakaarARs','brightness':100,'name':'Flicker','segments':[1],'expansion_strategy':1,'enable':1,'type':'random','hue_range':[30,40],'saturation_range':[100,100],'brightness_range':[50,100],'duration':0,'transition':0,'transition_range':[375,500],'init_states':[[30,81,80]]}
Flicker effect after adjusting brightness to 20 (breaks the effect which results in the light strip flashing like crazy at 100% brightness. This is the same behavior for any effect which breaks).
{'custom':0,'id':'bCTItKETDFfrKANolgldxfgOakaarARs','brightness':20,'name':'Flicker','segments':[1],'expansion_strategy':1,'enable':1,'type':'random','hue_range':[30,40],'saturation_range':[100,100],'brightness_range':[50,100],'duration':0,'transition':0,'transition_range':[375,500],'init_states':[[30,81,80]]}
I am unable to get the app working successfully. Running homebridge on an M1 Mac Mini. I have gone into terminal and installed python-kasa library and confirmed that it is running in terminal, but I am still getting three errors for error getting characteristic 'xxx' where xxx is brightness, hue/saturation, and on.
Do I need to tell the homebrige ui to look for Python-kasa somehow? Appreciate any help
Only freshly created accessories are executing the necessary get/set commands.
Need to figure out how to get the
configureAccessory(accessory) {
this.accessories.push(accessory);
}
...block to also initiate the update function
Hi,
I wanted to report this for anyone Googling. In short, homebridge-kasa-lightstrip won't work properly if your version of python-kasa is too new (0.4.1). In summary: python-kasa now wants "--type lightstrip" instead of "--lightstrip". Using the older "--lightstrip" argument will cause the "kasa" binary to print a warning about deprecated arguments; in turn, homebridge-kasa-lightstrip will fail to parse this warning message, thinking it's an HSV string.
I've written to @steveredden because I've got a patch to fix this so close to working..
I started getting these every few minutes today. Everything seems functional but reporting it all the same. The errors still occurred at every stage of the following troubleshooting: Removed the accessory completely / made sure all cached devices were gone / reinstalled and ran without any custom effects / reinstalled the custom effects.
Here is the debug log info:
[10/30/2021, 3:29:51 PM] [homebridge-kasa-lightstrip] This plugin generated a warning from the characteristic 'Hue': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[10/30/2021, 3:29:51 PM] [homebridge-kasa-lightstrip] Error:
at Hue.Characteristic.characteristicWarning (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2074:105)
at Hue.Characteristic.validateUserInput (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1967:16)
at Hue. (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1492:24)
at step (/usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
at Object.next (/usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
at fulfilled (/usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:114:62)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[10/30/2021, 3:29:51 PM] [homebridge-kasa-lightstrip] This plugin generated a warning from the characteristic 'Saturation': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[10/30/2021, 3:29:51 PM] [homebridge-kasa-lightstrip] Error:
at Saturation.Characteristic.characteristicWarning (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2074:105)
at Saturation.Characteristic.validateUserInput (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1967:16)
at Saturation. (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1492:24)
at step (/usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
at Object.next (/usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
at fulfilled (/usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:114:62)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[10/30/2021, 3:29:51 PM] [LifxLan] LIFX 41c043 - Get power: 0
Could not get this to work with hoobs and Apple HomeKit. Works in the hoobs UI but not on Apple home kit.
This new model light strip couldn't be controlled via HomeKit unless the "pre-requisites" of python-kasa is followed. Works great, thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.