Contribution - LG Thinq [Fridge] [WIP]

Hi @nemer !

I’m on OpenHAB 4.0.0 release in a docker container. I have the following in the logs every 10 seconds. The fridge thing is ONLINE.

2023-07-29 10:13:18.123 [ERROR] [nternal.handler.LGThinQFridgeHandler] - System error in pooling thread (UpdateDevice) for device Hűtőgép/058cfc00-1db0-11b8-a576-1c3929041324. Filtering to do not stop the thread
java.lang.IllegalStateException: Fridge has no Power state.
at org.openhab.binding.lgthinq.lgservices.model.devices.fridge.FridgeCanonicalSnapshot.getPowerStatus(FridgeCanonicalSnapshot.java:104) ~[?:?]
at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.updateDeviceChannelsWrapper(LGThinQAbstractDeviceHandler.java:533) ~[?:?]
at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.updateThingStateFromLG(LGThinQAbstractDeviceHandler.java:467) ~[?:?]
at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler$UpdateThingStateFromLG.run(LGThinQAbstractDeviceHandler.java:445) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

I think this is the json for the fridge:
thinq-058cfc00-1db0-11b8-a576-1c3929041324-cap.json (21.5 KB)

Thank you.

PS: Two days ago I’ve deleted the thing itself and recreated. The above error stayed. And even if I disable the thing AND the Gateway thing the errors are still coming.

same thing here,upadated to openhab 4.0.1 and added the 4.0.0 jar at my addons folder.Got this error and delete items and thing and redescovered it.Got the same error again…

2023-07-30 17:20:48.631 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler LGThinQFridgeHandler of thing lgthinq:101:e83467b281:1473b3b0-53ed-1fba-b6d9-b8165fa35961 tried updating channel dashboard#fridge-temperature although the handler was already disposed.
2023-07-30 17:20:48.632 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler LGThinQFridgeHandler of thing lgthinq:101:e83467b281:1473b3b0-53ed-1fba-b6d9-b8165fa35961 tried updating channel dashboard#freezer-temperature although the handler was already disposed.
2023-07-30 17:20:48.633 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler LGThinQFridgeHandler of thing lgthinq:101:e83467b281:1473b3b0-53ed-1fba-b6d9-b8165fa35961 tried updating channel dashboard#some-door-open although the handler was already disposed.
2023-07-30 17:20:48.634 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler LGThinQFridgeHandler of thing lgthinq:101:e83467b281:1473b3b0-53ed-1fba-b6d9-b8165fa35961 tried updating channel dashboard#temp-unit although the handler was already disposed.
2023-07-30 17:20:48.634 [ERROR] [nternal.handler.LGThinQFridgeHandler] - System error in pooling thread (UpdateDevice) for device Refrigerator/1473b3b0-53ed-1fba-b6d9-b8165fa35961. Filtering to do not stop the thread
java.lang.IllegalStateException: Fridge has no Power state.
	at org.openhab.binding.lgthinq.lgservices.model.devices.fridge.FridgeCanonicalSnapshot.getPowerStatus(FridgeCanonicalSnapshot.java:104) ~[?:?]
	at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.updateDeviceChannelsWrapper(LGThinQAbstractDeviceHandler.java:533) ~[?:?]
	at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.updateThingStateFromLG(LGThinQAbstractDeviceHandler.java:467) ~[?:?]
	at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler$UpdateThingStateFromLG.run(LGThinQAbstractDeviceHandler.java:445) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

@Constantinos_Contis and @cinadr .

Can you test the new version I delivered ? It fixes the Power State issue you have.

1 Like

seems to be ok mate,thnx!

1 Like

Sorry for late reply. I downloaded the binding and currently it has no issues displayed. Thank you.

1 Like

Hi guys, I dont want to open a new thread since there is already this thread, and this:

so, not sure which thread is the correct one to ask:

Prior to buying a LG smart thinq fridge, I’m trying to understand what works, what doesnt, which models are supported etc…
Is there any documentation to this binding?

Like can I just read the temperatures, or also get the status of the health of compressor, sensors, information if the door is opened, remotely set the temperature etc…

as i understand, download of the latest jar is here

?

looking at this model if it matters

Hi, @vanja . The post you mentioned is quite old, previously this binding started to be done. Answering the questions:

  • LG Thinq API is a HTTP/Rest API → Yes, but it doesn’t mean you can connect and send request easily. The LG API is not an open API then you don’t have documentations and/or good information in the web about how this works.
  • This binding is a working in progress but has a good support for the following LG devices:
    → Air Conditioner (V1/V2): fully functional
    → Washer Mashines (V1/V2): fully functional (but need more user’s test)
    → Dryers (V1/V2): fully functional (but need more user’s test)
    → Washer Tower (V1/V2): fully functional (but need more user’s test)
    → Fridge/Refrigerators (V1/V2): fully status integration (but need more tests in V1). Sending commands is on the way.
    → Heat Pumps (V2 only): fully functional, but has some bugs and need more feedbacks from the users.
    → DishWash: WIP

This is the current status of the binding. For the Fridge, as I mentioned, there is a good support. I’m currently developing the commands to change the temperatures, start turbo fridge, etc. I think for the next month gonna be done.

Regards.

hi @nemer thanks for your reply and for your work on the binding!

Hi @nemer
I confirm that the text configuration continues not to work.
I followed your advice to use the configuration via user interface,
however this too does not work.
My raspberry are restarted continuously and I have the following mistake:

what I’m wrong ?
thanks
bye

Hi, @tebraxin . The binding will not restart your raspberry even with errors.

Please, send me the OH log information related.

Hi, guys !
I released a new version of the binding with a lot of fridge fixes and new features like:

  • Water and FreshAir filter channels
  • IceFast (V1) and ExpressMode (V2) channels
  • Commands to set Fridge and Freezer temperature.

I need you guys to test the new cool feature and give the feedback about those.

Regards.

just tested,installed,deleted thing,restart openhab,add fridge back.These are my new channels now,no channel command to set temperatures.Thnx for your hard work mate!

Hello, @Constantinos_Contis . Thank you for the feedback. Actually, the channels to send commands are:

  • Freezer Setpoint Temperature → send some valid temperature for the freezer. This channel displays the current setpoint for the freezer temperature, but you can send a new value takes place.
  • Fridge Setpoint Temperature → send some valid temperature for the fridge. This channel displays the current setpoint for the fridge temperature, but you can send a new value takes place.

But, as this channels are Numeric ones, you can reset the itens related directly. You need to implement some rule or page with widget to access the valid values accepted for the channel.
First, please update the binding with new version because I fixes some bugs in V2 (yours).
Then , what you can do is to create a new page following the script above:

  1. Create a new Layout Page in the Main UI:
  2. Add a new widget in the page. The it will create a panel with a “plus” image. Push it and choose “List Card”
  3. Inside “List Card”, add a new widget of type “Label List Item”
  4. Configure the Label List Item in order to have the following properties set:
  • Item → pick the target temperature item (fridge/freezer) you want to send command
  • Action → choose “Command Option”
  • Action Item → pick the same item you choose in “Item” property.

Then you can enable the the “Run Mode” to interact with your page. When you chit in the item, you can choose some valid desired temperature.

Regards

1 Like

tested and it works!i can send setpoint commands.I am using something simpler ,i change through metadata the item’s widget to stepper so i can sent + and - number commands.The Express Mode channel is not working for me.In Lg app i have 3 settings a)Express Cool for Fridge ,b)Express Freeze for Freezer ,c
)Vacation mode.I cant send command to change any of it.If i set express freeze from Lg app the channel changes to “Express Fridge/Freezer On”.If i set Experss Cool at LG app , nothing happens.

Hi,

Can you try the newest version to see if you can control the express mode ? Additionally, can you send-me the thinq-xxxx-cap.json file related to your fridge or the model-url property ?

The refrigerator’s models I tested, only supported express mode on/off.

Hi guys ! I released a new version of the binding with some fixes and new cool features like:
Version 1 Models: new channels:


You can send setpoints to the temperatures (fridge & freezer) and enable/disable iceplus as well
Version 2 Models: new channels:

Version 2 models has new features, but some models has Express cool and Vaction and others don’t. The binding will auto-dicovery the features and create channels based on the capability of each model (I hope so :slight_smile: )
You can send commands to change the setpoints of the temperatures (Fridge & Freezer) and change the options of Express Freeze and enable/disable Express cool and Vaction mode as well.

Hope you guys can try it out and send the feedback to me.

Regards.

everything seems to be working right,thnx mate

1 Like

Platform_type: thinq1
I’m using last version from git: org.openhab.binding.lgthinq-4.1.0-SNAPSHOT.jar

Temperatures (fridge & freezer) are 0.0 also i can’t change it. Symantec Class “Point”. Is it okay?


thinq-336db190-82f2-11ec-a8e9-0051edb3bb3c-cap.json (8.7 KB)

Since these channels are Numbers, you can’t select it and change it by the items tab. You have to create a page like this:

And you will be able to choose the desired temperature and the binding will send the command to the device.
BUT, if you are seeing zero Celsius for the both and your refrigerator is not set to zero, then you have a previous issue. Can you check for me if you change the temperature direct in the refrigerator it’s not changing the temperature in the binding channels ?

Additionally, see this previous post:
Creating Page to Send Commands to Refrigerator

Sure, thank you. Changed both temperatures direct on refrigerator. Still 0.0 in openhab. here the log from console:

openhab> log:tail LG
15:13:43.195 [ERROR] [internal.handler.LGThinQFridgeHandler] - Temperature value informed can't be converted based on the cap file. It mostly like a bug
15:13:43.199 [ERROR] [internal.handler.LGThinQFridgeHandler] - Temperature value informed can't be converted based on the cap file. It mostly like a bug
15:13:53.828 [ERROR] [internal.handler.LGThinQFridgeHandler] - Temperature value informed can't be converted based on the cap file. It mostly like a bug
15:13:53.829 [ERROR] [internal.handler.LGThinQFridgeHandler] - Temperature value informed can't be converted based on the cap file. It mostly like a bug
15:14:10.524 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for the thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c. No data available yet ?
15:14:27.352 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for the thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c. No data available yet ?
15:14:44.062 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for the thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c. No data available yet ?
15:15:00.886 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for the thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c. No data available yet ?
15:15:00.887 [ERROR] [internal.handler.LGThinQFridgeHandler] - The thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c reach maximum retries for monitor data. Thing goes OFFLINE until next retry.
org.openhab.binding.lgthinq.internal.errors.LGThinqApiExhaustionException: Exhausted trying to get monitor data for the device:8fdcd310-f37d-11ed-9209-0051edb3bb3c
        at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.getSnapshotDeviceAdapter(LGThinQAbstractDeviceHandler.java:699) ~[bundleFile:?]
        at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.updateThingStateFromLG(LGThinQAbstractDeviceHandler.java:465) [bundleFile:?]
        at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler$UpdateThingStateFromLG.run(LGThinQAbstractDeviceHandler.java:458) [bundleFile:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:840) [?:?]
15:15:14.591 [ERROR] [internal.handler.LGThinQFridgeHandler] - Temperature value informed can't be converted based on the cap file. It mostly like a bug
15:15:14.592 [ERROR] [internal.handler.LGThinQFridgeHandler] - Temperature value informed can't be converted based on the cap file. It mostly like a bug