GithubHelp home page GithubHelp logo

steveredden / homebridge-kasa-lightstrip Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 682 KB

A homebridge plugin for controlling Kasa Light Strips :zap:

License: MIT License

JavaScript 100.00%
homeautomation homebridge homebridge-plugin homekit kasa kl4005l kl430 python-kasa smarthome tp-link tp-link-kasa tplink tplink-kasa

homebridge-kasa-lightstrip's People

Contributors

steveredden avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

justinmm2

homebridge-kasa-lightstrip's Issues

Issues with Custom Effects

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]]}

Error - Unable to get Characteristic in Mac OS environment

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

python-kasa 0.4.1 output breaks homebridge-kasa-lightrstrip parsing

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..

Characteristic Warnings

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

KL430

This new model light strip couldn't be controlled via HomeKit unless the "pre-requisites" of python-kasa is followed. Works great, thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.