LG Smart ThinQ

I have merged and adjusted recent changes from the original repository. As the result this project should support now Air Conditioners and Wash Towers.
Happy testing.

1 Like

The connection to the LG MQTT Service seems to be broken. In result no updates will be published to/by the proxy for v2 devices.

I tried to change the hostname from common-ats.iot.eic.lgthinq.com to common.iot.eic.lgthinq.com without success.

Is it still working for you @mgw ?

Update:
I replaced the MQTT host with a3phael99lf879-ats.iot.eu-west-1.amazonaws. com and it is working now! I assume this hostname should be determined by the init command, but the API is currently returning common.iot.eic.lgthinq. com, which is not working …

Hi @mgw,

I managed to get this working with my Thinq2 devices. I still have 2 Thinq1 devices which is working with the LG Home App. But they cause and error in your software so I cannot use my Thinq2 devices at all. Can you implement V1 or just ignore them?

I really interested in V1->V2 conversion if you can give me some directions. You mentioned earlier:

Exception:

Exception in thread “main” groovy.lang.MissingPropertyException: No such property: refreshV1Devices for class: ThinQ_Integration
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:65)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:341)
at ThinQ_Integration.initialize(ThinQ_Integration.groovy:383)
at ThinQ_Integration.installed(ThinQ_Integration.groovy:313)
at ThinQ_Integration$installed$4.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)
at ThinqMqttProxy.doRun(ThinqMqttProxy.groovy:47)
at ThinqMqttProxy.main(ThinqMqttProxy.groovy:18)

I’ve found refreshV1Devices in ThinQ_Integgration.groovy but I don’t have any experience in groovy at all…

Great that you have resolved it. It is also working fine for me.

Regarding conversion - I cannot find this information anywhere. From what I remember, it was about creating a new account and assigning all devices to this new one.

Regarding this problem with V1, I do not have such devices so I cannot verify this part of logic. I can try to fix it if you can send me your state.json file (via private message).

Hi there.

I was working fine thinq2-mqtt about a long time. But some days ago my microSD card died and I had to do a clean install of OpenHAB3. Since this issue, I can’t run the thinq2-mqtt. After install I receive this error when try poetry run python3 thinq_mqtt.py :

Traceback (most recent call last):
  File "thinq_mqtt.py", line 50, in <module>
    thinq = ThinQ(auth=auth)
  File "/usr/share/openhab/addons/thinq2-python/thinq2/schema.py", line 65, in __init__
    self._data = schema.load(merge_args(self, args))
  File "/usr/share/openhab/addons/thinq2-python/thinq2/schema.py", line 44, in merge_args
    k: getattr(self, k, None) for k in schema.fields.keys() if not k in kwargs
  File "/usr/share/openhab/addons/thinq2-python/thinq2/schema.py", line 44, in <dictcomp>
    k: getattr(self, k, None) for k in schema.fields.keys() if not k in kwargs
  File "/usr/share/openhab/addons/thinq2-python/thinq2/util/__init__.py", line 7, in inner
    memo[key] = func(*args, **kwargs)
  File "/usr/share/openhab/addons/thinq2-python/thinq2/schema.py", line 125, in inner
    return func(self, existing)
  File "/usr/share/openhab/addons/thinq2-python/thinq2/controller/thinq.py", line 47, in mqtt
    return ThinQMQTT(mqtt, auth=self.auth)
  File "/usr/share/openhab/addons/thinq2-python/thinq2/schema.py", line 65, in __init__
    self._data = schema.load(merge_args(self, args))
  File "/usr/share/openhab/addons/thinq2-python/thinq2/schema.py", line 44, in merge_args
    k: getattr(self, k, None) for k in schema.fields.keys() if not k in kwargs
  File "/usr/share/openhab/addons/thinq2-python/thinq2/schema.py", line 44, in <dictcomp>
    k: getattr(self, k, None) for k in schema.fields.keys() if not k in kwargs
  File "/usr/share/openhab/addons/thinq2-python/thinq2/schema.py", line 144, in inner
    value = getattr(data, obj.__name__, None) or obj(self)
  File "/usr/share/openhab/addons/thinq2-python/thinq2/controller/mqtt.py", line 113, in registration
    return self.thinq_client.register_iot(csr=self.csr)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/builder.py", line 103, in __call__
    (request_builder.method, request_builder.url, request_builder.info)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 97, in start
    return self._io.execute(self)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 122, in execute
    return self._io.execute(executable)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 122, in execute
    return self._io.execute(executable)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 122, in execute
    return self._io.execute(executable)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/blocking_strategy.py", line 31, in execute
    return executable.execute()
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/state.py", line 36, in execute
    return execution.before_request(self._request)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 56, in before_request
    return self.execute()
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/state.py", line 106, in execute
    self._request, self.SendCallback(execution, self._request)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 73, in send
    return self._io.invoke(self._client.send, (request,), {}, callback)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/blocking_strategy.py", line 21, in invoke
    return callback.on_success(response)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/state.py", line 96, in on_success
    return self._context.execute()
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/state.py", line 123, in execute
    return execution.after_response(self._request, self._response)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 62, in after_response
    return self.execute()
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/state.py", line 221, in execute
    return execution.finish(self._response)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 79, in finish
    return self._io.finish(response)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 125, in finish
    return self._io.finish(response)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 125, in finish
    return self._io.finish(response)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 144, in finish
    self._client.apply_callback, self._callback, response
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 133, in _invoke
    return self._io.invoke(func, args, kwargs, FinishingCallback(self._io))
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/blocking_strategy.py", line 19, in invoke
    return callback.on_failure(type(error), error, tb)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/execution.py", line 108, in on_failure
    return self._io.fail(exc_type, exc_val, exc_tb)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/interfaces.py", line 303, in fail
    compat.reraise(exc_type, exc_val, exc_tb)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/six.py", line 703, in reraise
    raise value
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/io/blocking_strategy.py", line 16, in invoke
    response = func(*arg, **kwargs)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/clients/requests_.py", line 53, in apply_callback
    return callback(response)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/hooks.py", line 20, in wrapper
    return hook(*args, **kwargs)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/returns.py", line 39, in __call__
    return self._strategy(*args, **kwargs)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/converters/interfaces.py", line 6, in __call__
    return self.convert(*args, **kwargs)
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/uplink/converters/marshmallow_.py", line 59, in convert
    return self._extract_data(self._schema.load(json))
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/marshmallow/schema.py", line 723, in load
    data, many=many, partial=partial, unknown=unknown, postprocess=True
  File "/home/openhabian/.cache/pypoetry/virtualenvs/thinq2-8-zRwjSs-py3.7/lib/python3.7/site-packages/marshmallow/schema.py", line 904, in _do_load
    raise exc
marshmallow.exceptions.ValidationError: {'result': {'_schema': ['Invalid input type.']}}

I have cloned thinq2-python.git and installed poetry.

I’m not sure what i am doing wrong… :sleepy:

Thanks a lot.

I have just pushed fixes for handling V1 devices.

1 Like

Sorry, it was my fault. I used another LG account which was not the correct one, now it works perfectly. Thanks!

Hi!

If I understand correctly this application can only read states of Thinq devices but cannot set mode/temperature etc.
Is it possible to implement such functionality like in wideq? Posting an mqtt message to /set topic would be nice to turn my AC On/Off.
Quoted from their github readme:

  • set-temp <ID> <TEMP>: Set the target temperature for an AC or refrigerator device.
  • set-temp-freezer <ID> <TEMP>: Set the target freezer temperature for a refrigerator.
  • turn <ID> <ONOFF>: Turn an AC device on or off. Use “on” or “off” as the second argument.

And is it hard to implement V1 handling as well? Right now they are ignored. I can help with debug/testing if needed.

Thank you in advance.

Sincerely,
Zsolt.

1 Like

As I do not have any device which requires set functionality, I have no plans to implement that. You can analyze how it is done in Wideq and any pull request will be welcome.

1 Like

Hi @thor,

where must i replaced the MQTT host?

Thanks…

In your state.json after running the init command.

thank you very much … now it works automatically again

Hi @thor ,

In state.json, I replaced:
{"rtiUri":"eic.lgthinq.com:47878"
with :
{"rtiUri":"a3phael99lf879-ats.iot.eu-west-1.amazonaws.com:47878"

I then re-ran the jar in run mode:

19:16:21.734 [main] INFO  ThinqMqttProxy - Starting Thinq Mqtt Proxy...
19:16:22.502 [main] INFO  Mqtt - starting connection the server tcp://localhost:1883...
19:16:23.178 [main] INFO  Mqtt - connected!
19:16:27.315 [main] INFO  ThinQ_Integration - ThinQ Found 2 devices
19:16:27.326 [main] INFO  ThinQ_Integration - ThinQ modelJsonUri: 
.....
19:16:27.824 [main] INFO  ThinqMqttProxy - Devices identified...
19:16:28.437 [main] INFO  Mqtt - Unencrypted key - no password needed
19:16:29.057 [main] INFO  Mqtt - starting connection the server ssl://common-ats.iot.eic.lgthinq.com:8883...
19:16:29.060 [main] INFO  Mqtt - connected!

...

but still I do not get any updates to values.
Am I doing something wrong?

Thanks in advance

My mistake… I was replacing the wrong URL in the file.

1 Like

yes, its the mqttServer property that has to be changed manually:

"mqttServer":"ssl://a3phael99lf879-ats.iot.eu-west-1.amazonaws.com:8883"

Hi all,

I used to have this working, but since yesterday that I upgraded my Raspberry Pi from Buster to Bullseye, I’m not able to get this working. I have installed again all packages needed on Python. But i get the followin error.

I will really appreciate if anyone could give me any tip to solve it.

Thanks

COUNTRY_CODE=ES LANGUAGE_CODE=es-ES poetry run python -m thinq_mqtt.py
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/home/pi/Desktop/thinq2-python-master/thinq_mqtt.py", line 75, in <module>
    devices = thinq.mqtt.thinq_client.get_devices()
  File "/usr/lib/python3.9/uplink/builder.py", line 101, in __call__
    return execution.start(
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 97, in start
    return self._io.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 122, in execute
    return self._io.execute(executable)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 122, in execute
    return self._io.execute(executable)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 122, in execute
    return self._io.execute(executable)
  File "/usr/lib/python3.9/uplink/clients/io/blocking_strategy.py", line 31, in execute
    return executable.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 36, in execute
    return execution.before_request(self._request)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 56, in before_request
    return self.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 105, in execute
    return execution.send(
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 73, in send
    return self._io.invoke(self._client.send, (request,), {}, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/usr/lib/python3.9/uplink/clients/io/blocking_strategy.py", line 21, in invoke
    return callback.on_success(response)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 96, in on_success
    return self._context.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 123, in execute
    return execution.after_response(self._request, self._response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 62, in after_response
    return self.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 65, in execute
    return execution.sleep(
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 76, in sleep
    return self._io.sleep(duration, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 119, in sleep
    return self._io.sleep(duration, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 119, in sleep
    return self._io.sleep(duration, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 119, in sleep
    return self._io.sleep(duration, callback)
  File "/usr/lib/python3.9/uplink/clients/io/blocking_strategy.py", line 25, in sleep
    return callback.on_success()
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 52, in on_success
    return self._context.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 36, in execute
    return execution.before_request(self._request)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 56, in before_request
    return self.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 105, in execute
    return execution.send(
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 73, in send
    return self._io.invoke(self._client.send, (request,), {}, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/usr/lib/python3.9/uplink/clients/io/blocking_strategy.py", line 21, in invoke
    return callback.on_success(response)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 96, in on_success
    return self._context.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 123, in execute
    return execution.after_response(self._request, self._response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 62, in after_response
    return self.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 221, in execute
    return execution.finish(self._response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 79, in finish
    return self._io.finish(response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 125, in finish
    return self._io.finish(response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 125, in finish
    return self._io.finish(response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 143, in finish
    return self._invoke(
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 133, in _invoke
    return self._io.invoke(func, args, kwargs, FinishingCallback(self._io))
  File "/usr/lib/python3.9/uplink/clients/io/blocking_strategy.py", line 19, in invoke
    return callback.on_failure(type(error), error, tb)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 108, in on_failure
    return self._io.fail(exc_type, exc_val, exc_tb)
  File "/usr/lib/python3.9/uplink/clients/io/interfaces.py", line 303, in fail
    compat.reraise(exc_type, exc_val, exc_tb)
  File "/usr/lib/python3.9/six.py", line 719, in reraise
    raise value
  File "/usr/lib/python3.9/uplink/clients/io/blocking_strategy.py", line 16, in invoke
    response = func(*arg, **kwargs)
  File "/usr/lib/python3.9/uplink/clients/requests_.py", line 53, in apply_callback
    return callback(response)
  File "/usr/lib/python3.9/uplink/hooks.py", line 20, in wrapper
    return hook(*args, **kwargs)
  File "/usr/lib/python3.9/uplink/returns.py", line 39, in __call__
    return self._strategy(*args, **kwargs)
  File "/usr/lib/python3.9/uplink/converters/interfaces.py", line 6, in __call__
    return self.convert(*args, **kwargs)
  File "/usr/lib/python3.9/uplink/converters/marshmallow_.py", line 59, in convert
    return self._extract_data(self._schema.load(json))
  File "/usr/lib/python3.9/marshmallow/schema.py", line 719, in load
    return self._do_load(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 856, in _do_load
    result = self._deserialize(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 661, in _deserialize
    value = self._call_and_store(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 493, in _call_and_store
    value = getter_func(data)
  File "/usr/lib/python3.9/marshmallow/schema.py", line 658, in <lambda>
    getter = lambda val: field_obj.deserialize(
  File "/usr/lib/python3.9/marshmallow/fields.py", line 365, in deserialize
    output = self._deserialize(value, attr, data, **kwargs)
  File "/usr/lib/python3.9/marshmallow/fields.py", line 651, in _deserialize
    return self._load(value, data, partial=partial)
  File "/usr/lib/python3.9/marshmallow/fields.py", line 634, in _load
    valid_data = self.schema.load(value, unknown=self.unknown, partial=partial)
  File "/usr/lib/python3.9/marshmallow_dataclass/__init__.py", line 639, in load
    all_loaded = super().load(data, many=many, **kwargs)
  File "/usr/lib/python3.9/marshmallow/schema.py", line 719, in load
    return self._do_load(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 844, in _do_load
    processed_data = self._invoke_load_processors(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 1090, in _invoke_load_processors
    data = self._invoke_processors(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 1220, in _invoke_processors
    data = processor(data, many=many, **kwargs)
  File "/home/pi/Desktop/thinq2-python-master/thinq2/model/thinq.py", line 85, in filter_items
    items = [i for i in data["item"] if i["platformType"] == "thinq2"]
TypeError: string indices must be integers

Hi all again,

I’ve tryed with a clean install from github. I’ve been asked to put the URL but then i get this error. Does anyone know how to solve it?

Thank you very much,

Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/home/pi/Desktop/Thinq2/thinq2-python-master/example.py", line 58, in <module>
    devices = thinq.mqtt.thinq_client.get_devices()
  File "/usr/lib/python3.9/uplink/builder.py", line 101, in __call__
    return execution.start(
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 97, in start
    return self._io.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 122, in execute
    return self._io.execute(executable)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 122, in execute
    return self._io.execute(executable)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 122, in execute
    return self._io.execute(executable)
  File "/usr/lib/python3.9/uplink/clients/io/blocking_strategy.py", line 31, in execute
    return executable.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 36, in execute
    return execution.before_request(self._request)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 56, in before_request
    return self.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 105, in execute
    return execution.send(
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 73, in send
    return self._io.invoke(self._client.send, (request,), {}, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 116, in invoke
    return self._io.invoke(func, args, kwargs, callback)
  File "/usr/lib/python3.9/uplink/clients/io/blocking_strategy.py", line 21, in invoke
    return callback.on_success(response)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 96, in on_success
    return self._context.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 123, in execute
    return execution.after_response(self._request, self._response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 62, in after_response
    return self.execute()
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 93, in execute
    return self.state.execute(self)
  File "/usr/lib/python3.9/uplink/clients/io/state.py", line 221, in execute
    return execution.finish(self._response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 79, in finish
    return self._io.finish(response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 125, in finish
    return self._io.finish(response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 125, in finish
    return self._io.finish(response)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 143, in finish
    return self._invoke(
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 133, in _invoke
    return self._io.invoke(func, args, kwargs, FinishingCallback(self._io))
  File "/usr/lib/python3.9/uplink/clients/io/blocking_strategy.py", line 19, in invoke
    return callback.on_failure(type(error), error, tb)
  File "/usr/lib/python3.9/uplink/clients/io/execution.py", line 108, in on_failure
    return self._io.fail(exc_type, exc_val, exc_tb)
  File "/usr/lib/python3.9/uplink/clients/io/interfaces.py", line 303, in fail
    compat.reraise(exc_type, exc_val, exc_tb)
  File "/usr/lib/python3.9/six.py", line 719, in reraise
    raise value
  File "/usr/lib/python3.9/uplink/clients/io/blocking_strategy.py", line 16, in invoke
    response = func(*arg, **kwargs)
  File "/usr/lib/python3.9/uplink/clients/requests_.py", line 53, in apply_callback
    return callback(response)
  File "/usr/lib/python3.9/uplink/hooks.py", line 20, in wrapper
    return hook(*args, **kwargs)
  File "/usr/lib/python3.9/uplink/returns.py", line 39, in __call__
    return self._strategy(*args, **kwargs)
  File "/usr/lib/python3.9/uplink/converters/interfaces.py", line 6, in __call__
    return self.convert(*args, **kwargs)
  File "/usr/lib/python3.9/uplink/converters/marshmallow_.py", line 59, in convert
    return self._extract_data(self._schema.load(json))
  File "/usr/lib/python3.9/marshmallow/schema.py", line 719, in load
    return self._do_load(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 856, in _do_load
    result = self._deserialize(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 661, in _deserialize
    value = self._call_and_store(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 493, in _call_and_store
    value = getter_func(data)
  File "/usr/lib/python3.9/marshmallow/schema.py", line 658, in <lambda>
    getter = lambda val: field_obj.deserialize(
  File "/usr/lib/python3.9/marshmallow/fields.py", line 365, in deserialize
    output = self._deserialize(value, attr, data, **kwargs)
  File "/usr/lib/python3.9/marshmallow/fields.py", line 651, in _deserialize
    return self._load(value, data, partial=partial)
  File "/usr/lib/python3.9/marshmallow/fields.py", line 634, in _load
    valid_data = self.schema.load(value, unknown=self.unknown, partial=partial)
  File "/usr/lib/python3.9/marshmallow_dataclass/__init__.py", line 639, in load
    all_loaded = super().load(data, many=many, **kwargs)
  File "/usr/lib/python3.9/marshmallow/schema.py", line 719, in load
    return self._do_load(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 856, in _do_load
    result = self._deserialize(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 661, in _deserialize
    value = self._call_and_store(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 493, in _call_and_store
    value = getter_func(data)
  File "/usr/lib/python3.9/marshmallow/schema.py", line 658, in <lambda>
    getter = lambda val: field_obj.deserialize(
  File "/usr/lib/python3.9/marshmallow/fields.py", line 365, in deserialize
    output = self._deserialize(value, attr, data, **kwargs)
  File "/usr/lib/python3.9/marshmallow/fields.py", line 768, in _deserialize
    result.append(self.inner.deserialize(each, **kwargs))
  File "/usr/lib/python3.9/marshmallow/fields.py", line 365, in deserialize
    output = self._deserialize(value, attr, data, **kwargs)
  File "/usr/lib/python3.9/marshmallow/fields.py", line 651, in _deserialize
    return self._load(value, data, partial=partial)
  File "/usr/lib/python3.9/marshmallow/fields.py", line 634, in _load
    valid_data = self.schema.load(value, unknown=self.unknown, partial=partial)
  File "/usr/lib/python3.9/marshmallow_dataclass/__init__.py", line 639, in load
    all_loaded = super().load(data, many=many, **kwargs)
  File "/usr/lib/python3.9/marshmallow/schema.py", line 719, in load
    return self._do_load(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 892, in _do_load
    result = self._invoke_load_processors(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 1090, in _invoke_load_processors
    data = self._invoke_processors(
  File "/usr/lib/python3.9/marshmallow/schema.py", line 1218, in _invoke_processors
    data = processor(data, original_data, many=many, **kwargs)
  File "/home/pi/Desktop/Thinq2/thinq2-python-master/thinq2/model/thinq.py", line 72, in polymorphism
    device_schema = device_types.get(item.device_type, Device).Schema()
AttributeError: 'dict' object has no attribute 'device_type'

Hi, Is there a way to observe what is happening? I have managed to get it somhow working with my AC and get some data in MQTT but would like to try observing what happening in the logs as sometimes the reaction time is quite long and some values like temperature do not change as they should.

i was using Flip’s thinq2-python script for almost a year now and it was working good until yesterday…Now i get no mqtt info anymore.I think something is changed by LG.I see that my Thinq android app changed-updated recently…Anyone has the same problem?

running

poetry run python3 thinq_mqtt.py

i get my devices alright

UserID: xxxxxxxxxx@gmail.com
User #: US200919xxxxxxx

Devices:

2b79afbe-a61a-1d7a-b3be-402fxxxxxxxxx: Dryer (model RC90V9_WW)
b67ac1fd-9ec5-190e-91f9-402fxxxxxxxxx: Washer (model F_V__Y___W.A__QEUK)

Listening for device events. Use Ctrl-C/SIGINT to quit.

but no mqtt updates whatsoever