0.1.0 • Published 7 years ago

homebridge-http-regex v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

homebridge-http-regex

GitHub issues license npm

HTTP RegEx plugin for HomeBridge

Plugin for Homebridge which checks a HTTP response against a RegEx pattern. It creates a contact sensor which opens when RegEx pattern is matched against the HTTP response.

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-http-regex
  3. Update your configuration file. See snippet below.

Configuration

You'll need to add a Regex accessory to your homebridge config.json. This example below would check the apple store page every 5 minutes and opens the contact sensor if it's closed.

{
  "accessories": [
    {
      "accessory": "Regex",
      "name": "Apple Store",
      "endpoint": "https://store.apple.com",
      "pattern": "(We'll be back.)",
      "interval": 300000
    }
  ]
}

Value summary

accessory: The name of the accessory, this must be Regex.
name: The name of the contact sensor in HomeKit.
endpoint: The address for the HTTP Get request.
Pattern: The RegEx pattern which needs te be checked against.
interval: The interval between checks in milliseconds. The default is set to 10 seconds if you don't specify an interval.

Note: You'll need to obmit the opening and closing slash from the pattern. Backslashes within the pattern need to be escaped with another backslash, because of how JSON is parsed.

0.1.0

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago