homebridge-raspi-bft-gate

0.0.1 • Public • Published

homebridge-raspi-bft-gate

Raspberry Pi GPIO BFT Gate plugin for HomeBridge

Circuit

This plugin assumes that you are using a Raspberry Pi to directly control your BFT gates.

Depending on the BFT gates controller model, you might need different circuits and configuration.

Example for ZARA BTL2 controller:

* Raspberry Pi Zero Wireless + ModMyPi PiOT Relay Board + 24v relay
* Open/Close command - relay COM pin to controller pin 60, relay NO pin to controller pin 61
* Gates status - connect 24v relay com port to raspi 3v, connect 24 relay NO port to raspi GPIO pin, 24v relay coil contacts to controller pins 20 and 21
* Setup a motor closing delay on the controller, so that we can distinguish between opening and closing of the gates, this is needed because the board does not have a pin that outputs current gates status (open/closed)

Installation

  1. Choose the GPIO pins that you are going to use
  2. Export the GPIO pins to be used and set their direction after reboot
  3. Install homebridge using: npm install -g homebridge
  4. Install this plugin using: npm install -g homebridge-raspi-bft-gate
  5. Update your configuration file

Sample configuration

Configuration sample:

   "accessories": [
       {
           "accessory": "RaspPiGPIOGarageDoor",
           "name": "Garage Door",
           "doorSwitchPin": 23,
           "doorSwitchPressTimeInMs": 1000,
           "doorSwitchValue": 1,
           "closedDoorSensorPin": 24,
           "closedDoorSensorValue": 1,
           "openDoorSensorPin": 25,
           "openDoorSensorValue": 1,
           "doorPollInMs": 4000,
           "doorOpensInSeconds": 14
       }
   ],

Fields:

  • name - Can be anything (required)
  • switchPin - The physical GPIO pin number that controls the relay to trigger the garage door
  • switchValue - 1 = ACTIVE_HIGH, 0 = ACTIVE_LOW, defaults to 1 if not specified. Set to 0 if you have a relay that requires the signal to be 0v to trigger.
  • switchPressTimeInMs - number of milliseconds to trigger the garage door button. defaults to 1000 millseconds (1 second) if not specified
  • statusPin - The physical GPIO pin that senses if the door is closed, do not specify if no sensor present
  • statusValue - 1 = ACTIVE_HIGH, 0 = ACTIVE_LOW, defaults to 1 if not specified
  • statusPollInMs - Number of milliseconds to wait before polling the doorSensorPin to report if the door is open or closed
  • closingDelayInSeconds - Delay in seconds before second motors start closing after the first, this is used to distinguish between opening and closing the gates when initial gate status is unknown

NB! Note on pin selection in case you are not using a ModMyPi PiOT Relay Board

When the Raspberry Pi reboots GPIO pins are reset to their default state. This can cause your garage door to open without you issuing a command. Please make sure you pick the correct pins so that you don't accidentally have your garage door opening after a power loss.

The following pins are pulled HIGH (they output a 3.3 volt signal) on reboot:

  • GPIO0/2
  • GPIO1/3
  • GPIO4
  • GPIO7
  • GPIO8

GPIO14 is configured as a Serial Transmit line, so avoid choosing that pin.

(information comes from raspberrypi forums)

Package Sidebar

Install

npm i homebridge-raspi-bft-gate

Weekly Downloads

5

Version

0.0.1

License

ISC

Last publish

Collaborators

  • stanislavprokopov