Which binding for telephone wifi checking (in Home or Outside)

Which binding will be good for telephone wifi checking (in Home or Outside).
I search good solution for HABPanel.

Network binding and platform dependant arpping.

Have u some link for tutorial?

Works with S7, note 8&9 and iPhone X

After you have arpping and Network binding installed you will need:

Assignment of fixed IP from MAC (setup in you router) or a device static IP outside of DHCP pool.


Group:Switch:OR(ON, OFF) presenceDevices

Switch Phone1  (lanItems, presenceDevices)             { channel = "network:pingdevice:192_168_1_??:online" }
Switch Phone2  (lanItems, presenceDevices)             { channel = "network:pingdevice:192_168_1_??:online" }
Switch Phone3  (lanItems, presenceDevices)             { channel = "network:pingdevice:192_168_1_??:online" }
Switch anyPhonesPresent
Switch PresenceTimer                                   { expire="12m,command=OFF" }   // need expire binding


rule "Phones Present"
    Item presenceDevices changed
    //val name = "PhonesPresent"
    //logInfo(name, "presenceDevices = " + presenceDevices.state) // semicolon is not needed

    if (presenceDevices.state == ON) { // only use === when one of the operands are null
        if (PresenceTimer.state == ON) PresenceTimer.postUpdate(OFF) // Cancel Expire based timer
        if (anyPhonesPresent.state != ON) anyPhonesPresent.sendCommand(ON)
    else {
        //logInfo(name, "Setting timer...")
        PresenceTimer.sendCommand(ON) // schedule/reschedule Expire based timer

// Expire timer expired
rule "Presence Timer"
    Item PresenceTimer received command OFF
    logInfo("PresenceTimer", "To: present")

rule 'anyPhonesPresent'
    Item anyPhonesPresent changed to OFF
    logInfo("presence", "anyPhonesPresent.state=" + anyPhonesPresent.state);
    switch vTimeOfDay.state.toString {
    case "MORNING": { 
        if ((vDayOfWeek.state.toString != "Sunday") && (vDayOfWeek.state.toString != "Saturday")) {
            if (HouseGuests.state != ON) {
       	        logInfo("presence", vTimeOfDay.state.toString + " Week day: No phones detected, all OFF")
                } else {
       	        logInfo("presence", vTimeOfDay.state.toString + " Week day: but house guests. Do nothing")
            } else {
       	    logInfo("presence", vTimeOfDay.state.toString + " Weekend: No phones detected, do nothing")
       	default: {}

[19:47:10] root@openHABianPi:/home/openhabian# /usr/sbin/arping -v
arping: Autodetected interface eth0
This box: Interface: eth0 IP: MAC address: b8:27:eb:17:87:01

But IPhone is Online :frowning: hmm…

If iPhone is on sand by, no ping if i unlocked them , is ok hmm

Note it can take up to 12m before one ARP-PING comes through in StandBy. Hence the 12m timer.
This is from an iPhone X:

Graph is this item:

Switch Phone2  (lanItems, presenceDevices)             { channel = "network:pingdevice:192_168_1_51:online" }

I need only .items and .rules and everything will be working ??

If your arpping is working this is it, but you will need to tune the timeout rule to what you want to happen when no phones are detected. I just call the script ‘allOff’. I don’t have any action for phonesDiscovered, but that should be trivial. Also my timeout rule is complicated with the houseGuest switch, weekDays Mornings only (06.00 - 10.00).

Modify to suit your needs. Start with just the logging in order to verify operation.

Also, in paperUI, verify that the binding picks up your arpping:

You could also fiddle around with the Network-binding timeout which is currently at 60s and try the get the DHCP monitoring going, but a 12m detection is OK for my use. My son is the last one out in the morning, and he usually forgets to hit the allOff button by the door. When we come home, the motion detector is way faster than WiFi detection.