npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-hs-plug

v1.0.0

Published

HomeBridge module to control HS100 and HS110 switches, supports KLAP & FW:4.1 SW:1.1.0

Downloads

13

Readme

Homebridge HS Plug Platform Plugin

This is a module to provide HomeBridge compatibility with TP-Link HS100 / HS110 plugs. This was specifically built to address the breaking of functionality due to firmware version 1.1.0 on hardware version 4.1 plugs. These plugs appear to be only found with the UK and associated territories, so this module may not have a wide scope.

Tested with:

  • HS100 (UK)
  • HS110 (UK)

I welcome any changes and I freely admit this is a very hacky implementation and I cannot offer any guaranties for both suitability or capability and this is used at your own risk.

Requirements & Notes

This plugin required a custom fork of python-kasa, if you install the version currently found in the repository IT WILL NOT WORK.

You first have to install my fork of python-kasa, which is located here. I must offer a great debt of gratitude to Simon Wilkinson , without his work on the python-kasa library none of this would be possible. In fact, my fork of python-kasa simply includes further changes by Simon that has not been submitted to his own fork yet.

With this setup I am going to assume you are on Linux or similar, if you are running on a different os you will have to adapt this.

Installation

  1. Install HomeBridge.
  2. Download my fork of python-kasa.
  3. Become root (actual root do not run the following command with sudo, so run sudo su or similar or log in as root).
  4. Run the following command, make sure you keep the trailing slash on the path to the directory you cloned into as it makes sure pip3 uses that folder not a similarly named package from the repository.
    pip3 install python-kasa/ --system
  1. Once this is installed switch back to a normal user and check you can run the command ‘kasa’
  2. It is now best to test that you can run a discovery, there are a few parameters that maybe needed, it will depend on how your plugs are configured. If you have 4.1 plugs that are configured on the TP-Link app and you have a username and password setup you will need to use the flags --user and –password. If you do not have a username and password configured (i.e the plugs have stopped working and you have not reset them) you can omit these.
  3. Run the following command to test discovery.
    kasa --klap --user ‘myusername’ --password ‘mypassword’
  1. You should get a discovery result that shows all your plugs including any that are hardware 4.1 with firmware 1.1.0.
  2. Install this plugin using: npm install -g homebridge-hs-plug or through Homebridge UI.
  3. Update your Homebridge configuration file (config.json).

Configuration

Avaliable platform configuration options are as follows:

  • platform [required] this is always "HSPlug"
  • name [optional] this is the username of your kasa app login
  • password [optional] this is the password of your kasa app login
  • klaponly [optional] this is a boolean to indicate you only was to use this plugin for the new 4.1 hardware. This allows you to keep on using your exisitng plugin setup for unaffected hardware.

Thanks / Credits

A big thanks to @simonwilkinson for his changes to the python-kasa library and his help via email.