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

InstigatorX I don’t think that wouldn’t name any difference right now. What you could do is to create a sensor.stevesiphonexsm_state like:

stevesiphonexs_state:
value_template: ‘{{states.device_tracker.stevesiphonexs.state} | lower}}’

for now and reference that sensor instead of the device_tracker state. I use a bunch of sensor attributes defined in sn_device_tracer_attributes.yaml file to display information on lovelace cards.

1 Like

Guess I did something wrong. I get Platform not found: device_tracker.icloud3 when checking my config.

Have I placed the icloud3.py in the wrong folder?

HA versions before 88 – Icloud3.py should be put in the config/custom_components/device_tracker directory

HA versions 89.0+ – icloud3.py should be renamed to ‘device_tracker.py’ and put in the config/custom_components/icloud3 directory

Okay I’m running 89.1 and I have placed the icloud3.py in here:

Getting these errors:

It looks like iCloud3 is installed but the Waze Route Calculator is not. See info for Waze here

Hmmm. Still the same.
I installed Waze into the root of home assistant jail using
pip install WazeRouteCalculator

Is there more I need to do?

Not sure. I use Hassio and never had any problems. But I never had to install waze. It was just there. Maybe put it into the custom components directory. Maybe someone else will have more info than I do. iC3 will still work without Waze but it works better with it. Set distance_method: calc in device tracker config.

Got it working. I guess leaving in the old icloud tracker causes problems.
Now what does these warning mean?

2019-03-12 14:17:45 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] >>location[isOld]=False 2019-03-12 14:17:45 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] >>olddebug=False 2019-03-12 14:17:45 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] >>ifboth=False 2019-03-12 14:17:45 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 0-going to get-dev-dist 2019-03-12 14:17:45 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci gdi-100 2019-03-12 14:17:45 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci gdi-102 2019-03-12 14:17:45 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci gdi-103 2019-03-12 14:17:45 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci gdi-104 2019-03-12 14:17:46 ERROR (SyncWorker_9) [custom_components.icloud3.device_tracker] ►►Error on retrieving data: empty response 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 0a-back 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 1 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 2 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 3 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 9 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 10 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 12 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 13 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 14 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 15 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 16 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 17 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 18 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 19 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 20 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 21a 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 21b 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] ci 21 2019-03-12 14:17:46 WARNING (SyncWorker_9) [custom_components.icloud3.device_tracker] >>>State=dave_work, FN=Dave Work<<<

There was a bunch of debug code written to the log file in that version. A new version is undergoing final testing and I thought it would be out last weekend but ran into a few things. All corrected now and hope to get it out sometime this week.

Just ignore the messages.

v1.0 of iCloud3 is now available for download

Go here to download the latest version of iCloud3 and to review the documentation on the github.

  • A full list of changes enhancements since 0.86 are described in the ChangeLog.
  • The Readme describes the functions and features of iCloud3 and contains many examples on how it provides a complete presence detection solution for Home Assistant.
1 Like

Just want to be sure I’m reading everything correctly, but do we remove all the sensor templates we manually created previously and they’re auto generated? I did that, but don’t show up.

The sensor templates should be generated. The name will be ‘sensor.gary_iphone_distance’ for example for the device named gary_iphone (unless you put in a ‘sensor_name_prefix’ config parameter with something else.

Look in the states area to see if they are showing up…What name did you use previously for the sensors?

You can turn on (and off) writing entries to the HA log file via the ‘icloud_command_info_logging_toggle’ script in the sc_icloud.yaml file. Then look at the debug info in the HA log file. You should see the sensor name with the value of the sensor’s state.

See a sample of the log file at the end of the Readme for more information.

So is this the fix for this error?

Wed Mar 20 2019 12:56:15 GMT-0400 (Eastern Daylight Time)
'NoneType' object has no attribute 'attributes'
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/icloud3/device_tracker.py", line 3377, in _update_device_sensors
    badge_attr     = badge_data.attributes
AttributeError: 'NoneType' object has no attribute 'attributes'

I really like the idea of this component. This is the second time i’ve implemented it. And it’s the second time it’s wrecked havock on my system. Last time a few weeks ago, after running for a few hours, my entire HA system went down and was unavailable the rest of the day. I then implemnted 1.0 last night, this morning made a quick change to something unreleated, restarted HA, and about 6 hours later, I’ve lost connection to many of my devices (zigbee, echos, weather sensors, and possibly others). I’m not at home so I’m not sure what the cause is at the moment, but none of these had issues the other day.

I know this sounds like a complaint, and I’m really not complaining, just trying to understand what I can do with this to keep it from causing such wide spread issues. If the device tracker stops working, I can deal with that.

Thanks for all the work, this looks like it can be a pretty amazing tracker with a lot of useful options.

Yes, the v1.0.1 fixes this badge_attr Attribute Error. I had included a sample sensor.gary_iphone_badge in the sn_badges.yaml sample file but never tested the program when that file was not available. This version updates it if it is available and creates it if it is not.

Regarding all the other issues with your other devices, I can’t see any way iCloud3 would affect them. I also have a SmartThings that is tied to some sensors and a switch (zwave) for my garage door and never had any connectivity issues. It does get a poll from HA every 5-seconds to quickly test if the IOS App has send HA any notifications (Zone Enter/Exit, Background Fetch, etc) and if not exits. Every 15-seconds it checks to see if the next update time is reached and, if so, does a iCloud Find-my-Phone location call. If the time has not been reached, it exits. Have you checked the HA Log files for anything. iCloud3 writes a lot of debug info (see the end of the Readme) to tell what is going on. Maybe turning that on and would show interactions between devices and help pinpoint the issues you’re having. It also writes status info when HA starts up that might show something.

The previous version didn’t have much error checking and wrote a lot of debug info to the HA log file. This version contains a great deal of error trapping and recovery steps, along with better diagnostic info.

Good luck

I’ll check out the debug logs. Overall what happened last time (version prior to 1.0) was that after being in a zone for a few hours (2 of us) my front end became not accessible. I saw a few other post with similiar issues, so I disabled the component, and the issue never returned. The issue I had today, I’ve also never had before. I dont know if its a network issue, or socket issue, but my zha devices all went offline at the same time as my, alexa media player (also custom component), and my dark sky weather sensors. It could be a coindince, but just never had this situation appear before. When I did a quick check of the logs, the most common item was the badge error. I’ll update when I get home and see if the issue returns.

Looking good so far with 1.0.1!

I like the automated sensors!

Now I have to figure out how to share the tracking information between two hassio instances at different locations.

@gcobb321 _waze_distance isn’t created automatically…should it?

Edit: never mind…I upgraded to 1.0.1 and voila it all started showing up. Fantastic!

Edit2: @gcobb321almost working,
…waze distance is blank.

@gcobb321

What’s interesting is my daughters phone shows the Waze info and we are sitting right next to each other.

This thread may shed light on the Waze data being missing: https://github.com/home-assistant/home-assistant/issues/22022

A fix is in the works.

Items in 1.0.2 (partially complete)

  1. If you are a long way from home, it appears Waze times out and doesn’t return any route information. But if you try again, it might. I am now retrying getting waze route data. and generates an error if it doesn’t return anything after 4 retrys.
  2. A message in the Waze Distance field will be displayed if there were any problems, waze is paused, waze is off, etc rather than leaving it blank.
  3. If there are several devices that are close to each other, and one device has already got route info from waze, it won’t call waze again but get the info from the other device. (An idea and not yet in code).
  4. Fixed some issues with the _badge where if you defined a template for a badge, the entity_picture data was getting destroyed.
  5. Optimizing some code related to sensors.
1 Like