Videx Buzzer alert/Automatic door opening switch on pressing Buzzer

Yes I am thinking of ways to make it better lol. Thank you again for this. I really appreciate all your help!!!

Hey Spiro, I got the IINA219 and its working like a charm. This is a much better solution than the sound based one. I wish it could detect voltage without the 2 second timer, it does make me curious how much wifi traffic is generated or disrupted from this. Thank you again!

Glad to hear it is up and running. Bit confused by the 2 second timer. Do you mean the update_interval? I have it set at 0.2s on mine.

Yeah that’s what I meant. I did notice that when my intercom rings I get 8V so that is working. However the ringer itself doesn’t ring when the device is hooked up. Any ideas? I don’t think it is a miswiring because the devices DO ring as soon as I remove the wire for the esp.

For me both buzzer and alarm worked together. 3 things to check. First your buzzer runs on DC not AC. Just make sure yours is DC buzzer. Second is the wiring.


Your original 8V+ wire to the buzzer is removed from buzzer and connected to Vin+ on the INA219 and a new wire runs from Vin- to the original connection for buzzer.
Third thing could be a faulty INA219 module. Have you tried running it on a bread board with something else like an LED with a resistor in place of the buzzer.

HOLY MOLY I HAD IT WRONG!! I had the neg from the intercom going to neg on INA219 and positive going to pos on INA219. I basically wired it parallel to the speaker. When I rang the doorbell before it detected 8V but the ringer didn’t ring (noticeably at least). Now with your diagram it goes from 0 to 0.5V and the ringer rings. I guess I didn’t think the INA219 could detect voltage on a single line. That is incredible. You have been so helpful to everyone here. I appreciate you. Can I donate to something you’re interested in perhaps? I just want to express my gratitude towards you, never change. Thank you again.

Your thanks is enough. Just happy to help out. It’s a good feeling when suddenly that project that just wont work does. :+1:

1 Like

Hey Spiro

Hope all is well. Thanks again for all your help a couple years back on the intercom.

I wanted to ask you is there a way of reading and saving the flash previously applied to an esp32 to see what was coded to it? If so how would I go about doing so? I need to make a copy on another intercom but cant find a copy of the written code i used at the time :frowning:

I have a .bin file which i created but have no idea how to read it. It was used to flash the esp32 board using esphome flasher. Luckily i put a lot of the code on the forum here so worst case i can track back to the last one and reconfigure it but I cant remember what i did hence me asking if there is a way to either read the existing board or .bin file :stuck_out_tongue:

Hi
Great to hear you’re still working away on HA. I believe if you burn the bin image to an ESP32 and turn it on and then on the ESPHome app it will discover it and you can then adopt it into ESPHome and then you should be able to read the code through the edit button.

.

1 Like

in fairness ive not used it since we last spoke lol

I will give that a shot tomorrow and see if i can read it and pull the code off to store a copy :smiley:

ok so massive issue, i am not running the same HA build as I cant for the life of me remember how I originally booted it so I have a windows version I am now running from scratch. This means I dont have my original HA build I used to create and code the original esp32.

Now on my new dash, there is no option to allow an existing device thats already been programmed using HA previously…so im stuck as part of my original problem back then was also that HA could never see my device via wifi so now when I try to connect the existing device, its trying to set it up as a new device

It was 2021 when you wrote the code. Esphome has had a lot of updates since then. Perhaps to much to expect an old version would be discovered. All the yaml code is above and it would be easy to copy and paste it into a new esphome device.

Id appreciate if you can look at this coding below and tell me or change to correct it? the new version of yaml code seems to be set out differently to how this was originally coded last time and I am honestly a little confused what I can and cant keep here so ive done the best i can… :stuck_out_tongue:

This is the original code i previously used below for the first build

esphome:
  name: intercom
  platform: ESP32
  board: esp-wrover-kit

wifi:
  ssid: "CrewCabinsWifi"
  password: "CabinCrew1"
  fast_connect: false
  manual_ip:
    static_ip: 192.168.0.30
    gateway: 192.168.0.1
    subnet: 255.255.255.0
    dns1: 192.168.0.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: 5000ms
    - 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"
      on_value_range:
        above: 3
        then:
          - switch.turn_on: relay
          - delay: 5000ms
          - switch.turn_off: relay
      filters:
        - multiply: 1000
    max_voltage: 18.0V
    max_current: 3.2A
    update_interval: 0.2s 




  

captive_portal:


    
# Enable logging
logger:
  level: DEBUG
# Enable Home Assistant API
api:

ota:

This is the newly compiled version I have created which gives me download errors (screenshot attached below it so i dont know what ive done wrong)

esphome:
  name: intercom
  friendly_name: intercom

esp32:
  board: esp-wrover-kit
  framework:
    type: arduino

# Enable logging
logger:
  level: DEBUG

# Enable Home Assistant API
api:
  encryption:
    key: "BXA6e7Xa/Ltp31GsfDk8H/B+SmGdr/z7UNKA2XE8Oto="

ota:
  password: "eb35715abc501afe1c211aab9ff08001"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Intercom Fallback Hotspot"
    password: "n8HQdmrHFsAg"

switch:
  - platform: gpio
    pin: 15
    id: relay
  - platform: template
    name: "Door Remote"
    icon: "mdi:door"
    turn_on_action:
    - switch.turn_on: relay
    - delay: 5000ms
    - 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"
      on_value_range:
        above: 3
        then:
          - switch.turn_on: relay
          - delay: 5000ms
          - switch.turn_off: relay
      filters:
        - multiply: 1000
    max_voltage: 18.0V
    max_current: 3.2A
    update_interval: 0.2s 

captive_portal:



This is the screenshot for the build failure

It compiled without any problem. I see some people had similar problem and answer was to reinstall the esphome addon. Try that

1 Like

ok deleted and installed again and it complied with success and allowed me to download. Not tried installing to the board just yet but am sure it will be fine and can figure that bit out hopefully lol.

For the code, do you know if its possible to play a pre recorded audio file via the intercom to the person who has just buzzed? Its so it gives the illusion to the person someone has answered prior to the esp32 board unlocking the door? If so… :face_with_peeking_eye: how would i recode and what additional hardware + wiring would i need to do? Any ideas?

Playing a message down intercom does sound possible. You would have to send the message using the transmit speech wire and ground wire. ESPhome allows this with digital to analogue convertor.


DACs may need a little blob of solder across a jumper perhaps. I did have to do that with PCM5102. Went to find the board there and couldn’t. An intercom probably only needs a monophonic DAC.

i2s_audio:
  i2s_lrclk_pin: GPIO13
  i2s_bclk_pin: GPIO18
  
media_player:
  - platform: i2s_audio
    id: media_out
    name: ESPHome I2S Media Player
    dac_type: external
    i2s_dout_pin: GPIO22
    mode: stereo

Above is the only code needed on the ESP32.

1 Like

thank a million buddy. I will test to see if the new board works now as a start.

superstar! Thank you. Can you also tell me is there another product other than the ina219 that I can use that comes pre soldered? All the INA219 boards ive seen require soldering which is a pain and I am not great at doing that while most other boards I have bought come pre soldered so wondering if there is an alternative to the INA219 that is plug and play?

Sorry, not aware of any current sensors that don’t need pins soldered in. Difficulty soldering usually comes down to dirty solder tip and lack of flux.


Saw this on Ebay. Voltage detection module Voltage Sensor Module for Arduino. Provided the voltage isn’t above about 15 volt the S pin could be connected to an ESP32 AD0 pin. You would have check the voltage across call tone pin and ground pin on the intercom to make sure it’s not above 15v.

1 Like

seeing a friend of mine on tuesday and he is a competent solderer so will get him to do all the boards i need lol

thanks for the recommendation. I did take a look online and see these too but was unsure how these would connect to the esp32 setup