Open jbmorgado opened 4 years ago
I have exactly the same problem. Authentication worked with regular Lg account. No devices are shown.
Also when I use the headers and tokens in postman, I get bad request returned. Has the api changed?
I think you are probably running into the issue that this is trying to fix: https://github.com/sampsyo/wideq/pull/100
Basically: newer units and/or newer accounts can only use v2 of the API, that wideq doesnt support yet. Edit: see also https://github.com/sampsyo/wideq/issues/108
Having the same problem while trying to setup my newly installed LG AC on a new LG account.
Same here :( Hope there will be a working version soon
I did get wideq to show my devices with branch api2_merged from this fork: https://github.com/gladhorn/wideq.git However, I cannot get the custom integration to pick this up. I have both git repo's checked out to my custom_components dir, but the wideq one is probably in the wrong location?
@lvlie yes, i confirm that wideq version from that repo lists my devices. I'll try to use it in HA
@lvlie yes, i confirm that wideq version from that repo lists my devices. I'll try to use it in HA
That doesn't seem to work, I tried forcing the wideq from gladhorn, resulted in:
Traceback (most recent call last):
File "/home/ha/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 191, in _async_setup_component
result = await task
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/username/.homeassistant/custom_components/smartthinq/__init__.py", line 79, in setup
client = wideq.Client.from_token(refresh_token, region, language)
File "/home/username/.homeassistant/custom_components/wideq_fork/wideq/client.py", line 215, in from_token
client._auth = core.Auth(client.gateway, None, refresh_token)
core.Auth def in gladhorns repo:
class Auth(object):
def __init__(self, gateway, oauth_url, access_token, refresh_token):
Looks like its missing a parameter, just adding another 'None' in there doesn't work.
Edit:
Replacing the client = wideq.Client.from_token(refresh_token, region, language)
line with a wideq.Client.load(state)
, hardcoding the wideq_state.json contents in the state var, also doesn't fix it, throws a NotLoggedIn exception. Solving that with a forced client.refresh() shows the next missing implementation (edm_post) and so on. Gladhorn's fork doesn't seem finished for home assistant integration.
@JasperE84 thank you for your test. It seems that The code od not ready for HA. But at least it is possible to interact with V2 API. Could you tell me how you managed to override wideq in HA. I have my HA on RPi.
Check
@JasperE84 thank you for your test. It seems that The code od not ready for HA. But at least it is possible to interact with V2 API. Could you tell me how you managed to override wideq in HA. I have my HA on RPi.
Check out https://askubuntu.com/a/471168/568023
So with the gladhorn fork I can list my AC, but not give any instructions to the AC.
On the cmdline yes, only listing will work. In home assistent nothing will work. The Thinq custom component will crash upon loading in hass. (After sensor/components are found and registered I think it tried setting up sensor data monitoring which failed because of a missing edmpost method.) Fingers crossed @sampsyo, maybe with help from @ollo69, will get the lg API v2 to work and implemented.
Hi, I have an old account with 2 old Mural AC's and all works good, but today a installed a new AC at my home and i added this new device on my account. The new AC is not listed in the wideq only the old's 2 AC's. Is possible that in the same account 2 devices use the v1API and the new use v2 API ? Tks in advance.
I tried a new setup.
Still, I can't get any device listed: