Git Product home page Git Product logo

hs-100's Introduction

hs-100

Simple Java API for TP-Link HS100 Plugs. Although it should work for all HS plugs, hs-100 is the only type it is verified and confirmed to work with.

Status

As of April.9.2018 Changes and Updates are being worked on. These may include refactoring of the entire class, addition of utilities such as network scanners, plug name identifiers, and other miscellaneous changes. I am currently recoding my application that uses this API and will be making changes to the API that I feel are warranted for regular ease of use and implementation.

ETA: May 1 2018

Getting Started

There is one class central to the HS-100 API. This is the HS100.java class. It represents a physical plug.

Creating a Plug Object

You can create a HS100 Plug with just the IP, and you can additionally specify the Port.

By default, the port for TP-Link

HS100 plug = new HS100(String IP);

// Default local port is almost always 9999!
HS100 plug = new HS100(String IP, int PORT);

Turning the Plug On and Off

// On
plug.switchOn();

// Off
plug.switchOff();

Getting Information

// Checks if the IP has a device behind it
plug.isPresent();

// Checks if the plug is on
plug.isOn();

// Checks if the plug is off
plug.isOff();

// USER SET INFO //

// Ip you created the plug with
plug.getIp();

// Port assigned to a plug
plug.getPort();

Setting Information

// Set the IP
plug.setIp(String IP);

// Set the Port
plug.setPort(Integer PORT);

hs-100's People

Contributors

calicocatalyst avatar mtlevine0 avatar

Watchers

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