# Multiple raspberry pi dashboard

**URL:** <https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672>\
**Category:** General\
**Created:** [18 July 2018 18:51 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672 "2018-07-18T18:51:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![E.Strobel](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@E.Strobel](https://discourse.nodered.org/u/E.Strobel)\
**Post date:** [18 July 2018 18:52 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/1 "2018-07-18T18:52:00Z")

</div>

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.

---

<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:** [18 July 2018 21:04 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/3 "2018-07-18T21:04:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![E.Strobel](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@E.Strobel](https://discourse.nodered.org/u/E.Strobel)\
**Post date:** [20 July 2018 13:32 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/4 "2018-07-20T13:32:39Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/222f3520f05603a7dcf08a0e2913b0e0d9ed88fc.png)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [20 July 2018 13:38 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/5 "2018-07-20T13:38:22Z")

</div>

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/](http://www.hivemq.com/mqtt-essentials/)

---

<div class="post-metadata">

**Author:** ![E.Strobel](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@E.Strobel](https://discourse.nodered.org/u/E.Strobel)\
**Post date:** [20 July 2018 13:42 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/6 "2018-07-20T13:42:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [20 July 2018 13:52 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/7 "2018-07-20T13:52:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![E.Strobel](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@E.Strobel](https://discourse.nodered.org/u/E.Strobel)\
**Post date:** [20 July 2018 14:01 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/8 "2018-07-20T14:01:20Z")

</div>

> [@ukmoose](#):
>
> 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?

This did not seem to work either.

> [@ukmoose](#):
>
> Also while you a debugging why not use the MQTT wildcards?

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

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [20 July 2018 14:04 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/9 "2018-07-20T14:04:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [20 July 2018 14:05 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/10 "2018-07-20T14:05:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![E.Strobel](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@E.Strobel](https://discourse.nodered.org/u/E.Strobel)\
**Post date:** [20 July 2018 14:23 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/11 "2018-07-20T14:23:11Z")

</div>

> [@ukmoose](#):
>
> Sort out your brokers on the Pis before introducing the PC to the mix

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

```auto
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.

---

<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:** [20 July 2018 14:58 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/12 "2018-07-20T14:58:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![E.Strobel](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@E.Strobel](https://discourse.nodered.org/u/E.Strobel)\
**Post date:** [20 July 2018 15:00 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/13 "2018-07-20T15:00:35Z")

</div>

> [@Colin](#):
>
> 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"

---

<div class="post-metadata">

**Author:** ![E.Strobel](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@E.Strobel](https://discourse.nodered.org/u/E.Strobel)\
**Post date:** [20 July 2018 15:08 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/14 "2018-07-20T15:08:04Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/12ea7f108cb35dbfab5fb4d6107e5d0b1f7a18c1.png)

---

<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:** [20 July 2018 16:10 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/15 "2018-07-20T16:10:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![E.Strobel](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@E.Strobel](https://discourse.nodered.org/u/E.Strobel)\
**Post date:** [20 July 2018 16:47 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/16 "2018-07-20T16:47:22Z")

</div>

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.

---

<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:** [20 July 2018 16:50 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/17 "2018-07-20T16:50:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![E.Strobel](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@E.Strobel](https://discourse.nodered.org/u/E.Strobel)\
**Post date:** [20 July 2018 17:15 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/18 "2018-07-20T17:15:50Z")

</div>

> [@Colin](#):
>
> That is not the way it works. In node-red on the PC configure an MQTT _In_ node connecting to the broker of 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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/2a40d4413290832ee662016957be7cf241e5e6ed.png)

---

<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:** [20 July 2018 17:20 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/19 "2018-07-20T17:20:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![E.Strobel](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@E.Strobel](https://discourse.nodered.org/u/E.Strobel)\
**Post date:** [20 July 2018 17:22 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/20 "2018-07-20T17:22:09Z")

</div>

What do you mean by log?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [20 July 2018 20:40 UTC](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672/21 "2018-07-20T20:40:04Z")

</div>

> [@E.Strobel](#):
>
> 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.

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

[Next page](https://discourse.nodered.org/t/multiple-raspberry-pi-dashboard/1672.md?page=2)
