Multi Raspberry Pi and Node Red

629 views
Skip to first unread message

Mike Arney

unread,
Dec 8, 2017, 11:17:02 AM12/8/17
to Node-RED
Is it possible to show flows or UIs on NodeRed from another Raspberry Pi?
Example:

Main RPi:
IP = 10.0.0.2
2 Flows


Remote RPi:
IP = 10.0.0.7
1 Flow

Combine flow from Remote RPi and Main RPi to one UI hosted on the Main RPi.

Thanks,
Mike

Stephen Mann

unread,
Dec 8, 2017, 11:27:37 AM12/8/17
to Node-RED
I don't think so, but why would you want Node-Red running on two Pi's?
I do sometimes fire up Node-Red on another Pi to test flows found on the forums.  This way if I trash my flows because of missing nodes, it's no big deal.
When I have a node in my test Pi that I want in my main Pi, I just export it to the clipboard then import it into my Primary Node-Red.

Steve Mann (Complete Novice)

Colin Law

unread,
Dec 8, 2017, 11:29:40 AM12/8/17
to node...@googlegroups.com
I achieve this by running an MQTT server (mosquitto) on each pi, then
data generated by pi_A for display is published to the MQTT server on
pi_A, similarly for pi_B, C etc. Then you can run the same UI flows on
multiple node red instances on any pi or a PC or whatever by accessing
the data via mqtt. Similarly switches and other controls output to
mqtt then these are seen by the control flow in the appropriate
server. You can even combine data and controls from multiple pis onto
one dashboard. This completely detaches the displays from the control
which can make the whole system much easier to manage.

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/8e6c60a7-9b6b-4123-8dc0-12b3e1893e78%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Colin Law

unread,
Dec 8, 2017, 11:34:12 AM12/8/17
to node...@googlegroups.com
A reason for running node-red on multiple servers is to increase the
reliability of the system. For example I have a pi that controls the
environment in a greenhouse and another that controls the heating
system in the house. Both are attached by wifi to a hub. If the wifi
goes down the heating keeps working and the greenhouse control
continues. I may not be able to see the data on my PC but at least
the critical parts of the system keep working.

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/c76668e5-fd16-43b6-ab47-724697a09d0e%40googlegroups.com.

Stephen Mann

unread,
Dec 8, 2017, 12:10:26 PM12/8/17
to Node-RED
Well, there you go again, making sense.
I hadn't thought of the reliability angle since my WiFi is remarkably reliable.

Thanks for the example.

Steve Mann

Colin Law

unread,
Dec 8, 2017, 1:04:26 PM12/8/17
to node...@googlegroups.com
My greenhouse is on the WiFi range limit. Heavy rain can block it.

To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

wku...@gmail.com

unread,
Dec 8, 2017, 1:08:13 PM12/8/17
to Node-RED

I'd added a third Pi to the mix that is wired Ethernet to the hub/router/WiFi  that runs a node-red flow  which monitors the WiFi connections to the remotes and sends an Email if they are down and uses MQTT to verify that the remote flows are running and notifies me if they are not.
This has worked well.

But then you had to post that thread about node-red on Android with Termux, so I had to go out and buy a cheap Android phone and move my monitoring flow to it.  What this "buys" me is in addition to the previously mentioned monitoring I can now monitor that the WiFi itself is up along with my Internet connection (which would kill Email notifications) and send SMS messages as notifications my wife and my cell phones if any of the above has failed.  I use the "cheap" Ting "pay as you go" service and my average bill is <$9/month because it rarely sends real messages since basically these systems are more reliable than the power company..  I have UPSes that keep the whole shebang going for an hour or so and do send a message when the AC mains go down (and come back up if its before the UPS batteries run out).

I tried to use the "free" Freedom POP service but their messaging app doesn't integrate into Android SMS manager that termux uses so texts ended up in the default Android Messanger app and never get sent.

Colin Law

unread,
Dec 8, 2017, 1:29:19 PM12/8/17
to node...@googlegroups.com
On 8 December 2017 at 18:08, <wku...@gmail.com> wrote:
> ..
> But then you had to post that thread about node-red on Android with Termux,

It wasn't me actually.

Colin

wku...@gmail.com

unread,
Dec 8, 2017, 3:45:48 PM12/8/17
to Node-RED
Sorry I got confused, it was Dave C-J.
This is the thread:

It was an eye opener for me.  I had been using an Adafruit Fona "cellular modem" programmed in C to send SMS messages, it worked but its a 2G device and 2G was going away -- I was getting a lot of "no Cellular signal" notifications from my code.  They now have a 3G model, but redoing the C-code was not attractive at the moment and in a few years 3G will likely be in the same boat being phased out for something "better" yet incompatible.  Took about an hour to get the basic node-red flow running for my monitoring and notifications.  I've got some single point failure dependencies, but quick notifications via SMS really limits their impact.

WiFi is pretty reliable, but we get a lot of thunderstorms here which cause weird issues that do things like make the WiFi "work" but not route to the larger Internet, etc. that are only fixed by rebooting the router.

A friend is up against the WiFi range limits, he is off-grid but has solar AC power distributed to all his buildings (backed up by an out-building full of batteries and a diesel generator) . I've dusted off a couple of old Wireless G routers and connected them as a "bridge" via a power-line Ethernet adapter pair.  I tested it in my Garage, where I get no WiFi, and I was getting 5-20 Mbps on a 48 Mpbs connection using speedtest.net in a web browser.  Speeds were very sensitive to which AC outlets I had the adapters plugged into.  His off grid wiring should be "cleaner".  He distributes single phase 120VAC with a few step-up transformers for where he needs 240 VAC

mm

unread,
Dec 9, 2017, 1:14:17 PM12/9/17
to Node-RED
Wouldn't running node-red on Docker solve your problem?
Reply all
Reply to author
Forward
0 new messages