0.3.29 • Published 3 years ago

homebridge-relays-i2c v0.3.29

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Homebridge Relays

Controls 4 channel i2c relays with a Raspberry Pi using HomeKit.

Hardware

The hardware is quite simple to construct.

  1. Raspberry Pi 3 Model B
  2. 4-relay module pins are connected to 4 GPIO pins.

The raspberry pi can then control the state of the relays.

Installation

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

Sample Configuration

{
  "bridge": {
    "name": "RelayServer",
    "username": "CC:22:3D:E3:CE:FA",
    "port": 51826,
    "pin": "031-45-155"
  },
  "description": "4 Channel i2c Relay",
  "accessories": [
    {
      "accessory": "Relay",
      "name": "North",
      "i2cAddress": "0x10",
      "i2cRegister": "0x01",
      "invert": true,
      "intial_state": 0,
      "timeout_ms": 5000
    },
    {
      "accessory": "Relay",
      "name": "South",
      "address": "0x02",
      "invert": false,
      "initial_state": 0,
      "timeout_ms": -1
    },
    {
      "accessory": "Relay",
      "name": "Kitchen",
      "address": "0x03"
    },
    {
      "accessory": "Relay",
      "name": "Garage Door",
      "address": "0x024
    }
  ],
  "platforms": []
}

Accessory Configuration Options

NameOptionalDescription
accessoryNoAccessory type
nameNoDefault name of an accessory
addressNoi2c address
invertYesIf true, output on pin is LOW for ON, HIGH for OFF (default: false)
initial_stateYesInitial pin state. 1 for ON, 0 for OFF (default: 0)
timeout_msYesRelay will stay ON for a given period of time then OFF (default: 0)
0.3.29

3 years ago

0.3.28

3 years ago

0.3.27

3 years ago

0.3.26

3 years ago

0.3.25

3 years ago

0.3.24

3 years ago

0.3.23

3 years ago

0.3.22

3 years ago

0.3.21

3 years ago

0.3.20

3 years ago

0.3.19

3 years ago

0.3.18

3 years ago

0.3.17

3 years ago

0.3.16

3 years ago

0.3.15

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

3 years ago

0.3.11

3 years ago

0.3.10

3 years ago

0.3.9

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.2.39

3 years ago

0.2.38

3 years ago

0.2.37

3 years ago

0.2.36

3 years ago

0.2.35

3 years ago

0.2.34

3 years ago

0.2.33

3 years ago

0.2.32

3 years ago

0.2.31

3 years ago

0.2.30

3 years ago

0.2.29

3 years ago

0.2.28

3 years ago

0.2.27

3 years ago

0.2.26

3 years ago

0.2.25

3 years ago

0.2.24

3 years ago

0.2.23

3 years ago

0.2.22

3 years ago

0.2.21

3 years ago

0.2.20

3 years ago

0.2.19

3 years ago

0.2.18

3 years ago

0.2.17

3 years ago

0.2.16

3 years ago

0.2.15

3 years ago

0.2.14

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago