# homebridge-teleruptor

> Raspberry Pi plugin for homebridge to enable teleruptor

Latest version **0.0.12** (published 2019-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install homebridge-teleruptor
pnpm add homebridge-teleruptor
yarn add homebridge-teleruptor
bun add homebridge-teleruptor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.12 |
| Published | 2019-05-08 |
| First published | 2019-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.12.0 |
| Dependencies | 2 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Frank Croket |
| Maintainers | fcvuilbak |
| Keywords | homebridge-plugin |

## Links

- npm: https://www.npmjs.com/package/homebridge-teleruptor
- Repository: https://github.com/fcvuilbak/homebridge-teleruptor
- Homepage: https://github.com/fcvuilbak/homebridge-teleruptor#readme
- Issues: https://github.com/fcvuilbak/homebridge-teleruptor/issues
- npm.io page: https://npm.io/package/homebridge-teleruptor

## Dependencies (2)

- [rpio](https://npm.io/package/rpio.md) ^0.9.12
- [request](https://npm.io/package/request.md) ^2.65.0

## Recent versions

- 0.0.12 (latest) — 2019-05-08
- 0.0.11 — 2019-05-07

## README

# Homebridge Teleruptor

Controls channel relays with a Raspberry Pi using HomeKit and creates behaviour of a push button to control lights.

# Hardware

The hardware used.

1. Raspberry Pi 3 Model B+
2. Multi channel relay board connected to GPIO pins
3. opto-couplers used to detect on/off state of lights

The raspberry pi can then control the state of the lights. Normal push buttons
are still usable. 

# Installation

1. Install homebridge using: `sudo npm install --unsafe-perm -g homebridge`
2. Install this plugin using: `sudo npm install -g --unsafe-perm homebridge-teleruptot`
3. Update your configuration file. See `config-sample.json` in this repository for a sample.

# Sample Configuration
{
  "bridge": {
    "name": "TeleruptorServer",
    "username": "CC:22:3D:E3:CE:FD",
    "port": 51826,
    "pin": "031-45-158"
  },

  "description": "Teleruptor",

  "accessories": [
    {
      "accessory": "Teleruptor",
      "name": "Teleruptor-1",
      "pin": 7,
      "inputpin": 12,
      "invert": false,
      "default_state": false,
      "duration_ms": 100
    },
    {
      "accessory": "Teleruptor",
      "name": "Teleruptor-2",
      "pin": 11,
      "inputpin": 14,
      "invert": false,
      "default_state": false,
      "duration_ms": 100
    } ],

  "platforms": []
}

# Accessory Configuration Options

Name             | Meaning
---------------- | ------------------------------------------------
`accessory`      | Accessory type. `Teleruptor` (REQUIRED)
`name`           | Default name for the accessory. (REQUIRED)
`pin`            | Which pin number to use for this accessory. (REQUIRED)
`inputpin`       | Which pin number to use for reading status of the light. (REQUIRED)
`invert`         | If true, output on pin is `LOW` for `ON`, and `HIGH` for `OFF`. (Default: false)
`default_state`  | State to set on start of homebridge.  `true` for `ON`, `false` for `OFF`. (Default: `false`/`OFF`)
`duration_ms`    | Length of the Pulse that is given in milliseconds (Default: 20)

---
_Source: https://npm.io/package/homebridge-teleruptor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
