Giter Site home page Giter Site logo

grassmunk / tplink-hs100 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arhea/tplink-hs100

0.0 1.0 0.0 782 KB

๐Ÿ”Œ A home hub for the TPLink HS 100 Smart Plugs. Discovers plugs on the same network as the hub and allows them to be turned on and off.

Shell 4.01% JavaScript 42.44% Groovy 48.95% Dockerfile 4.59%

tplink-hs100's Introduction

TPLink HS100 Home Hub (Unofficial)

This NodeJS server is a simple REST API to discover and interact with TPLink HS100 Smart Plugs that runs on a Raspberry Pi on your home network. This hub interacts over REST API and also comes with a Samsung SmartThings Integration.

Getting Started

To get started, plugin your Raspberry Pi to the network that your plugs are connected to. Setup your Switches using the TPLink Kasa app. Next, install Docker on the Raspberry Pi.

apt-get update -y && apt-get upgrade -y && apt-get install wget -y
wget -qO- https://get.docker.com/ | sh
sudo usermod pi -aG docker

Once Docker is installed, it is time to run the hub. The following Docker commands are all you need to get started.

docker pull arhea/tplink-hs100-hub:armhf

docker run -d --name tplink-hs100-hub \
  -p 3000:3000 \
  --restart always \
  --network host \
  arhea/tplink-hs100-hub:armhf

Now, visit the http://<ip address of pi>:3000/plugs and you should see all of your plugs listed. New plugs will automatically be discovered once they are configured using the Kasa app.

Samsung SmartThings Integration

  1. Login to the SmartThings IDE
  2. Go to the "My SmartApps" page and click "Settings"
  3. Add this repository to the list of repositories.
  4. Select the TPLink Home Hub and add the script.
  5. Go to the "My Device Handler" page and click "Updaet from Repo" and select the device type. Check the box that says publish.

REST API

The following REST API is exposed by the service.

  • GET - /plugs - List all the plugs on the network.
  • GET - /plugs/:deviceId - Get information about a specific plug on the network.
  • GET - /plugs/:deviceId/on - Turn the plug on.
  • GET - /plugs/:deviceId/off - Turn the plug off.

Thanks

Thanks to hs100-api that serves as the underpinning of this service.

tplink-hs100's People

Contributors

arhea avatar

Watchers

 avatar

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.