@ghstudio I assume you have looked at each entry in the iosapp event log (app settings, bottom of the screen). Touching the item brings up some detail info for the entry. Most are blank but some contain a Json string with details. Compare that to the HA … log entry to see if it has been recorded. It may help you figure what end the problem is on.
Installed IOS 2.0 with icloud3 1.1.0 on .97.0…drove around today through zones…and everything works…every zone enter/leave was detected and reported.
For what it’s worth, here’s my code:
configuration.yaml
Note: I found that stationary was creating problems on the leaving automation…I am not interested in leaving “stationary”…i want to report the last zone I entered…so I eliminated it. Similarly, I found that GPS accuracy varies more than the default 100 even when standing still, so I raised the value to 500…which seems to work.
device_tracker:
- platform: icloud3
username: [email protected]
password: mypassword
group: family
track_devices:
- doug_iphone > [email protected] , doug.jpg
stationary_still_time: 999
gps_accuracy_threshold: 500
automations.yaml
- alias: arriving in zone
trigger:
- platform: state
entity_id: sensor.doug_iphone_zone_name1
condition:
- condition: template
value_template: "{{ states('sensor.doug_iphone_zone_name1') not in ['Away', 'Stationary', 'not_set'] }}"
action:
- service: notify.ios_doug_iphone
data_template:
message: >
‘Doug is near or has arrived at {{states.sensor.doug_iphone_zone_name1.state}}’
- alias: leaving a zone
trigger:
- platform: state
entity_id: sensor.doug_iphone_zone_name1
condition:
- condition: template
value_template: "{{ states('sensor.doug_iphone_last_zone_name1') not in ['Away', 'Stationary', 'not_set'] }}"
- condition: template
value_template: "{{ states('sensor.doug_iphone_zone_name1') not in ['Statonary', 'Away'] }}"
action:
- service: notify.ios_doug_iphone
data_template:
message: >
‘Doug is leaving or has left {{states.sensor.doug_iphone_last_zone_name1.state}}
I’m sure those could be shortened and maybe combined…but they seem to work. Obviously, you can take any action you want…I just send the message back to my phone so I can see it working as I drive. Ultimately, it will announce my wife and my locations on our Alexa Dot’s at home…but having some trouble getting alexa_media to work…I’m testing their new version and it’s almost ready.
Not sure how useful this project will be, but it’s fun learning what home assistant can do.
iCloud v1.1.0 Beta 8 uploaded 8/29 11:30am
The latest beta has just been uploaded. The main features are:
- Support for the IOS App version 2
- Overhauled error reporting and setting polling intervals for errors (iCloud account reauthorization, no location data available, gps accuracy, old location data) to try 4 times on a 15-second interval. If the problem was not resolved, try again in 1-minute, again in 5-minutes, again in 15-minutes, and finally in 30-minutes.
- Fixed a problem with pyicloud_ic3.py component that created an errror in the log file and didn’t return any information.
- And other minor items described in the change log .
Full Change Log is here
Full documentation is here
Review the tracked_devices parameter options here for more information about using the IOS App v2 .
Download the beta version here
Hi,
Just question, it’s normally I don’t view the phone on MAP ? is A configure zone (exemple corker) a view in dashboard my phone location (Worker) but in MAP don’t vieww (if I understand it’s noramlly because My phone is on zone)
when my phone is not in zone I don’t view thhe info on MAP
this is my config :
# Tracker
device_tracker:
- platform: icloud3
username: ............................
password: .........................
account_name: barto_Icloud
unit_of_measurement: km
waze_realtime: true
waze_region: EU
distance_method: waze
sensor_name_prefix:
- iphone_xs_max @ Barto
thank’s for your help and excuse my bad english
@barto_95 My Map is not working either. Normally, it displays an icon of all of my zones and my picture at my current location. Right now, it is displaying Amsterdam and I’m really in Florida. It’s also not showing the zone icons or my location. I’m running HA 0.98.1 so something in HA is not working.
HI,
Do you have define your zone with this on your configuration.yaml :
zone:
- name: Home
latitude: 49.010000
longitude: 5.1005
radius: 5
icon: mdi:home
When I configured this My map locate the right zone and icon but I’m not viewing my icon/picture for my phone
I seem to recall reading somewhere that your icon won’t be displayed when in the home zone.
That is correct… here under “Home Zone”
YEs but I’m not in Zone and the icon don’t show on map
I don’t move and icon don’t show but when a move in my car the circle with “letter” show on map but the picture no
There is a typo in attribute name for unit of measurement of battery. Please fix this.
Hi @GaryK, really nice and highly useful work, that you do with icloud3! Tanks!
Currently I´m trying to switch to icloud3 but unfortunately its not working for me:
With “include_device_type: iphone” the plugin states, that “device_types” is missing.
When I add “device_types”, it states, that this is not a valid option :-).
Do you have a fully working config sample for the sensor please?
As I´m willing to go with the newest beta version - is there a way, using the beta with hacs?
Thanks and regards,
Jakob
In the beta, the ‘include_device_type’ parameter is no longer used. There is a new ’track_devices’ parameter where you specify the device name for all devices you want to track. This was done to be able to track devices using the Find-my-friends and the iOS app location services. There are lots of examples of configurations in the iCloud3 documentation.
Just getting back to building my raspberry home automation with icloud3…and I find myself in device-tracker “hell”. I read the section on each new device tracker being incremented by 1 (very confusing, at least to me) and it didn’t help. I found a section on essentially cleaning IOS off the system and reinstalling:
https://companion.home-assistant.io/en/troubleshooting/beta-cleaning
That worked to a point. I followed all the instructions and rebooted the HA, reinstalled HA Companion on my phone, established the connection and the overview shows that the connection worked…I am at home,etc. But there’s still one problem…really IOS problem, I guess. Device tracker 2 was created and it’s attributes show somewhere I was a week ago.
I’ll follow up with the IOS folks to see how to get only one tracker…and post back if we figure it out.
I am at a complete standstill with icloud3 1.1 and HA 2.0. My confusion is in how to set it up. I have configured IOS and icloud3 fmf and no matter what I do, I wind up with two device trackers for one phone.
- platform: icloud3
username: [email protected]
password: !secret apdoug
tracking_method: fmf
track_devices:
- doug_iphone > [email protected]
When I boot, I have two device entities: device-tracker.doug_iphone AND device-tracker.doug_iphone_2.
The friendly name of the iphone entity is: Douglas and the friendly name of iphone_2 is doug_iphone which I could understand, but all of the icloud3 data is in the iphone entity not the iphone_2 one. As an aside, I have no idea where the friendly name Douglas came from…it is my first name, but how does IOS know?
I have to use FMF since my main account has 2 part authentication.
I really could use some help…
@gcobb321 really nice, I set this up as my Sosumi setup was getting to be too much automation work. Was working great until my wife enabled 2fa on her account to allow icloud backups which unfortunately broke this for me I was using Fmfphn but honestly, Apple keeps changing things (it seems) unfortunately I’ll have to abandon icloud in general and find another way to track iphones via GPS.
I am trying to use icloud3 to announce my location (zone) on our amazon echos. I am using FMF and it seems to be working, albeit, it only locates the phone on what appears to be a 2 hour polling interval rather than zone enter/leave using home assistant companion (still have to test that out). I have defined zones and they are announced correctly…however my zones in some cases have two words: Home Depot or Post Office. When those are announced (or shown in the overview badges) they have an underscore… The echo actually says: Doug is at home underscore depot
Is there a way to define the zones so that there is no underscore? I guess alternatively, is there some code that would covert a state containing an underscore to something with no underscore that I could put in the echo announce message.
Version 2.0 is going through final testing. It supports Find-my-Friends to get around the notification issues due to 2fa on an iCloud account. The beta has been available for a few months and the docs will give you a good idea of how it works. There are differences in the final version but you will be back up and running soon.
You can find it here here
Look at sensor._zone_name2. It reformats the zone name and removes ‘-’. For example, ‘gary_iphone_stationary’ becomes ‘Gary iPhone Stationary’.