Skip to content

Plugin for Homebridge to connect any device that responds to http

License

Notifications You must be signed in to change notification settings

mattharris5/homebridge-readablehttp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

homebridge-readablehttp

Supports https devices on the HomeBridge Platform and provides a readable callback for getting the "On" characteristic to Homekit.

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-readablehttp
  3. Update your configuration file. See sample-config.json in this repository for a sample.

Configuration

The configuration for this plugin is the same as homebridge-http but includes an additional method to read the power state of the device. Specify the read_url in your config.js that returns the status of the device as an integer (0 = off, 1 = on).

Configuration sample:

"accessories": [
   {
   "accessory": "Http",
   "name": "Kitchen Lamp",
   "on_url": "https://192.168.1.22:3030/devices/23222/on",
   "on_body": "{\"state\":\"On\"}",
   "off_url": "https://192.168.1.22:3030/devices/23222/off",
   "off_body": "{\"state\":\"Off\"}",
   "read_url": "https://192.168.1.22:3030/devices/23222/status",
   "brightness_url": "https://192.168.1.22:3030/devices/23222/brightness/%b",
   "username": "",
   "password": "",
   "sendimmediately": "",
   "http_method": "POST",
   "http_brightness_method": "POST",       
   "service": "Switch",
   "brightnessHandling": "no"
   }
]

About

Plugin for Homebridge to connect any device that responds to http

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%