@bstrebel
No Problem! I’m very happy that someone does care for this feature!!
I used 540seconds, so 9 Minutes as I have 2FA
Just installing 0.7.2
-
Pimatic phone icloud error
-
So it is possible to stop the continuous polling in Version 0.7.2?
-
@daice said in Pimatic phone icloud error:
So it is possible to stop the continuous polling in Version 0.7.2?
Yes. But you have have to set the suspend flag by your own rules. E.g. create a ping presence device for your iPhone and create two rules:
- if iphone is present then execute curl … /api/device/iphone_id/suspend?flag=true
- if iphone is not present for 10 minutes then execute curl …//api/device/iphone_id/suspend?flag=false
Please look at the documentation for details
-
@theslashy said in Pimatic phone icloud error:
@bstrebel
No Problem! I’m very happy that someone does care for this feature!!
I used 540seconds, so 9 Minutes as I have 2FA
Just installing 0.7.2That’s strange. Pushing a few bytes to the iCloud every 10 minutes should not consume so much power. I’ve removed 2FA for the iPhone6s and are going to use an idle session and the new suspend feature to enhance battery lifetime.
The best solution would be a native iOS App that updates the location with a web request directly in pimatic-phone like I have realized this for my Android device: If connected to WiFi it sends the SSID which is mapped to a location. On the road updates are triggered by mobile network cell id changes. Accuracy depends on my GPS settings on the phone. Very flexible, very low power consumption, very open and, at the moment, a very good reason for me not move to an iPhone but stay in this open Android ecosystem.
But maybe, you’re experienced in iOS App development? -
@Tim said in Pimatic phone icloud error:
@bstrebel I’m looking at a few alternatives at the moment. Thought I’d be nice to share them.
- Owntracks
I tried setting up a MQTT server because I did not want my location to be shown to everyone who uses Owntracks. This was pretty complicated and the mqtt had to be opened to everyone which I don’t really like.
Agree …
- IFTTT
With the maker channel you could create a web request to your Pimatic which alters a phone variable when you leave / enter a place. At first I thought this was the perfect solution, but then I realized I had to add my pimatic credentials in the URL. This did not feel safe.
Would be very nice if you could use at least basic authentication over SSL/TLS. And, of course, you have to trust the IFTTT platform …
- HomeKit
@Lex has homekit based solution: https://forum.pimatic.org/topic/2753/solution-for-ios-location-based-automation/2 but this does not work for me because I don’t have a iPad or AppleTV
No personal experience but looks Apple-like: Cool devices but a very very closed proprietary eco system. Not very flexible or extensible…
All of them are not perfect solutions, I’m wondering if I missed something.
I’ve tried to overcome these limitations for my own devices by the pimatic-phone plugin. It implements the concept of “well known locations” (mapped to SSIDs, CIDs, or GPS position+range) which can be easily used in location based rules. And it provides an open API to realize very flexible and power saving solutions where the device updates its location directly in pimatic. Using basic authorization over SSL/TLS fits my security requirements.
- Owntracks
-
@bstrebel
I don’t know why this uses so much battery, the iphone search doesnt even appear in my list of apps which use much battery.Unfortunately I’m a android developer, I’m in the progress of learning swift but I think that is beyond my possibilites yet
but I think there would already be an app who does this: locative.
Somenone mentioned it in this forum, it can push a http request when leaving a geofence.
My concern with this is: you have to open your pimatic installation to the internet.the best thing would be a url with a certificate so you can encrypt your communication to your pimatic installation and push your request directly to the pimatic api
but I’m still not very happy with opening pimatic to the web… -
@theslashy said in Pimatic phone icloud error:
@bstrebel
I don’t know why this uses so much battery, the iphone search doesnt even appear in my list of apps which use much battery.Unfortunately I’m a android developer, I’m in the progress of learning swift but I think that is beyond my possibilites yet
but I think there would already be an app who does this: locative.
Somenone mentioned it in this forum, it can push a http request when leaving a geofence.Sounds good. I will have a look on it …
My concern with this is: you have to open your pimatic installation to the internet.
the best thing would be a url with a certificate so you can encrypt your communication to your pimatic installation and push your request directly to the pimatic api
but I’m still not very happy with opening pimatic to the web…My pimatic server is exposed to the internet behind a firewall/router. Only SSH and one NAT’ed high port for the HTTPS connection is open. I’m using Let’s Encrypt certificates which work well with any kind of client. The connection is as secure as the firewall and as secure as basic auth over SSL is. It works for me. I’m running an alarm system which definitely has to be reachable through an external connection.
-
the problem I see when we use iCloud is that apple will change anything every few weeks and we have a problem again…
-
And its draining to much battery too. I will install openwrt firmware on my router an get the presence over ssh shell
-
I have tested the plugin with two iphones. When i set the suspend flg true it stopps tracking me. This morning i set the suspend flag back to false, but when it trys to locate me i get the following error message:
error [pimatic-phone]: Update of device “iPhone 6” failed, Cannot read property ‘reason’ of undefined
Also the icloud verify code is always 000000 when i click on edit device.
-
@daice said in Pimatic phone icloud error:
I have tested the plugin with two iphones. When i set the suspend flg true it stopps tracking me. This morning i set the suspend flag back to false, but when it trys to locate me i get the following error message:
error [pimatic-phone]: Update of device “iPhone 6” failed, Cannot read property ‘reason’ of undefined
Also the icloud verify code is always 000000 when i click on edit device.
Do you use two factor authentication? Currently the suspend option is available only for accounts without 2FA since it’s not possible to keep a 2FA session idle for more then 10 minutes. If possible, login to https://appleid.apple.com and disable two factor authentication. An automatic reconnect of the plugin is not implemented because every time a session is established you will receive notification mails and popups.
The iCloudVerify code is used for exactly one session which is established on device (re-)creation on save and afterwards set to ‘000000’. You will see your verification only once when you enter it into the device configuration.
-
For the people who gave up on iCloud and are still looking for an alternative.
I wrote a guide on how to use the IFTTT maker channel for presence detection,
not as much features as before but hey… It works:https://forum.pimatic.org/topic/2806/presence-detection-with-ifttt-maker-channel
-
I solved this for me with another method:
I ask my Fritz Box which devices are connected, i found a little php script that I extended to send http requests when a specific device connects and I periodically call the script via crontabdo you think I should write a little howto for this?
-
I have flashed open wrt on my tp link archer c7 and get info about connected devices over ssh shell presence sensor. This works very good. I use following command
ssh root@192.168.5.100 ‘iw dev wlan1 station dump | grep -c 70:3e:ac:25:a9:aa’ | tee
My problem now is that i have an wifi repeater. When my iphone connects to the repeater, it is not connected to the wlan1 interface from my router. Has somebody an alternative shell command to get the connected mac adress without reading the wlan1 interface from the router?
-
You could use the static ip option of your dhcp server so the phone would alway get the same ip from the router. This makes it possible to ping the phone with pimatic-ping.
daice
-
I use the static ip option over dhcp. But the iphone goes in deep sleep mode after 60 seconds. So it is not pingable
-
@sonny said in Pimatic phone icloud error:
I use the static ip option over dhcp. But the iphone goes in deep sleep mode after 60 seconds. So it is not pingable
that’s right, but it works using a script with a fritzbox
-
Yes, you are right. But at least in my environment with iPhone 6s and iPad Pro the device wake up every 3-5 minutes. So the rules
if ping_device is present then set presence of dummy present
if ping_device is absent for 5m then set presence of dummy absentwork for me (unless I have not disabled networking). My ping interval is set to 10 seconds.
It would be great to have some figures to compare accuracy and latency of the different approaches (ping, IFTTT, FritzBox WLAN status, Locative geofence, …) for the “DeviceAtHome” problem.
BTW: Independent from the method, you can log the device location in pimatic-phone with calls like …/updateTag?tag=Home or …/updateSSID?ssid=WLAN
-
@daice , the new release 0.7.6 of pimatic-phone provides 2 additional api calls disableUpdates and enableUpdates?code=000000 which can be used to suspend updates for 2FA enabled accounts. A login takes place with enableUpdates and trigger a notification mail.
-
@theslashy i dont have a fritzbox. And i dont know how to make a script