Giter VIP home page Giter VIP logo

Comments (16)

gcobb321 avatar gcobb321 commented on August 19, 2024

I've updated ic3 to 2.0.6c (or d) in the development directory. Waiting to set up stat. Zone doesn't place nice with the iOS app. New zones are not getting pushed to the iOS app so it then doesn't do any enter/exit triggers for the stat. zone. I'm now trying to create one around the home zone but get enter/exit triggers on a 1m zone passive zone for some strange reason.

Download the development version. After loading and the devices are located, do a hard reset on the iOS app to load the zones if the stat. zone is not listed on the App Config/Locations for the iOS app.

from icloud3.

manonstreet avatar manonstreet commented on August 19, 2024

I've confirmed that the version I used for testing associated with this issue is the same as the latest:
2.0.6c for device_tracker
v2.0.6b for pyicloud_ic3

I've also confirmed that the stationary zone is not showing up in my iOS app, so that is likely the cause. I'm a bit weary of doing a hard reset which will delete my mobile_app integration and all of the associated devices. I believe I can just re-add and rename all of the entities again and everything should "just work".

from icloud3.

gcobb321 avatar gcobb321 commented on August 19, 2024

Working on 2.0.6d now. Ran into some things today and looking at them now. I'll be out running errands tomorrow and will give it a workout.

You don't have to do a hard reset on the ios app on HA and delete the integration as you described.. On the iphone, open the app switcher (slide up fro the bottom) and push the ios app off the top of the screen to unload it from the iphone's memory. Then open the ios app again and it will reload the zones, which will include the newly setup stationary zone.

from icloud3.

manonstreet avatar manonstreet commented on August 19, 2024

I believe everything is working as intended. My status does go into a stationary zone, and exit from that zone. The only issue I see that on HA startup, the above error is thrown.

from icloud3.

gcobb321 avatar gcobb321 commented on August 19, 2024

I've uploaded iCloud3 v2.1 to the iCloud repository development v2.1 directory here. It's a prerelease that changes the Stationary Zone process. See the changelog.md file for more info. Let me know if you download it and have any problems.

from icloud3.

manonstreet avatar manonstreet commented on August 19, 2024

I've installed the new update. Here are my observations:

  1. Stationary zones for both devices tracked by iCloud3 are created .5km north of my Home zone as noted in the Changelog.
  2. The device icon for both of those stationary zones is a person icon, and is not the first letter of the Friendly Name
  3. The following error is thrown on startup:
Logger: custom_components.icloud3.device_tracker
Source: custom_components/icloud3/device_tracker.py:5403
First occured: 10:05:49 AM (2 occurences)
Last logged: 10:05:49 AM

'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 5403, in _initialize_device_zone_fields
    first_initial = self.friendly_name.get(devicename)[0].lower()
TypeError: 'NoneType' object is not subscriptable
  1. In the iCloud3 Event Log card, the header does not show the Friendly Name of the user. Instead the name reads: null (devicename). For clarity, devicename is correct.

from icloud3.

gcobb321 avatar gcobb321 commented on August 19, 2024

You had a devicename of maximus a while back. Is that the name that is getting the error or is it another one? What does your config parameters look like. The track devices statement changed a little to remove the sensor_name_prefix and add a friendly name. ic3 tries to figure out the friendly name using the devicename. A name on the track devices parameter line will override it. In your situation, it sounds like it isn't figuring out the friendly name from the devicename and none is specified. I'll some checks for that situation. and let you know when it is ready.

from icloud3.

gcobb321 avatar gcobb321 commented on August 19, 2024

I have just updated a new version of iCloud3 that fixes the Friendly Name problem. It had to do with no first name in the iCloud account record for the device in the non-2fa account and not making the friendly name from the devicename when the tracking method was FmF. It now does not look at the iCloud account contact name but always makes it from the devicename or the name specified on the track_devices parameter line. You should be all set with this new version.

from icloud3.

manonstreet avatar manonstreet commented on August 19, 2024

That did the trick, thanks Gary.

I'd be curious how to set the friendly name using configuration parameters? Doesn't look like the docs are updated yet.

from icloud3.

gcobb321 avatar gcobb321 commented on August 19, 2024

from icloud3.

manonstreet avatar manonstreet commented on August 19, 2024

Both options are now functional. Using just - maximus makes the friendly name maximus, and -maximus > friendly_name allows me to override it.

from icloud3.

gcobb321 avatar gcobb321 commented on August 19, 2024

That's good that it's working now but what changes did you make to the config to eliminate the error. I'd like to duplicate it here so the problem doesn't happen to others going forward. In the mean time, I'll mess with the iosapp method to see if I spot anything.

from icloud3.

manonstreet avatar manonstreet commented on August 19, 2024

I have just updated a new version of iCloud3 that fixes the Friendly Name problem.

After you pushed the update related to the above comment, it started working without any configuration changes. I noted this with my comment: 'That did the trick'. Sorry if I wasn't clear.

In your follow-up comment on how to override the friendly name, you asked me to try with just using - maximus. I had already tried that and it was working successfully prior. I then tested with the friendly name override and commented that they both worked.

Also to note, I do have 2FA enabled on my icloud account. However as far as I can tell, iCloud3 doesn't attempt to login to iCloud as I do not receive a 2FA notification. I prefer it this way, since I am only using the iosapp features and am not keen on disabling 2FA. The point is, since iCloud3 isn't logging in, it wasn't able to grab my first name. I suspect the fix you applied for FmF edge cases is what corrected my problem since you noted that:

It now does not look at the iCloud account contact name but always makes it from the devicename or the name specified on the track_devices parameter line.

Hopefully that clears things up!

from icloud3.

manonstreet avatar manonstreet commented on August 19, 2024

Version .107 is bringing some new errors with the latest build. On start I see the following:

2020-03-18 19:00:27 INFO (SyncWorker_7) [custom_components.icloud3.device_tracker] None(None) Initializing v2.1 > Stage 1, Preparing iCloud3
2020-03-18 19:00:27 INFO (SyncWorker_7) [custom_components.icloud3.device_tracker] None(None) Set up Zones-
2020-03-18 19:00:27 ERROR (SyncWorker_7) [custom_components.icloud3.device_tracker] float() argument must be a string or a number, not 'NoneType'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 940, in restart_icloud
    self._initialize_zone_tables()
  File "/config/custom_components/icloud3/device_tracker.py", line 5242, in _initialize_zone_tables
    self.zone_home_radius_km = float(self.zone_radius_km.get(HOME))
TypeError: float() argument must be a string or a number, not 'NoneType'

...

2020-03-18 19:00:27 ERROR (SyncWorker_7) [custom_components.icloud3.device_tracker] 'Icloud' object has no attribute 'waze_history_data_used_flag'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 1081, in restart_icloud
    self._initialize_device_zone_fields(devicename)
  File "/config/custom_components/icloud3/device_tracker.py", line 5395, in _initialize_device_zone_fields
    self.waze_history_data_used_flag[devicename_zone] = False
AttributeError: 'Icloud' object has no attribute 'waze_history_data_used_flag'

...

2020-03-18 19:01:10 ERROR (SyncWorker_10) [custom_components.icloud3.device_tracker] ►►INTERNAL ERROR-RETRYING (_determine_interval:SetLocation-float() argument must be a string or a number, not 'NoneType')
2020-03-18 19:01:10 INFO (SyncWorker_15) [homeassistant.loader] Loaded august from homeassistant.components.august
2020-03-18 19:01:10 INFO (SyncWorker_6) [homeassistant.loader] Loaded tplink from homeassistant.components.tplink
2020-03-18 19:01:10 ERROR (SyncWorker_10) [custom_components.icloud3.device_tracker] 'Icloud' object has no attribute 'stat_zone_base_lat'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 1789, in _update_device_iosapp_trigger
    self._update_last_latitude_longitude(devicename, latitude, longitude, 1844)
  File "/config/custom_components/icloud3/device_tracker.py", line 4638, in _update_last_latitude_longitude
    elif latitude == self.stat_zone_base_lat and longitude == self.stat_zone_base_long:
AttributeError: 'Icloud' object has no attribute 'stat_zone_base_lat'

...

2020-03-18 19:01:31 ERROR (SyncWorker_7) [custom_components.icloud3.device_tracker] '>' not supported between instances of 'NoneType' and 'int'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 1988, in _polling_loop_15_sec_icloud
    self._request_iosapp_location_update(devicename)
  File "/config/custom_components/icloud3/device_tracker.py", line 2728, in _request_iosapp_location_update
    self.max_iosapp_locate_cnt):
TypeError: '>' not supported between instances of 'NoneType' and 'int'
2020-03-18 19:01:31 INFO (MainThread) [homeassistant.components.mobile_app.notify] mobile_app push notification rate limits for Maximus: 5 sent, 150 allowed, 0 errors, resets in 0:58:28
2020-03-18 19:01:31 ERROR (MainThread) [homeassistant.util.logging] Exception in update_data when dispatching 'mobile_app_location_update_089871a899ac40d2a2fddf0b3a884094': ({'gps': [40.447174072265625, -74.85114119160559], 'battery': 41, 'gps_accuracy': 65, 'vertical_accuracy': 10, 'altitude': 77.79744720458984},)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/device_tracker.py", line 151, in update_data
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 297, in async_write_ha_state
    self._async_write_ha_state()  # type: ignore
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
    state = self.state
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/config_entry.py", line 105, in state
    self.hass, self.latitude, self.longitude, self.location_accuracy
  File "/usr/src/homeassistant/homeassistant/components/zone/__init__.py", line 102, in async_active_zone
    zone.attributes[ATTR_LATITUDE],
KeyError: 'latitude'

2020-03-18 19:01:35 ERROR (SyncWorker_6) [custom_components.icloud3.device_tracker] unsupported operand type(s) for *: 'NoneType' and 'int'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 1503, in _polling_loop_5_sec_device
    if (dist_from_zone_m >= current_zone_radius_m * 2 and
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
2020-03-18 19:01:35 ERROR (SyncWorker_6) [custom_components.icloud3.device_tracker] Device Update Error, Error=<class 'ValueError'>
2020-03-18 19:01:40 ERROR (SyncWorker_8) [custom_components.icloud3.device_tracker] ►►INTERNAL ERROR-RETRYING (_determine_interval:SetLocation-float() argument must be a string or a number, not 'NoneType')
2020-03-18 19:01:40 ERROR (SyncWorker_8) [custom_components.icloud3.device_tracker] 'Icloud' object has no attribute 'stat_zone_base_lat'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 1789, in _update_device_iosapp_trigger
    self._update_last_latitude_longitude(devicename, latitude, longitude, 1844)
  File "/config/custom_components/icloud3/device_tracker.py", line 4638, in _update_last_latitude_longitude
    elif latitude == self.stat_zone_base_lat and longitude == self.stat_zone_base_long:
AttributeError: 'Icloud' object has no attribute 'stat_zone_base_lat'

NOTE: I tried reverting iCloud3 to the latest stable version of 2.05; however I still see these errors.

from icloud3.

gcobb321 avatar gcobb321 commented on August 19, 2024

The first error is occuring getting the radius of the Home zone, which defaults to 100m. Check Developer tools>States to see if there is a zone entity named Home and what the radius and location is. All of the other errors are the result of not setting up the Home zone within iCloud3 correctly. Have you set it up but called it another name?

Get the latest development version from the development v2.1 directory. I just updated to 0.107.0 and iCloud3 loaded ok. I had added some additional error checking when zones are loaded. Be sure to update the iCloud3-event-log-card too. The changeling file lists all the updates.

from icloud3.

manonstreet avatar manonstreet commented on August 19, 2024

This was actually a home assistant issue corrected in .107.1. None of my zones were loading correctly until I performed an update.

I have re-redeployed 2.1rc4. All appears to be working.

from icloud3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.