# Dynamic Network Map

**URL:** https://discourse.nodered.org/t/dynamic-network-map/25406
**Category:** Share Your Projects
**Created:** [24 April 2020 08:41 UTC](https://discourse.nodered.org/t/dynamic-network-map/25406 "2020-04-24T08:41:20Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [24 April 2020 08:41 UTC](https://discourse.nodered.org/t/dynamic-network-map/25406/1 "2020-04-24T08:41:20Z")

</div>

I have been working on a network map that shows the current reachability of my network devices.

 ![Screenshot 2020-04-24 at 10.14.23](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/6/26aa319bfcf262e43ada457af427ad02fd8a4257.jpeg)

The map is created using d3 (which fortunately is already available in node-red/dashboard).

One inject node describes the complete topology of the network, in basic form:

```auto
{
  "name": "Internet",
  "properties": {
    "type": "ping",
    "reachable": false,
    "ip": "google.com"
  },
  "children": [
    {
      "name": "router",
      "properties": {
        "type": "ping",
        "reachable": false,
        "ip": "192.168.1.1"
      }
    }
  ]
}

```

Default all devices should be set to false and it is injected as global object upon deploy, after which the flow will ping all the `ip`'s it find in the topology, once every 30 seconds and updates the map. Using a http endpoint the global object will be retrieved in the map (will need some additional d3 work to only update the nodes instead of a refresh)

The topology can have many levels of depth.

The 'type' describes the type of check that will be done when a node is clicked. Currently, either ping or tasmota.  
When the node is clicked, it will execute either a ping for 4 times and outputs the rtt/packetloss.

If it is tasmota, it will get the `status 0` command from the tasmota device via http (note; if user/pass is used on tasmota device, the flow will need modifications), it will display the uptime/version/ssid/RSSI, can ofcourse all be customized. The ip address can be clicked to go to the device in a new tab/window.

 ![flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/db4c3e2d2b6465e4f537f78065403335b82084e5.jpeg)

Try it if you like 🙂

> [Pending topic](https://discourse.nodered.org/t/transparent-background-on-md-card-in-template-node/25384/2) to remove the background from the "group" to make it transparent.

> [Flow](https://flows.nodered.org/flow/4b940430b92142571c670050f4d98f6d)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [24 April 2020 09:20 UTC](https://discourse.nodered.org/t/dynamic-network-map/25406/2 "2020-04-24T09:20:08Z")

</div>

Hi Backman, looks very interesting.

I tried but alas it doesnt work on windows (ping format & grep are two immediate issues).

question: why use a cmd for pinging and not the PING node?

Perhaps a flag (indicating OS) could be employed?

Then if set for if windows, use a pipe and `FINDSTR` instead of grep?

(of course I am assuming something - you may rightly not give a monkeys about windoze 😉 )

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [24 April 2020 09:30 UTC](https://discourse.nodered.org/t/dynamic-network-map/25406/3 "2020-04-24T09:30:40Z")

</div>

> question: why use a cmd for pinging and not the PING node?

Because it requires a node that is not included out of the box.

> I tried but alas it doesnt work on windows

I will make a note that it is linux only and modify it to your liking 😉

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [24 April 2020 09:44 UTC](https://discourse.nodered.org/t/dynamic-network-map/25406/4 "2020-04-24T09:44:43Z")

</div>

> [@bakman2](#):
>
> Because it requires a node that is not included out of the box.

Then i guess we need to convince Dave & Nick to put the ping node in the default install 🙂 (it is maintained by Dave in the node-red repo after all)

> [@bakman2](#):
>
> I will make a note that it is linux only and modify it to your liking

Umm that would be counter productive since my "liking" is to support windows too 🙂

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [24 April 2020 09:48 UTC](https://discourse.nodered.org/t/dynamic-network-map/25406/5 "2020-04-24T09:48:37Z")

</div>

it is already in the Pi default install...(due to history) - just not the generic default install as well... meh...

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [24 April 2020 09:50 UTC](https://discourse.nodered.org/t/dynamic-network-map/25406/6 "2020-04-24T09:50:48Z")

</div>

Slip it in to the default install Dave (ping is pretty much ubiquitous) 🤞

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [24 April 2020 10:02 UTC](https://discourse.nodered.org/t/dynamic-network-map/25406/7 "2020-04-24T10:02:06Z")

</div>

only if you play with networks

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [23 June 2020 08:41 UTC](https://discourse.nodered.org/t/dynamic-network-map/25406/8 "2020-06-23T08:41:21Z")

</div>

This topic was automatically closed after 60 days. New replies are no longer allowed.
