1.0.8 • Published 2 years ago

homebridge-web-window-covering v1.0.8

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

homebridge-web-window-covering

npm npm

Description

This homebridge plugin exposes a web-based valve to Apple's HomeKit. Using simple HTTP requests, the plugin allows you to open and close the window covering.

Installation

  1. Install homebridge
  2. Install this plugin: npm install -g homebridge-web-window-covering
  3. Update your config.json file

Configuration

"accessories": [
     {
       "accessory": "WebWindowCovering",
       "name": "Window Covering",
       "apiroute": "http://myurl.com"
     }
]

Core

KeyDescriptionDefault
accessoryMust be WebWindowCoveringN/A
nameName to appear in the Home appN/A
apirouteRoot URL of your deviceN/A

Optional fields

KeyDescriptionDefault
horizontalTiltWhether to expose horizontal tilt as a characteristicfalse
verticalTiltWhether to expose vertical tilt as a characteristicfalse
autoResetWhether obstruction detection should automatically change the state back to 0 after being triggeredfalse
autoResetDelayTime (in seconds) until the obstruction detection will automatically reset (if enabled)5

Additional options

KeyDescriptionDefault
pollIntervalTime (in seconds) between device polls300
timeoutTime (in milliseconds) until the accessory will be marked as Not Responding if it is unreachable3000
portPort for your HTTP listener (only one listener per port)2000
http_methodHTTP method used to communicate with the deviceGET
usernameUsername if HTTP authentication is enabledN/A
passwordPassword if HTTP authentication is enabledN/A
modelAppears under the Model field for the accessoryplugin
serialAppears under the Serial field for the accessoryapiroute
manufacturerAppears under the Manufacturer field for the accessoryauthor
firmwareAppears under the Firmware field for the accessoryversion

API Interfacing

Your API should be able to:

  1. Return JSON information when it receives /status:
{
    "positionState": INT_VALUE,
    "currentPosition": INT_VALUE,
    "targetPosition": INT_VALUE
}
  1. Open/close the garage when it receives:
/targetPosition?value=INT_VALUE_0_TO_100
  1. Update currentPosition as it opens/closes by messaging the listen server:
/currentPosition?value=INT_VALUE_0_TO_100
  1. Update positionState as it opens/closes by messaging the listen server:
/positionState?value=INT_VALUE_0_TO_2
  1. Update targetPosition following a manual override by messaging the listen server:
/targetPosition?value=INT_VALUE_0_TO_100
  1. Update obstructionDetected when an obstruction is detected by messaging the listen server (should notify 0 after obstruction moves unless autoReset is enabled):
/obstructionDetected?value=INT_VALUE_0_TO_1

Optional

  1. If horizontalTilt is enabled, update currentHorizontalTiltAngle as the angle changes:
/currentHorizontalTiltAngle?value=INT_VALUE_-90_TO_90
  1. If horizontalTilt is enabled, update targetHorizontalTiltAngle following a manual override by messaging the listen server:
/targetHorizontalTiltAngle?value=INT_VALUE_-90_TO_90
  1. If verticalTilt is enabled, update currentVerticalTiltAngle as the angle changes:
/currentVerticalTiltAngle?value=INT_VALUE_-90_TO_90
  1. If verticalTilt is enabled, update targetVerticalTiltAngle following a manual override by messaging the listen server:
/targetVerticalTiltAngle?value=INT_VALUE_-90_TO_90

PositionState Key

NumberName
0Opening
1Closing
2Stationary
1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago