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