Multiple raspberry pi dashboard

I have three raspberry pi's, all of which have their own dashboard. Node red is installed on each individual pi, but is it possible to have one dashboard which shows the data from all three raspberry pi's? All are on the same network.

Send the data to one or more mqtt servers (either one per pi or send it to a central server, I prefer one per pi), then you can have node red running on another machine with a dashboard showing data from all the Pis by subscribing to topics on the mqtt servers.

2 Likes

I have an mqtt server running on all of the pi's. I am using node-red on my computer to serve as the main hub where my dashboard will be, but do I need an MQTT server running on my pc as well. If so where do I install? I have tried connecting to the MQTT server on the pi from my computer but it failed.

Node-red on Pi and on pc:
image

No on the PC you subscribe to the MQTT broker running in the pi(s).

There’s a great intro to MQTT here http://www.hivemq.com/mqtt-essentials/

Ok, then I guess my next question is what is preventing the connection? Both are on the same server, with the same topic, and the same security credentials. I am able to see the data coming in from the pi with the debug node on the pi, but it is not being forwarded to my pc.

OK let’s start by getting the terminology right.
With MQTT you publish to the broker and clients subscribe to the broker. (Its well worth reading the tutorials)

So as you appear to have multiple Pi’s each running a MQTT broker, why not see if you can subscribe to a topic on pi1 from pi2?
If you can do that I would then look at your firewall rules on your PC. Also while you a debugging why not use the MQTT wildcards?

This did not seem to work either.

Wouldn't this just display all of the data coming in?

  1. OK so you’ve got more problems, Sort out your brokers on the Pis before introducing the PC to the mix

  2. Yes, but if you are trying to get it to work, it removes the issues of typos in the topic names.

So what broker did you install on the Pis?

I’d start by reading the tutorials to sense-check your current setup

When I subscribe to emon/# base topic to view all messages I get this:

emon/emonpi/power1 37
emon/emonpi/power2 0
emon/emonpi/power1pluspower2 37
emon/emonpi/vrms 230
emon/emonpi/t1 0
emon/emonpi/t2 0
emon/emonpi/t3 0
emon/emonpi/t4 0
emon/emonpi/t5 0
emon/emonpi/t6 0
emon/emonpi/pulsecount 0

This to me says that there is no issue with the broker, but I could be wrong. The broker is mosquitto.

You have to use an MQTT In node on the PC. If you are already doing that does it show connected in node red (on the PC).

I am using an input node, but it says "disconnected"

Below is my flow. The goal is to remove the FRED nodes because connecting to the cloud is not necessary right now.

That is an MQTT Out node that is showing disconnected.
Is that running on the PC?

I am trying to connect the out node labeled "2MAIN" to the input node on the pc. The flow above is that on the pi.

That is not the way it works. In node-red on the PC configure an MQTT In node connecting to the broker on the pi.

Sorry if I was unclear, but I believe this is what I already have. Below is all I have on the pc so far. The server I connect to is the IP on the pi. Would this be the issue?
image

What do you see in the node-red log on the PC?

What do you mean by log?

By which you mean you a publishing a topic to the broker and that on the PC the MQTT-IN node is set to subscribe to that topic