Hi @nemer, is the dishwasher thing still in development or you abandoned the project?
Itās supposed to be finished Ricky. Let me check if I updated it in the repo and I let you know.
Actually now Iām only writing the binding documentation and after send to revision to be released in the main OH branch.
Itās supposed to be finished. Let me verify if I updated it in the repo.
Thanks @nemer can you tell me where I can download the binding to test it?
Hi, Ricky. Sorry, Iām in debt with you :-(. I found some issues in some parts of the binding and had to refactor some parts. I gonna delivery these feature to you test in the next days. Iām only finishing some tests.
Thanks @nemer. Iāll wait for something to test.
Hi Ricky. Finally I uploaded a test version for DW.
Itās very basic, because I donāt know all the functions its supports from LG App. Let me know about the tests and if you missing some feature.
Hi @nemer,
I tried the new binding. Dishwasher is dicovered and added correctly but never goes online. I have the following error:
2024-05-16 22:04:17.930 [ERROR] [nal.handler.LGThinQDishWasherHandler] - Error updating thing Lavastoviglie/40c06592-e5f0-1b3b-b8cd-b8165fcae1da from LG API. Thing goes OFFLINE until next retry: Error reading IO interface
org.openhab.binding.lgthinq.internal.errors.LGThinqApiException: Error reading IO interface
at org.openhab.binding.lgthinq.lgservices.LGThinQAbstractApiClientService.getCapability(LGThinQAbstractApiClientService.java:272) ~[bundleFile:?]
at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.getCapabilities(LGThinQAbstractDeviceHandler.java:271) ~[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) [?:?]
Caused by: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byte 0xb0
at [Source: (File); line: 419, column: 22]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2477) ~[bundleFile:?]
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:750) ~[bundleFile:?]
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidInitial(UTF8StreamJsonParser.java:3712) ~[bundleFile:?]
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidChar(UTF8StreamJsonParser.java:3708) ~[bundleFile:?]
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishString2(UTF8StreamJsonParser.java:2634) ~[bundleFile:?]
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishAndReturnString(UTF8StreamJsonParser.java:2560) ~[bundleFile:?]
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.getText(UTF8StreamJsonParser.java:335) ~[bundleFile:?]
at com.fasterxml.jackson.databind.deser.std.BaseNodeDeserializer._deserializeContainerNoRecursion(JsonNodeDeserializer.java:572) ~[bundleFile:?]
at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:100) ~[bundleFile:?]
at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:25) ~[bundleFile:?]
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323) ~[bundleFile:?]
at com.fasterxml.jackson.databind.ObjectMapper._readTreeAndClose(ObjectMapper.java:4867) ~[bundleFile:?]
at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:3252) ~[bundleFile:?]
at org.openhab.binding.lgthinq.lgservices.LGThinQAbstractApiClientService.getCapability(LGThinQAbstractApiClientService.java:269) ~[bundleFile:?]
... 9 more
The encode of the your cap file is not UTF-8. This file is downloaded in backgroud by the binding to get the meta-model of the device. This file is structured as JSON format, and itās based on the JSON RFC:
Blockquote 1. Encoding - JSON text SHALL be encoded in Unicode. The default encoding is
UTF-8.
So, itās mostly like a mistake in the file from LG API than this binding. But, regardless this issue, I must to do some āmagicā to fix the file because the LG team will not care about us
Can you please send me your thinq-xxxxx-xxxx-cap.json file ?
Hi @nemer
an important updateā¦
Looking for the files you asked I found that I had an old version. I deleted it and after adding again the thing it seems that the problem is gone!
Iāll check the other funztions and let you know if everything works as expected.
Thanks a lot.
OK.
Let me know !
Hi, @tizen
About issues you mentioned here:
- Power State: actually, your machine is suppose to be ON even after complete the cycle. The Power goes to OFF when the state goes to POWEROFF (and you can see in the picture the state is Complete/END).
- 00:01 - apparently, when the cycle finish, the DW stop to send state changes to the API and sometimes the last snapshot remains 00:01. I changed the logic for this to force the remaining goes to 00:00 when state is complete. I think it will fix this issue;
Wrapping all these up, this scenario appears to me as the DW is missing to send the last event to the LG API. I really donāt know, but we can do some tests to undertand better this behavior.
I gonna ask you to:
- Put the binding in debug mode
- run a washing cycle and in the end, see if the result is the same (00:01 & Power not go to OFF even after power off physically)
- collect the in the userdata folter (mine is in /srv/openhab-userdata/thinq) the thinq-XXXXX-datatrace.json related to your DishWasher and attach here.
- Tell me the last update date for this file and if is the same as the the near current time.
Hi @nemer, firstly thank you for your great work on this!
Everything is working with my Washer (WV5-1410W) except that āprocess stateā got stuck on āDetectingā even though the thinq app showed it had moved on to āWashingā. The remaining time was updating properly, and when the cycle ended it updated to āEndā. I could see the same in the trace (showing āpreStateā:āDETECTINGā while washing).
Itās not a big deal for me but thought you might like to know. I will check what happens with the next cycle also to see if itās the same.
Could I please request that you add the āhow to enable debugā information and the repository link to the first post? They are difficult to find in the thread for anyone coming in new
Hello, Matt. Thx for the report! Actually I donāt have this machine. I developed a simulator to support me in the implementation, but i depend of guys like you to fine tune the Binding. I will take a look on preState.
Hi @nemer, Iāve checked again and can confirm that itās only the āWashingā state that is missed. It successfully updated from: Detecting ā Rinsing ā End. It just missed the Washing between the Detecting and Rinsing.
Actually I also noticed that when the washer state went to āSpinningā the process state when to āRisingā (missing the ānā).
Iāve attached the capabilities output of that helps.
thinq-###-cap.json (78.8 KB)
Sorry for the delay. I was in vacation these last days.
I was seeing in the code, Iām considering the state transition: Detecting ā Running ā Rising ā End according to the cap you sent. However, maybe has some bug in the LG cap definition (that is not so incomum). I added the Washing state. You can get the last version in my repository and try it out.
Regards
No need to apologise Nemer, weāre all volunteers here
Somethingās gone wrong at my end. Now the bridge is stuck at Initialising, however itās the same with the previous github blob version so it must be something outside the plugin.
Iāll see what I can troubleshoot. Unless anyoneās seen this before and has any hints?
19:21:40.731 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ālgthinq:bridge:bridgeā changed from UNINITIALIZED (NOT_YET_READY) to INITIALIZING
19:21:40.732 [DEBUG] [internal.handler.LGThinQBridgeHandler] - Initializing LGThinq bridge handler.
19:21:40.732 [INFO ] [internal.handler.LGThinQBridgeHandler] - LGās discovery pooling disabled (configured as zero)
19:21:40.735 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ālgthinq:201:bridge:washingmachineā changed from UNINITIALIZED (NOT_YET_READY) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
Hello, @nemer. Some time in the past, the bridge just stopped functioning. I wasnāt paying too much attention so Iām unsure what broke. I did notice that several new snapshots were available so I deleted the version 4.1.0 that I was using and tried using the newer editions. I donāt understand why but now the bundle wonāt load; it wonāt show at all in the console. Iāve tried every version you have included to no effect. Iāve tried everything I can think of (cleared the cache and restarted, deleted any reference to any things in the jsondb, etc.). It doesnāt seem to me to be caused by the jar files, but have you seen this in the past? Thanks
From the version 4.1.X to 4.2.X have some changes in the internal binding core libraries (specially the discovery) and they are not backward compatible anymore. I tried to keep updating the 2 versions, but itās hard to maintain 2 different branches and environments to build, deploy and test. So, the last upload was done only for 4.2 and 4.3 and since 4.2 is released, I recommend you to upgrade to this version (if youāve not done this yet) and use the version 4.2 of the binding.
Try to restart the OH and send me the complete log.