I assume when anyone is using FindMy, all of the devices being tracked will have their battery usage increase while it’s running, correct?
Yes
Can you think of anyway to create a sensor that reports the current speed of a device what won’t kill the battery?
No. But the iOS app may create a speed sensor. I worked on adding a speed sensor to iCloud3 and was not successful. To calculate the speed, you need to measure a movement distance and the time it took. The device is not located until it’s location is requested. iCloud3 would have to take the lat/long of the previous location and the current location, pass to Waze to get a driving route, which may not be the route you took, and keep up with time. Llocation errors and gps accuracy meant it was never accurate so I gave up and went on to other things.
Is the “stationary zone” available from the Companion app in terms of firing a “zone exited” trigger?
Yes. When the location of the zone changes, HA sends the new location to the iOS app so iCloud3 gets an exit trigger when it is exited.
Can an automation detect when the stationary zone is created, deleted or recreated? This might be a natural place to change the update intervals to improve reporting location without killing the battery.
I don’t understand what your point is. A stationary zone is created when you have not moved much in a specific amount of time so the interval is set to a longer time than it would normally be based on the distance from home. In you are at a restaurant or shopping or at a doctors office that is 4 miles from home, the interval might be 3 minutes. Moving the device into a stationary zone would change the interval to 30 minutes until you left the zone, saving the battery.
If you want to trigger an automation on entering or exiting a stationary zone, look to see isf stationary’ is in or not in the zone_name sensor on a zone_name sensor change.
Re: Badge sensor - What is the name of the sensor that is created? What is your device name? If you are away from home, it should show the value of the devicename_distance sensor. Are you showing a value in the distance sensor?
Re:Waze - Is Waze being used? If HA can not load Waze, iCloud3 will put a message in the Home Assistant log file that the calc distance is used and turn Waze off. Waze is not used it the distance is less than 1 mi/km.
@gcobb321 since a sensor called sensor.my_iphone_activity is created, which will report
Automotive
Stationary
Unknown
I’ve started experimenting by decreasing the associated device tracker’s interval when the sensor reports “Automotive” and if the phone is plugged in to power I make it even more aggressive. If it changes to Stationary or Unknown I increase interval. Hopefully this will update the Map more frequently when driving around and not kill the battery. I’ll keep you posted.
@FutureTense FYI-That sensor is created and updated by the iOS app, not iCloud3. You can increase the interval when in a zone using the inzone_interval configuration parameter. The stationary inzone interval can also be changed using the stationary_inzone_interval.
See configuration parameters section of the iCloud3 docs for more info here
The problem is that sometimes one person disappears from the map and another person teleports to the lost persons location (Its always the same persons). Is this a known bug?
The question I have is if that are any good way to save location history. It would be awesome if I could get lines on a map there the persons have been traveled.
The map is controlled by Home Assistant. iCloud3 doesn’t have anything to do with it. However, Home Assistant uses the latitude/longitude of the device to display it on the map. When my wife and I are in the same location, her picture is displayed on top of mine. So maybe it has to do with both devices being close together.
It would be awesome but will never happen. There are too many apps that already do this and, because off the variable polling interval, would not be very accurate.
So i got it working again via famshr, just used a seperate account without the 2fa. Seems to be doing just fine now.
I also get that you have say device_tracker.erik and a device_tracker.erik_2 for the ios app. But i also have a device_tracker.erik_3 which is via the unifi controller. My question is how do i map these together for the icloud component?
Last time i noticed that the ios app correctly noticed a zone change and was marked as away, but that didn’t trigger the icloud component to check/update the location. I’ve read in the docs that you can add a _2 in the tracked devices, but should i also add the unifi _3 ones too?
The docs also mention a “group: family” which is all the tracked devices if i am looking at it correctly. In my case that group consists of 2 groups again, of which holds the actual devices. Does that work too?
I just started getting this in the logs. This is strange because it says [email protected] is invalid (does that mean malformed?) or it’s not in my tracking icloud account, but then it goes on to actually list it. Anything I should be looking for to narrow this down?
@riemers sorry for the delay in responding. I just got back from a 7-week trip out of the country.
The _2 can be added to the track_device parameter to make sure iCloud3 monitors the sensors associated with the iOS app (device_tracker itself and the last_update_trigger). There is no support for unifi controller.
The ‘group’ is only used by iCloud3 to identify one instance of iCloud3 using one iCloud account and another. It is not used by Home Assistant to combine devices together into a common sensor. That would have to be done using a script or template sensor.
You can request a location using the icloud3_update service call with the ‘resume’ command for iCloud locations or the ‘locate’ command to ask the iOS app for a location trigger. See here for more info and examples.
The contacts are scanned looking for the email address in the track_devices parameter. If it is not found, the email addresses it did find are displayed so you can correct it. Check for punctuation errors, extraspaces, etc. Adding the ‘log_level: debug’ parameter will add the raw fmf record to the Home Assistant log file. It may be tough to dig through but it might help finding the conflict.
I’m not sure what you are referring to regarding the sql data base. iCloud3 doesn’t interface to any sql data bases.
When I enable ic3, I get a ton of these SQL errors. When I disable ic3, they stop happening. Maybe it has something to do with the logger: or recorder: components. I was hoping if you or anyone else who has the ability to test ic3 with mariadb could try. I’ll poke around and maybe ask on discord.
Bill has an iPhone and an iPad and Susan has an iPhone. I discovered by accident that I’m getting this error when I use the same email to track another device. As you can see from the config at the bottom I’m tracking three devices. I get the following error on start:
As I recall, others have also had a sql dB problem like yours. The messages iCloud3 generates for the HA log file use utc-8 encoding rather that ascii. Once they changed the sql configuration to that encoding, the errors went away. I have no idea of what they did or how they did it but that might be an avenue for you to explore.
Ahh. NowI understand what you are doing. I never considered tracking 2 devices with the same iCloud account and same email address. To do that would require massive changes to the way devices are tracked and identified. I do not see that ever being done.
Another thought is to have 2 instances of iCloud3, one for Bill and Susan’s iPhone and another ft your Bill’s ipad. I’m not positive it will do what you want but think it would be worth trying.
Thank you for your reply!
It’s not because they are close together. It was clearly a bug. However I solved it by change the order of persons in the configuration.yaml. At least I have not seen the bug since I done this.
Btw. I am running icloud3 successfully with 2fa. I done this by first configure the original HA icloud and connect it using SMS in the notification panel. I keep this configuration and also adding icloud3 to my configuration. I have been running it for a mount or so without been forced to login again.
Hi Gary, thanks for all of your hard work, it’s much appreciated - I’ve been using iCloud3 for several months now.
Recently v1.X stopped working. I updated to v2.0.5 but have had a series of problems that I am trying to resolve. The configuration file is set to use ‘fmf’ as the tracking method. Looking at the code in device_tracker.py, the crux of the problem seems to be that there are no array of “contacts” in the json returned from the icloud server by pyicloud_ic3.py; the authentication seems fine, the json contains a list of “follower” and “following”, but no contacts array.
Could I PM you the json response? (It is rather long and contains losts of email addresses that I would rather not publish). Alternatively, do you have a sample of the expected fmf json response that you could send me?
I am sorry that this question is rather vague, but any suggestions would be most welcome.
@marshn Log into the non-2fa account and verify the emails/names of the people you want to track are in the Contacts app. Also open the FindMe app and make sure they can be found.
@Ekstrom I have given the original HA icloud a quick review and it has been completely rewritten. I’ll try your method of authorizing the 2fa account and then tracking the devices using iCloud3.
One caution however, is the battery drain. As I recall, iCloud will locate all devices on the account based on the polling interval, which is not optimized for travel time, driving distance, battery state, gps accuracy, etc. At one time, you could override the interval using the icloud_update service call. What happens if you give it a very large interval (i.e., 1440 minutes)?
Can you open up an iCloud3 issue so we can try a few things offline.