Sometimes, I don't hear my doorbell ringing. Sometimes because I'm listening to music, because I'm using the vacuum cleaner, etc. So I thought notifications to my smartwatch should solve this, and hopefully this would help me not miss any Amazon parcels 😜...
The sketch uses MQTT to notify my MQTT server, which shoots the notification to my phone using Pushbullet, and WiFiManager to allow the WiFi configuration in case it changes without having to reprogram the board.
You'll need:
- ESP-01 or similar microcontroller from the ESP8266 family
- A way of assembling the microcontroller to a small mains voltage detector and a small power supply. In my case, I used this schematic
- Arduino IDE
- The ESP8266WiFi library
- The PubSubClient library
- The ESP8266 WiFiManager library
- An MQTT server to communicate to (in my case I used the embedded MQTT server from OpenHAB
You'll need to configure in Configuration.h the IP, user, and password of your MQTT server, the client ID, and the MQTT topic to use and an SSID and password to create a new WiFi connection with a captive portal, that lets you connect to your WiFi router. This is not your actual WiFi router SSID and password, but a new one. Once you power on the microcontroller for the first time, connect to the SSID you configured here with your password and navigate to the captive portal to then configure your real WiFi connection.
More info (only in Spanish for now) in https://elprogramadoriberico.es/2020/07/23/avisador-de-timbre-casero/