I started with the plan to use a Wemos D1 Mini with a couple of the plug-in modules like a relay module, processor module and a button module all placed on the dual base PCB.
Button Module |
Processor Module |
Relay Module |
Dual footprint Motherboard |
Once the parts were assembled and the software flashed (the button module happens to be the flash button as well)
The idea was to load some software written by a chap called arendst on Github this software allows you to control a relay via MQTT, usually used in WiFi controlled power sockets found at ITEAD but there's no reason why it can't be used on any ESP8266 to drive a relay and more importantly read a connected temperature sensor like a DHT22 or DS18B20.
I planned to control this from my Raspberry Pi 3 running Node Red, I would design a control layout using the Dashboard module, which serves up a webpage I can view on my phone/PC/tablet etc. inside my WiFi network.
Work in progress Dashboard UI in Node Red |
but could also be controlled outside my network using an MQTT app on my phone via the Cloudmqtt service using 4G data.
I also got hold of an Amazon DASH Button which I've configured using a node "node-dash-button", I've configured it so that pressing this button gives a 30 min boost to the Hot Water.
I tried several MQTT apps and found the one I liked the most was MQTT dash it let me create quite a nice interface.
Sample layout for MQTT Dash |
So all was going well and starting to work when I saw that the lovely people that make the Raspberry Pis had just launched a new version of the Pi Zero, this time with WiFi and Bluetooth included and it was just under £10 .....Whoa! .... hold on a minute! under a tenner! .... I'm quite prepared to use a Pi Zero W instead of a Wemos D1 mini and shut it in the airing cupboard controlling the hot water.
The Pi Zero isn't very fast but I was certain it was plenty fast enough to control one relay and read the temperature using a DS18B20.
So I changed plans at this point a turned toward the Pi Zero W, if you want to use an ESP8266 then go over to Github and use arendst's code (I use it on 3 Sonoffs) and make it happen.
I will put together a blog entry for the Pi Zero W in a few days, I'm just sorting out the housing and wiring to put it in the airing cupboard.
As usual if there are any questions just ask them in the comments and I'll do my best to answer them.