hm_pdetect
hm_pdetect copied to clipboard
Status 'away' jumps to 'present' after prox. 30 seconds
Hello, first: thank you for providing this nice skript! second: I wanted to use the hm_pdetect just to check the status and then just go on with a self-made python-skript to trigger some servos (so no CCU or anything used or installed). It works well in generel, but sometimes it just doesn't show the right status. Most of the time when I turn my Iphone 6 into Flightmodus" it says 'away' but turns on 'present' again after about half a minute. Turning off my phone doesn't change anything sometimes. Also the number of detected devices is not correct - it shows 2 more. Is this problem connected to the CCU-stuff - meaning, can this only work this CCU-Firmware installed? Or is this a known problem for Iphone? Thank you for helping me! PS: I just want to turn the heater on with a servo, which is controlled by a python skript, which reads the status out of the "HM_PROCESSLOG_FILE" and then does some actions. So I get a bunch of Error warnings running "hm_pdetect" but between them I can see the presence status.
I confirm that after updating my Fritzbox 7360 to the latest firmware 6.50. Presence changes to "away" correctly but with the next query it's reset to "present" no matter if the mobile is connected to the WiFi. With an older firmware version I had no issues. Please let me know if I can help fixing this issue.
Ok, nice to know, that I'm not the only one. I think you can't do anything about it, when its a Fritzbox-Problem. But if you have news regarding this topic maybe you could inform me here. Now my experience is, that sometimes status jumps directly to "away" then comes back to "present" but after about 9 minutes it stays on the right status "away" until the device is checking in again. But thanks for your work again!!!!
Just fyi because it's been a while since the last update: We are using a Fritz!Box 7490 running OS 6.60 and two 1750E repeaters running OS 6.51. We do not observe the issue. Abscence is detected approx. 10min after disconnecting from WiFi and presence is detected almost instantly upon return. The devices used for presence detection are an iPhone 5s and an iPhone 6s.
Hey thanks a lot. Yeah, same here. It seems stable now. Just a littlebit annoying that it takes so long to display the absence. I told the producer of fritzbox and they will look at it for the next update.
Moritz Pickhardt
Am 18.01.2017 um 15:08 schrieb jewesta [email protected]:
Just fyi because it's been a while since the last update: We are using a Fritz!Box 7490 running OS 6.60 and two 1750E repeaters running OS 6.51. We do not observe the issue. Abscence is detected approx. 10min after disconnecting from WiFi and presence is detected almost instantly upon return. The devices used for presence detection are an iPhone 5s and an iPhone 6s.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Very good to know AVM is considering a fix. Thanks for sharing!
I suppose there has got to be some form of delay in the "abscent" status. The moment of connecting is "well defined", but disconnecting may happen accidentally. Bad reception, lost packages, etc. At first I thought those 10min were a big problem. But now that I've been using this great addon for a few weeks I've noticed that those 10min are actually quite practical. That way I'm not abscent every time I get something from the garden or pay a visit to the trashcan. :-) But yes... it would definitely be nice to see the abscent status one minute after the last contact or something like that.
Jens
I upgraded to Fritz!OS 6.80 yesterday and unfortunately things have made a turn for the worse. I've been monitoring the presence of our iPhone 5s and 6s through the night (Homematic log). Both phones were in the same room close to the access point. As was the case all the nigts before. The 6s remained "at home" the whole time, but with the 5s it was very chaotic. Every few minutes its status switched to "away" only to switch back to "present" between 5 and 7 minutes later. I'm polling the Fritz box every 10s.
Since I'm switching on a "welcome light" for 5 mins as soon as someone gets home, it was disco all night long. I've now taken "emergency measures" :-) and created a second set of presence variables. The 6s is synced with the variable maintained by hm_pdetect and the 5s is set to "away" after an 8 min delay compared to the hm_pdetect variables. Unfortunately this also means it now takes up to 18 min until the 5s is reported as being away. But this constant jumping back and forth is just not practical so it's better than the alternative. Let's see how today and the next night go.
Follow-up: I made some changes to our infrastructure yesterday and the problems with the 5s are gone. For now at least. It stayed "present" the whole night without exception. Our infrastructure consists of a Fritz!Box 7390 and two 1750E repeaters. The repeaters operate in "bridge" mode and are connected to the Fritz!Box via Ethernet. The SSID is the same everywhere. hm_pdetect is set to query all three devices every 10s. Both iPhones use iCloud push notifications. So in theory there should be an open channel all the time. These have been the settings from the start.
The changes I made yesterday: 1) Move from 5GHz to 2.4GHz. Meaning the the 5GHz network has been disabled in all Fritz! devices and the 2.4GHz network has been enabled. This should in theory enhance the range and might have lead to better connectivity (if that was the problem -- which I doubt, since the AP is approx. 3m away). 2) Switch off "WiFi coexistence" in the Fritz!Box since there are not many "foreign" networks around here anyway. Again not sure if that could have an effect. 3) Switch off "WiFi support" on the 5s and the 6s. Never been a problem on the 6s. But those are two different devices using two different providers, so who knows.
I do not know what caused the problems yesterday night and what brought on the change. The phones were both located at exactly the same spot as before and were running on battery also just as before. But I think I can rule out Fritz!OS 6.80 and / or hm_pdetect as the source of the problems.
Edit: Had disabled / enabled under 1) the wrong way round. Now corrected - sorry about that.