Scan your (local) network with your homey. It currently only supports TCP port scans, but this can be done on an IP only basis. I've created this app to detect if my Xbox 360 is turned on, but really most devices can be detected by this app. All it requires is an IP address (and an open port).
It's important to assign your devices a constant IP, either through a DHCP reservation or a static IP.
If you like this app
Lookup for the IP address of the device you want add. Most routers support this on their admin UI's.
Now you have to determine which port you want to add. First install the nmap shell utility.
Mac OSX:
brew install nmap
Linux:
yum install nmap
or apt-get install nmap
or use another package manager.
Windows:
Follow instructions on nmap.org
Now you may scan the IP that you've just looked up. It's 10.0.0.246 in my case, which is my Xbox 360.
Execute nmap -Pn 10.0.0.246
on the shell or command prompt (for windows). I get the following output:
Starting Nmap 6.47 ( http://nmap.org ) at 2016-10-09 12:46 CEST
Nmap scan report for 10.0.0.246
Host is up (0.0027s latency).
Not shown: 999 filtered ports
PORT STATE SERVICE
1025/tcp open NFS-or-IIS
Nmap done: 1 IP address (1 host up) scanned in 6.68 seconds
This shows that the NFS service is running on TCP port 1025. No open port found? No biggie, use the IP driver.
Now that we've got all information present, it's time to add the device.
-
Select the TCP port driver if you have found an open port, select the IP address driver if you have not found an open port.
-
Then fill out the form with the IP address (and TCP port) we've just looked up. Also give it a name.
-
You're done.
The TCP port driver allows to watch a TCP port on a specified IP-address.
- Device came online
- Device went offline
- Device is online
- Device is offline
The IP Address driver can be used to detect a device by ip address. Since ICMP (ping) is prohibited on Homey, I did the next best thing: Scan for closed TCP ports.
- Device came online
- Device went offline
- Device is online
- Device is offline
- Experimental IP only driver added. Only works if the device has closed TCP ports. Ports should not be stealth to have this work.
- Sanity check added. When a device went offline, another check will be performed to ensure it is really offline.
- Also added a sanity check for the conditions.
- Bugfixes.
- Bugfixes.
- Bugfixes.
- Added configurable host check interval and timeout.
- Initial port scan implementation.