gcobb321 / icloud3

iCloud3 v3 - iCloud3 is an advanced iDevice tracker that uses Apple iCloud account and HA Companion App data for presence detection and location based automations.
MIT License
498 stars 52 forks source link

HA freezes when entering Home Zone #319

Open gcobb321 opened 3 months ago

gcobb321 commented 3 months ago

@26tajeen I have opened a new issue for this problem so balloob does not get a notification on every post for this issue.

  1. Turn on Debug logging - Configure Settings > Page 2 > Format Parameters screen > Log level > Debug
  2. Restart HA
  3. Run everything until you get the freezer.
  4. Send me the complete icloud3-0.log and home-assistant.log files. Email to geekstergary@gmail.com
26tajeen commented 3 months ago

Current working theory

my home-assistant_v2.db got corrupted due to all the freezes/restarts. Now I have 'hangover issues' from that, and actually the icloud3 repo you provided MAY have solved the original issue. I'll install and retry....

26tajeen commented 3 months ago

Hi Gary, will email you the HA logs. Currently my HA is freezing so often I can't even get in to the UI to export the event logs. SSH always works - is there somewhere I can access them from the file system to export them?

26tajeen commented 3 months ago

Hi Gary, not sure if you got my email or not, but my latest theory is this script might be responsible for the crashes

gcobb321 commented 3 months ago

I looked at the log file you sent and iCloud3 was doing its normal startup and just stopped. I don’t think iCloud3 is the problem. The Python script code looks ok but why are you running it and what entities are you force setting? Comment it’s out of your HA config and see what happens. When trying to solve a problem like this, you have to remove one thing at a time and see if it then works. If it does, you have found the p problem

26tajeen commented 3 months ago

Yeah, I've removed all references to that script from my automations and my HA has been stable ever since. It's only been a day but it's a MASSIVE improvement on what it was. Screenshot 2024-03-15 at 14 40 31

gcobb321 commented 3 months ago

Great. Sounds like progress. v3.0.1b4 that fixes that problem.

Here is the latest v3.0.1b4

Unzip into the icloud3 directory and restart HA. icloud3_v3.0.1b4.zip

Change Log : v3.0.1 - 3/15/2024

  1. UPDATE SENSOR & DEVICE TRACKER ENTITIES (Improvement) - Changed the method of updating these items at the request of @balloob (Paulus Schousten, HA Founder) to prevent a potential Home Assistant lockup when doing an update.
  2. LOG FILE (Improvement) - Changed the method of updating the iCloud3 log files. Also changed some of the record formatting to improve readability.
  3. WAZE & CALC DISTANCE SENSORS (Fixed) - They were not being created.
  4. UPDATE DEVICES CONFIGURE SCREEN (Fixed) - The Picture parameter was listing every image file in the all of the www/ sub-directories. A filter was added to limit the search to specific directories. The filter is defined on the Tracking and Other Parameters screen. Only the first 25 image files in a directory will be displayed to prevent overloading the HA dropdown list handler.
  5. FIXED INTERVAL (Improvement) - The lowest interval was reduced from 5-minutes to 3-minutes.
  6. DIRECTION OF TRAVEL (Improvement) - Changed the way this is being updated. If the distance from Home is more than 400m/250mi, it will be set to FarAway.
  7. STATIONARY ZONE (Fixed) - The second device to enter an existing Stationary Zone was not saving the Stationary Zone info correctly.
26tajeen commented 3 months ago

You are an amazing dev!