I love my thing “pingable network device” I have created twice (one for my handy and one for my girlfriend). → If both are not pingable over 2min All lights go off.
(want to extend avilability later with BLE, but lets stay in WLAN for now)
All my Wireless Network is seperated in VLANs, so I know for sure if a MQTT device, A Guest or a WellKnown device in logged in…
In this case I want to avoid that RULE above will shut of light, when guest are in my houes while I went to car;)
So how can I realise follwing:
Scan reguallry for new devices in 192.168.3.*
Set them on a list for regulary ping (2min same as well known devices) and remove from list, if ping unsucccesssfull.
→ rule from above only if that List ist empty.
Easiest would be if the binding I allready use would support a range of IPs instead of a single one.
For now I guess I need a alternative Script doint that. Does anyone have an example for me?
Unfortunately this feature isn’t available natively in openHAB or the network binding.
However, as you have VLANs it sounds like you’ve got some better-than-ISP network hardware. I have a simple Unifi WiFi access point, and with a guest SSID I can detect whether devices are connected to the G guest SSID or not, and can act accordingly in openHAB. But the detection runs outside of openHAB I’m afraid, using external scripts.
put the complete logic in a shell script which is scheduled to be executed by a linux cronjob and then turn a switch on/off via REST API call
or
use the executeCommandLine action or the exec-binding which is triggered true a OH cron timer to run a shell script; this again either can turn on/off a switch or set an item to the return value of the shell that was executed