How to Transform Any Electronic Device Into a Smart Electronic Device for 10$?

by Smirk0514 in Circuits > Electronics

3324 Views, 47 Favorites, 0 Comments

How to Transform Any Electronic Device Into a Smart Electronic Device for 10$?

00083D7A-23A3-44B3-8743-F7C715EBB4AE_1_105_c.jpeg

In this tutorial, I will show you how to transform a regular door bell into a smart door bell that:

  • push notifications on my wife's phone and mine
  • integrates my Home Assistant setup for any other automation (text-to-speech annoucement, camera screenshot...)

Supplies

The pre-requirements for this project are:

  • Operational Home Assistant setup
  • Operational ESPHome setup
  • A RF door bell (or any not-so-smart electronic device you want to connect make smart with Home Assistant)


The following hardware is required:

  • Wemos D1 Mini (10$ approx.)
  • A few wires (2$ approx.)

Note: You can choose any ESP board you have on hand as long as it is compatible with ESPHome


The following tools is required:

  • Soldering station
  • Pliers
  • Screwdrivers

Open the Enclosure

9C3E38AE-5048-442F-9F9E-00135812A403_1_105_c.jpeg
5F8B87C7-F9D8-4D94-B608-D59B725878CB_1_105_c.jpeg
6257158C-FCF1-4763-AD86-1EABA0CCFBA3_1_105_c.jpeg
44BF45C8-99C9-42EF-A697-0AECD4862464_1_105_c.jpeg

Unplug the unit from the wall

Unscrew the two main screws on the back of the unit

Pull the top cover from the bottom

Unscrew the two other screws on the electronic board

Analyze the Electronic Board and Identify Power Connection Points

6257158C-FCF1-4763-AD86-1EABA0CCFBA3_1_201_a.jpeg

On the top of the electronic board, I immediately identify two test points labelled "5V" and "GND". I will be able to power my micro-controller through them.

Analyze the Electronic Board and Identify Signal Connection Points

44BF45C8-99C9-42EF-A697-0AECD4862464_1_201_a.jpeg

I noticed that my door bell activates a blue light when someone rings the door. The idea is to identify the control signal of this light. If I find it, I will be able to monitor it to know when someone rings.

On the electronic board, the blue light matches with the component labelled LED14. An LED circuit requires a resistor to work properly. Let's find this resistor.

I followed the trace (in red). At some point, I found a tiny hole on the electronic board. This is called a via and this is used to continue the trace on another layer. So, I continued following the trace on both side of the electronic board until I found the resistor (yellow).

I will be able to connect input of my micro-controller on this resistor.

Solder the ESP Board to the Door Chime

EDBB3796-473C-471E-842F-4D281747B99E_1_105_c.jpeg
IMG_2889.JPEG

Now you can connect the 5V, GND and signal wire from the door bell to the 5V, GND and D5 pins of the micro-controller board.

You can add insulation layer where necessary to prevent shorts to happen.

Configure the New Device With ESP Home

Capture d’écran, le 2022-09-24 à 20.52.50.png
Capture d’écran, le 2022-09-24 à 20.53.07.png
Capture d’écran, le 2022-09-24 à 20.53.16.png
  • Open Home Assistant
  • Open ESP Home module web interface
  • Click on New Deice green button
  • Enter a new for your device
  • Follow instructions to download initial firmware to your micro-controller


  • Once setup, go back to ESP Home module, find your device and click on Edit
  • Add the following section at the end of the yaml file:
binary_sensor:
  - platform: gpio
    pin: D5
    name: "Door Ring"
    id: "door_ring"
    filters:
      - delayed_off: 2s


  • Click on Save
  • Click on Install (at this point, you should be able to install it wirelessly)


Note: The configuration file should look like that:

esphome:
  name: d1-mini


esp8266:
  board: d1_mini


# Enable logging
logger:


# Enable Home Assistant API
api:
  encryption:
    key: "8rj9fdswKTvsOE4O3UwDOyNIiofgsdzq7YOaj7E4dho="


ota:
  password: "8422267116cb103bdc779de1a1335af4"


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


  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "D1-Mini-4 Fallback Hotspot"
    password: "uJPVhjvkchopK"


captive_portal:


binary_sensor:
  - platform: gpio
    pin: D5
    name: "Door Ring"
    id: "door_ring"
    filters:
      - delayed_off: 2s

Close Your Device and Plug It to the Wall

00083D7A-23A3-44B3-8743-F7C715EBB4AE_1_105_c.jpeg

Be careful with short circuits and not pinching any wires.

Wait 30 seconds after power up before going to the next step.

Add Your New Device to Home Assistant

Capture d’écran, le 2022-09-24 à 21.12.48.png

If you followed the last step and you successfully setup the custom ESP Home firmware to your micro-controller, Home Assistant should automatically detect a new device and add a notification on the left panel.

  • Select the room and add the device to Home Assistant
  • Go to Settings > Devices & Services
  • Select Devices tab
  • Click on the name of your device
  • You should be able to test you door bell

Configure Mobile App Notification

Capture d’écran, le 2022-09-24 à 21.16.09.png
Capture d’écran, le 2022-09-24 à 21.16.46.png
Capture d’écran, le 2022-09-24 à 21.19.18.png
  • Go to Settings > Automation & Scenes
  • Click on Create Automation
  • Click on Start with and empty automation
  • Add a trigger
  • Device
  • Ring turn on
  • Add an action
  • Service
  • notify: Send a notification with notify
  • Type a message and title
  • Click on Save
  • Add a name to this automation

Enjoy Your New Smarter Device

2DC38612-A868-4BC0-8E3A-523BBF27EAAE_1_201_a.jpeg

When someone press you door bell button, a notification should appear on your phone.