In development: LG SmartThinQ component

correction:
I am now able to see my washing machine (LG F4V508WS) using this wideq client (https://github.com/gladhorn/wideq/tree/api2_merged).

Now to get that information into homeassistant :smile:

2 Likes

Hi there,
how did you install wideq ?

Does anyone have a ELI5 version of how to get this all working in HASSIO? I’m not great with this stuff but really want to work it out

Hi!
I try connect my washer “WASHER WTWN3” with home assistant I see there is a bunch of this plugins.
Which one works with European washers?

Which wideq client is the better one to use for USA based appliances?


or

Looks like Gladhorn’s hasn’t been updated for 24 days, while Sampsyo’s had some logging added 6 days ago.

Don’t suppose there’s a version out there somewhere that consolidates all this so there aren’t multiple forks of the same project. Something this small and niche really shouldn’t be forked. Work together please!

Hi! This is just my opinion, but I think my (@sampsyo’s) original repository is indeed that “version that consolidates all this.” Many people have helped out by making changes and sending them back to the origin point, which is awesome. @gladhorn’s fork is an example; most of the stuff happening there has been merged back—except for the APIv2 work, which is still ongoing.

1 Like

Would someone that has managed to get a US washer and dryer to work in hassio within docker be willing to post a step by step walk through? I’ve gotten @GuGu927 wideq version to work and in fact it recognized the washer and dryer as sensors but wasn’t passing any information to home assistant. At the same time there weren’t any errors in the log. I’ve tried many other wideq version with much less luck. Has anyone got it running properly in hassio with Docker?

4 Likes

I would also love to see this. I’ve gotten wideq working, but never had any success with the Home Assistant side of things.

1 Like

Who’s leading the effort on the APIv2 at this point?

Hi,

i got this error after setting up my configuration:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 174, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/smartthinq/__init__.py", line 69, in setup
    client = wideq.Client.from_token(refresh_token, region, language)
  File "/usr/local/lib/python3.7/site-packages/wideq/client.py", line 220, in from_token
    client.refresh()
  File "/usr/local/lib/python3.7/site-packages/wideq/client.py", line 203, in refresh
    self._auth = self.auth.refresh()
  File "/usr/local/lib/python3.7/site-packages/wideq/core.py", line 282, in refresh
    self.refresh_token)
  File "/usr/local/lib/python3.7/site-packages/wideq/core.py", line 231, in refresh_auth
    raise TokenError()
wideq.core.TokenError

Whats wrong with my token? I’ve updatet smartthinq and wideq to the newest version.

Any ideas?

Thanks

Hi all,

I created a new custom component for LG Washer based on SmartThinq / WideQ.
The component supports config_flow and simplify the initial creation of the token using UI.
Do not require installation of thirdy part library,
I need to complete readme and the settings for HACS, if someone is interested to start testing and give me some feed-back is welcome.

4 Likes

I have a super hacked custom component that is a heavily modified fork of sampyso’s that works for my washer and dryer. However, I gave this a shot just to see how it worked. I haven’t used config flow before, will absolutely start using that on new custom components.

Since the README isn’t filled out, I’m not sure if this is an error on my part or not. I used the region/locale/token I use for my existing integration and it saved no problem. However it looks like there was an error during setup. I created an issue for you on github. https://github.com/ollo69/ha-smartthinq-washer/issues/1

Can you provide me the code of your hacked custom component so that I can compare with mine and merge it. It seems that LG have a lot of difference related to locale that have to be managed.
Please if you can attach the code as zip file to the issue.

Thanks.

Hello everyone,
I am trying to configure this method but I am receiving the following error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 453, in wrap_socket
    cnx.do_handshake()
  File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1915, in do_handshake
    self._raise_ssl_error(self._ssl, result)
  File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1647, in _raise_ssl_error
    _raise_current_error()
  File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
    raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_ske_dhe', 'dh key too small')]

Does anyone know how to fix this?
Thanks in advance.

Trying to use your component, but when I try to set up the integration, I’m unable to get the redirection URL. I just get a 404 error. My LG app was logged in using my Google Account and that’s what I’m using with the integration.

2020-04-02 15_22_02-https___us.m.lgaccount.com_login_iabClose_thirdpartylogin_third_party_type=GGL&f

EDIT: I was able to get a token by creating an LG account, but I keep getting the “No SmartThinQ devices found” message. I’ve removed and re-added my devices multiple times.

What could be the issue?

You cannot use social network account for this, doesn’t work.
I think that you don’t see any device because your device are still associated to the google account and not to the new created.
You must login in the phone app with the new created account and associate your devices. At this point you can use the HA component for generating a new token and complete the configuration.

This issue sometime occurs on some LG servers. My component contain the fix to avoid this problem.
If you want to solve the problem on other version, you can browse the code of the module “wideq.py” and check the method called “gateway_info”.

2 Likes

I did remove them from the Google created account. I’ll generate a new token and see if that does it.

I was only able to generate a token with the LG account so I figured it would work.

EDIT: Same error.

Yes, it is working!
Thank you so much! :heart_eyes:

I removed all devices from the thinq app. Logged out. Logged in with my LG account. Re-added the devices. Went through the HA component setup generating a new token. No devices found.

I’m not sure what else I can do at this point. I have both a washer and dryer. Models WM3900HBA and DLEX3900B.