hayat help
Help › Hayat Gate

Connecting boom barriers

gate.hayaterp.com ↗

How the Gate Agent opens a boom barrier — a short dry-contact pulse on the controller's OPEN input through a network relay (Shelly, KMtronic, ESP32), a Modbus TCP IO module (Waveshare, USR, Advantech ADAM), a USB relay, or a Hikvision / Dahua camera's alarm output. Wiring notes, testing, and the safety rules: never wire into the motor, keep the safety loop, and never leave a barrier without a manual override.

Hayat Gate does not replace your barrier's controller. It only presses the OPEN button for you: the agent closes a relay for half a second, wired in parallel with the barrier's own open push-button. The barrier closes by itself as it does today (timer, loop detector or photocell).

Safety rules

  • Never wire the relay into the motor or mains circuit. Use only the controller's low-voltage OPEN (sometimes PB-open, OPEN/COM, Push button open) input, with a dry contact: relay NO to OPEN, relay COM to the controller's COM / GND.
  • Keep the barrier's own safety — the loop detector under the road and the photocell — connected. Hayat only opens; it never decides when it is safe to close.
  • Never leave a barrier with no manual override. The guard must always be able to open it without Hayat: keep the controller's push-button or remote in the cabin, a key switch outside, and the manual release (hand crank or key) for power cuts. Show every guard where they are.
  • Put the PC, the switch and the relay board on a UPS. Fail-safe matters more than speed: if the relay board dies, the barrier must stay usable by hand.
  • Test with the barrier disconnected first (see below).

Choosing a driver

On the lane in gate.hayaterp.com, Barrier → + Add, and pick the Driver:

Driver Use when Address Channel
Network relay (http-relay) A Wi-Fi/LAN relay with a web address: Shelly 1 / Plus 1, KMtronic LAN relay, ESP32 / ESPHome board The relay's web address with placeholders, e.g. Shelly http://192.168.1.80/relay/0?turn=on&timer={pulseS} Relay number
Modbus TCP IO module (modbus-tcp) An industrial relay box on the network: Waveshare Modbus POE ETH Relay, USR-IO808, Advantech ADAM-6060 / 6066 192.168.1.70:502 Coil number, counting from 0
USB relay (usb-relay) A cheap relay plugged into the gate PC: LCUS-1 / LCUS-2 (CH340), "USB Relay HID" boards COM3 (serial) or hid Relay number, from 1
Hikvision camera output (hikvision-io) The ANPR camera's ALARM OUT is wired to the barrier Camera IP Alarm output number, from 1
Dahua camera output (dahua-io) The Dahua ITC camera's ALARM OUT or "strobe" output drives the barrier Camera IP Alarm output number, from 1
None Pilot weeks: Hayat logs and decides, the guard opens by hand — —

Pulse (ms): how long the contact is closed. 500 suits most controllers; some need 1000. Username / Password: for relays and cameras that ask for a login (kept encrypted).

The agent never pulses the same lane twice within 5 seconds, so a car read twice does not jam the barrier. A guard's Open barrier from the screen always goes through.

Wiring examples

Modbus relay (Waveshare 8-channel)

Relay terminal Barrier controller
CH1 NO OPEN
CH1 COM COM / GND

In Hayat: driver Modbus TCP, address 192.168.1.70:502, channel 0, pulse 500. CH2 for the exit lane: channel 1.

Shelly 1 — set it to momentary / auto-off in the Shelly app; wire its output contacts (O and I on the Shelly 1, dry contact) to OPEN and COM. Give the Shelly a fixed IP on the camera network. Power the Shelly from a proper supply, not from the barrier's motor terminals.

Camera alarm output — Hikvision ANPR cameras: ALARM OUT 1 (the two terminals marked ALARM OUT or 1A / 1B) to OPEN and COM. Many outputs can switch only small currents; that is fine for an OPEN input, never for a motor.

Test before you go live

  1. Disconnect the wires from the barrier controller, so a mistake cannot drop the boom on a car.
  2. In gate.hayaterp.com, on the guard screen, choose the lane and Open barrier with a reason (test).
  3. Watch the relay's LED or listen for its click. On the gate PC, the status page shows the command.
  4. Repeat for every lane and check each relay matches its lane.
  5. Connect the wires and test again with no car, then with a registered car, then with an unknown car (it must stay closed).
  6. Test the manual push-button and the hand release with the guard watching.

Nothing happens: check the relay's IP from the gate PC (ping 192.168.1.70), the channel number (does the manual count from 0 or 1?), and the username and password. For USB relays, check the COM port number in Windows Device Manager.

Who opens the barrier and when

Situation Barrier
Registered vehicle, valid pass, paid exit, open lane Opens by itself
Unknown vehicle, expired pass, wrong gate, outside its hours Stays closed; guard decides
Plate one character different from a registered one Stays closed; guard is alerted
Blacklist Deny Stays closed; alert
Paid exit, fee not paid Stays closed until the cashier takes payment
Guard presses Open barrier Opens; the guard's name and reason are logged