Was asked by @ Bikhs to share this
This is another Videx 3011 intercom project to open door/gate remotely and Buzzer/doorbell (used interchangeably to confuse) sensor and automation to open door when Buzzer sounds.
Parts
ESP32 development board
5 V Relay Module
INA219 DC current sensor
Dupont wires Female to female (20cm) x7
Other wire with no end connector about 60cm
5 v USB power supply for ESP32
When you open up the intercom there is a lot of room to fit components but you don’t want electrical shorts so I place parts accordingly.
I made a previous version of this that sensed the Buzzer by sound but there were a lot of false positives due to just closing doors a few feet away.
Probably easiest to program your ESP32 first using ESPhome addon.
esphome:
name: intercom
platform: ESP32
board: esp-wrover-kit
wifi:
ssid: "Yourssid"
password: "YourPa55word"
fast_connect: false
manual_ip:
static_ip: 192.168.1.4
gateway: 192.168.1.1
subnet: 255.255.255.0
dns1: 192.168.1.1
dns2: 8.8.8.8
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Intercom Fallback Hotspot"
password: "ReDaCtEd"
switch:
- platform: gpio
pin: 15
id: relay
- platform: template
name: "Door Remote"
icon: "mdi:door"
turn_on_action:
- switch.turn_on: relay
- delay: 500ms
- switch.turn_off: relay
- platform: restart
name: "Intercom.Node Restart"
i2c:
sda: 21
scl: 22
scan: True
id: bus_a
sensor:
- platform: ina219
address: 0x40
shunt_resistance: 0.1 ohm
shunt_voltage:
name: "INA219 Shunt Voltage"
filters:
- multiply: 100
max_voltage: 18.0V
max_current: 3.2A
update_interval: 0.2s
- platform: wifi_signal
name: "Intercom WiFi Signal Sensor"
update_interval: 60s
captive_portal:
# Enable logging
logger:
level: INFO
# Enable Home Assistant API
api:
ota:
Someone might comment on a better way to use INA219 as I have it checking voltage on the line every 0.2 seconds.
Step 1 of the hadware
Connect relay to Videx terminal. Strip the ends of 2 Electrical wires and screw one in to Normally Open terminal of Relay and the other into Common terminal of Relay. The two other ends connect one each to 3 and 5 Videx Terminal. It doesn’t matter which way round you connect them. This is a dry relay with little current.
The Ground terminal of relay connect to a ground pin on ESP32 and the +V to 5 V on ESP32 by dupont wires.
Connect by dupont wire Pin15 to signal pin.( you can pick different pins but need to adjust ESPhome programme.
Step 2 of the hardware
In the picture I have hidden the wiring for the relay to make it easier to read.
Pic
Remove the wire from terminal 4 (call tone wire) and connect it to Vin+ at the top of the INA219. This is the only wire to be disconnected from the Videx. Take another wire and strip the ends and connect one end to Vin- and other back to terminal 4 on the Videx.
Connect by dupont +3V (ESP32) to Vcc (INA219) ,
GND (ESP32) to Gnd (INA219)
G21 to sda (INA219)
G22 to scl (INA219)
It does all fit back in to case. Bent pins a bit on ESP32 where Dupont connectors are. If I had a thinner USB power supply end I would have.
Back to the Home assistant
This is in my automations and set as a switch on the frontend of HA to turn on/off self buzz in. Would be crazy to leave on all the time.
- id: '1620237122004'
alias: Door Buzzer auto open door
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.ina219_shunt_voltage
above: '0.3'
for: '0:00:0.1'
condition: []
action:
- service: switch.turn_on
target:
entity_id: switch.door_remote
mode: single
The valve 0.3 might be different on your device. Adjust it to avoid false positives and false negatives.
Another automation to notify various devices like TV/Telegram that the door has buzzed
- id: '1612619661356'
alias: 'Buzzer Door '
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.ina219_shunt_voltage
above: '0.3'
for: '0:00:0.1'
condition: []
action:
- service: notify.home
data:
message: door Bell
- service: notify.alien2br
data:
message: front doorbell
mode: single