iCloud3 v2.2.1 Device Tracker-Advanced tracking features, iOS App monitoring

There is no link :slight_smile:

I remember @gcobb321talking about battery state not being available in the Find My Friends authentication method in v2.1

I would love a more accurate reading of my battery state, would that be available through the Family Sharing route?

@poudenes
Try this https://janakiev.com/blog/gps-points-distance-python/

@Ronaldt
No. iCloud does not report the battery state with Find-my-Friends so I pick up the value from the iOS App and fill it in.

1 Like

Hi @gcobb321 I’m using icloud 3 integration since a week and i find it great! However i get an error when trying to call service lost_iphone

I created this very easy script:

trova_iphone_enri:
  alias: Trova Iphone Enri
  sequence:
  - service: device_tracker.icloud3_lost_iphone
    data:
      device_name: enrico_iphone
  mode: single

but i get an error: list object has no attribute get.

How can i get this working?

I’m having a bit of trouble getting past the “No Tracked Devices” error while using the fmf method.

On my phone it’s called “Matts-iPhone”. For track_devices I have it set as:
track_devices:
- matts_iphone > [email protected]

In the event log I see an entry saying "Not Tracking Device > Matts (matts_iphone). I’ve tried a few different combos under track_devices, followed by restarts, but I can’t seem to resolve the issue.

@mattenz
The iCloud3 docs here have things to check when you have these problems getting set up.

@gcobb321 First of all, thanks for this component.

I think there is a typo error in the battery sensors unit of measurement attribute.

iCloud3 2.2 sensor:
icloud3

iOS Home Assistant App sensor:

Are you agree?

@jdmartinez
I checked the iCloud3 program and there is no ‘unit_of_measurment’ text anywhere so I don’t know where that is coming from. My battery attribute shows ‘unit_of_measurement’.

image

However, I did notice your friendly_name started with a ‘-’ since your phone’s name started with iPhone. I removed the ‘-’. Also, the ‘-De-’ in the name will now be ‘-de-’.

This will be in the v2.2.1c in the iCloud3 development directory later today.

@gcobb321 Perfect, thanks. My iPhone name is in spanish, that’s way it starts with ‘iPhone’

@gcobb321 any chance to look to lost iphone service problem?

@enribomber
The lost phone service is only available with the Family Sharing tracking method due to a limitation of the pyicloud_ic3.py interface program. At some point, I may add a notification using the iOS App but do not have any timeframe on when this might happen. My next priority issue is to dig back into iCloud verification/authentication expiration problems.

I’m using family sharing but doesn’t work…

Hi Gary, hats off to you for this fantastic integration. My daughter just got an iPhone for her Birthday and has replaced her Android phone meaning I can finally implement iCloud3 and replace Life360.

My only question so far is would it be possible to have the 24 hour clock as a configurable?

I’ve tried creating a template sensor based on the zone_timestamp attribute however as it’s only 12 hours its showing my sensor as “Home since Tuesday 06:39 AM” when in fact I arrived home at 18:39/06:39 PM.

Thanks!

@pardanme
The ‘unit_of_measurement: km’ parameter will display the clock in 24-hour format.

iCloud3 v2.2.1c - Release Candidate 1 is available

Download it here. To install, download the zip file into the icloud3 directory, unzip it and restart HA.

Change Log:
1.Bug fix - The iOS App reports the device_tracker state with the zone’s friendly_name. iCloud3 was handling zones by the zone name. This caused problems handling zone change detection and, at times created a iOS App/iCloud3 state mismatch error.
2. Bug fix - If (1) the phone was turned off and not available when HA restarted or (2) became unreachable for an extended period of time while HA/iCloud3 was running (cell service down, turned off, airplane mode, etc.), the phone would be in a not_set state or the location would become older and older. This would hang up iCloud3 in a 5-second update loop, polling iCloud for location data when none was available. It will now retry the data request 4-times at a 15-second interval. The interval will increase to 1, 5, 15, 30, 1 hr and then the max_interval (4-hrs) and remain there until the phone comes back online. If the phone is then turned on, it will be picked up on the next successful location data request and returned and then tracked as normal.3. 3. Bug fix - When old location messages were added to the Event Log if the last located time is old and the phone is in a zone.
4. Bug fix - If the unit_of_measurement not being set to ‘km’ if the parameter was in the config_ic3.yaml file. It was being set correctly if it was in the HA configuration.file.
5. Bug fix - Fixed ‘Lost Pnone’ notification. It will now work with all tracking methods using the iOS App Notifications platform.
6. If the phone’s name started with iPhone (or iPad), the first character of the sensor.xxx friendly_name attribute would be a ‘-’. The ‘-’ was removed. Also removed the ‘-’ between the phone’s name and the attribute name to match the iOS App friendly_name formatting.
7. New configuration parameter - ‘display_zone_name: True/False(default)’ The ‘device_tracker.[devicename]’ entity displays the zone’s friendly_ name, which is then displayed on the lovelace card. The name is truncated if it is longer than 10-12 letters. This option, if True, will display the zone name itself instead of the friendly_name.
8. Added some logger debug statements to ‘pyicloud_ic3.py’ to capture icloud request/response events that might help pinpoint what is happening when iCloud needs to do an account verification.

To turn this on, add the following to your configuration.yaml file:

logger:
  default: info
  logs:
    custom_components.icloud3.pyicloud_ic3: debug

Gary,

Finally got everything working, most of the issues were related to the settings on the phones. Really nice work and excellent documentation. Quick question, how do you enable the boolean driving flag that you use in your sample lovelace cards ??

@gcobb321 SInce your update 2.2.1c im still connected without verification proces within 24hours

@mikealdo
I use an automation that sets an input_boolean that is triggered by the distance from home. See the sample automation/scripts in the iCloud3 docs here.

In the iOS app config setup we’re told to enable ‘Enter Zone’, ‘Exit Zone’ and ‘Significant Location’ notifications. This causes my phone to make a noise too often for my liking. What happens if I disable those 3 settings? Do they just control the notification on my phone or will iCloud3 stop tracking location changes?