home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.78k stars 30.88k forks source link

Tractive integration doesn't complete #65892

Closed FS1961 closed 2 years ago

FS1961 commented 2 years ago

The problem

Doesn't seem to active/complete integration.

Logger: homeassistant.config_entries Source: config_entries.py:358 First occurred: 1:10:40 PM (1 occurrences) Last logged: 1:10:40 PM

Config entry '(user@login.com)' for tractive integration not ready yet; Retrying in background

What version of Home Assistant Core has the issue?

2022.2.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Tractive

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tractive

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: config_entries.py:358 
First occurred: 1:10:40 PM (1 occurrences) 
Last logged: 1:10:40 PM

Config entry 'someuser@me.com' for tractive integration not ready yet; Retrying in background

Additional information

I've checked my account and it's active and premium which is required.

probot-home-assistant[bot] commented 2 years ago

tractive documentation tractive source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @danielhiversen, @zhulik, @bieniu, mind taking a look at this issue as it has been labeled with an integration (tractive) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

bieniu commented 2 years ago

If config entry gets configured after some time (10-20 mins)?

Add this to your configuration.yaml file:

logger:
  default: error
  logs:
    homeassistant.components.tractive: debug
    aiotractive: debug

and post here the log.

FS1961 commented 2 years ago

Here is the log file and also screen print. log.txt

Screen Shot 2022-02-07 at 9 01 35 AM
bieniu commented 2 years ago

There is not a single entry related to tractive in this log.

FS1961 commented 2 years ago

Yes I noticed that as well.

bieniu commented 2 years ago

Have you added the logger configuration I posted above?

FS1961 commented 2 years ago

Yes, please see the "other" log and the yaml file configuration.txt log.1.txt

FS1961 commented 2 years ago

Is it maybe in the wrong place?

bieniu commented 2 years ago

Restart HA, wait 10 minutes and then post the entire log.

FS1961 commented 2 years ago

New log.txt Here it is after restart.

bieniu commented 2 years ago

Still no information about tractive in the log. Please remove tractive configuration entry and configure the integration once again, then post the log.

FS1961 commented 2 years ago

Okay I removed the integration, rebooted the machine. I added the integration again and restarted the server. Attached is the log. AF7AD1BD-6D7E-4CEB-9228-5AA7F630698C 8A63176F-739A-407C-B19D-B46E4D00043D F7D792D4-5FD5-4B54-8C0C-309FAB88E1A4

log 2022-02-08 19:29:55 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration localtuya which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-02-08 19:29:55 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-02-08 19:29:55 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration edgeos which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-02-08 19:30:10 ERROR (MainThread) [homeassistant.components.speedtestdotnet] Error fetching speedtestdotnet data: Unable to connect to servers to test latency. 2022-02-08 19:30:43 ERROR (MainThread) [unifi_discovery] Failed to get system info for 192.168.178.5 Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/unifi_discovery/init.py", line 432, in _probe_services_and_system system = await system_response.json() File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1103, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://192.168.178.5/api/system') 2022-02-08 19:30:43 ERROR (MainThread) [unifi_discovery] Failed to get system info for 192.168.1.1 Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/unifi_discovery/init.py", line 432, in _probe_services_and_system system = await system_response.json() File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1103, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://192.168.1.1/api/system') 2022-02-08 19:35:04 ERROR (MainThread) [custom_components.localtuya.common] [383...812] Connect to 192.168.1.86 failed Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/locks.py", line 413, in acquire await fut asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for fut.result() asyncio.exceptions.CancelledError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/localtuya/common.py", line 155, in _make_connection status = await self._interface.status() File "/config/custom_components/localtuya/pytuya/init.py", line 481, in status status = await self.exchange(STATUS) File "/config/custom_components/localtuya/pytuya/init.py", line 460, in exchange msg = await self.dispatcher.wait_for(seqno) File "/config/custom_components/localtuya/pytuya/init.py", line 247, in wait_for await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout) File "/usr/local/lib/python3.9/asyncio/tasks.py", line 494, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError

FS1961 commented 2 years ago

I've upgraded to the latest core and rebooted the machine. Here is the complete log, but note that the integration says it's still not running. 2022-02-10 14:08:31 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration localtuya which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-02-10 14:08:31 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration edgeos which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-02-10 14:08:31 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-02-10 14:09:32 ERROR (MainThread) [unifi_discovery] Failed to get system info for 192.168.178.5 Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/unifi_discovery/init.py", line 432, in _probe_services_and_system system = await system_response.json() File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1103, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://192.168.178.5/api/system') 2022-02-10 14:09:32 ERROR (MainThread) [unifi_discovery] Failed to get system info for 192.168.1.1 Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/unifi_discovery/init.py", line 432, in _probe_services_and_system system = await system_response.json() File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1103, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://192.168.1.1/api/system') 2022-02-10 14:13:41 ERROR (MainThread) [custom_components.localtuya.common] [383...595] Connect to 192.168.1.95 failed Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/locks.py", line 413, in acquire await fut asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for fut.result() asyncio.exceptions.CancelledError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/localtuya/common.py", line 155, in _make_connection status = await self._interface.status() File "/config/custom_components/localtuya/pytuya/init.py", line 481, in status status = await self.exchange(STATUS) File "/config/custom_components/localtuya/pytuya/init.py", line 460, in exchange msg = await self.dispatcher.wait_for(seqno) File "/config/custom_components/localtuya/pytuya/init.py", line 247, in wait_for await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout) File "/usr/local/lib/python3.9/asyncio/tasks.py", line 494, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError 2022-02-10 14:53:40 ERROR (MainThread) [custom_components.localtuya.common] [045...c34] Connect to 192.168.1.90 failed Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/locks.py", line 413, in acquire await fut asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for fut.result() asyncio.exceptions.CancelledError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/localtuya/common.py", line 155, in _make_connection status = await self._interface.status() File "/config/custom_components/localtuya/pytuya/init.py", line 481, in status status = await self.exchange(STATUS) File "/config/custom_components/localtuya/pytuya/init.py", line 460, in exchange msg = await self.dispatcher.wait_for(seqno) File "/config/custom_components/localtuya/pytuya/init.py", line 247, in wait_for await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout) File "/usr/local/lib/python3.9/asyncio/tasks.py", line 494, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError

bieniu commented 2 years ago

There is no information about tractive in the log.

FS1961 commented 2 years ago

I am happy to provide whatever information you require, however the integration just isn't firing up? Is there something I can do or some other information I can send you?

bieniu commented 2 years ago

I'm currently on vacation so next week I can help you but... I need a log. I can't do anything without the log.

FS1961 commented 2 years ago

Okay, it's not urgent. But I can't give you a log if the system isn't running the integration or the log is not being used.

FS1961 commented 2 years ago

Hah - finally got this error.

Logger: homeassistant.config_entries Source: components/tractive/init.py:82 First occurred: 5:18:40 PM (1 occurrences) Last logged: 5:18:40 PM

Error setting up entry fspatt@me.com for tractive Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 327, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/tractive/init.py", line 82, in async_setup_entry tractive = TractiveClient(hass, client, creds["user_id"]) TypeError: 'NoneType' object is not subscriptable

I can upload the entire log if it’s not enough.

FS1961 commented 2 years ago

Full log.txt

here's the whole log.

FS1961 commented 2 years ago

How was your vacation?

bieniu commented 2 years ago

Great, thank you. I can't reproduce your error. Could you show me the log captured during configuration of the integration?

FS1961 commented 2 years ago

Hi - I uninstalled the integration, restarted HASS, added the integration, waited a while. Here is the log home-assistant.log

FS1961 commented 2 years ago

I just noticed this. Two integrations side by side, yours with red cloud and it doesn't work!

Screen Shot 2022-02-28 at 1 16 25 PM

What's the difference?

bieniu commented 2 years ago

I uninstalled the integration, restarted HASS, added the integration, waited a while. Here is the log

There is no information about tractive in the log. Do you enable debug for tractive?

FS1961 commented 2 years ago

Yes, configuration.yaml.txt

Are you on Discord?

bieniu commented 2 years ago

Did the integration work after configuration?

FS1961 commented 2 years ago

No, it's never worked.

FS1961 commented 2 years ago

This is becoming ridiculous. It doesn't work.

Danielhiversen commented 2 years ago

Sorry for that. Without any relevant logs, it is not much we can do.

FS1961 commented 2 years ago

I understand, but what can I do? I've done everything you've asked for and it doesn't provide the logs.

FS1961 commented 2 years ago
Screen Shot 2022-03-01 at 10 07 49 AM

Clearly you can see it's loaded.

FS1961 commented 2 years ago

Well I got it working. I had to put this in the configuration.yaml and then restart HAOS. Then I added the integration. and now it works. Very weird

Screen Shot 2022-03-01 at 1 14 03 PM

Here is the log. home-assistant-2.log

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

yhalmarri commented 2 years ago

Well I got it working. I had to put this in the configuration.yaml and then restart HAOS. Then I added the integration. and now it works. Very weird Screen Shot 2022-03-01 at 1 14 03 PM

Here is the log. home-assistant-2.log

Hi, I have been having the exact same issue with my Tractive integration, may I ask what it was you added to your configuration.yaml file? I am new to Home Assistant, but I know how to edit this file. I still haven't gotten around to learning the syntax.

FS1961 commented 2 years ago

Hi !

I think I added this,

device_tracker:

bieniu commented 2 years ago

tractive core integration doesn't support yaml configuration. Maybe your system has custom tractive integration installed?

FS1961 commented 2 years ago

All I can say is that’s how I got this integration working. Could be that I had a custom integration but the only way I got the standard installation working was doing the above. Happy to send you any views of my system but as above, I’m not the developer, just a user that identified a problem.

yhalmarri commented 2 years ago

Thanks for the help, although it didn't work for me. It's a very strange error with nothing useful, I'll keep trying to fix it and see.

tbucher commented 2 years ago

Did anyone ever solve this in a reproducible way? Since today, I'm also running into this exact same issue:

image

image

Interestingly, it was running fine for months before. Today, I wanted to rename a device, because I assigned a tracker to a "new" pet, then the troubles started. Since then, the integration does not work anymore. Deleting/reinstalling multiple times, with and without HASS reboot did not work :-(

FS1961 commented 2 years ago

Although I appreciate the work that people put into these projects, this one seems to be a little quirky. I know that the authors are a little sensitive but I resolved MY issue in the way I described above.

nobert commented 2 years ago

I've had this problem for a while, and I tried a lot of things. What ultimately got it working for me was setting a shorter Tractive password. This may be a tractive-specific issue (although the longer password works in the app and the web inteface), or it may be that some part of HA is truncating it.