Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LG Thinq Range Hood Support #394

Closed
Jonkieber opened this issue Nov 5, 2022 · 38 comments · Fixed by #735
Closed

LG Thinq Range Hood Support #394

Jonkieber opened this issue Nov 5, 2022 · 38 comments · Fixed by #735

Comments

@Jonkieber
Copy link

Is your feature request related to a problem? Please describe.
Is it possible to support LG Range hoods? Link below.
https://www.lg.com/us/cooking-appliances/lg-hced3015s-range-hood#

Describe the solution you'd like
It would be great if I could import my range hood to automate fan/light control

Describe alternatives you've considered
N/A

Additional context

@matthai5
Copy link

matthai5 commented Dec 1, 2022

I'd like to request the same. Thanks!

@ollo69
Copy link
Owner

ollo69 commented Dec 24, 2022

Please attach integration diagnostic

@ollo69
Copy link
Owner

ollo69 commented Jan 16, 2023

Any update here? Could someone attach diagnostics?

@ollo69 ollo69 added the Waiting feedback Waiting feedback label Jan 16, 2023
@Jonkieber
Copy link
Author

Jonkieber commented Jan 24, 2023

Here you go, thanks for looking at it @ollo69
smartthinq_oven_diagnostics.txt

@ollo69
Copy link
Owner

ollo69 commented Jan 24, 2023

@Jonkieber,

in attached diagnostic I just see oven and dishwasher, no Range Hood.

@Jonkieber
Copy link
Author

Jonkieber commented Feb 4, 2023

Strange, I have it visible in my LG app, I wonder why it wouldn't show up?

I currently have my LG Dishwasher, Front Load Washer, Dryer, Oven and Refrigerator showing up in Homeassistant.

The only thing that doesn't appear is my hood, if I re-add the integration it still does not show up at all.

@chaliluc
Copy link

chaliluc commented Mar 1, 2023

Hi @ollo69 ,
my hood shows under 'unsupported_devices'.
unsupported_devices.txt
Let me know if you need anything else, I'll be glad to help get this integrated (especially the lights)!

@preeefix
Copy link

preeefix commented Mar 8, 2023

Additionally, I also have the hood showing in unsupported devices:
full diagnostics

@pknaz
Copy link

pknaz commented Jun 16, 2023

I'm also interested in this feature request, thanks!

Range Hood

@pknaz
Copy link

pknaz commented Jun 16, 2023

"HOOD": [
{
"appType": "NUTS",
"modelAppType": "NUTS",
"modelCountryCode": "WW",
"countryCode": "US",
"modelName": "STUDIO_HOOD",
"deviceType": 304,
"deviceCode": "KI09",
"alias": "Hood",
"deviceId": "76b907bb-5805-1193-8db5-24e8536cd594",
"fwVer": "",
"imageFileName": "home_appliances_img_hood.png",
"imageUrl": "https://objectcontent.lgthinq.com/43712709-2ec9-439d-84c9-2951db0ae32e?hdnts=exp=1702976416hmac=b9ff1edb67659a91ed2ab9784748fd02147f89a8dcf9f0c6dc58204fabc6b570",
"smallImageUrl": "https://objectcontent.lgthinq.com/05dd536f-c9f9-4060-8009-76f1fffd82f4?hdnts=exp=1701655219
hmac=8696f32f6e246d9536b542692f501441eec5e3344a3be101078eaf4f022e1428",
"ssid": "REDACTED",
"softapId": "",
"softapPass": "",
"macAddress": "",
"networkType": "02",
"timezoneCode": "America/New_York",
"timezoneCodeAlias": "USA/New_York",
"utcOffset": -5,
"utcOffsetDisplay": "-05:00",
"dstOffset": -4,
"dstOffsetDisplay": "-04:00",
"curOffset": -4,
"curOffsetDisplay": "-04:00",
"sdsGuide": "{"deviceCode":"KI09"}",
"newRegYn": "N",
"remoteControlType": "",
"userNo": "REDACTED",
"tftYn": "N",
"modelJsonVer": 0.61,
"modelJsonUri": "https://objectcontent.lgthinq.com/b8d132ea-1ce8-47c8-90a1-127db64f0bb6?hdnts=exp=1696845622hmac=43be0188e6be218f2990a94bc838eb270d174789c8170a9b4217388a5ea9d469",
"appModuleVer": 211.22,
"appModuleUri": "https://objectcontent.lgthinq.com/ed6520ba-814e-461d-9915-8b520ed391e1?hdnts=exp=1697090442
hmac=3b8f67a23c3c4c33278c7d159bfc9b0a08ea978a0f12ce43ab0f4e1b5a518079",
"appRestartYn": "Y",
"appModuleSize": 1290039,
"langPackProductTypeVer": 54.0,
"langPackProductTypeUri": "https://objectcontent.lgthinq.com/b65c61a3-5bb0-47fb-9c02-141a2b9e97c9?hdnts=exp=1746613954~hmac=a8fd1a060a6d47be47b7f583614a7fc68b5443a5e2c530cfff88092692c85672",
"deviceState": "E",
"snapshot": {
"mid": 1521951.0,
"online": true,
"hoodState": {
"ventMode": "NOT_SET",
"dummyData": 0.0,
"error": "DISABLE",
"ventLevel": 0.0,
"lampSet": "ENABLE",
"remainTimeMinute": 0.0,
"ventSet": "ENABLE",
"hoodFotaEnable": "ENABLE",
"remainTimeSecond": 0.0,
"childLock": "DISABLE",
"standyMode": "DISABLE",
"lampLevel": 0.0,
"hoodState": "INIT"
},
"static": {
"deviceType": "304",
"countryCode": "US"
},
"meta": {
"allDeviceInfoUpdate": false,
"messageId": "zdzhfug2Toq_TEv8hRxBbg"
},
"timestamp": 1686956222640.0
},
"online": true,
"platformType": "thinq2",
"area": 334505,
"regDt": 20220408161746.0,
"blackboxYn": "Y",
"modelProtocol": "STANDARD",
"order": 0,
"drServiceYn": "N",
"modemInfo": {
"appVersion": "clip_hna_v1.9.183",
"modelName": "STUDIO_HOOD",
"modemType": "QCOM_QCA4010",
"ruleEngine": "y"
},
"guideTypeYn": "Y",
"guideType": "TYPE1",
"regDtUtc": "20220408201746",
"regIndex": 0,
"groupableYn": "N",
"controllableYn": "N",
"combinedProductYn": "N",
"masterYn": "Y",
"pccModelYn": "N",
"autoOrderYn": "N",
"initDevice": false,
"existsEntryPopup": "N",
"tclcount": 0
}
]

@pknaz
Copy link

pknaz commented Oct 13, 2023

This request still in "requesting feedback" - is there anything else we could provide?

@ollo69
Copy link
Owner

ollo69 commented Oct 14, 2023

Time for me 😉

@ollo69 ollo69 removed the Waiting feedback Waiting feedback label Oct 14, 2023
@pknaz
Copy link

pknaz commented Oct 14, 2023

Time for me 😉

You got it! :)

@ollo69
Copy link
Owner

ollo69 commented Oct 14, 2023

@ALL,

sorry for this but I wait to match time to work on this and the link in the attached files are expired, so I cannot download model info to implement this.
Please attach a new diagnostic file, I will take this with priority.

@pknaz
Copy link

pknaz commented Oct 14, 2023

config_entry-smartthinq_sensors.json.txt

Here ya go, just downloaded this a few minutes ago

@ollo69
Copy link
Owner

ollo69 commented Nov 1, 2023

Hood support is now available in last release. Honestly I have no idea if controls works, I don't have a Hood to test. Please report here your results.

@ollo69
Copy link
Owner

ollo69 commented Nov 6, 2023

Any update here?

@matthai5
Copy link

Any update here?

Sorry for the long wait, I appreciate all your hard work on this. Since the update the integration shows the Range Hood as a device and lists a fan and light control which can be toggled on and off but unfortunately, it fails to turn on/off the Range Hood fan or light.

A sensor for the hood is also shown but it remains "OFF" regardless of the range hood status. Let me what info you would need to look into this further.
Cheers!

@ollo69
Copy link
Owner

ollo69 commented Nov 16, 2023

Does the light and fan controls follow the states of the Hood? It is only a problem related to the controls and reported states are correct?

@matthai5
Copy link

matthai5 commented Nov 16, 2023 via email

@chaliluc
Copy link

chaliluc commented Nov 16, 2023 via email

@ollo69
Copy link
Owner

ollo69 commented Nov 16, 2023

Delay is normal, this integration poll cloud every 30 seconds.
Related to the control, I just try to use the same logic used in microwave, because model info was very similar, but unfortunately this doesn't work.
I could do another try based on another project, but not sure that will solve.
The best solution should be that someone with a Hood analyze the traffic as described here and provide me right command to control the device. There are someone here that can do this?

@ollo69
Copy link
Owner

ollo69 commented Nov 19, 2023

Please check if with last release vent and lamp controls works. Thanks 👍

@chaliluc
Copy link

chaliluc commented Nov 20, 2023 via email

@ollo69
Copy link
Owner

ollo69 commented Nov 20, 2023

I hope this gives you something to work with.

Honestly, no.
Because the previous command do not return any errors, probably was more correct that this one (but I suppose that something was missing)
But there are no change for me to guess the right command, the only possible solution is to capture the command. I hope that someone here will be able to follow the instruction in readme mentioned above and provide me the info.

@ollo69 ollo69 added the Waiting feedback Waiting feedback label Nov 20, 2023
@chaliluc
Copy link

chaliluc commented Nov 20, 2023 via email

@ollo69
Copy link
Owner

ollo69 commented Dec 17, 2023

Any news here? If someone is available to share his LG account (via private e-mail) I could make some test in my env.

@kevinbarmstrong1
Copy link

@ollo69 I am happy to share my LG account if that would help. I too see all of the Range Hood controls but get a 'service call failed' error whenever I click on them. Let me know best way to get that over to you and thanks again for all the help !!

@ollo69
Copy link
Owner

ollo69 commented Jan 21, 2024

@kevinbarmstrong1,

thanks for your support.
You should send to me your LG credential (login name, password and country), if you prefer you can temporary change your password.
Send me the information to ---, I will keep you informed about the progress in the thread,
Just be ready that I need to turn on light and fan of your Hood to capture commands.

@ollo69
Copy link
Owner

ollo69 commented Jan 21, 2024

@kevinbarmstrong1,

I successfully captured traffic using your account and LG app.
I understood that your device use ApiV1, so I'm still not be able to fix control for Hood that use APIv2.

I will work on this on next days when I will have some available time. If is not a problem for you, do not change your password account until I do not finish implementation so that I will be able to make some tests using integration.

Thanks again for your support👍

ollo69 added a commit that referenced this issue Jan 26, 2024
@ollo69
Copy link
Owner

ollo69 commented Jan 30, 2024

Control for APIv1 is available in last release. I also rewrite control for APIv2 device, but I have no idea if this implementation works. Please test and report here results.

@kevinbarmstrong1
Copy link

@ollo69 sorry I'm not sure what I should do to test it --- i uninstalled from HACS and then tried reinstalling but I still get the same errors. Is there something else I should do to get the APIv2 working ? Thanks !

@ollo69
Copy link
Owner

ollo69 commented Feb 16, 2024

Is there something else I should do to get the APIv2 working ?

@kevinbarmstrong1 ,

as I see your device is APIv1 so it should work with last release. Can you eventually share error logs?

@kevinbarmstrong1
Copy link

it works !!! I just updates your integration to the most recent version and now it controls the Hood Fan and Light. Simply awesome @ollo69 - we really appreciate your help here ! Case closed and coffee coming your way :)

@ollo69
Copy link
Owner

ollo69 commented Feb 22, 2024

it works !!! I just updates your integration to the most recent version and now it controls the Hood Fan and Light.

Good to know and thanks for coffee🎉.
Still waiting for feed-back from some user that have APIv2 devices...

@drwicid
Copy link
Contributor

drwicid commented Apr 3, 2024

My LG HCED3015S uses APIv2--I can confirm this update does not work with v2.

I have the detailed diagnostic log, python error log, and mitmproxy flows--I can send those direct to you.

This is the payload to set hood state with POST method:

{
    "command": "Set",
    "ctrlKey": "setCookStart",
    "dataGetList": null,
    "dataKey": null,
    "dataSetList": {
        "hoodState": {
            "contentType": 34,
            "dataLength": 5,
            "lampLevel": 2,
            "lampOnOff": "ENABLE",
            "ventLevel": 3,
            "ventOnOff": "ENABLE",
            "ventTimer": 0              // See note
        }
    },
    "dataValue": null
}

This is the partial response payload with relevant hood state for GET method

{
    "result": {

        // Other attributes

        "snapshot": {
            "hoodState": {
                "childLock": "DISABLE",
                "dummyData": 0.0,
                "error": "DISABLE",
                "hoodFotaEnable": "ENABLE",
                "hoodState": "INIT",
                "lampLevel": 0.0,
                "lampSet": "ENABLE",
                "remainTimeMinute": 0.0,     // See note
                "remainTimeSecond": 0.0,     // 
                "standyMode": "DISABLE",
                "ventLevel": 3.0,
                "ventMode": "USER_MODE",
                "ventSet": "ENABLE"
            },
        },
    },

    // Other attributes

    "resultCode": "0000"
}

Observation on the ventTimer and remainTimeMinutes/Seconds Attributes

  • The hood features a 5-minute auto-off timer, which can be activated by holding the power button for 3 seconds.
  • The API can also initiate the auto-off timer based on the value of ventTimer, which accepts whole numbers between 1 and 5. However, the LG app sets ventTimer to 0 by default, as this feature is not available in the UI.
  • The remainTimeMinutes/Seconds values in the API response are cached, reflecting the last update received from the hood. It seems the hood does not transmit state updates for each countdown tick, causing the minutes/seconds to remain unchanged until a significant state change occurs—either when the timer expires, turning off the fan/light, or if the fan/light settings are manually adjusted on the hood.
  • Without an API call specifically designed to force the hood to send a current state update, accurately tracking the countdown is not feasible.

Lastly, I have 3 other LG devices using APIv2 if you need/want other traces:

  • Refrigerator - LMXS28626S
  • Dishwasher - LDTS5552S
  • Double Wall Oven - LWD3063ST

@drwicid
Copy link
Contributor

drwicid commented Apr 13, 2024

@ollo69 -- changing content type from 22 to 34 made this integration work with APIv2 hood.

CMD_VENTLAMP_V2_DICT = {
"command": "Set",
"ctrlKey": CMD_SET_VENTLAMP,
KEY_DATASET: {
KEY_HOODSTATE: {
"contentType": 22,
"dataLength": 5,
CMD_VENTTIMER: 0,
}
},
}

@badali16
Copy link

I have an LG hood which was not working and making the change recommend by ollo69 fixed it for me. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants