Good news! It can! 🙂
It turns out the micro controller that is used (CS2105G0-S12) offers a nice pin (Pin 7 – I/O) to be used for external electronics. Conveniently the PCB has a test pad (T4) that one can solder to.
The layout shows how the Wemos D1 mini is powered. It runs MicroPython, only when the alarm goes off. An alarm must be active for about 20-30 seconds for a message to go through. The wifi module connects to a local wifi network and sends a MQTT message to a pre-defined channel.
The I/O-Pin 7 of the smoke detector is high at 9V when smoke is detected. The Mosfet will be switched on and the battery now powers the D1 mini as well, allowing notifications via network. The ESP8266 on the board is flashed with MicroPython. The script connects to the local wifi and notifies home-assistant via MQTT that smoke is detected. Home-Assistant does the rest.
I’ve been playing around with MicroPython and Home Assistant. MicroPython is a ‘bare-metal’-Python flavor that you can use to program ICs. Home Assistant is a home automation and home control software written in Python 3. It can be hosted on a Raspberry Pi. It enables you to connect a vast amount of different devices: lights, switches, sensors, locks etc.
This is a raw guide on how to make your own smart plug and connecting it to MQTT which is then connected to Home Assistant.
You will need a relay board (single relay), a NodeMCU board, a power adapter for 5V, a case, a button, some wire and a 1k resistor.
Connect the devices according to this schema (WARNING: Don’t do this if you’re not comfortable handling mains power!). Don’t forget earthing (it’s not on the diagram):
See the Home Assistant documentation for how to integrate the MQTT part with Home Assistant.
The nice thing is: you can press the button to switch the device. The status of the device will update via MQTT and Home Assistant gets a correct status update. You can of course switch the device from within Home Assistant as well.