LG Smartthinq Air Conditioning

Well it could be device dependent but I expect more people to suffer from it then. From what I can tell the fork is API v2 specific. Apparently there is an API v1 and v2. Maybe that’s also causing the issues. I’m on HA v0.112.4 btw.

I tried some additional things like I was able to install in HASS and it now shows up in the HASS integration:


(For people like me that couldn’t find it: to add custom integrations you need to go to HASS > Integrations > 3 dots icon > Custom integrations)
However, that was causing the same Warning message and still no devices.

Then, I saw a suggested quick fix for the sampsyo repo that was not released yet:

I applied the fix (just a single line of code needs to be changed) and the warning is gone now but still no luck with the device in HA.

I’m thinking of diving into the world of Python programming to see if I can work out a solution myself :-).

I installed this software i get 2 tokens (washing machine and aircodnition). When I add this to configuration file i recive error “The following integrations and platforms could not be set up: smartthinq

Marcin

@Neoc83 have you tried running wideq from the command line? Heres and example of mine thats working. You plug in the first command, get its output and insert into the second (and third) command. If you DONT get values back like mine then that would be something to look into (sorry for night mode colors on my screenshot!)

Good soot on the issue on GitHub by the way (bless that platform!). And yeah it seems i was right, dont reckon thats your issue

1 Like

The first command “ls” is working fine but the other 2 “ac-mon” and “ac-config” are throwing an error:

NameError: name 'lgedm_post' is not defined.

Python traceback:

Traceback (most recent call last):
  File "example.py", line 237, in <module>
    main()
  File "example.py", line 233, in main
    example(args.country, args.language, args.cmd, args.args)
  File "example.py", line 193, in example
    example_command(client, cmd, args)
  File "example.py", line 169, in example_command
    func(client, *args)
  File "example.py", line 144, in ac_config
    print(ac.get_filter_state())
  File "/home/coen/docker/hassio/homeassistant/custom_components/wideq/wideq/ac.py", line 239, in get_filter_state
    return self._get_config('Filter')
  File "/home/coen/docker/hassio/homeassistant/custom_components/wideq/wideq/client.py", line 436, in _get_config
    key,
  File "/home/coen/docker/hassio/homeassistant/custom_components/wideq/wideq/core_v2.py", line 382, in get_device_config
    'data': '',
  File "/home/coen/docker/hassio/homeassistant/custom_components/wideq/wideq/core_v2.py", line 277, in post
    return lgedm_post(url, data, self.auth.access_token, self.session_id)
NameError: name 'lgedm_post' is not defined

Hmm…I don’t get anything back when I run “python3 example.py ls -c US -l en-US”. No errors either. I was able to log in and it generated the .json with the token, etc.

I’m using Facebook login to LG, which according to the wideq github should work.

It works with the apiv2 branch https://github.com/gladhorn/wideq/tree/api2_merged :

# python3 example.py -c US -l en-US
#####: AC (AC WIN_056905_WW)

Id suggest reaching out to sampsyo and gladhorn (via a GitHub ‘ issue ‘) and get them merge and reconcile the fork. Ive no idea of the reasons for the fork that gladhorn made, and i wonder if sampsyo knows it exists. Obv better to have all exceptions handled in the same code if possible.

Hello to everyone. I have alreasy setup the air condition, but I have to tell there is a delay of the responses. Do you also have this problem?

1 Like

i am struggle with the LG AC integration.
wideq from https://github.com/sampsyo/hass-smartthinq only find an manualy added AC (DB-klima-test) in the ThinQapp
wideq from https://github.com/gladhorn/wideq/tree/api2_merged find the the manualy and the real (Klimaanlage) AC
$ python3 example.py -c DE -l de-DE
DB-klima-test (AC Normal-401)
Klimaanlage (AC RAC_056905_WW)

after the integration i add it in the configuration.yaml and reboot the system
smartthinq:
token: [refresh_token]
region: DE
language: de-DE

i get the homeassistant notification:
SmartThinQ Error
SmartThinQ device not available: Db-klima-test > i think this is ok.
But i can not find the AC´s “Klimaanlage” or "Db-klima-test " in Devices or Entities

How do-able is this for a Linux amateur? Can all the scripts be executed from within HASSIO? Also is there any delay in response?

Thanks :slight_smile:

Karsten,

It is pretty straightforward if you follow the instructions. I had very little Linux to do - that was more about not having some pre-requisites installed particular to my Hyper-V based VM.

Give it a go - the peeps on here are really helpful if you get stuck but the key is to follow the instructions as far as you can first.

Cheers,

Phil

Is it true that the Python command can not be executed from within Terminal/SSH from within Home Assistant?

Yes but you don’t need to. you can do most of the set-up from the front end now.

I could not find the repository in HACS so I manuelly added both WideQ & Smartthing to custom comp folder. Can you now also retrieve the token from the front-end? Also is the Wideq Api2 a better/newer option?

Hi,
Did someone face sucha a situation?: I installed LG SmartThinQ Appliances and I was able to get the refresh token. After defining:

smartthinq:
    token: xxxxxxxxx
    region: DE
    language: en-US

in my congiuration.yaml file and restarting HA I’m getting the notiication that I should check my configuration file because the smartthinq integration is invalid. Of course, I can’t see my AC devices in HA.

obraz

I’d be really glad for your help!

log info:

Is there any other information or guide to successfully add an AC?

1 Like

nope wideQ is junk and not supported smarthing does not work either

Hi,
I am new to HA and have been tinkering on the system for 2 months now.
I am trying the addon (https://github.com/ollo69/ha-smartthinq-sensors) steps but I think I encountering some errors on language and country code. I don’t think it is my country but the country where my account database is.
So you have any idea how to retrieve this info?

PS: I am from Brazil.


Olá @brazil885

Você conseguiu finalizar a configuração? Acredito que o erro seja no código do país e lingua.

Estou tentando o addon pelo HACS (https://github.com/ollo69/ha-smartthinq-sensors).

I almost made it work using BR as country and en-US as language with @filipecalvo reply ( LG Smartthinq Air Conditioning )

No errors on log but no sensors created… :frowning:


Fiz quase funcionar usando BR como pais e en-US como idioma com a resposta do @filipecalvo ( LG Smartthinq Air Conditioning ).

Sem erros no log mas nenhum sensors criado… :frowning: