
This script uses ping to monitor a device on the network.
To reduce the number of false positives i added a 'cooldown' period.
So if a device goes offline it is not immediately reported back to domoticz, it waits to see if the device comes back online before the cooldown period expires.
This is very useful if you want to use your phone to determine if you are at home. For example, an iPhone is not always connected to the network when it is locked, especially at night it can be "offline" for 45 minutes before it returns on the network. Without the cooldown period domoticz will get a lot of fake reports and it could be switching devices off when your still at home.
Before reporting a change in the online/offline status, the script first checks the current status of the switch in Domoticz. If the switch already has the correct status it won't reset it, this prevents triggering domoticz events for a second time.
You can find the script here : http://www.chopperrob.nl/domoticz/5-rep ... o-domoticz
I hope you like it.