System Alive Checker (Ping)
Introduction
Domoticz have a built in way to ping devices. Check if they are alive or close by on wifi. There are other ways with external scripts running under crontab but this is much easier to set up and already there.
Preconditions
- Nodes should be reachable from domoticz machine over the network.
- Mobile devices should have a static ip setup in your routers dhcp server (otherwise they change ip over time)
- Also most mobile devices don't respond to ping if using too much of battery saving functions.
- You should only use one instance of this hardware
Setup
- Go To Setup -> Hardware
- Add Hardware type: System Alive Checker (Ping), give it some name. For example Ping. push add
- Push Setup button on the new Ping row
- Add your nodes that you would like to ping, give them a name and ipadress
If you have turned off Accept new Hardware Devices.
- Goto Setup -> Settings -> System -> Hardware/Devices
- Push Allow for 5 Minutes
Now your nodes should be visible under devices
- Goto Setup -> Devices
- Add them as usual by pushing the green arrow. And they are now visible on switches page.
Note: The last seen datetime of the device is only modified when the monitored item is switched from status (On/Off)
Non-root permissions on Linux
When running Domoticz without root (recommended), you need to add the correct socket capabilities for this to function properly and restart domoticz (otherwise it will fail silently!):
$ sudo setcap cap_net_raw+eip <full qualified name of domoticz executable eg /home/pi/domoticz/domoticz>
$ sudo setcap -v cap_net_raw+eip <full qualified name of domoticz executable eg /home/pi/domoticz/domoticz>
$ sudo service domoticz stop
$ sudo service domoticz start