Track other devices on wifi network

420

Active member
Maybe i will sound stupid asking this but is there a way to have macrodroid track which other devices are connected to the same wifi network?

If it is possible i would like to use this to track who is at home or not, i think it would be easier and more reliable then having each phone call a seperate webhook on my "home hub" when they arrive or leave home.
 

dsnz

Well-known member
it's possible probably using shell script but it's better to use a dedicated app for this
any network app with "Lan Scan" capability (eg. Net Analyzer, PortDroid)
 

tanutanu

Well-known member
Maybe i will sound stupid asking this but is there a way to have macrodroid track which other devices are connected to the same wifi network?

If it is possible i would like to use this to track who is at home or not, i think it would be easier and more reliable then having each phone call a seperate webhook on my "home hub" when they arrive or leave home.
I recommend you to use Fing or something as well, if I do it by MD macro...

A: Scan my home router's web console. It has summary of current connecting devices.

B: Send ping to broadcast address and collect each response. Once I got a device list, then check them dead or alive in a specific cycle. It is almost same thing as using apps for the purpose and less reliable...
 

tanutanu

Well-known member
How do you do this
Shell script and text manipulation on MD.
I got a response iike this. So, store them array-ish variable with unique checking.

:/ $ ping -b -c 2 192.168.1.255 WARNING: pinging broadcast address PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data. 64 bytes from 192.168.1.47: icmp_seq=1 ttl=64 time=2.80 ms 64 bytes from 192.168.1.62: icmp_seq=1 ttl=64 time=33.9 ms (DUP!) 64 bytes from 192.168.1.60: icmp_seq=1 ttl=64 time=34.0 ms (DUP!) 64 bytes from 192.168.1.63: icmp_seq=1 ttl=64 time=34.0 ms (DUP!) 64 bytes from 192.168.1.78: icmp_seq=1 ttl=64 time=34.7 ms (DUP!) 64 bytes from 192.168.1.62: icmp_seq=2 ttl=64 time=5.32 ms --- 192.168.1.255 ping statistics --- 2 packets transmitted, 2 received, +4 duplicates, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 2.808/24.164/34.758/14.231 ms :/ $
 

dsnz

Well-known member
I recommend you to use Fing or something as well, if I do it by MD macro...

A: Scan my home router's web console. It has summary of current connecting devices.

B: Send ping to broadcast address and collect each response. Once I got a device list, then check them dead or alive in a specific cycle. It is almost same thing as using apps for the purpose and less reliable...

⚠️ Fing collects a lot of data and sends it outside your home 😂

it's well known and written in terms of service
 

tanutanu

Well-known member
⚠️ Fing collects a lot of data and sends it outside your home 😂

it's well known and written in terms of service
Thank for mentioning me.
So, how much important do your devices mac address, Mr. VIP?
And how do you know I leave my home network so weak? I don't believe any network segment and devices on my network even though it's my own;)
 

420

Active member
it's possible probably using shell script but it's better to use a dedicated app for this
any network app with "Lan Scan" capability (eg. Net Analyzer, PortDroid)
These apps do indeed show the other devices on my wifi network but how would i then get that data into macrodroid?

Also they seem to only have an option to scan when you manually press the "scan" button, but i would like it to scan continuously..

I don't see an option for either of these apps to send notifications when a device connects/disconnects, i was hoping that was a thing.. ☹️

Another question, if these "random" apps can see the other devices on my network without me giving them any permissions, then why can macrodroid not do the same thing?
 

420

Active member
I recommend you to use Fing or something as well, if I do it by MD macro...

A: Scan my home router's web console. It has summary of current connecting devices.

B: Send ping to broadcast address and collect each response. Once I got a device list, then check them dead or alive in a specific cycle. It is almost same thing as using apps for the purpose and less reliable...
How exactly are you doing A? I assumed you meant using HTTP GET to get the content of the router webpage but i'm getting an error about HandshakeException - Trust anchor for certification path not found.
 

tanutanu

Well-known member
How exactly are you doing A? I assumed you meant using HTTP GET to get the content of the router webpage but i'm getting an error about HandshakeException - Trust anchor for certification path not found.
Exactly.
And it is considerable to get the info via ssh or snmp as well.

Probably you encountered the same problem.
 

420

Active member
Exactly.
And it is considerable to get the info via ssh or snmp as well.

Probably you encountered the same problem.
Hmm.. i tried it as described in that thread (using Http shortcuts app and have it accept any certificate) but this gives a different message;

your modem interface can not be displayed correctly because either your browser does not support scripts or there is some browser add-on blocking them, for the correct operation of the interface please check if your browser supports scripts, if the browser is blocking the execution of scripts or if one of the add ons installed in your browser is blocking this page to run scripts.

So this doesn't seem to work (i don't think i have any add-ons), and even if it worked then i don't see a way to have it return the data to macrodroid..
 

tanutanu

Well-known member
Hmm.. i tried it as described in that thread (using Http shortcuts app and have it accept any certificate) but this gives a different message;

your modem interface can not be displayed correctly because either your browser does not support scripts or there is some browser add-on blocking them, for the correct operation of the interface please check if your browser supports scripts, if the browser is blocking the execution of scripts or if one of the add ons installed in your browser is blocking this page to run scripts.

So this doesn't seem to work (i don't think i have any add-ons), and even if it worked then i don't see a way to have it return the data to macrodroid..
Well, I'm using ASUS as my home router, so I'm not sure about Netgear router. Some switch have ssh and/or snmp feature though. My L2 smart switch collect MAC addresses and DHCPv6 neighbor info as well, so I could get similar info from it.

Umm... I don't use but Autotools plum seems to have some useful feature for networking.
 

420

Active member
Well, I'm using ASUS as my home router, so I'm not sure about Netgear router. Some switch have ssh and/or snmp feature though. My L2 smart switch collect MAC addresses and DHCPv6 neighbor info as well, so I could get similar info from it.

Umm... I don't use but Autotools plum seems to have some useful feature for networking.
My home router is a "KPN box 12" not a netgear router. (i tried to find a way to have it send push notifications as i mentioned in #11, but i was not able to find anything, so i think my (pretty basic) router sadly doesn't support that either)

Thanks for the Autotools tip, i've already tried it (the SSH action) and it wasn't working.. it wanted a username and password and i had no idea which one.. maybe i should take another look at it!
 

tanutanu

Well-known member
My home router is a "KPN box 12" not a netgear router. (i tried to find a way to have it send push notifications as i mentioned in #11, but i was not able to find anything, so i think my (pretty basic) router sadly doesn't support that either)

Thanks for the Autotools tip, i've already tried it (the SSH action) and it wasn't working.. it wanted a username and password and i had no idea which one.. maybe i should take another look at it!
hahaha, the Reddit article title you quoted is misleading;)
 
  • Haha
Reactions: 420

420

Active member
I just seen this thread and it has given me an idea.. i could probably just use my "home hub" as a hotspot and connect everything else to that, not sure about the internet speed but i will try it out tomorrow and see what it's like..

 

tanutanu

Well-known member
I just seen this thread and it has given me an idea.. i could probably just use my "home hub" as a hotspot and connect everything else to that, not sure about the internet speed but i will try it out tomorrow and see what it's like..

While googling for the other thing, I reached another approach. You can use the port scanner named Nmap via Termux.
I had an idea to use similar port scan app named Knock on port, but it seemed to support single host a time only, it is working as plugin though.
Nmap seems to have ability to reach all host in a network segment with -A and -sP option. I didn't test it yet but it looks nice.
 
  • Like
Reactions: 420

420

Active member
While googling for the other thing, I reached another approach. You can use the port scanner named Nmap via Termux.
I had an idea to use similar port scan app named Knock on port, but it seemed to support single host a time only, it is working as plugin though.
Nmap seems to have ability to reach all host in a network segment with -A and -sP option. I didn't test it yet but it looks nice.
I will see if i can look into this but i think i've been taking on to many projects, i don't have enough time to do them all :ROFLMAO:, and now i have to become a hacker on top of it.. :ROFLMAO:
 

tanutanu

Well-known member
You've already got ADB hacks:oops:
No problem, you are a wizard;)

Anyway, It's just an FYI.
I will try after building up new backup solution, when I have enough time:)
 
  • Like
Reactions: 420
Top