This application can connect to LG Thinq infrastructure and register for the updates coming from smart LG devices. Received messages are converted into JSON payload and sent to your private MQTT server. This way you can enhance your home automation (like OpenHab or HomeAssistant) thanks to received notifications from your fridge or washing machine.
This application is based on the code written by dcmeglio
at https://github.com/dcmeglio/hubitat-thinq .
He made a great job by finding all the details necessary to connect to the LG's MQTT servers and register for the messages coming from the LG's appliances.
I have asked him if he doesn't have any objection with adaptation of his work and renaming the project to “Thinq MQTT Proxy”. His answer was
No objections at all. Good luck!
My goal was to keep the code as close to the original one, to make any updates with upstream easier. I have implemented a thin layer which is providing necessary infrastructure for this code to work as standalone application.
- Java 8
- Apache Maven 3.6.3
mvn clean package
Copy state-example.json
to state.json
and correct your language, region and local MQTT server settings.
java -jar ./target/thinq-mqtt-proxy.jar init
Check if application works correctly when running it from command line
java -jar ./target/thinq-mqtt-proxy.jar run
If previous step was successful, run
sudo ./install.sh
It should create and start thinq-mqtt-proxy
service. You can verify if works correctly by inspecting thinq-mqtt-proxy.log
or by issuing command
sudo systemctl status thinq-mqtt-proxy.service
-
MQTT reconnects
-
Error handling
-
Easier setup
-
Better format of the messages after conversion
-
Provide documentation on how to run it as service
-
Friendly names for the MQTT topic (i.e.
washer
instead of long id string)Instead of using cryptic uuid of the device as the topic name, by default is it generated from the device type in lower case (ie. "refrigerator"). This name is persisted into the configuration file and can be modified if different name is needed.
-
Code cleanup and hardening
-
Tests
-
Better logging
- As I have only
v2
devices, I have not corrected the code to handlev1
ones. Original code is written to handle them, so adding support should be doable. - I have tested only washer and fridge, because I don't have more Thinq enabled devices. There might be some fixes necessary for other devices.
- This application is a hobby project for other hobbyists, provided as-is. I am not responsible for any issues caused by its use.