[SOLVED] Iphone presence issue WIFI

Something wrong in the rule:

I got this log:

2018-06-21 18:26:02.944 [INFO ] [.eclipse.smarthome.model.script.RULE] - Iphone_Sw received command ON. Counter reset to 0

==> /var/log/openhab2/events.log <==

2018-06-21 18:27:01.379 [vent.ItemStateChangedEvent] - Iphone changed from Phone 192.168.2.104 is not present to Phone 192.168.2.104 is detected!

2018-06-21 18:27:01.393 [ome.event.ItemCommandEvent] - Item 'Iphone_Sw' received command ON

==> /var/log/openhab2/openhab.log <==

2018-06-21 18:27:01.396 [INFO ] [.eclipse.smarthome.model.script.RULE] - Iphone_Sw received command ON. Counter reset to 0

==> /var/log/openhab2/events.log <==

2018-06-21 18:28:01.379 [vent.ItemStateChangedEvent] - Iphone changed from Phone 192.168.2.104 is detected! to Phone 192.168.2.104 is not present

==> /var/log/openhab2/openhab.log <==

2018-06-21 18:28:01.396 [INFO ] [.eclipse.smarthome.model.script.RULE] - Iphone_Sw received command ON. Counter reset to 0

==> /var/log/openhab2/events.log <==

2018-06-21 18:28:01.397 [ome.event.ItemCommandEvent] - Item 'Iphone_Sw' received command ON

That script’s output is either

  • Phone $i is detected!
  • Phone $i is not present

where $i is presumably the device being searched for. You cannot pass these strings to a Switch Item. A Switch Item can only receive ON or OFF as commands or updates.

1 Like

Great, Thank you. I got it. It seems now is working. I am testing…