I have a number of IP cameras that from time to time disconnected from the network, for whatever reasons. I want to know immediately when it has happened.
I'm thinking about running a small program on my Wemos board to keep monitoring the connection status of the, say 3 IP cameras. The Wemos and all 3 cameras are connected to the same wifi router. For the notification part, I can deal with it, but I have no idea how to do the monitoring part.
Thanks.
I guess you can ping the cameras from the Wemos D1. If you don't get a reply, you know something is wrong somewhere. Requirement is that the cameras must have a static IP address so you know which addresses to ping.
The usual way of troubleshooting when e.g. a server or PC is not accessible, is to use ping and traceroute.
Thanks for suggesting the ping function. I'm then able to find a simple example sketch based on ping command here which I can easily tweak from:
simple ping command
For ping, the devices must always have the same IP and you must reprogram for each new device or scan the whole IP range. With MDNS you can make a list and then compare them with a new one.
It's ok for now because those cameras are at the house I seldom stay and add new devices.
I'll look at the MDNS as to how to make the sketch less hard-coded.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.