New iCloud3 Device Tracker Custom Component -- Waze integration, Dynamic Stationary Zones, immediate zone enter/exit update vis IOS app, device include/exclude filters, minimal battery usage, and more


#21

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


#22

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?


#23

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.


#24

Thanks Jim!

I’m using icloud3 already :frowning:


#25

Don’t thank me, thank the creator of it :wink:


#26

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


#27

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


#28

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


#29

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.


#30

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.


#31

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.


#32

9999 it is. I’ll let you know. Thanks!


#33

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.


#34

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)


#35

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.


#36

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?


#37

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.


#38

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.


#39

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).


#40

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