ollo69 / ha-smartthinq-sensors

HomeAssistant custom integration for SmartThinQ LG devices configurable with Lovelace User Interface.
Apache License 2.0
1.15k stars 159 forks source link

[BUG] can not add integration because wrong login #89

Closed pepsonEL closed 3 years ago

pepsonEL commented 4 years ago

Describe the bug Hi. I installed by HACS intergration this. Then reboot HA and add integration i setup. Then setup language as PL and pl... open link in web browser and copy link from browser to integration below. And integration show me wrong data login.....

KTibow commented 4 years ago

Can you send a screenshot?

  1. Copy link
  2. Open new tab
  3. Paste link
  4. Login to LG
  5. Copy the link
  6. Paste it in the bottom forum

Make sure your app is up-to-date, you've accepted TOS, and you're not using a social account (I was able to make it work with a social account though).

Weom85 commented 4 years ago

Same issue here ! everything is up to date from fr-CA was working before

Logger: custom_components.smartthinq_sensors.config_flow Source: custom_components/smartthinq_sensors/config_flow.py:135 Integration: SmartThinQ LGE Sensors (documentation) First occurred: 16:38:51 (3 occurrences) Last logged: 16:43:05

LGE ThinQ: Invalid Login info!

////////////////////////////////////////////////////////////

Logger: custom_components.smartthinq_sensors Source: custom_components/smartthinq_sensors/wideq/core_v2.py:150 Integration: SmartThinQ LGE Sensors (documentation) First occurred: 16:24:37 (16 occurrences) Last logged: 16:43:05

Error connecting to ThinQ Traceback (most recent call last): File "/config/custom_components/smartthinq_sensors/init.py", line 127, in createClientFromToken client = ClientV2.from_token( File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 736, in from_token client.refresh() File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 718, in refresh self._load_devices() File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 592, in _load_devices self._devices = self._session.get_devices() File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 441, in get_devices dashboard = self.get2("service/application/dashboard") File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 428, in get2 return thinq2_get( File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 150, in thinq2_get raise API2_ERRORS[code]() custom_components.smartthinq_sensors.wideq.core_exceptions.InvalidCredentialError

KTibow commented 4 years ago

@Weom85 Make sure your app is up-to-date, you've accepted TOS, and you're not using a social account (I was able to make it work with a social account though).

Weom85 commented 4 years ago

@Weom85 Make sure your app is up-to-date, you've accepted TOS, and you're not using a social account (I was able to make it work with a social account though).

I don’t know what TOS is but like I told you it was working before with normal email credential and everything, home assistant, HACS and the LGE sensor integration is up to date

KTibow commented 4 years ago

@Weom85 Can you access SmartThinq with the app on your phone?

Weom85 commented 4 years ago

@Weom85 Can you access SmartThinq with the app on your phone?

It’s seems the app had an update I’ll try something I’ll let you know the result

Weom85 commented 4 years ago

Working for me now thx

Brahmah commented 4 years ago

@Weom85 What did you try? After a restart of HA, I'm experiencing the same issue.

pepsonEL commented 4 years ago

For me now also works ok. Thanks

robertfgoodworth commented 4 years ago

I'm also getting the same issue now, everything has been working well for months, everything is up to date, i've not changed anything, only started happening 24 hours ago. Below are the logs.

LOGS:

2020-09-26 21:25:36 ERROR (SyncWorker_20) [custom_components.smartthinq_sensors] Error connecting to ThinQ Traceback (most recent call last): File "/config/custom_components/smartthinq_sensors/init.py", line 127, in createClientFromToken client = ClientV2.from_token( File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 736, in from_token client.refresh() File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 718, in refresh self._load_devices() File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 592, in _load_devices self._devices = self._session.get_devices() File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 441, in get_devices dashboard = self.get2("service/application/dashboard") File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 428, in get2 return thinq2_get( File "/config/custom_components/smartthinq_sensors/wideq/core_v2.py", line 150, in thinq2_get raise API2_ERRORS[code]() custom_components.smartthinq_sensors.wideq.core_exceptions.InvalidCredentialError 2020-09-26 21:25:36 WARNING (MainThread) [custom_components.smartthinq_sensors] Connection not available. SmartThinQ platform not ready

Brahmah commented 4 years ago

Same, This has been working flawlessly for months until yesterday, I noticed the sensors were unavailable. After a restart of HA with no favourable outcome, I attempted to remove the integration and re-configure it. Upon doing so, I was confronted with the exact same logs and behaviour described by @robertfgoodworth along with authorisation failure. I presume this may be an API change on LG's end but am not yet able to confirm.

ollo69 commented 4 years ago

TOS is Term Of Service. If TOS changed, you must agree new ones. To do this you must use the ThinQ phone app, eventually try to logout and login again in phone app if new TOS is not shown to you. LG API are working properly, no change!!!!

robertfgoodworth commented 4 years ago

Ah ok, worked it out too. It appears LG updated there app (google play store for me), and it now prompts you to agree to a new licence agreement, this is stopping the API creds. Simply use the android app and agree to the licence stuff and logon, you can then log off and now your API creds will work and so will this integration. Oh restarted HA just to be sure and now my integration is working again.

Brahmah commented 4 years ago

This would have likely worked for me, however, I removed the integration and am now unable to re-add it.

ollo69 commented 4 years ago

For which reason? Error detail?

Brahmah commented 4 years ago

Details Used: Region: AU Language: en Problem Upon gaining the link and logging in, I'm redirected to a blank page (which is normal). I then copy the link into the GUI configurator and receive the message "Invalid SmartThinQ credentials." Before removing the integration and accepting the licence agreement, I experienced the same log output as @robertfgoodworth.

ollo69 commented 4 years ago

So you don't have issue to add integration but to configure it. And this is is the same issue, you need to agree new TOS in phone app before!!

Brahmah commented 4 years ago

I already had this integration running for months until recently when all device became unavailable. One of the first things I attempted was to remove the integration and re-add it. [At that point I had already accepted the TOS on my phone]. When re-adding the integration, I am unable to complete the process. In hindsight, I should have attempted to accept the TOS before removing the integration. I am now unable to re-configure the integration.

ollo69 commented 4 years ago

Are you using social network accout or LG account?

Brahmah commented 4 years ago

LG Account, the same one I have been using for the past few months.

ollo69 commented 4 years ago

Try to remove component from HACS, reboot HA, than reinstall and reconfigure. If still not work open a new issue providing all possible detail including some picture,

Brahmah commented 4 years ago

UPDATE: I tried using a social network account and it worked! For anyone experiencing this issue, Do Not Use An LG Account, Instead Use A Social [I used Google]. It doesn't seem to work with LG accounts.

ollo69 commented 4 years ago

Normally is exactly the opposite, but we know also that social network sometimes work. In any case the most important think is that phone app and integration use the same account.

Brahmah commented 4 years ago

Yes, It's interesting. For me, the LG account does not work, however, the Social does. I'd be curious to pinpoint the correlation between when it works and doesn't to find out under what circumstances it functions. Could it depend on region? Type of social account?

ollo69 commented 4 years ago

Really complex to understand, a starting point should be create a survey to collect all experience.

Brahmah commented 4 years ago

Maybe create and pin an issue on Github with a template to provide basic details as to how their accounts are set up to better understand what causes such discrepancies?

ollo69 commented 4 years ago

I can pin :)

Brahmah commented 4 years ago

@ollo69 Done :) Hopefully, its what you wanted, otherwise close it.

omayhemo commented 4 years ago

Never would have thought to log back into the app I never use to accept the ToS. Thanks!!