Put it all together

Understood :grinning:

1 Like

I feel as though I can now move onto the main deal. Making an ESP turn stuff on/off. Any suggestions for a start up for that?

Have you taken a look at ESPEasy or Tasmota which you would flash on the esp8266 (do you have a WeMos D1 mini? Can't tell from your first post)

They have interfaces to talk/control other devices.

Back in 2018, I added a thread to the Share Your Projects section of the forum called Coffee Pot Timer where I flashed a SonOff S20 switch with ESPEay and created a flow. So from the node-red dashboard you can turn the pot on/off and if you turn it on, after 20 minutes, it will shut itself off. You can also turn it on/off using the button on the SonOff itself. I made it because I kept forgetting to shut the pot off and when I came back it had burnt the remaining coffee in the pot and I'd have to wash it out befor cleaning it.

You could take a look at the project to see how I did it.

Wow. Node-Red turns my espresso machine on/off via MQTT too.
I have a smart socket with Tasmota.
A countdown timer in the socket will turn it back off after half an hour so actually I only have to make it turn on from Node-Red.
Currently I'm working to estimate how full the water tank is using the socket's report of power consumed.

Making an ESP turn stuff on/off: Most ESPs have an onboard LED connected to one of the GPIO pins.
First step is to work out how to turn that on/off via MQTT.

You haven't said whether you've done much programming before getting involved with Node-RED, MQTT and ESP8266's, but if you have a bit of C++ ability you can fairly easily "roll your own" simple sketches to read sensors, control actuators etc.

You've already included PubSubClient which will handle all the MQTT stuff for you, so it's just a case of sending and receiving messages at both the ESP8266 and Node-RED ends to get things working.

(Yes, that's a little bit of a simplification, but it really is quite straightforward :wink:)

ESPeasy is great. Limited, but easy to get a start.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.