hhm

homebridge-http-multiswitch

Simple HTTP switches for Homebridge - stateful and radio-button/multi-switch (forked from homebridge-switcheroo)

Showing:

Popularity

Downloads/wk

3

GitHub Stars

11

Maintenance

Last Commit

2yrs ago

Contributors

2

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

homebridge-http-homebridge

Simple HTTP switches for Homebridge - stateful and radio-button/multi-switch switches

*Forked from homebridge-switcheroo


Creating and maintaining Homebridge plugins consume a lot of time and effort, if you would like to share your appreciation, feel free to "Star" or donate.

Click here to review more of my plugins.


Switch Services

Switch (standard on/off)

Meant to be used as a standard on/off switch. Light, projector, fan, etc.

{
        "accessory": "HttpMultiswitch",
        "switch_type": "Switch",
        "name": "My Projector",
        "http_method": "GET",
        "base_url": "http://192.168.0.XXX/command",
        "on_url": "/on",
        "off_url": "/off"
}

Multiswitch (radio buttons)

Meant to be used as a switcher, where only one input is ever on. Automaticaly turns off the other switches when turning on one ofe them.

Multiswitch appends the string, defined under 'multiurls' below, to complete the path of the Url (Must be use in the same order of the devices in "multiswitch". For example, when PC Mode is selected, the url generated will be http://192.168.0.XXX/command?id=42786sdf787.

{
    "accessory": "HttpMultiswitch",
    "switch_type": "Multiswitch",
    "name": "My Multiswitch",
    "http_method": "GET",
    "base_url": "http://192.168.0.XXX/command?id=",
    "multiswitch": [
                "Apple TV Mode",
                "PC Mode",
                "Android Mode",
                "The Music Mode"
            ],
    "multiurls": [
                "43",
                "42786sdf787",
                "l1479461871215",
                "44"
            ]
}

Configuration Params

ParameterDescriptionRequired
namename of the accessory
switch_typeSwitch or Multiswitch
base_urlurl endpoint for whatever is receiving these requests
http_methodGET (default), POST, PUT, DELETE
usernameusername for request
passwordpassword for request
send_immediatelyoption for request
refereroption for request
on_url (only Switch)endpoint for the on state
off_url (only Switch)endpoint for the off state
on_body (only Switch)body for on state request
off_body (only Switch)body for off state request
multiswitch (only Multiswitch)list of inputs for the Multiswitch - order is respected
multiurls (only Multiswitch)list of endpoint urls for multiswitch-order is respected

Help

  • Make sure specify a port in the if necessary. (i.e. "base_url" : "http://192.168.0.XXX:2000")
  • Verify the correct http_method is begin used. Switcheroo defaults to GET

Installation

Read about an example Raspberry Pi + Homebridge setup guide with this package here.

  1. Install homebridge using: npm install -g homebridge
  2. Install homebridge-http using: npm install -g homebridge-http-multiswitch
  3. Update your config file

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial