#Mega simple retrofit doorbell trigger with magnetic contact

12 messages · Page 1 of 1 (latest)

blazing dome
#

Drilled a 3/8th hole next to the chime hammer for the magnetic contact and double-sided taped a 3mm neodymium magnet to the side of the hammer. Works really well so far 😅

This magnetic contact plugs into my rack mounted alarm control panel. To abuse one of the inputs there.
#1124219298026627163 message

Magnetic contact is in the closed position until the doorbell rings which pulls the hammer down opening the contact reed switch then lets go closing the switch again.

blazing dome
#

ESPHome bypass the zone so it won't trigger an alarm when armed 😬

alarm_control_panel:
  platform: template
  id: acp1
  name: Alarm Panel
  codes:
    - "<Your Pin>"
  requires_code_to_arm: true
  arming_away_time: 10s
  arming_home_time: 10s
  pending_time: 15s
  trigger_time: 5min
  binary_sensors:
    - input: zone_05
      bypass_armed_home: true
      bypass_armed_night: true

HomeAssistant

alias: "Alarm: Doorbell was triggered"
description: ""
trigger:
  - type: opened
    platform: device
    device_id: <device_id>
    entity_id: <entity_id>
    domain: binary_sensor
condition: []
action:
  - service: notify.mobile_app_<mobiledevice>
    data:
      message: You can ring my bell, ring my bell (Ring my bell, ring-a-ring-a-ring) :notes:
mode: single
blazing dome
#
substitutions:
# Common ADS1115 Sensor Setting
  ads_gain: "6.144"
  ads_update_interval: "100ms" # 100ms or the Doorbell won't trigger.
  ads_delta: "0.2"
  ads_heartbeat: "120s"

binary_sensor:
  - platform: template
    name: Zone 05
    id: zone_05
    device_class: window
    lambda: return (id(zone_05_str).state != "OK");
  - platform: template
    name: Zone 05 Tamper
    id: zone_05_tamper
    device_class: tamper
    lambda: |-
      if ((id(zone_05_str).state == "Tamper") || (id(zone_05_str).state == "Short")) {
        return true;
      } else {
        return false;
      }
sensor:
  - name: "Zone 05 Voltage"
    id: ads1115_49_a0
    ads1115_id: ads1115_49
    platform: ads1115
    multiplexer: 'A0_GND'
    resolution: 16_BITS
    gain: ${ads_gain}
    update_interval: ${ads_update_interval}
    internal: false
    filters:
      - or:
        - delta: ${ads_delta}
        - heartbeat: ${ads_heartbeat}
    on_value:
      then:
        # Compare Reading to Ref voltages and set zone state (Int) if changed.
        - lambda: |-
            int y = 0;
            if (x > ${v3}) { y = 4; }                     // # State 4 = Tamper/Short = Red_Blink
            else if (x > ${v2} && x <= ${v3}) { y = 3; }  // # State 3 = Alarm = Red
            else if (x > ${v1} && x <= ${v2}) { y = 2; }  // # State 2 = OK = Green
            else if (x <= ${v1}) { y = 1; }               // # State 1 = Short = Red Blink
            if (id(zone_05_int).state != y) {
              id(zone_05_int).publish_state(y);
            }

@zinc widget Is there any way to tell esphome to poll faster? sometimes it misses the door bell press.

blazing dome
#

it runs off an ads1115 pin so maybe the analog calculations don't have enough time to settle into the zone required to activate.

zinc widget
#

If that's an adc sensor, then you need to change the update interval.

blazing dome
#

update_interval: "500ms" change to "250ms"?

#

What is the default?

#

Oh 60s

#

Is there a minimum that the esp can do?

zinc widget
#

The loop interval is 16ms.

#

You could also disable the update interval and use a template binary sensor to directly sample the adc.