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.
@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.
@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.