{"_id":"@bydga/homebridge-garage-door-shelly1","_rev":"2-95d50d2dfa593944a8ba735cd0c1de7a","name":"@bydga/homebridge-garage-door-shelly1","dist-tags":{"latest":"1.1.5"},"versions":{"1.1.5":{"name":"@bydga/homebridge-garage-door-shelly1","version":"1.1.5","description":"Homebridge plugin for a simple garage door opener using Shelly 1 relay","main":"index.js","engines":{"homebridge":">=0.4.50","node":">=12.13.0"},"scripts":{"test":"exit 0"},"repository":{"type":"git","url":"git+https://github.com/bydga/homebridge-garage-door-shelly1.git"},"dependencies":{"jsonpath":"^1.0.2","request":"^2.88.2"},"keywords":["homebridge-plugin","homebridge","garage","garagedoor","home","remote","shelly","shelly1"],"author":{"name":"Martin Bydzovsky"},"license":"MIT","bugs":{"url":"https://github.com/bydga/homebridge-garage-door-shelly1/issues"},"homepage":"https://github.com/bydga/homebridge-garage-door-shelly1#readme","gitHead":"b8fbfbfb645bb7184b1141d8bfe75dbaab44b333","_id":"@bydga/homebridge-garage-door-shelly1@1.1.5","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-9nnK3sBrbQ5B8l+RUQnKOVQJy6FqNR9pUOq4+iodw3D9LdLq4YUEwjn6JPp1NsJhW9edcif5DTdAEWsnd7Oh4g==","shasum":"df5bc251aa468c517bb24de79e1ecd7543bab901","tarball":"https://registry.npmjs.org/@bydga/homebridge-garage-door-shelly1/-/homebridge-garage-door-shelly1-1.1.5.tgz","fileCount":6,"unpackedSize":27339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2CAUCRA9TVsSAnZWagAAokIP/R+dyyr4SLKHUjC3Ilw9\nUK8EaYdc9mlJAoONdvgQA7w5p9DA0i0wxETIT95XDM+bl99gaPy8EE5clbdy\nhv7Phi50IVzokJBnfI55GzwESZtFl+a3gE3jHqBo9EYzu/cVUGiNn0IopGSF\nmMxIRhmkoGWlnkz8py33IORoOv2BWvTLb88zS7ccCAL/+77NBp5FjuWiP1Sr\nCo8j3H+2jjxGSYUbsSnVdrZ6wQef9shVsjOkfACEEhUdYvo5rLQYgujY+NnN\nQ2ukmM1l/ZA5l7T7XpjskQ65Ll1YiQza7Dl5K4Vm1N5+iZZa6X6fR8eTEI15\nq8NS13Wsh9+QOSEUr0ul5nZq9AuWGA7XoUpfwIScgq+7RUaX+6C2IUsHm7Lv\nknkWOlby4saJUJoHiznN5G4fVFYQVPWkOfYaayNLNpwIECga/DznKyY4uEdD\ncO0Od4g/6y09mqdvDsmpTMqAJra3FOhiL1cfStq+AA72wU79IypdBUwLx8nS\nNNsdQyMsIppBOWalxSPgRgY6gGe0/IcHQV46GHXtt+XPCahO54QeLnX41GAv\n4oc7Q+3ImO04MFQdqd8T78wbtzrr76FfK8r4MgxJx9ZlrGdlePFxC5JOdYg4\nnUJawY44QqjK7P34nPc8tVCVNx5qSb6dKNomd5N6HelB6rKttUCKX7+hBpWK\n4Wg1\r\n=600B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC04/ATWRnMEZyq21Ojuv9t0GFyY/BMqJ4VoQMmGsduoQIgSqTrFgxxkqt+Icn7mbecWN1Upx9a14rzhDyFcOv0kqY="}]},"_npmUser":{"name":"bydga","email":"bydgam@gmail.com"},"directories":{},"maintainers":[{"name":"bydga","email":"bydgam@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/homebridge-garage-door-shelly1_1.1.5_1634821457089_0.6063227227032537"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-21T13:04:17.037Z","1.1.5":"2021-10-21T13:04:17.276Z","modified":"2022-04-04T21:18:26.639Z"},"maintainers":[{"name":"bydga","email":"bydgam@gmail.com"}],"description":"Homebridge plugin for a simple garage door opener using Shelly 1 relay","homepage":"https://github.com/bydga/homebridge-garage-door-shelly1#readme","keywords":["homebridge-plugin","homebridge","garage","garagedoor","home","remote","shelly","shelly1"],"repository":{"type":"git","url":"git+https://github.com/bydga/homebridge-garage-door-shelly1.git"},"author":{"name":"Martin Bydzovsky"},"bugs":{"url":"https://github.com/bydga/homebridge-garage-door-shelly1/issues"},"license":"MIT","readme":"<p align=\"center\">\n  <a href=\"https://github.com/homebridge/homebridge\"><img src=\"https://raw.githubusercontent.com/homebridge/branding/master/logos/homebridge-color-round-stylized.png\" height=\"140\"></a>\n</p>\n\n# homebridge-garage-door-shelly1\n\n[![npm](https://img.shields.io/npm/v/homebridge-garage-door-shelly1.svg)](https://www.npmjs.com/package/homebridge-garage-door-shelly1) [![npm](https://img.shields.io/npm/dt/homebridge-garage-door-shelly1.svg)](https://www.npmjs.com/package/homebridge-garage-door-shelly1)\n\nThis work is forked from https://github.com/jmaferreira/homebridge-garage-remote-http.\n\nFixed a bug, where calling \"close the garagedoor\" on already closed door actually opens them. - by Bydga\n\n## Description\n\nThis [homebridge](https://github.com/nfarina/homebridge) plugin exposes a web-based garage opener to Apple's [HomeKit](http://www.apple.com/ios/home/). Using simple HTTP requests, the plugin allows you to open/close the garage. It works as a general purpose HTTP client for any relay, but it works particularly well with a Shelly 1 relay.\n\n## Installation\n\n1. Install [Homebridge](https://github.com/homebridge/homebridge).\n2. Install the plugin by running `npm install -g homebridge-garage-door-shelly1` or by searching for `homebridge-garage-door-shelly1` on the [plugins tab](https://github.com/homebridge/homebridge#installing-plugins) if you are using [Homebridge UI](https://www.npmjs.com/package/homebridge-config-ui-x) or [Hoobs](https://hoobs.org/).\n3. Update your Homebridge `config.json` accordingly.\n\n## Configuration\n\nNOTE: Don't forget to update `shelly_ip` to the IP address of your Shelly relay.\n\n```json\n\"accessories\": [\n     {\n        \"accessory\": \"GarageDoorOpener\",\n        \"name\": \"Back door\",\n        \"http_method\": \"GET\",\n        \"openURL\": \"http://shelly_ip/relay/0?turn=on\",\n        \"closeURL\": \"http://shelly_ip/relay/0?turn=on\",\n        \"autoLock\": false,\n        \"autoLockDelay\": 60,\n        \"openTime\": 21,\n        \"closeTime\": 17,\n        \"polling\": true,\n        \"pollInterval\": 60,\n        \"username\": \"garage\",\n        \"password\": \"Mh4hc7EDJF8mMkzv\",\n        \"manufacturer\": \"BFT\",\n        \"model\": \"SCE-MA (Board)\",\n        \"statusURL\": \"http://shelly_ip/status\",\n        \"statusKey\": \"$.inputs[0].input\",\n        \"statusValueOpen\": \"0\",\n        \"statusValueClosed\": \"1\",\n        \"debug\": \"false\"\n    }\n]\n```\n\n## Options\n\n### Core\n\n| Key         | Description                               | Default |\n| ----------- | ----------------------------------------- | ------- |\n| `accessory` | Must be `GarageDoorOpener`                | N/A     |\n| `name`      | Name to appear in the Home app            | N/A     |\n| `openURL`   | URL to trigger the opening of your garage | N/A     |\n| `closeURL`  | URL to trigger the closing of your garage | N/A     |\n\n### Optional fields\n\n| Key                  | Description                                                                                                                                                                 | Default             |\n| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |\n| `openTime`           | Time (in seconds) to simulate your garage opening                                                                                                                           | `10`                |\n| `closeTime`          | Time (in seconds) to simulate your garage closing                                                                                                                           | `10`                |\n| `autoLock`           | Whether your garage should auto-close after being opened                                                                                                                    | `false`             |\n| `autoLockDelay`      | Time (in seconds) until your garage will automatically close (if enabled)                                                                                                   | `20`                |\n| `switchOff`          | Closes the garage immediately without animation. For IR remote control use.                                                                                                 | `false`             |\n| `switchOffDelay`     | Time (in seconds) until your garage will automatically close without animation (if enabled)                                                                                 | `2`                 |\n| `polling`            | Whether the state should be polled at intervals                                                                                                                             | `false`             |\n| `pollInterval`       | Time (in seconds) between device polls (if `polling` is enabled)                                                                                                            | `120`               |\n| `statusURL`          | URL to retrieve state on poll (if `statusField*` options are not set, expects HTTP response body to be `0` or `1`)                                                          | N/A                 |\n| `statusKey`          | [JSONPath](https://www.npmjs.com/package/jsonpath) that identifies the property that contains the status of the door (e.g. `$.inputs[0].input` is the default for Shelly 1) | `$.inputs[0].input` |\n| `statusValueOpen`    | Regex that will match the `open` state of the relay status (e.g. `open`)                                                                                                    | `0`                 |\n| `statusValueClosed`  | Regex that will match the `closed` state of the relay status (e.g. `closed`)                                                                                                | `1`                 |\n| `statusValueOpening` | Regex that will match the `opening` state of the relay status (e.g. `opening`)                                                                                              | `2`                 |\n| `statusValueClosing` | Regex that will match the `closing` state of the relay status (e.g. `closing`)                                                                                              | `3`                 |\n\n### Additional options\n\n| Key            | Description                                                                                        | Default |\n| -------------- | -------------------------------------------------------------------------------------------------- | ------- |\n| `timeout`      | Time (in milliseconds) until the accessory will be marked as _Not Responding_ if it is unreachable | `3000`  |\n| `http_method`  | HTTP method used to communicate with the device                                                    | `GET`   |\n| `username`     | Username if HTTP authentication is enabled                                                         | N/A     |\n| `password`     | Password if HTTP authentication is enabled                                                         | N/A     |\n| `model`        | Appears under the _Model_ field for the accessory                                                  | plugin  |\n| `serial`       | Appears under the _Serial_ field for the accessory                                                 | version |\n| `manufacturer` | Appears under the _Manufacturer_ field for the accessory                                           | author  |\n| `firmware`     | Appears under the _Firmware_ field for the accessory                                               | version |\n| `debug`        | Display debug messages on Homebridge log                                                           | false   |\n\n### State key\n\n| State | Description |\n| ----- | ----------- |\n| `0`   | Open        |\n| `1`   | Closed      |\n| `2`   | Opening     |\n| `3`   | Closing     |\n\n## Wiring\n\n![Shelly 1 wiring](https://savjee.be/uploads/2020-06-smart-garage-door-shelly-home-assistant/shelly-schematic-dc.png)\n\nMore information at https://savjee.be/2020/06/make-garage-door-opener-smart-shelly-esphome-home-assistant/\n\n### Videos on wiring\n\n- [Shelly1 Garage Door Control](https://www.youtube.com/watch?v=aV7gOWjia5w)\n- [Automate your Garage Door! The PERFECT First DIY Smart Home Project](https://www.youtube.com/watch?v=WEZUxXNiERQ)\n\n## Door open/closed sensor\n\nIn order to know for sure if your gate is open or closed you need to install a Reed Switch sensor connected between `L` and `SW` (order is irrelevant). These cost between €2 and €5.\n\n![Reed Switch](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQlGm8m0RQnE2NE15JjLc4KEOUdR0QghniwDQkSQjto3mPq9qPUVGmlrB5vBVWsL1sJlLU9sWAOs4Y&usqp=CAc)\n\nFor Shelly 1 and a normally open reed switch (NO) the following options need to be set:\n\n```json\n\"accessories\": [\n     {\n       ...\n\t\t \"statusKey\": \"$.inputs[0].input\",\n\t\t \"statusValueOpen\": \"0\",\n\t\t \"statusValueClosed\": \"1\"\n\t\t ...\n\t  }\n\t]\n```\n\nFor a normally closed switch (NC), use:\n\n```json\n\"accessories\": [\n     {\n       ...\n\t\t \"statusKey\": \"$.inputs[0].input\",\n\t\t \"statusValueOpen\": \"1\",\n\t\t \"statusValueClosed\": \"0\"\n\t\t ...\n\t  }\n\t]\n```\n","readmeFilename":"README.md"}