gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
169 stars 13 forks source link

Sensors stop updating a few seconds before 12:00 #366

Open giugit opened 1 week ago

giugit commented 1 week ago

All sensors stop updating a few seconds before 12:00. What could be the cause?

giugit commented 1 week ago
Sensori_iCloudv3
gcobb321 commented 1 week ago

Check Event Log to see if there are any startup messages. Check HA developer tools > started to see if HA added a _2 extension to the sensor names. It probably did and the ones being displayed are not the ones being updated.

giugit commented 1 week ago

I don't understand what i have to check in "Check Event Log to see if there are any startup messages." About "started to see if HA added a _2 extension to the sensor names" i already verified this and is not the problem, the sensor not update the correct sensor name and this happen at around midnight for all sensors. I tried also to uninstall and install again the integration but the result is the same Thanks

gcobb321 commented 1 week ago

A lot of info is displayed in the Event Log where icloud3 starts. An error would be displayed when setting up the entities if there was a problem with names and alerts would be displayed if the Apple account was not being logged into. A device that is tracked will have an enter for each event.

Try Event Log > Actions > Relocate All Devices and review each device to see if it was located and updated. If it was located and messages are displayed, then the problem is probably with entity names. Look on HA Developer Tools > States for your entire, their names and their candies.

giugit commented 1 week ago

I probably didn't explain my problem well, so I'll try using a translator which might be better than me in English. I have completely uninstalled the integration, I have done it several times, and then reinstalled it. Everything works perfectly throughout the day, but when midnight arrives, all sensors stop updating. There is no problem with the sensor names which I have checked multiple times to be correct. Any ideas?

gcobb321 commented 1 week ago

So you are saying that it rung ok during the day and then just stops tracking everything at midnight? A restart (just a restart, not a reinstall), starts tracking everything again and it stops again at the next midnight?

The only thing iCloud3 does at midnight is to roll over the log file and rebuild the Waze History data base files.

Are there any iCloud3 error messages in the HA logs? (HA Sidebar > System > Logs) Are you using the Waze? Than the history data base would be enabled. Disable it on the Configure Settings > Waze screen to see if that does anything.

giugit commented 1 week ago

Also this night at midnight sensor update stop to works

There are no icloud errors in logs

I don not use waze

Restarting Home Assistant work again

I use Here In the sensor setup something happen at 12:00 see the screenshot

In the logs this error for Here

Registratore: homeassistant.components.here_travel_time.coordinator Fonte: helpers/update_coordinator.py:382 Integrazione: HERE Travel Time (documentazione, problemi) Prima occorrenza: 09:05:03 (27 occorrenze) Ultima registrazione: 09:45:04

Unexpected error fetching here_travel_time data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 382, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/here_travel_time/coordinator.py", line 89, in _async_update_data response = await self._api.route( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/here_routing/here_routing.py", line 190, in route response = await self.request(uri=ROUTES_PATH, params=params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/here_routing/here_routing.py", line 121, in request raise HERERoutingUnauthorizedError(json.loads(decoded_contents)["error_description"]) here_routing.exceptions.HERERoutingUnauthorizedError: Sentry-EUM Error. EUM returned HTTP response code of 401 for https://account.api.here.com/authentication/v1.1/extendedApiKeys/ImXC-5u4V2*****. The Server error message was {"errorId":"ERROR-2ed2ceef-3daa-46cd-b665-e32f52f3cfaf","httpStatus":401,"errorCode":401311,"message":"Requesting client hB759D5hYnws2lgRywMd status is not active.","error":"invalid_request","error_description":"errorCode: '401311'. Requesting client hB759D5hYnws2lgRywMd status is not active.","correlationId":"b06896b4-af1f-4886-aea2-199b60650111"}. The Sentry cache was therefore not updated. X-HERE-TID="null" The Server error message was {"errorId":"ERROR-2ed2ceef-3daa-46cd-b665-e32f52f3cfaf","httpStatus":401,"errorCode":401311,"message":"Requesting client hB759D5hYnws2lgRywMd status is not active.","error":"invalid_request","error_description":"errorCode: '401311'. Requesting client hB759D5hYnws2lgRywMd status is not active.","correlationId":"b06896b4-af1f-4886-aea2-199b60650111"}. The Sentry cache was therefore not updated. X-HERE-TID="null"

Sensori_iCloudv3_2 Sensori_iCloudv3_3
gcobb321 commented 1 week ago

It does look like another HA Integration also gets disconnected when your router is rebooted and the http cannot connect with its data source. To fix this, you will need to restart HA after your router is rebooted. I would create an automation to restart HA using the home_assistant.restart Action with the time you want it to restart. There are probably examples in the HA docs.

giugit commented 1 week ago

It's a coincidence that this morning I had to restart the router, but the issue with iCloud3 is not related to this. It occurs even without restarting the router.

gcobb321 commented 1 week ago

It looks like you have an in zone interval of 1-min. If that is true, increase it to at least 5-min. The errors above your screen shots are about communication problems and your router losing its connection with the internet.

httpStatus":401,"errorCode":401311,"message":"Requesting client hB759D5hYnws2lgRywMd status is not active."

It does not appear that this its an iCloud3 issue.

giugit commented 1 week ago

It seems really difficult to understand each other.

You asked me if I use Waze and I replied no, instead I use "HERE." "Here" is an integration, and I posted an error that is related to "HERE," not iCloud3. It seems clear and evident to me!!!

It's clear that this error is not related to iCloud3!!!

The problem with iCloud3 is that it stops to work at midnight and has done so again now!!! This is the problem, and it is only related to iCloud3. I don't know how to explain it any other way!!!

You wrote to set the interval from 1 to at least 5... but which interval, where is this setting??? Where can I make this change??? Thank you

JtwoA commented 1 week ago

You asked me if I use Waze and I replied no, instead I use "HERE." "Here" is an integration, and I posted an error that is related to "HERE," not iCloud3. It seems clear and evident to me!!! You wrote to set the interval from 1 to at least 5... but which interval, where is this setting??? Where can I make this change??? Thank you

"It looks like you have an In zone interval of 1-min. If that is true, increase it to at least 5-min." is what @gcobb321 said. This is a picture of what he's referring to:

image

Further, @gcobb321 said "Are you using the Waze? Than the history data base would be enabled. Disable it on the Configure Settings > Waze screen" - since you are using "HERE" (which, from what I can tell, is actually called "HERE WeGo") then the answer to Gary is "no, not using Waze" which then leads you to his answer of "disable it on the Configure Settings > Waze screen". Did you disable it?

giugit commented 1 week ago

Very Thanks I not have nothing setting to 1 min... Now I disabled waze route service and waze history database... Now i have only to wait what will happen tonight at midnight... I will tell you Thanks Again

ZoneTime Waze
gcobb321 commented 1 week ago

@giugit The values on the inZoneParameters … screen are default values and only used when setting up a device. The in zone and fixed interval settings being used are set for each device on the Configure Settings > Update Devices screen. Your values may be correct and the value i noticed may have been the interval being used in that tracking event.

My comment of the error you posted was that your internet connection was interrupted and effected all apps that used it to include HERE WeGo and iCloud3.

Can you change the time your router reboots to another time?

giugit commented 1 week ago

Last night it didn't stop... maybe the problem is solved... let's see what happens next night at midnight. If the problem is solved, it was due to Waze being enabled without the integration installed. Very Very Thanks!

gcobb321 commented 1 week ago

Actually, the Waze option does not use the integration. It sends a time/distance directly to the Waze servers. But that’s good it continues to run without problems.

giugit commented 1 week ago

I confirm that the problem is solved by disabling Waze, everything works now! The values of the various devices have now started to update more slowly (several minutes) whereas before they were updating continuously. I have also enabled the Waze integration and will try to re-enable the options that disabled WAZE ROUTE SERVICE and WAZE HISTORY DATABASE even though I'm not entirely sure what their purpose is. Thank you.

HAWaze
gcobb321 commented 6 days ago

You do not need the Waze integration. iCloud3 calls Waze directly and does not use it.

giugit commented 5 days ago

I confirm that reactivating the WAZE HISTORY DATABASE at midnight causes updates to stop... just to complete the post. That’s how it works for me... Thanks for the support.