it is possible, to make external script executing, only if another device from DB is away(or not).

for example: run script "run-in" from folder "device1" if device2 is away
or maybe execute command from "device1/run-in" script if device2 is away.