Have you executed the app with init
command first? Have you pasted the correct response from the web page?
- Yes
- No. and where to get it?
I understood. You need to copy the generated link to the browser, log in and get a new link to insert it back into the script.
Nothing appeared on my MQTT server. You need to publish this " 2021-04-24T23: 26: 20.365272: MODEL JSON – PLEASE WRITE IN THE SUBJECT https://objectcontent.lgthinq.com/…"?
I have done several improvements:
- better logging
- migrated from Paho to HiveMQ for working reconnects
- script to run application as Linux service
Please use the latest version, change the logging level to DEBUG
in logback.xml
and see what’s in the thinq-mqtt-proxy.log
I never managed to forward the messages to the local MQTT server, it is too difficult for my level, apparently, I decided to use the standard application. Thanks for the help.
@mgw
Hi Michal,
I tried new version. But message is not reaching my local mqtt. I m not seeing any error in logs.
20:55:35.032 [main] INFO ThinqMqttProxy - Starting Thinq Mqtt Proxy...
20:55:37.578 [main] INFO Mqtt - starting connection the server tcp://192.168.1.10:1883...
20:55:37.808 [main] INFO Mqtt - connected!
20:55:48.558 [main] INFO ThinQ_Integration - ThinQ Found 3 devices
20:55:51.500 [main] INFO ThinqMqttProxy - Devices identified...
message sending logs
20:56:02.455 [main] INFO Device - {name=currentTemperature, value=24.5}
20:56:02.458 [main] INFO Mqtt - Sending to topic thinq/ac/event/currentTemperature message 24.5
20:56:02.461 [main] INFO Device - {name=windStrength, value=4.0}
20:56:02.463 [main] INFO Mqtt - Sending to topic thinq/ac/event/windStrength message 4.0
20:56:02.515 [main] INFO ThinqMqttProxy - Waiting forever...
mosquitto version 1.6.12
mosquitto is an MQTT v5.0/v3.1.1/v3.1 broker.
Anything I can check ?
Have you checked with MQTT Explorer that messages are not arriving?
The provided log looks good, but it is truncated, so hard to check all details.
Have you extended the processing logic in ThinQ_Airconditioner
? Does the initial processing of snapshot values works well?
Hi,
Nothing reaches to mqtt. I checked that. Let me run with increased log level to see any errors.
Yes, i have added ac support. Have to do some modification to make it work. I will share the details
Hi Michal,
Found the error. there is a missing call for send() method on local mqtt object. I added following code and message worked. I m not sure how yours is working without this line of code. Maybe you have not checked in all the changes.
if (userName && password) {
log.info("Password")
client.connectWith().simpleAuth().username(userName).password(password.getBytes()).applySimpleAuth()
.send()
.whenComplete((connAck, throwable) -> {
if (throwable != null) {
log.info("Error in local MQTT Connection")
} else {
log.info("connected!")
}
});
//log.info("Connection Done")
I added the send part after username password and when block in connect method.
Good catch - I simply do not use authenticated version. I have pushed the fix.
Can anyone psot a full guide on how to get this running?
Im running openHABian 3.0.2 on a Raspberry Pi 3 Model B Plus
I tried the following:
install poetry like this:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
$HOME/.poetry/bin/poetry already has #!/usr/bin/env python3
in it
Then i followed with:
# Load the poetry environment
source $HOME/.poetry/env
cd /etc/openhab/scripts
git clone https://github.com/tinkerborg/thinq2-python.git
cd thinq2-python
poetry install
First run:
COUNTRY_CODE=DE LANGUAGE_CODE=de-DE poetry run python3 example.py
any further run via
poetry run python3 example.py
always returns
Traceback (most recent call last):
File "example.py", line 6, in <module>
from thinq2.controller.auth import ThinQAuth
File "/etc/openhab/scripts/thinq2-python/thinq2/controller/auth.py", line 9, in <module>
from uplink.clients.io import RequestTemplate, transitions
ModuleNotFoundError: No module named 'uplink'
Then I tried
cd /etc/openhab/scripts/thinq2-python
wget https://raw.githubusercontent.com/Flip76/thinq2_mqtt/main/thinq_mqtt.py
poetry run python3 thinq_mqtt.py
which retruns
Traceback (most recent call last):
File "thinq_mqtt.py", line 13, in <module>
import paho.mqtt.client as paho
ModuleNotFoundError: No module named 'paho'
What am I missing here?
I found this when running poetry install but cannot make sense of it:
Installing dependencies from lock file
Package operations: 35 installs, 0 updates, 0 removals
• Installing cffi (1.14.0): Failed
EnvCommandError
Command ['/home/lukaz/.cache/pypoetry/virtualenvs/thinq2-rt_iq-AX-py3.7/bin/pip', 'install', '--no-deps', 'file:///home/lukaz/.cache/pypoetry/artifacts/c5/36/a2/454cd9909af7ef4a484abd959b4abc393e7ff39ec0a73eeac1763da0ea/cffi-1.14.0.tar.gz'] errored with the following return code 1, and output:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/lukaz/.cache/pypoetry/artifacts/c5/36/a2/454cd9909af7ef4a484abd959b4abc393e7ff39ec0a73eeac1763da0ea/cffi-1.14.0.tar.gz
Building wheels for collected packages: cffi
Building wheel for cffi (setup.py): started
Building wheel for cffi (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/lukaz/.cache/pypoetry/virtualenvs/thinq2-rt_iq-AX-py3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-yuu_hy45/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-yuu_hy45/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-te7x7y3w
cwd: /tmp/pip-req-build-yuu_hy45/
Complete output (56 lines):
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/c
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/home/lukaz/.cache/pypoetry/virtualenvs/thinq2-rt_iq-AX-py3.7/include -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.7/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: cffi
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/lukaz/.cache/pypoetry/virtualenvs/thinq2-rt_iq-AX-py3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-yuu_hy45/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-yuu_hy45/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-zbmlg60l/install-record.txt --single-version-externally-managed --compile --install-headers /home/lukaz/.cache/pypoetry/virtualenvs/thinq2-rt_iq-AX-py3.7/include/site/python3.7/cffi
cwd: /tmp/pip-req-build-yuu_hy45/
Complete output (56 lines):
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/c
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/home/lukaz/.cache/pypoetry/virtualenvs/thinq2-rt_iq-AX-py3.7/include -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.7/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/lukaz/.cache/pypoetry/virtualenvs/thinq2-rt_iq-AX-py3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-yuu_hy45/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-yuu_hy45/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-zbmlg60l/install-record.txt --single-version-externally-managed --compile --install-headers /home/lukaz/.cache/pypoetry/virtualenvs/thinq2-rt_iq-AX-py3.7/include/site/python3.7/cffi Check the logs for full command output.
WARNING: You are using pip version 21.0.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/lukaz/.cache/pypoetry/virtualenvs/thinq2-rt_iq-AX-py3.7/bin/python -m pip install --upgrade pip' command.
at ~/.poetry/lib/poetry/utils/env.py:1075 in _run
1071│ output = subprocess.check_output(
1072│ cmd, stderr=subprocess.STDOUT, **kwargs
1073│ )
1074│ except CalledProcessError as e:
→ 1075│ raise EnvCommandError(e, input=input_)
1076│
1077│ return decode(output)
1078│
1079│ def execute(self, bin, *args, **kwargs):
In case someone like me bought a LG ThinQ (v1) air conditioner and wants to integrate it with openHAB, I wrote a simple blog post on that subject:
I’m using a Exec binding and slightly modified original Wideq repository.
Hope it’s useful!
I’m trying to use @mgw 's Thinq-MQTT-Proxy with an LG dryer…
The connection works, I see the initial message in MQTT Explorer, but no updates are received, ever.
Here’s the log:
2021-07-10 06:42:10,303 INFO [main] ThinqMqttProxy [ThinqMqttProxy.groovy:9] Starting Thinq Mqtt Proxy...
2021-07-10 06:42:11,030 INFO [main] Mqtt [Mqtt.groovy:51] starting connection the server tcp://192.168.200.100:1883...
2021-07-10 06:42:11,519 INFO [main] Mqtt [Mqtt.groovy:57] connected!
2021-07-10 06:42:15,327 ERROR [main] ThinQ_Integration [NativeMethodAccessorImpl.java:-2] ThinQ lgAPIPost(https://eic-service.lgthinq.com:46030/v1/service/users/client, null) - ResponseException - [resultCode:0102, result:]
2021-07-10 06:42:18,180 INFO [main] ThinQ_Integration [NativeMethodAccessorImpl.java:-2] ThinQ Found 1 devices
2021-07-10 06:42:19,146 INFO [main] ThinqMqttProxy [ThinqMqttProxy.groovy:46] Devices identified...
2021-07-10 06:42:19,768 INFO [main] Mqtt [Mqtt.groovy:155] Unencrypted key - no password needed
2021-07-10 06:42:20,701 INFO [main] Mqtt [Mqtt.groovy:78] starting connection the server ssl://common-ats.iot.eic.lgthinq.com:8883...
2021-07-10 06:42:20,715 INFO [main] Mqtt [Mqtt.groovy:80] connected!
2021-07-10 06:42:21,200 INFO [main] ThinQ_Integration [NativeMethodAccessorImpl.java:-2] ThinQ cleanEnumValue(@WM_STATE_DRYING_W, @WM_STATE_) = drying
2021-07-10 06:42:21,202 INFO [main] Device [NativeMethodAccessorImpl.java:-2] dryer CurrentState: drying
2021-07-10 06:42:21,216 INFO [main] Device [Device.groovy:98] {name=currentState, value=drying}
2021-07-10 06:42:21,221 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/currentState message drying
2021-07-10 06:42:21,261 INFO [main] Device [NativeMethodAccessorImpl.java:-2] dryer Was turned on
2021-07-10 06:42:21,263 INFO [main] Device [Device.groovy:98] {name=switch, value=on, descriptionText=Was turned on}
2021-07-10 06:42:21,263 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/switch message on
2021-07-10 06:42:21,277 INFO [main] Device [Device.groovy:98] {name=runTime, value=10500.0, unit=seconds}
2021-07-10 06:42:21,281 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/runTime message 10500.0
2021-07-10 06:42:21,283 INFO [main] Device [Device.groovy:98] {name=runTimeDisplay, value=02:55, unit=hh:mm}
2021-07-10 06:42:21,284 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/runTimeDisplay message 02:55
2021-07-10 06:42:21,294 INFO [main] Device [Device.groovy:98] {name=remainingTime, value=10260.0, unit=seconds}
2021-07-10 06:42:21,294 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/remainingTime message 10260.0
2021-07-10 06:42:21,296 INFO [main] Device [Device.groovy:98] {name=remainingTimeDisplay, value=02:51, unit=hh:mm}
2021-07-10 06:42:21,296 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/remainingTimeDisplay message 02:51
2021-07-10 06:42:21,297 INFO [main] Device [Device.groovy:98] {name=delayTime, value=0.0, unit=seconds}
2021-07-10 06:42:21,298 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/delayTime message 0.0
2021-07-10 06:42:21,299 INFO [main] Device [Device.groovy:98] {name=delayTimeDisplay, value=00:00, unit=hh:mm}
2021-07-10 06:42:21,299 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/delayTimeDisplay message 00:00
2021-07-10 06:42:21,300 INFO [main] Device [Device.groovy:98] {name=finishTimeDisplay, value=2021-07-10T09:33:21+0300, unit=hh:mm}
2021-07-10 06:42:21,301 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/finishTimeDisplay message 2021-07-10T09:33:21+0300
2021-07-10 06:42:21,304 INFO [main] Device [Device.groovy:98] {name=error, value=error_noerror}
2021-07-10 06:42:21,305 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/error message error_noerror
2021-07-10 06:42:21,308 INFO [main] ThinQ_Integration [NativeMethodAccessorImpl.java:-2] ThinQ cleanEnumValue(@WM_TERM_NO_SELECT_W, @WM_DRY27_DRY_LEVEL_) = @wm term no select
2021-07-10 06:42:21,310 INFO [main] Device [Device.groovy:98] {name=dryLevel, value=@wm term no select}
2021-07-10 06:42:21,319 INFO [main] Mqtt [Mqtt.groovy:183] Sending to topic thinq/dryer/event/dryLevel message @wm term no select
2021-07-10 06:42:21,352 INFO [main] ThinqMqttProxy [ThinqMqttProxy.groovy:49] Waiting forever...
As you can see, it’s waiting forever
and it doesn’t get any updates form the dryer/LG API even if there were 2 or 3 drying cycles since then.
What can I try?
Hi, i currently have the same issue
Hi @mgw!
I have two v1 and three v2 AC devices. I managed to start your code. Turned on debug (output is not changed, no debug lines in log). Init went well. Running the jar I’ve got this:
12:34:00.376 [main] INFO ThinqMqttProxy - Starting Thinq Mqtt Proxy...
12:34:00.791 [main] INFO Mqtt - starting connection the server tcp://xxx.xxx.xx:1883...
12:34:01.132 [main] INFO Mqtt - connected!
12:34:04.795 [main] INFO ThinQ_Integration - ThinQ Found 5 devices
12:34:05.940 [main] INFO ThinqMqttProxy - Devices identified...
12:34:06.938 [main] INFO Mqtt - Unencrypted key - no password needed
12:34:07.366 [main] INFO Mqtt - starting connection the server ssl://common-ats.iot.eic.lgthinq.com:8883...
12:34:07.375 [main] INFO Mqtt - connected!
Exception in thread "main" java.lang.NullPointerException: Cannot invoke method keySet() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:44)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:34)
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 ThinQ_Integration.findMQTTDataNode(ThinQ_Integration.groovy:1197)
at ThinQ_Integration$findMQTTDataNode$11.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:194)
at ThinQ_Integration.getDeviceSnapshot(ThinQ_Integration.groovy:384)
at ThinQ_Integration$getDeviceSnapshot$10.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:194)
at ThinQ_Integration.initialize(ThinQ_Integration.groovy:372)
at ThinQ_Integration.installed(ThinQ_Integration.groovy:309)
at ThinQ_Integration$installed$3.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)
Is there any chance to get this corrected?
Thank you,
Zsolt.
“Waiting forever” is only to indicate that the service has started and waiting to process messages.
I have just started the service built from the latest code and here is the log after opening and closing the door of the fridge.
...
22:26:55.164 [main] INFO ThinQ_Integration - ThinQ cleanEnumValue(@CP_OFF_EN_W, @CP_) = off
22:26:55.164 [main] INFO Device - {name=doorLock, value=off}
22:26:55.164 [main] INFO Mqtt - Sending to topic thinq/washer/event/doorLock message off
22:26:55.174 [main] INFO ThinqMqttProxy - Waiting forever...
22:27:18.712 [RxComputationThreadPool-2] INFO Mqtt - Parsing received message: {"data":{"state":{"reported":{"meta":{"allDeviceInfoUpdate":false,"messageId":"XXXXXXXX"},"online":true,"refState":{"atLeastOneDoorOpen":"OPEN"},"static":{"countryCode":"PL","deviceType":"101"},"timestamp":1630614438696}}},"deviceId":"XXXX-XX-XX-XX-XXXX","type":"monitoring"}
22:27:18.713 [RxComputationThreadPool-2] INFO Device - refrigerator parse([data:[state:[reported:[meta:[allDeviceInfoUpdate:false, messageId:XXXXXXXXXXX], online:true, refState:[atLeastOneDoorOpen:OPEN], static:[countryCode:PL, deviceType:101], timestamp:1630614438696]]], deviceId:XX-XX-XX-XX-XX, type:monitoring])
22:27:18.721 [RxComputationThreadPool-2] INFO Device - {name=contact, value=open}
22:27:18.722 [RxComputationThreadPool-2] INFO Mqtt - Sending to topic thinq/refrigerator/event/contact message open
22:27:20.242 [RxComputationThreadPool-2] INFO Mqtt - Parsing received message: {"data":{"state":{"reported":{"meta":{"allDeviceInfoUpdate":false,"messageId":"XXXXXXX"},"online":true,"refState":{"atLeastOneDoorOpen":"CLOSE"},"static":{"countryCode":"PL","deviceType":"101"},"timestamp":1630614440237}}},"deviceId":"XX-XX-XX-XX-XX","type":"monitoring"}
22:27:20.243 [RxComputationThreadPool-2] INFO Device - refrigerator parse([data:[state:[reported:[meta:[allDeviceInfoUpdate:false, messageId:XXXXXXX], online:true, refState:[atLeastOneDoorOpen:CLOSE], static:[countryCode:PL, deviceType:101], timestamp:1630614440237]]], deviceId:XX-XX-XX-XX-XX, type:monitoring])
22:27:20.245 [RxComputationThreadPool-2] INFO Device - {name=contact, value=closed}
22:27:20.246 [RxComputationThreadPool-2] INFO Mqtt - Sending to topic thinq/refrigerator/event/contact message closed
This code is not supporting AC devices. I know that some people are working on adding support for them.
Also I don’t know if support for V1 devices really works. I have all mine in V2. As far as I know it is possible to convert V1 into V2. I have seen somewhere instruction on how to do that.
Conversion would be great. Any chance to remember where you’d read that? I’ve searched with google but nothing came up…
Hello, I installed everything according to the instructions. After the service has started, a connection is established and all parameters are correctly queried. However, no changes are accepted.
My System is OH 3.1.0
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /opt/maven
Java version: 11.0.12, vendor: Raspbian, runtime: /usr/lib/jvm/java-11-openjdk-armhf
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "5.10.60-v7l+", arch: "arm", family: "unix"
The log file remains at:
OpenHab3 java[12069]: 09:48:50.116 [main] INFO ThinqMqttProxy - Waiting forever...
When I restart the service, the current parameters are queried correctly, but as I said, no new parameters.
What am I missing?
Thanks very much