iCloud3 v2.0 Device Tracker - Advanced tracking features with HA iOS App integrated monitoring (Updated)

Gary now has all attributes. :+1: Thank you.

Iā€™m finding battery usage very aggressive. I am running the latest Jan 22 code.

In home zone the interval shows as 30 minutes, and while driving it shows as 1 minute. Similarly, when my wife was at work in an office building all day, the interval was 1 minute.

in HA logs, the icloud tracker is checked every minute.

Configuration.yaml:

  • platform: icloud
    username: [email protected]
    password: *****
    account_name: yyy_icloud
    include_device: devicename
    unit_of_measurement: km
    distance_method: waze
    waze_region: NA
  • platform: icloud
    username: [email protected]
    password: *****
    account_name: xxx_icloud
    include_device: otherdevicename
    unit_of_measurement: km
    distance_method: waze
    waze_region: NA

Any suggestions of what to check?

I had this problem too, apparently the OP is working on another icloud version (he calls it icloud3, you can download it to try it out).

This component is not (yet) a part of home assistant. But perhaps if this works well it might be.

Thanks Jim!

Iā€™m using icloud3 already :frowning:

Donā€™t thank me, thank the creator of it :wink:

Thanks and Iā€™m glad iCloud3 seems to be solving the battery drain issue you had with the original iCloud HA component (which was written years ago by someone else). A lot of time went into itā€™s development to address that problem (and others). A section in the docs explans how it does this.

Iā€™d appreciate a :star: on my GitHub repository here if itā€™s working well for you.

Gary

Hi! Do I need remote access to Home Assistant to use cloud3?

Yes, to set up and use the HA IOS app. Iā€™m using hassio with the duckkdns component that includes letsencrypt.

Hi Gary,

Iā€™m getting multiple instances of ā€œShannon changed to Homeā€ in the log. This seems to occur at each polling event. I donā€™t see this with the other configured account. This change to home is reflected in the device.tracker entity correct? Also, Shannonā€™s phone exhibits Poor GPS Accuracy values. This may be due to poor ATT coverage in our area. We run WiFi calling and Iā€™m guessing when her phone drops off the network overnight, these pop up.

Polling frequency (2 hrs) didnā€™t seem to change during the poor gps coverage period. I had to issue a resume command to get this attribute to update. Iā€™ve increased default, in-zone polling frequency to 1 hour in hopes of keeping her phone connected during the overnight hours. Iā€™ve got an input boolean blocking the arrive home automation right now.

Hi,
have changed my settings on phones, apps, and in hass config and it looks like itā€™s workingā€¦
Then I went to ā€œMapā€ in hass and noticed this:


As the circles indicate, I do live in the rainy Denmark - but some device tracker is placed in the Golf og Guinnea (I promise, Iā€™m not there, neither is any device Iā€™m linked to).

Obviously, some device tracker has got the coordinates 0,0ā€¦

After some searching I found this:
fig_2

Searching through my config, I can only find this zone.cbh_iphone_stationary
And as far as I can figure out, itā€™s originating from the iCloud3 Custom Component - and obviously it is something with coordinates not being passed correctlyā€¦

I havenā€™t seen any error messages - that could be a matter of log-level, of course.

Any ideas where to look for what is (not) going on?
Regards,
Chr.

When the GPS accuracy is poor, the interval is set to 1-minute if the distance > 2km.whether the device is in a zone or not. If the accuracy is poor, it could think it is not home so changes the state which will cause it to do a repoll on the next 15-second interval. It will then probably get another gps accuracy error and do the same thing again. The gps retry interval is set before the inzone interval so the inzone interval will be ignored

Iā€™ll add a ā€˜ignore_gps_accuracy_inzoneā€™ configuration option (default will be true) so the device will not repoll on a constant basis when in a zone. And, yes, poor GPS accuracy is the culprit here. It drove me nuts too. You could change the gps_accuracy to 9999 to turn it off for now and see what happens.

9999 it is. Iā€™ll let you know. Thanks!

When iCloud3 starts and is setting up the devices it is tracking, a Dynamic Stationary Zone is created with coordinates 0,0. These zone coordinates are automatically reset to your current location if it sees you havenā€™t moved more than .25km for several polling intervals (doctors office, friends house, shopping mall, etc), You are placed in the Stationary Zone and the polling interval goes to 2-hours until you leave the zone and the HA IOS app issues a zone exit notification which will reset the device and start the normal distance/time interval calculations. Perhaps I should change the default to 90,0 (the north pole) instead of Africa or the middle of the Pacific Ocean on the equator.

Sadly, my battery woes are using your iCloud3, but I am impressed overall and will continue to work through any issues.

I have a feeling that this may be related to poor GPS accuracy (it showed as 65m if I recall correctly)

hangs head in shame

I canā€™t read what I typed. I busily put together lots of configurations for icloud3, but left the tracker as icloud.

Iā€™ll just go back under my rock now.

First of all; thank you for your code. Iā€™m running it now on my test server. The only problem for me is that the dynamic stationary zone has coordinates 0, 0. I looked into your code and thought about this:
What if I change the Dynamic Stationary Zone to my homeā€™s coordinates at start (and when leaving the dynamic zone)? That way the map will always work. Or do you see any problems with this?

Ohw and does this component support the custom updater? That would be nice for future updatesā€¦
If not (yet), itā€™s really easy to make it work.

Hi gary,

I made the move to 86.x and am having difficulty with input_select. By default the upgrade left a lovelace configuration file under .storage. Not the YAML version you appear to be using. Hereā€™s the error:

Invalid option: 30 min (possible options: 15 sec, 1 min, 3 min, 5 min, 10 min, 20 min, 30 min, 1 hr, 2 hrs) 7:30 AM components/input_select.py (WARNING)

If you have the input selects broken out, would you post them here?
Thanks.

Wouldnā€™t it be more logical to set the Dynamic Stationary Zone coordinates to the coordinates of either the device or the default location of the hass-server?

Do I understand correctly, that if you stay stationary in a defined zone the Dynamic Staionary Zone will not be affected?
My ā€œman in the African seaā€ has stayed there since yesterday - even though Iā€™ve been away during the day - but thinking about it, I went directly to work and stayed within that zone and then directly back (so if the Dynamic Stationary Zone is supposed to be changed, no matter if Iā€™m in a defined zone or not, then something doesnā€™t work).

Added Custom Updated VERSION statement to iCloud3 v0.86.1 and will look what else is needed.

1 Like