Node-Red with or without mqtt broker

A very stupid question.

Prerequisite: on a raspi

When using Node-Red do I necessarily need an mqtt broker like mosquito or can i use node red as such?

Kind regards,

There is a pallet in Node-Red that uses the Home Assistant Rest API.
Therefore MQTT should not be required.

Install this pallet in Node Red and communicated with HA directly.


MQTT is not required. Just use the Home Assistant Websocket node palette.

I started using mine with no mqtt broker, but if you want to create to triger flows or read metrics from node red without HA entity. You either need to make mqtt switches/sensors in HA or resort to templates.

Thanks a lot. Using Node-Red is the plan.
And thank you for answering my super beginners question.

I actually think this is a very legit and up to date question. I am still struggeling on how to solve this the most efficiently. I have an MQTT broker running for the sole popuse to have sensor which are updated from within NodeRed.

I’d rather like something like th ESPHome solution. E.g. I can completely define the entities in NoreRed only and then they are added via discovery as it is done with ESPHome.
So much nicer and cleaner, and NO MQTT.

I assume this might be implementable with API calls, maybe, but so far I haven’t seen anything like that.

you can simply use api node with post method and home assistant creates the entity. But with every restart you lose the state, so I prefer mqtt way.

Thanks, that works also for me, You are right, after a restart of HA, the entity is gone.

As I found in another topic, I just write to the state machine, no entity is ever created.

Some kind of simple “API Sensor” would be nice as an integration. With the whole purpose of being updated by API calls with persistence during restart.