Checks if the door is locked/unlocked with a keyboard blueswitch that is pressed by the lock bolt. Uses an ESP8266 (ESP-12F module) which connects to WiFi and publishes an MQTT event to Home Assistant on activation and implements a debounce timer to avoid spamming MQTT events.
- Requires Python 3.7, I recommend creating a virtual environment
- installation guide
- Export the path to the ESP8266 SDK (e.g.
export IDF_PATH=/home/user/esp/ESP8266_RTOS_SDK)
There is a bug in the SDK that leads to ncurses library errors on Arch Linux, here's the fix
- Use
make menuconfigand fill in the toolchain path + extension (e.g./home/user/esp/xtensa-lx106-elf/bin/xtensa-lx106-elf-) under theSDK Tool Configurationtab - in the same menu fill in the required settings under the
Door Lock Sensor Configtab (wifi ssid, password, mqtt broker, etc.)
Use make -jn all flash monitor (fill in n for the number of CPU cores), to compile, flash and monitor the program.
If the bootloader is flashed once you can use make app-flash monitor to flash without flashing the bootloader.