Sensordata from esphome in nodered

Hey there,
i have an esp32 connected to my home assistant via esphome and it is sending temperature values from a dht22-sensor. So far, so good.
I am wondering how i can bring this datastram to nodered to further “datahandling”. Can i tell the esp32 that runs with esphome that it should publish the data with mqtt? MQTT works in another project quite well, where i am publishing sensordata from an esp32 and using it in nodered.

Or is there another way, to bring the data to nodered without mqtt?


If it’s coming into HA, it should be into a sensor. You should be able to query that sensor in NodeRed as well.

Did you consider feasibility of doing this processing on the esp? Many folk would recommend this unless there is a sound reason to do it upstream.

My understanding is the only alternative to MQTT is the “Native API” (which is what Home Assistant integration and the ESPhome apps use). The API is open source, and there has been an attempt to adapt it for NodeRed but it’s still marked “alpha” so arguably MQTT is a better option if your intent is to cut out HA as a middleman. If you need privacy, MQTT supports TLS encryption using the esp-idf framework.

Of course you can use mqtt with esphome. It’s right on the esphome front page.

However once you have the data in home assistant via the esphome api it is available in node red, as is all home assistant data.

I feel a little limited and not really comfortable with coding in the yaml -file. Basic sensor readings is fine but when it gets more complex i feel better in node red. And i also have other esp32-attached sensors that are not included in my ESPHome and sending directly to node-red via mqtt.

Ok well you have your solution.