My 4-channel Sonoff switching unit has arrived and has been “paired” with my Alexa. So now Alexa can switch my workshop heating on and off.
In theory, at least, because I haven’t actually connected this to my heater. This is simply going to provide a signal to my workshop hub microcontroller that the heater should be turned on (if below a preset temperature).
This Sonoff also comes with an easy-to-use and intuitive phone app, that shows the state of the four switches as well as allowing you to change that state (eg. from off to on). We’ll be discussing more of this in my very next video, #110, all queued up ready for imminent release.
Best of all, although I don’t know why I feel that way, I can ask my Amazon Echo, Alexa, to switch on my workshop heater – and she does! You can imagine the chaos caused by me videoing this and then playing it back whilst my Alexa was still listening to me! That poor Sonoff didn’t know what had hit it.
So what, I hear you ask, is the workshop microcontroller hub? Funny you should ask. I had already told you that an Arduino was not suitable because it had no built-in wi-fi for starters, and I didn’t want to add a shield or other LAN component. An ESP8266 would have wi-fi, and the power required to run some central control program. But having read up about sensors sending messages to, and receiving from, a central hub it became clear that if I was to support that (easily) then a Raspberry Pi Model 3B+ would be required. This £35 unit is a computer in its own right, sporting a dual-core 1.4Ghz processor with 1Gb of RAM, a fast LAN connection and wi-fi with both 2.4Ghz and 5Ghz frequencies supported. I’ve got it running with the Raspbian operating system. I barely had to do anything for this bit to work.
More importantly, it can run the message queuing and transferring process provided by MQTT (Mosquito) pretty much out-of-the-box. MQTT manages the flow of messages from sensors (such as a thermometer) and back out to actuators (such as a heater switch).
It works with Node-RED, installed by default on the Pi, which is a web-based “flow editor that makes it easy to wire together flows using the wide range of nodes in the palette. Flows can be then deployed to the runtime in a single-click”. If that doesn’t mean much to you stay with my channel as we leverage its simplicity to make my workshop almost autonomous!
Here’s a bigger picture showing it all up and running in my workshop.
As you can see it is showing the standard wallpaper with a taskbar at the top. It’s connected to my wi-fi and seems to be very quick.
I’ve connected up a wireless mouse but can’t find my wireless keyboard that works with the Pi so I’ve had to resort to a cabled version, spit, spit!
More on this in future videos but for now I must read up a bit more about the message queuing protocols and see what the absolute simplest set up is, so I can demo it. Until next time!