Thermostat via external sensor | Understanding MQTT or Home Assistant

First post, hope it's not terrible!

Hi guys. So, as the title suggests I am planning a specific automation while also trying to understand as much as possible about node red in the process.

I am running HA dockerized on an RPi4, zigbee2mqtt and mosquitto.
Thermostat: Aqara Smart Radiator Thermostat E1 (SRTS-A01) by Xiaomi
Thermometer: Aqara temperature, humidity and pressure sensor (WSDCGQ11LM) by Xiaomi

Now I dont know if it's just me, but the interaction with Thermostats is really confusing and counter-intuitive at times. HA provides a multitude of entities for these devices, the ones that I assume are the most relevant are the switch and the climate entity. Which leads me to my first question:

  • The current temperature is managed relative to the devices own thermometer- which is not very usefull since it resides very close to the radiator. Since I also have other thermometers in my room- how can I make sure that the device does not implement its own logic, but only listens to the one provided by node red. What would such a flow like?

Another observation that I made in HA is that it does not matter whether I turn the device on or off via the switch. Neither does it matter if the mode is "heat", "manual" or "none". It will just heat according to room temp. relative to measured temp. This does not seem very reliable at all!

  • Is it possible to manage devices/entities in node red only, even though HA knows about them?

Sorry, I am aware that this post is a bit of a mess. Just struggling to formulate my questions at this point.

Welcome to the forum @dokwon

Very few here use HA and as this appears to be a question about HA specifically you might be better on a HA forum.

Hi Colin,

thanks, I understand.

Alternatively, you could ditch HA and go to a node-red based system.


Im already considering this :slight_smile:
Whats the best way to learn? I know about the documentation and browsed it a couple of times. Any other place that you can recommend, especially regarding fundamentals around smarthome devices?

There is a playlist on youtube from the developers (short videos), it will take your through all the essentials of node-red, watch them all and you will grasp a lot of the concepts.

You are using zigbee2mqtt, you can directly use this in node-red via mqtt nodes for example.

1 Like

Thank you!

I suggest starting without Docker or Home Assistant, maybe migrate once you have things working.

Docker makes things much more complicated (just my opinion).
It's very useful software but I found it has a considerable learning curve.

No doubt as Andreas Spiess says on youtube "The Home Assistant project ... is the de facto standard for serious home automation" but for me it lacks the elegance of Node-red.
I have never used it but I have seen lots of questions on this forum from HA users and the number of different node types they have is mind boggling.
I wonder about the quality of support too, there must be a reason that HA users ask here instead of a HA forum.

After the first automatic scan of Devices, most of the configuration is done via yaml files in HA. (if I got it right, while testing it)
I also prefer the Node-RED style :smiley:

Some of the Home Assistant Nodes are very convenient. Like the "current state" node for a radiator/open window scenario.
I would love to learn node red the right way though, without having the underlying logic abstracted away from me. Did anyone ever create a space where the Home Assisntant nodes are listed and reproduced with native node red nodes? That would be a good place for beginners (and people migrating) to start.

Like the "current state" node for a radiator/open window scenario.

Depending on your device and its capabilities, you can either request its state or you need to maintain some state table. Maintaining state is something HA is good at. Within NR you can keep track of states using context or a database or something.

I am using zwave devices for the radiators and can request the current state of the radiator and perform the logic in NR where needed.

I think the intended scope behind automations is just different in HA.
For a lot of use-cases, HA automations are more than enough and due to the limited scope in comparison to Node-RED it compensates with a very intuitive UI with almost no learning curve. The fact that you can enhance automations with NR for those who want to go further is very thoughtful imho.
I think both tools are amazing and they arent really competing for the same thing.

Sorry, I have two followup questions if you dont mind :slight_smile:
• What do you mean by 'using context'
• How do you request the current state?

Means saving the reading to either RAM or to disk, so that you can quickly recall it at a later time.

Sending a message to the device asking it to return a message with the current reading.
The request message can take different formats depending upon the device.
A lot of users use MQTT for this.

1 Like

There is a lot of documentation available that should get you going.

1 Like