ha-smartthinq-sensors
ha-smartthinq-sensors copied to clipboard
Add Energy Usage and Filter Status for LRFVS3006D Fridge
Add sensor data for energy monitoring, water filter and air filter status (see screenshot)
I am a HA integration developer (integration). If you need any help implementing this, let me know what I can do to help! Just got a new fridge and I would love this data in HA.
@AngellusMortis,
any help is appreciated. Starting point is diagnostics from where you can see the payload that comes from LG API, then based on the information you can work on library code and integration. The problem here is that LG have so many different devices and 2 differents API, integrate new feature or new device without breaking existing require lot of time that I don't have on this period. Any PR are welcome, and as I see you know very well how to write code for HA integrations👍.
I am a HA integration developer (integration). If you need any help implementing this, let me know what I can do to help! Just got a new fridge and I would love this data in HA.
@AngellusMortis did you manage to make this work with this integration? The login flow is falling over since they started requiring people to reset their password
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Remove stale from this, but please attach integration diagnostic. I need device information to add new sensors.
I have the same fridge. Diagnostic attached smartthinq_sensors-09d45055e81a7d693dc7abb5a080c617-Refrigerator-7f9fd63f8d979e46584473a12133db44.json.txt
I did some MITM'ing for my dryer and got the info below. Compared to the screenshot in the initial post here, it seems as the presentation is different for that fridge and my dryer. In the same app view I only have a link where I can click on "Energy monitoring" to get a view of week / month / year. I don't get a kWh summary.
Energy monitoring on the dryer is divided into cycles, which most likely differs compared to the fridge. You can fetch the information for cycles via type count. courseSpendPower seems to be Wh.
- GET https://eic-service.lgthinq.com:46030/v1/service/laundry/[device-id]/energy-history?type=count&count=10&washerType=M&sorting=1 HTTP/2.0
{ "result": { "count": 0, "energyDetergent": 0, "energySoftener": 0, "energyWater": 0, "item": [ { "courseDryer24inchBase": "COTTONNORMAL", "courseSpendPower": "1163", "dnnReady": "DNNREADY_OFF", "dryLevel": "DRYLEVEL_CUPBOARD", "ecoHybrid": "ECOHYBRID_ECO", "periodicEnergyData": "1163", "smartCourseDryer24inchBase": "NOT_SELECTED", "timestamp": "1679155500743" }, { "courseDryer24inchBase": "COTTONNORMAL", "courseSpendPower": "1082", "dnnReady": "DNNREADY_OFF", "dryLevel": "DRYLEVEL_CUPBOARD", "ecoHybrid": "ECOHYBRID_ECO", "periodicEnergyData": "1082", "smartCourseDryer24inchBase": "NOT_SELECTED", "timestamp": "1679079207883" } ], "periodicEnergyData": 0, "power": 0, "powerWh": 0 }, "resultCode": "0000" }
Then there are also commands to get energy usage per time period in the app, with the options of week / month / year where week and month are using the same API call, just different date ranges.
Week
- API call: GET https://eic-service.lgthinq.com:46030/v1/service/laundry/[device-id]/energy-history?type=period&period=day&startDate=2023-03-12&endDate=2023-03-18&washerType=M&twinYn=N HTTP/2.
- Response body: energy-history-week.txt
Month
- API call: GET https://eic-service.lgthinq.com:46030/v1/service/laundry/[device-id]/energy-history?type=period&period=day&startDate=2023-03-01&endDate=2023-03-31&washerType=M&twinYn=N HTTP/2.0
- Response body: energy-history-month.txt
Year
- API call: GET https://eic-service.lgthinq.com:46030/v1/service/laundry/[device-id]/energy-history?type=period&period=month&startDate=2023-01-01&endDate=2023-12-31&washerType=M&twinYn=N HTTP/2.0
- Response body: energy-history-year.txt
Not really sure on how to proceed as there's no summary Wh value for the dryer. Might be an idea to just fetch the latest cycle and present that as a sensor so that one could set up own utility meter templates to get the summary. But for the fridge it should be possible to find a summary via the API, but I don't have a fridge so I can't fetch that info.
If anyone with the fridge would like help to set up the MITM, or temporarily share their LG credentials with me so that I can do it, find me on the Home Assistant Discord and send me DM.