homebridge-http-is-it-down

1.0.0 • Public • Published

homebridge-http-is-it-down

NPM

npm npm

Homebridge Plugin to check whether the endpoint is active/inactive. Occupancy Sensor will be set to Occupancy Detected whenever the host is down/up.

Description :

This plugin makes GET request to the endpoint and validates its expected HTTP Status Code. Works like UpTime Robot. The Occupancy sensor will be activated whenever the validation fails. You can use this helpful plugin to trigger automations whenever your target host/website/server/ip-camera etc. gets down or up.

Installation :

    $ npm install -g homebridge-http-is-it-down

Sample Config :

{
    "accessories": [
        {
            "accessory": "IsItDown",
            "name": "Camera Status",
            "url": "https://192.168.0.186", // Target URL
            "auth": {
                "user": "root",
                "pass": "ismart12"
            },
            "maxTryOuts": 3,
            "interval": 300000, // in ms
            "expectedStatusCode": 200, // Expected HTTP Status Code
            "debug": true
        },
        {
            "accessory": "IsItDown",
            "name": "MyWebsiteIsItDown",
            "url": "http://sahilchaddha.com",
            "maxTryOuts": 3,
            "interval": 1000,
            "expectedStatusCode": 200
        },
                {
            "accessory": "IsItDown",
            "name": "MyWebsiteIsItUP",
            "url": "http://sahilchaddha.com/pingu",
            "maxTryOuts": 3,
            "interval": 1000,
            "expectedStatusCode": 404
        }
    ]
}

/homebridge-http-is-it-down/

    Package Sidebar

    Install

    npm i homebridge-http-is-it-down

    Weekly Downloads

    5

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    9.73 kB

    Total Files

    7

    Last publish

    Collaborators

    • sahilchaddha