# Flow for heating solution for job interview

**URL:** <https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [25 May 2025 17:19 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266 "2025-05-25T17:19:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![BraCra](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@BraCra](https://discourse.nodered.org/u/BraCra)\
**Post date:** [25 May 2025 17:19 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/1 "2025-05-25T17:19:39Z")

</div>

Hello there - i funnily enough came to Node Red via a job offer where i'm asked to simulate/add to a flow. I primarily need to present it as a way how i'd get it to run, but better would be to get a running JSON (requested if possible):

 ![Job request](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/8/08c132d1921bc0830594ffe3604ee539f56979c1.png)

the lower part needs to be fitted.  
Request here is:  
E1; Toggle signal from heating controller: Pump on/off, digital input  
E2: Signal state of safety temperature guard (STW), fault/normal, digital input  
A1: toggle pump, on/off, digital output

Build a flow  
E1 via MQTTin-Node; Topic HK3PumpeReglerEin, 1=on, 0=off //PumpControllerOn  
E2 via MQTTin-Node; Topic HK3STW 1=normal, 0=fault  
A1: via MQTTout-Node, Topic HK3PumpeAus, 1=on, 0=off //PumpOff

I've got Node red installed, was playing around it currently and tried to rebuild it.  
As i did not find the trigger-fields (e.g. STW ) i tried to set it up as inject and debug...  
For my understanding it's an And-comparator in between and that should be it?  
I also do not have any Host running (have installed HomeAssistant and tried to play around with that then) and do not know how to "troubleshoot" this setup

 ![2025-05-25 19_12_40-Window](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/b/6bbaca3c23a42944df4f50e5b03a41a11b6db8f0.png)

could anyone help me with that?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [25 May 2025 17:55 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/2 "2025-05-25T17:55:14Z")

</div>

> [@BraCra](#):
>
> (have installed HomeAssistant and tried to play around with that then)

You can do a lot of stuff in Node-red.  
Or, you can install Home Assistant, which is an entire operating system with the applications that HA have chosen. And then you can install Node-red as well because there's a lot of stuff that HA doesn't do.

I suggest that you spend some time familiarising yourself with Node-red and flow based programming. There are a collection of introductory videos at [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). They are done by the developers of node-red.

Now you understand more about flows and messages, you should not fall into the common beginners trap of trying to compare the contents of two discrete messages. There are probably hundreds of posts in the forum explaining this and few of them involve installing a logical AND node!

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [25 May 2025 17:58 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/3 "2025-05-25T17:58:36Z")

</div>

> [@BraCra](#):
>
> via a job offer where i'm asked to simulate/add to a flow

> [@BraCra](#):
>
> could anyone help me with that?

Isn't that cheating??  
You probably need to do some reading of the node-RED documentation & videos, and then come back with specific issues.

EDIT - as @jbudd has posted above

---

<div class="post-metadata">

**Author:** ![BraCra](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@BraCra](https://discourse.nodered.org/u/BraCra)\
**Post date:** [25 May 2025 18:29 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/4 "2025-05-25T18:29:18Z")

</div>

How do you work with new challenges on any topic? You research AND you request info from people that already know it. That's pretty basic for everything everywhere, so please elaborate how that's cheating.

And yes, i try to get something running because of the short time window until the interview.  
Basically the requirement is to state the function (you need an AND from both HK3PumpeReglerEin & inverted SK3STW (as 1 is normal function) for HKPumpeAus to trigger)  
So that's basic, however i want to offer more. For questions in the interview itself they pretty fastly know i don't know my way around, which i'll openly say - but in this environment it's rather about solution finding and will to go through...

And based on this i want to work further (after seeing HomeAssist i reeeeeeally want to play around with the stuff at my home now, given time).

So to my current understanding i for now need the way to project an negate for HK3STW and set both to an AND-gate.  
🙂

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [25 May 2025 18:38 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/5 "2025-05-25T18:38:54Z")

</div>

> [@BraCra](#):
>
> So to my current understanding i for now need the way to project an negate for HK3STW and set both to an AND-gate.

[https://flows.nodered.org/node/node-red-contrib-boolean-logic-ultimate](https://flows.nodered.org/node/node-red-contrib-boolean-logic-ultimate)

😁

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [25 May 2025 18:40 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/6 "2025-05-25T18:40:33Z")

</div>

> [@BraCra](#):
>
> after seeing HomeAssist i reeeeeeally want to play around with the stuff at my home now, given time

Hi @BraCra

Just Note - We're not affiliated with Home Assistant - many here do not use Home Assistant, just in case this is where you want to go.

---

<div class="post-metadata">

**Author:** ![BraCra](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@BraCra](https://discourse.nodered.org/u/BraCra)\
**Post date:** [25 May 2025 18:51 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/7 "2025-05-25T18:51:57Z")

</div>

Thank you! 🙂

---

<div class="post-metadata">

**Author:** ![BraCra](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@BraCra](https://discourse.nodered.org/u/BraCra)\
**Post date:** [25 May 2025 19:35 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/8 "2025-05-25T19:35:28Z")

</div>

however... that's boolean, so only true/false.  
meaning i'd need to translate 1/0 to true/false and back.  
Isn't there a better way in Node?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 May 2025 20:49 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/9 "2025-05-25T20:49:32Z")

</div>

I believe that the boolean ultimate node can handle 1/0. Have you read the readme?

As for Home Assistant, my advise would be to avoid it, at least until you have become familiar with node-red. There is very little that you can do with HA that you cannot do with native node-red, and it will just add complication, which is what you do not want at the moment.

---

<div class="post-metadata">

**Author:** ![BraCra](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@BraCra](https://discourse.nodered.org/u/BraCra)\
**Post date:** [25 May 2025 20:53 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/10 "2025-05-25T20:53:03Z")

</div>

yup, got my way to a workable solution, with switch and changes 😃  
Thanks for the input!

 ![2025-05-25 22_52_03-Window](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/7/a7a655b1fc1c653c9380bcf90e0fc7f3dd05339e.png)

regarding HomAssist, you're right, have to first get the basics running.  
However, it's always good to directly have a goal which you can get running this way

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 May 2025 21:26 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/11 "2025-05-25T21:26:20Z")

</div>

If I were marking your work you would lose marks for using flow context. That is the equivalent of using global variables in your favorite programming language.

The node red way would be to use a Join node.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 July 2025 21:27 UTC](https://discourse.nodered.org/t/flow-for-heating-solution-for-job-interview/97266/12 "2025-07-24T21:27:11Z")

</div>

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