and the sitemap file:
sitemap ossy label=“Menu Presence”
{
Frame label=“Groupe Ossy” {
Text item=CurrentDate
Text item=MOB001
Text item=MOB002
Text item=MOB003
}
}
It still don’t update, but I have new entrys in the logfile:
…
2016-01-30 20:32:31.617 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
2016-01-30 20:32:31.883 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been started
2016-01-30 20:32:31.894 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been started
2016-01-30 20:32:31.895 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been shut down
2016-01-30 20:32:31.905 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been started
2016-01-30 20:32:31.906 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been shut down
2016-01-30 20:32:32.084 [INFO ] [b.core.service.AbstractActiveService] - HTTP Refresh Service has been started
2016-01-30 20:32:32.885 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been shut down
…
EXEC is installed. Do I need the create a cfg file?
I had this working, but now my iphone is repeatedly switching from ‘home’ to ‘nothome’ at nearly every refresh interval of the item config. Its been connected to wifi the entire time. Any thoughts?
Here is the relevant log portion, 1st showing home
2016-01-30 18:53:40.803 [DEBUG] [.o.b.exec.internal.ExecBinding] - item ‘chris_phone’ is about to be refreshed now
2016-01-30 18:53:40.804 [DEBUG] [.o.b.exec.internal.ExecBinding] - executed commandLine 'sudo /home/chris/iphonedetect.sh’
2016-01-30 18:53:41.057 [DEBUG] [.o.b.exec.internal.ExecBinding] - exit code ‘0’, result 'home’
2016-01-30 18:53:41.057 [DEBUG] [i.s.RegExTransformationService] - about to transform ‘home’ by the function '(.*?)'
2016-01-30 18:53:41.057 [DEBUG] [.o.b.exec.internal.ExecBinding] - transformed response is ‘home’
2nd showing away
2016-01-30 18:54:01.219 [DEBUG] [.o.b.exec.internal.ExecBinding] - item ‘chris_phone’ is about to be refreshed now
2016-01-30 18:54:01.220 [DEBUG] [.o.b.exec.internal.ExecBinding] - executed commandLine 'sudo /home/chris/iphonedetect.sh’
2016-01-30 18:54:01.523 [DEBUG] [.o.b.exec.internal.ExecBinding] - exit code ‘0’, result 'nothome’
2016-01-30 18:54:01.524 [DEBUG] [i.s.RegExTransformationService] - about to transform ‘nothome’ by the function '(.*?)'
2016-01-30 18:54:01.524 [DEBUG] [.o.b.exec.internal.ExecBinding] - transformed response is ‘nothome’
It looks like it’s working fine. It just says you’re not home (which I assume you are). Are you sure your ip and MAC address are correct in the script? Are you sure your wifi and Bluetooth are on?
Yeah, its running at the correct interval and everything but is switching back and forth between home and nothome. The wifi has been connected the entire time, bluetooth is on but not really connected to anything (probably shouldn’t matter for this anyway). I have triple checked the mac and ip addresses and they are both correct in the .sh file.
Sometimes thats the best answer…In this case it was partly correct. A reboot stopped the phone from going back and forth as away and home but about 12 hours later it started doing it again after actually returning from being gone. Any other thoughts?
Hi,
I had the same problem with my iphone 4s. It only changed when I enabled the phone to synchronise via wifi using i-tunes.
Maybe that helps?
However, in the end I changed to Geofency via vpn-on-demand installed on my iphone. See post
Thanks, I have tried the geofency app with some custom php scripts on one of my public web servers and I am pretty reliably getting home/nothome notifications. Actually works better than using the arp and ip scan on wifi. Will continue to see how things go.
I’ve tried to integrate this to my OH1 Installation (@Extrabannies solution). In principal it works, but I still have one question.
For testing, I executed the script via bash. Result was correct with “anwesend” / “on” (or whatever echo command will be defined) when my iPhone has Wifi turned on. So far, so good. When I turn Wifi off though, the result of the script doesn’t switch to abwesend/off immediately. When I execute the script a dozen times, the first results are always “anwesend” (wifi is off!). It seems to take some time until it switches to “abwesend”. Then it stays correctly at “abwesend”.
When I test the other direction (wifi off -> wifi on), the script immediately changes to “anwesend”, without any delay.
i´ve the same behavior. In my case it´s the arp cache.
(wifi off -> wifi on), immediately changes to “anwesend”, no delay.
(wifi on -> wifi off), takes about 1-2 minutes to realise that it´s “abwesend”
If i clear the arp cache directly after (wifi on -> wifi off) itimmediately changes to “abwesend”, no delay
best regards
#!/bin/bash
declare -a DEVICES
sudo ip neigh flush 192.168.x.x
sudo /usr/sbin/hping3 -2 -c 10 -p 5353 -i u1 192.168.x.x -q >/dev/null 2>&1
DEVICES=/usr/sbin/arp -an | awk '{print $4}'
CHECK=“78:xx:xx:xx:xx:xx”
if [[ ${DEVICES[*]} =~ $CHECK ]]
then
echo “Anwesend”
else
echo “Abwesend”
fi
Its the “sudo ip neigh flush 192.168.x.x”, you can also use “sudo ip neigh flush all” or “sudo ip neigh flush eth0”
I prefer the first one, because it flushes only the entry with the defined IP Address.