This projects satisfies one of my everyday needs: Alerts for when my clothes are done washing. Tired of checking every some minutes to know if my basic washer machine has done the laundry, I created this code, which loaded into an ESP-01 board checks if the door lock has been released and communicates to my IoT server to notify me through an app notification.
You'll need:
- ESP-01 or similar microcontroller from the ESP8266 family
- A way of connecting the microcontroller to your washer machine. 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 and a way of notifying to your devices (in my case I used OpenHAB and PushBullet
You'll need to configure in Configuration.h the IP, user, and password of your MQTT server, the client ID, and the two MQTT topics 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/2019/04/22/haciendo-inteligente-mi-lavadora-parte-1/