Sonoff with esphome listening to mqtt messages

I have ESP32 based temp measuring device in my greenhouse. Data is sent via mqtt protocol. Node-Red is capturing mqtt message and saves data to influxDB. I measure temp in several locations, but here important are temp at the top of greenhouse and soil temp. I would like to have solution where I can turn device when certain temp conditions are met. I have ventilator that moves air from the top of greenhouse under surface and therefore warm up soil during cold spring days.

I have flashed ESPhome to sonoff device and not sure what can I do next. I have tested sonoff device with Home Assistant, I can turn it on and off.

What kind of solution can I make ?

  1. Best would be that NodeRed checks temp vs condition that I set up and send message to turn on or off to sonoff device?
  2. Can Home Assistant be used for that purpose?
  3. I could change micropython code in ESP32 to check conditions, but then again, I need to send some message to sonoff device.

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