Contribution - LG Thinq [Fridge] [WIP]

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

Can you put the binding in debug mode ? When you do this, the binding will create a file named thinq-336db190-82f2-11ec-a8e9-0051edb3bb3c-datatrace.json then I can analyse the payload exchanged.

To do so, log in the kafka console with the command:

openhab-cli console

When asked for a password, type habopen
Then, at the kafka console, execute the command:

log:set DEBUG org.openhab.binding.lgthinq

In the same path you found the cap file, you will see the datatrace file.

thinq-8fdcd310-f37d-11ed-9209-0051edb3bb3c-datatrace.json (202 Bytes)

Here is it

Thant you ! I will analyse these data and let you know soon.

1 Like

Could you please send me YAML code of the widget config of Refrigerator V1? Cant get switch for Ice Plus, like you have it in your screenshot.
Thank you :slight_smile:

Of course. Item and ActionItem are the items associated to the Temperature/IcePlus channels.

component: oh-list-card
config:
  title: Refrigerator V1
slots:
  default:
    - component: oh-label-item
      config:
        action: options
        actionItem: RefrigeratorV1_Fridge_Setpoint_Temperature
        icon: temperature
        item: RefrigeratorV1_Fridge_Setpoint_Temperature
        title: Fridge Temperature
    - component: oh-toggle-item
      config:
        icon: snow
        item: RefrigeratorV1_Ice_Plus
        title: Ice Plus

1 Like

After yesterday’s update:

Thank you! :slight_smile:

FYI: I can set temperatures and Ice Plus, but LG Thing goes offline and then online periodically:
Update: Ice Plus state should be inverted. Also if it ON on the Refrigerator Panel, than it is OFF in OH

16:48:39.148 [DEBUG] [ces.LGThinQAbstractApiV1ClientService] - Prepare command v1: [1, 1, 1, 2, 255, 255, 255, 255, 255, 255, 255]
16:48:39.149 [DEBUG] [s.LGThinQFridgeApiV1ClientServiceImpl] - setControl Payload:[{cmd=Control, cmdOpt=Set, value=ControlData, data=AQEBAv////////8=, format=B64}]
16:48:39.149 [DEBUG] [ces.LGThinQAbstractApiV1ClientService] - URL: https://eic.lgthinq.com:46030/api/rti/rtiControl, Post Payload:[{
  "lgedmRoot" : {
    "deviceId" : "8fdcd310-f37d-11ed-9209-0051edb3bb3c",
    "workId" : "31f584aa-1724-4684-be19-5ae34af71b2d",
    "cmd" : "Control",
    "cmdOpt" : "Set",
    "value" : "ControlData",
    "data" : "AQEBAv////////8=",
    "format" : "B64"
  }
}]
16:48:43.751 [DEBUG] [ces.LGThinQAbstractApiV1ClientService] - Prepare command v1: [1, 1, 1, 2, 255, 255, 255, 255, 255, 255, 255]
16:48:43.751 [DEBUG] [s.LGThinQFridgeApiV1ClientServiceImpl] - setControl Payload:[{cmd=Control, cmdOpt=Set, value=ControlData, data=AQEBAv////////8=, format=B64}]
16:48:43.752 [DEBUG] [ces.LGThinQAbstractApiV1ClientService] - URL: https://eic.lgthinq.com:46030/api/rti/rtiControl, Post Payload:[{
  "lgedmRoot" : {
    "deviceId" : "8fdcd310-f37d-11ed-9209-0051edb3bb3c",
    "workId" : "42997259-508f-4c94-9089-ff930763e638",
    "cmd" : "Control",
    "cmdOpt" : "Set",
    "value" : "ControlData",
    "data" : "AQEBAv////////8=",
    "format" : "B64"
  }
}]
16:48:58.313 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for the thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c. No data available yet ?
16:49:15.068 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for ......
....
16:54:04.136 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for the thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c. No data available yet ?
16:54:04.137 [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) [?:?]
16:55:00.843 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for the thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c. No data available yet ?
16:55:30.409 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for the thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c. No data available yet ?
16:57:23.213 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for the thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c. No data available yet ?
.....
17:12:02.343 [DEBUG] [ces.LGThinQAbstractApiV1ClientService] - Prepare command v1: [1, 1, 0, 2, 255, 255, 255, 255, 255, 255, 255]
17:12:02.344 [DEBUG] [s.LGThinQFridgeApiV1ClientServiceImpl] - setControl Payload:[{cmd=Control, cmdOpt=Set, value=ControlData, data=AQEAAv////////8=, format=B64}]
17:12:02.344 [DEBUG] [ces.LGThinQAbstractApiV1ClientService] - URL: https://eic.lgthinq.com:46030/api/rti/rtiControl, Post Payload:[{
  "lgedmRoot" : {
    "deviceId" : "8fdcd310-f37d-11ed-9209-0051edb3bb3c",
    "workId" : "385504d0-198a-4283-8932-3b54686ade13",
    "cmd" : "Control",
    "cmdOpt" : "Set",
    "value" : "ControlData",
    "data" : "AQEAAv////////8=",
    "format" : "B64"
  }
}]
17:12:20.519 [ERROR] [internal.handler.LGThinQFridgeHandler] - Command OFF to the channel extended-information#fr_fresh_air_filter not supported. Ignored.
17:14:30.254 [WARN ] [internal.handler.LGThinQFridgeHandler] - LG API returns null monitoring data for the thing Refrigerator/8fdcd310-f37d-11ed-9209-0051edb3bb3c. No data available yet ?