This post describes how I hooked up a Dakota Alert driveway alarm to Home Assistant using an ESP32.

The Dakota Alert 4000 Series is a driveway alarm system that can pair a receiver with a variety of transmitters (magnetic probe, rubber hose, break beam, etc.). When a transmitter fires, the receiver plays a chime or tune. Mine plays the William Tell Overture - it’s very catchy / startling, but not very helpful if I happen to be outdoors.

The RE-4k Plus receiver has 2 relay outputs that can be configured to trip when a transmitter fires:

This suggests a plan: have an ESP32 monitor the relay output, add this to Home Assistant as a sensor, and have Home Assistant send a notification to my phone when the sensor turns on.

esphome

I ordered something that claimed to be an ESP32 dev board from Aliexpress. It seems to be a NodeMCU-32S, but the poor quality of the silk screening makes me think that it’s a sketchy knockoff. I have it on a fairly locked-down subnet, so I don’t really care.

esphome seems to be the easiest way to hook up an ESP32 to Home Assistant. Setting up esphome is kind of a pain, but it makes the actual configuration of the device utterly trivial:

esphome:
  name: driveway-alarm

esp32:
  board: nodemcu-32s
  framework:
    type: arduino

# Enable Home Assistant API
api:

wifi:
  ssid: "(redacted)"
  password: "(redacted)"
  fast_connect: true

  # wifi times out when we use DHCP for some reason.
  manual_ip:
    static_ip: 192.168.3.50
    gateway: 192.168.3.1
    subnet: 255.255.255.0

binary_sensor:
  - platform: gpio
    name: "Incoming Traffic"

    # debounce the input - otherwise each signal triggers it repeatedly
    filters:
      - delayed_off: 5s

    pin:
      number: GPIO5
      inverted: true
      mode:
        input: true
        pullup: true

Home Assistant

Once the ESP32 is running you can add it to Home Assistant with “Add Integration”.

The final step is to create an Automation that sends a notification:

alias: Notify on incoming traffic
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.incoming_traffic
    from: "off"
    to: "on"
condition: []
action:
  - service: notify.notify
    data:
      message: Somebody is arriving.
      data:
        notification_icon: mdi:road_variant
      title: Incoming traffic
mode: single

I have the Home Assistant app on my phone, and the notify.notify service is configured to send notifications to that app.

Wiring the ESP32

The ESP32’s GPIO5 pin is wired to “NO” on the receiver, and ground is wired to “COM”. When a transmitter fires, the relay closes and the esphome sensor reads as “on”.

I powered the ESP32 by tapping into the receiver’s “GND” and “VDD” (3.3V), which are conveniently exposed. Not the greatest solder job, but it works:

I drilled a hole in the receiver to pass the wiring through:

In this photo you can see that I’m using both relays. I have 2 transmitters, this allows me to distinguish between them.

The result is not the prettiest looking thing on my wall. The velcro attaching the 3D printed ESP32 case to the receiver is particularly ugly. There’s lots of room inside the receiver - you could probably fit something like a TinyPICO ESP32 board inside, but I’m not sure how you’d connect it to the relay.