So, you've read my previous blog post? No? Start at API Testing for IoT and then come back.
So, you've now read my previous blog post. I've updated that UDP query script to return a sorted tree map, so duplicate UDP responses are automatically removed, providing a list of each advertised service, attached here as "ssdp search.tst".
I thought it would probably be a good idea to add a port scanning facility for any device on my LAN. In my usual manner, I adapted some code I found on the Internet, so it can now take some (optional) DevTest properties:
hostToScan = the IP address on your LAN that you want to scan, e.g.: 192.168.1.178
ports = group of ports to scan, e.g.: 8000-9000
protocol = IP protocol to scan, tcp or udp.
Attached here as "portscan.tst"
For Nest, I need two tests, because access token provisioning is a separate process to executing API commands:
More to come as I find more public APIs for the IoT devices I own. My Panasonic phone appears to have zero open TCP ports, and many UDP ports that time out but don't respond, and neither that device nor my SKY+HD receivers have APIs that I've been able to find documentation for.