INTEGRATING ELAN GATE CONTROL WITH APPLE HOME (SIRI VOICE CONTROL)

INTEGRATING ELAN GATE CONTROL WITH APPLE HOME (SIRI VOICE CONTROL)


OVERVIEW

This guide explains how to control a gate connected to an ELAN controller using Siri via Apple Home.

The solution uses:

- ELAN String-to-Event driver
- Homebridge running on Raspberry Pi
- homebridge-garagedoor-command plugin
- TCP string commands via netcat

Result:

- “Hey Siri, open the Drive Gate”
- Gate opens
- Home app shows Open for 60 seconds
- Automatically returns to Closed

This solution does not require a physical gate sensor.


SYSTEM REQUIREMENTS

- ELAN controller (any model supporting the String-to-Event driver)
- Intrinsic Dev String-to-Event driver installed
- Raspberry Pi running Homebridge
- Apple Home (iPhone)
- Home Hub (Apple TV or HomePod) for remote access


STEP 1 – CONFIGURE ELAN

1. Install the Intrinsic Dev String-to-Event driver.

2. Confirm:
   - Socket Status shows “Ready”
   - Listen Port is 10001 (unless changed)

3. Add the following strings:
   Open Drive Gate
   Open Pedestrian Gate

4. In Event Mapper:

   Trigger:
   - String 1 Received → Pulse Drive Gate relay
   - String 2 Received → Pulse Pedestrian Gate relay

5. Send configuration to the controller.

6. Test from a Mac:

   printf '%s' "Open Drive Gate" | nc 192.168.8.220 10001

   (Replace with your ELAN controller IP.)

   The gate must open before proceeding.


STEP 2 – INSTALL HOMEBRIDGE PLUGIN

In Homebridge UI:

Plugins → Install:
homebridge-garagedoor-command

Restart Homebridge.


STEP 3 – CREATE SCRIPT DIRECTORY

In Homebridge Terminal:

mkdir -p /home/homebridge/gate-scripts


STEP 4 – CREATE GATE SCRIPTS

DRIVE GATE OPEN SCRIPT

tee /home/homebridge/gate-scripts/drive_gate_open.sh > /dev/null <<'EOF'
#!/bin/bash
TS_FILE="/home/homebridge/gate-scripts/drive_gate_last_open"

printf '%s' "Open Drive Gate" | /usr/bin/nc -q 0 -w 1 192.168.8.220 10001 >/dev/null 2>&1 || true
date +%s > "$TS_FILE"

echo OPENING
exit 0
EOF

chmod +x /home/homebridge/gate-scripts/drive_gate_open.sh


DRIVE GATE STATE SCRIPT (60 SECOND SIMULATION)

tee /home/homebridge/gate-scripts/drive_gate_state.sh > /dev/null <<'EOF'
#!/bin/bash
TS_FILE="/home/homebridge/gate-scripts/drive_gate_last_open"
OPEN_SECONDS=60

now=$(date +%s)

if [ -f "$TS_FILE" ]; then
  last=$(cat "$TS_FILE" 2>/dev/null || echo 0)
  if [ $((now - last)) -lt "$OPEN_SECONDS" ]; then
    echo OPEN
    exit 0
  fi
fi

echo CLOSED
exit 0
EOF

chmod +x /home/homebridge/gate-scripts/drive_gate_state.sh


DRIVE GATE CLOSE SCRIPT

tee /home/homebridge/gate-scripts/drive_gate_close.sh > /dev/null <<'EOF'
#!/bin/bash
echo CLOSING
exit 0
EOF

chmod +x /home/homebridge/gate-scripts/drive_gate_close.sh


Repeat the same structure for the Pedestrian Gate, changing:

- “Open Drive Gate” → “Open Pedestrian Gate”
- drive_gate → ped_gate


STEP 5 – CONFIGURE HOMEBRIDGE ACCESSORIES

In Homebridge → Settings → Config add:

{
  "accessory": "GarageCommand",
  "name": "Drive Gate",
  "open": "/home/homebridge/gate-scripts/drive_gate_open.sh",
  "close": "/home/homebridge/gate-scripts/drive_gate_close.sh",
  "state": "/home/homebridge/gate-scripts/drive_gate_state.sh",
  "status_update_delay": 2,
  "poll_state_delay": 2,
  "ignore_errors": true
},
{
  "accessory": "GarageCommand",
  "name": "Pedestrian Gate",
  "open": "/home/homebridge/gate-scripts/ped_gate_open.sh",
  "close": "/home/homebridge/gate-scripts/ped_gate_close.sh",
  "state": "/home/homebridge/gate-scripts/ped_gate_state.sh",
  "status_update_delay": 2,
  "poll_state_delay": 2,
  "ignore_errors": true
}

Restart Homebridge.


STEP 6 – ADD TO APPLE HOME

In the Apple Home app:

1. Add Accessory
2. Scan Homebridge QR code
3. Confirm gates appear as Garage Door accessories

You can now say:

“Hey Siri, open the Drive Gate”
“Hey Siri, open the Pedestrian Gate”


BEHAVIOUR SUMMARY

When triggered:

1. Gate opens
2. Home shows “Opening”
3. Shows “Open” for 60 seconds
4. Automatically returns to “Closed”

This simulates real gate timing without requiring a physical sensor.


SHARING WITH FAMILY MEMBERS

In Apple Home:

Home Settings → Invite People

Invite additional Apple IDs to allow voice control from other devices.

END OF GUIDE
    • Related Articles

    • How To: Using the MXNet USB Control Tool

      Powerpoint and software for the USB Control Tool used when configuring Point To Point, Multicast Settings, and Control Routing. Extra information. To manually set the channel to 0000 via command line astparam s ch_select 0000;astparam save;sleep ...
    • How to use logic functions to control the boiler call for heat in an Eelectron KNX PWM based UFH control system

      If you want an ON if any PWM based valve is more than 1% and OFF if all are set to 0% you can implement that with 3 simple logic by setting all in OR between each other. First logic, setting in OR first 4 PWM Second logic, setting in OR other 4 PWM ...
    • Poor audio quality on intercom to a door station

      if you get poor audio quality at the door station using ELAN then try enabling QOS on the router and the switches. You do not need to configure anything, just enable it. That will priorities audio packets and improve the audio quality. 
    • How do I add Visualint Cameras to ELAN

      ELAN requires an H.264 main stream for when the camera is full screen and a lower res MJPEG for the thumbnail view. With Visualint VIM Cameras, set the settings below on all the camera first using the local web GUI of the cameras. Set the stream 1 to ...
    • Troubleshooting Tips For Access Control Reader

      Wiring is one of the biggest causes for problems when using the 75A00-2 Access Card Reader. The pinout for the built-in serial ports on Leviton controllers are: With the above stated, your pinout should be using Pins 4 & 5, where Pin 5 should be ...