I have been working on a network map that shows the current reachability of my network devices.
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:
{
"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.
Try it if you like
Pending topic to remove the background from the "group" to make it transparent.