# How to watch devices availability in a network

**URL:** <https://discourse.nodered.org/t/how-to-watch-devices-availability-in-a-network/7799>\
**Category:** Share Your Projects\
**Created:** [10 February 2019 11:20 UTC](https://discourse.nodered.org/t/how-to-watch-devices-availability-in-a-network/7799 "2019-02-10T11:20:51Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![scotie](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scotie/32/5981_2.png) [@scotie](https://discourse.nodered.org/u/scotie)\
**Post date:** [25 February 2019 04:49 UTC](https://discourse.nodered.org/t/how-to-watch-devices-availability-in-a-network/7799/21 "2019-02-25T04:49:35Z")

</div>

Here is another solution, but that depends on your router.

Mine supports it, so I just poll it every half a minute or so to get a list of all the MAC addresses and parse it to check if my or my wife's phones are connected.

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [25 February 2019 13:33 UTC](https://discourse.nodered.org/t/how-to-watch-devices-availability-in-a-network/7799/22 "2019-02-25T13:33:01Z")

</div>

@darabontors At this point we're at the evaluation and bidding stage (my prototyping was more an exercise to gauge what could be done in house as a negotiation tool for dealing with established vendors,) so unfortunately I can't disclose any real details as of yet. Once we're up and running, though, I hope to do some tinkering in NR to extend functionality, so hopefully I'll have something to show off here in a year or so.

---

<div class="post-metadata">

**Author:** ![darabontors](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@darabontors](https://discourse.nodered.org/u/darabontors)\
**Post date:** [25 February 2019 20:33 UTC](https://discourse.nodered.org/t/how-to-watch-devices-availability-in-a-network/7799/23 "2019-02-25T20:33:44Z")

</div>

OK. Thanks. Please let me know when you have some details.  
Best wishes,  
Örs

---

<div class="post-metadata">

**Author:** ![dclear](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dclear/32/9107_2.png) [@dclear](https://discourse.nodered.org/u/dclear)\
**Post date:** [9 June 2020 09:59 UTC](https://discourse.nodered.org/t/how-to-watch-devices-availability-in-a-network/7799/24 "2020-06-09T09:59:23Z")

</div>

I've been using [this](https://gist.github.com/vaibhavarduino/ed47511832dfd79d6bf416f6a8a056da) - but for some reason whilst the flow works beautifully the UI stubbornly won't show the LED array only the gauges showing latency. Anyone got any time to try it out?  
Cheers

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [9 June 2020 11:28 UTC](https://discourse.nodered.org/t/how-to-watch-devices-availability-in-a-network/7799/25 "2020-06-09T11:28:40Z")

</div>

It looks like you posted this question to the author of that flow and he responded.

---

<div class="post-metadata">

**Author:** ![Maximus1](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@Maximus1](https://discourse.nodered.org/u/Maximus1)\
**Post date:** [15 June 2020 22:08 UTC](https://discourse.nodered.org/t/how-to-watch-devices-availability-in-a-network/7799/26 "2020-06-15T22:08:38Z")

</div>

i´m using :

```auto
[{"id":"a91813f7.16fba","type":"inject","z":"7c23461f.a9ac38","name":"","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":500,"wires":[["f7308882.007ac8"]]},{"id":"f7308882.007ac8","type":"exec","z":"7c23461f.a9ac38","command":"sudo nmap -sn 192.168.178.0/24 | awk '/Nmap scan report for/{printf $5;}/MAC Address:/{print \"|\"substr($0, index($0,$3)) }' | sort","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"scan subnet","x":330,"y":500,"wires":[["16b4ae92.2180e1"],[],[]]},{"id":"16b4ae92.2180e1","type":"function","z":"7c23461f.a9ac38","name":"Subnet Devices Array","func":"let response = msg.payload.split('\\n');\nlet found = []\nlet device\nresponse.forEach ( line => {\n if ( line.indexOf('|') > -1 ){\n device = {\n IP : line.split('|')[0],\n MAC: line.split('|')[1].split(' ')[0],\n }\n found.push ( device )\n }\n})\nmsg.payload = found;\nreturn msg;","outputs":1,"noerr":0,"x":560,"y":500,"wires":[["f8515636.9f59e8"]]},{"id":"38eb79b3.a57346","type":"debug","z":"7c23461f.a9ac38","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":500,"wires":[]},{"id":"f8515636.9f59e8","type":"ui_template","z":"7c23461f.a9ac38","group":"126ec89.5132637","name":"Im Netzwerk vorhandene Geräte","order":1,"width":10,"height":12,"format":"<table id=\"table\" border=\"1\">\n <tr>\n <th>IP</th> \n <th>MAC</th>\n </tr>\n <tbody>\n <tr ng-repeat=\"row in msg.payload\">\n <td ng-repeat=\"item in row\" >{{item}}</td>\n </tr>\n </tbody>\n</table>\n\n","storeOutMessages":false,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":840,"y":500,"wires":[["38eb79b3.a57346"]]},{"id":"126ec89.5132637","type":"ui_group","z":"","name":"Netzwerkgeräte","tab":"f51efc73.89572","order":1,"disp":true,"width":10,"collapse":true},{"id":"f51efc73.89572","type":"ui_tab","z":"","name":"Geräte","icon":"fa-television","order":2,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [16 June 2020 00:56 UTC](https://discourse.nodered.org/t/how-to-watch-devices-availability-in-a-network/7799/27 "2020-06-16T00:56:20Z")

</div>

I don't know why as I already have a system working.

But I'm curious.

I'm not getting how the flow works from that screen shot.

Could you indulge me with the code? (BTW, I don't have DSM installed yet.)  
Or explain what the two "yellow" nodes are/do?  
And how you configure the `DSM`......?  
It can't just "out of the box" understand what is happening - can it?

[Previous page](https://discourse.nodered.org/t/how-to-watch-devices-availability-in-a-network/7799.md?page=1)
