Connect two Node Red (Raspberry) together

Hi there,

I got two raspberry pi and one needs information from the other.

What's the best way to connect them to each other. Ah, both are in the same network.

What is the most stable connection ... Mqtt? Webhook? Something I don't know?

Just to let you know about my project: I have one raspberry pi with node red which control and shows me the most information my house can show me. In this case I check my photovoltaic overpower and the second raspberry controls by pwm signal an heating system inside the water tank. So I'm able to set the exact watt of overpower into my hot water tank. To control this heater I use a Kemo M240. It works perfekt for my 1500W heater.

Thx in advance.
Felix

If both are in the same network then any method you choose should be stable.
I would recommend MQTT.

1 Like

Mqtt is probably a popular choice in the forum.
It's easy to setup, low overhead and very reliable.

Edit > Snap! @ghayne

1 Like

:slight_smile: "Great Minds"

1 Like

@Flixm although not the question that you asked, but have you considered building in a 'watchdog' in RP 2 to ensure that if RP 1 crashes/goes off-line/etc, then RP 2 will stop the Kemo instead of continuing to act on the most recent received instruction.
I used a very basic solution by using a trigger node (in RP 2), which passed through the incoming messages, then waited for 2 minutes. If a further msg was not received in that time, then the trigger sends a 'OFF' command.

watchdog

@Paul-Reed
Of course I'll do a fallback secured.
I'll do different solutions to stop heating if anything goes wrong.
First a separate temperature switch, then a relay hat that's the main switch for the Kemo and at least a watchdog to check that the signal is present.
And also I do a signal pulldown after 5 second with no new signal.

But thanks for your hint :wink:

1 Like

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