Home automation

This post is a update of my previous post. I ditched the idea of replacing my remote with a fixed touchscreen remote. Instead I wanted to be able to control everything through the internet. I decided to start with using the Adafruit IO service. The hardware used for this project are a Raspberry Pi 3, Pi camera, remote controlled switches, ESP8266 NodeMCU and a 433MHz transmitter.

The NodeMCU was used to make a wireless connection to the internet. It uses the MQTT protocol to get feed data from my Adafruit IO dashboard. This feed data determines if the transmitter needs to turn off or on a specific switch. Currently the switches are only controlled by the online commands (or manual override with a remote control). But automation scripts can easily be made, which can be handy when going on vacation. As can be seen in Figure 1 there are still a lot of IO pins unused on the MCU so upgrades can be connected.

Figure 1 - NodeMCU
Figure 1 – NodeMCU

 

 

 

 

 

 

As can be seen in Figure 2 the online dashboard also contains a live camera feed. This camera feed runs from a Raspberry Pi 3 with a Pi camera. Currently the camera is in a testing location. But when properly placed it will see my complete room. Because there is no QOS support from the online dashboard a different solution had to be created. That’s why the status of the received input feeds is send by the NodeMCU to the dashboard. This way we can make sure that the feed update was received and processed correctly. The ESP8266 is programmed with a last will and testament, so if the connection is lost the broker sees this and publishes the testament which donates that the module is OFFLINE. If the connection is open then the ESP8266 status is set to ONLINE.

Figure 2 - Online dashboard
Figure 2 – Online dashboard