Giter Site home page Giter Site logo

micasahttpswitch's Introduction


This MiCasa plugin provides a switch, that can be toggled via HTTP.

Configuration

Tho configure the plugin, the following objkect has to be added to the plugins array:

{
    "plugin": "micasa-http-switch",
    "configuration": {
        "port": 18080,
        "switches": [
            {
                "id": "terrarium-light",
                "name": "Terrarium: Light",
                "serialNumber": "29084d67-e5f3-4b10-9db5-5d698fc1fb3f"
            }
        ]                
    }
}

Toplevel properties

Property Description
plugin Plugin name; must be 'micasa-http-switch'.
configuration Plugin configuration.
configuration.port Port on which the web server is listening.
configuration.switches Array with the switch configurations. Any number of switches can be configured.
configuration.switches.id Technical ID of the switch; must be unique.
configuration.switches.name Display name that is passed to HomeKit.
configuration.switches.serialNumber Serial number that is passed to HomeKit

REST endpoints

URI Description
/switches/off Turn all switches off.
/switches/on Turn all switches on.
/switches/status Get the status of all switches.
/switches/:id/off Turn the switch with :id off.
/switches/:id/on Turn the switch with :id on.
/switches/:id/status Get the status of the switch with :id.

micasahttpswitch's People

Contributors

thbonk avatar

Watchers

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