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

Correct firmware for fans #270

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

cdnninja
Copy link
Contributor

My 131 wasn't showing firmware, neither is my Classic300.

I noticed the 131 contains the firmware within the device call vs the summary call:

2025-01-18 18:20:58,548 - DEBUG - API response:

  {
  "code": 0,
  "msg": "request success",
  "traceId": "1737249658",
  "screenStatus": "off",
  "filterLife": {
    "change": false,
    "useHour": 1035,
    "percent": 75
  },
  "activeTime": 0,
  "timer": null,
  "scheduleCount": 0,
  "schedule": null,
  "levelNew": 7,
  "airQuality": "excellent",
  "level": 2,
  "mode": "manual",
  "deviceName": "Levoit 131S Air Purifier",
  "currentFirmVersion": "2.0.58",
  "childLock": "off",
  "deviceStatus": "on",
  "deviceImg": "https://image.vesync.com/defaultImages/deviceDefaultImages/airpurifier131_240.png",
  "connectionStatus": "online"
}

I couldn't find the data for the classic300 even though it is in the app.

This PR parses the data - only overwriting if it finds data.

@webdjoe
Copy link
Owner

webdjoe commented Jan 22, 2025

There is a new API call that get's the firmware updates available for all devices the I found it the last time I captured packets. I can create a new branch if you think it would be useful

@cdnninja
Copy link
Contributor Author

Wouldn't be a bad thing. It isn't hugely helpful but figured I may as well solve this one. If a better way exists I will close this one.

@cdnninja cdnninja closed this Jan 22, 2025
@webdjoe
Copy link
Owner

webdjoe commented Jan 24, 2025

I started a branch here with the endpoint, problem is one device may have multiple firmware updates for the mainfw and mcu. I messed around with using a dataclass to hold the state but it's a bit clunky. Let me know if you have any thoughts:
firmware-updates

@webdjoe webdjoe reopened this Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants