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

Cannot add LV-RH131S-WM Air Purifier #138486

Closed
giuseppebaldi opened this issue Feb 13, 2025 · 12 comments · Fixed by #138626
Closed

Cannot add LV-RH131S-WM Air Purifier #138486

giuseppebaldi opened this issue Feb 13, 2025 · 12 comments · Fixed by #138626

Comments

@giuseppebaldi
Copy link

The problem

I have a Vital 200 that works great, no problem getting into HA, etc. I just picked up the smaller RH131 which is an alternate model # to the PUR-131S which is supported per the documentation. After doing some research I came across this closed issue regarding alternate model numbers not being recognized by the integration (why Levoit needs so many model numbers for the same product I don't know). What stood out to me from that issue was this line
'LV-PUR131S': { 'module': 'VeSyncAir131', 'models': ['LV-PUR131S', 'LV-RH131S'], 'features': ['air_quality'] }, }

I'm no expert but I wonder if my issue is that my model # is LV-RH131S-WM, yet another alternate model #. Is this something that can be added or is there somewhere I can add it to get this working?

What version of Home Assistant Core has the issue?

core-2025.2.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

VeSync

Link to integration documentation on our website

https://www.home-assistant.io/integrations/vesync

Diagnostics information

"integration_manifest": { "domain": "vesync", "name": "VeSync", "codeowners": [ "markperdue", "webdjoe", "thegardenmonkey", "cdnninja", "iprak" ], "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/vesync", "iot_class": "cloud_polling", "loggers": [ "pyvesync" ], "requirements": [ "pyvesync==2.1.17" ], "is_built_in": true, "overwrites_built_in": false }, "setup_times": { "null": { "setup": 1.795800017134752e-05 }, "01JM0F91G1V3M0NE621YNDYRCB": { "wait_import_platforms": -1.485645925999961, "config_entry_setup": 3.600238600999546 } }, "data": { "vesync": { "bulb_count": 0, "fan_count": 1, "outlets_count": 0, "switch_count": 0, "timezone": "America/Chicago" }, "devices": { "bulbs": [], "fans": [ { "manager": "**REDACTED**", "device_name": "Living Room Air Purifier", "device_image": "https://image.vesync.com/defaultImages/deviceDefaultImages/vs_wfon_apr_lap_v201s-wus_us_240.png", "cid": "vsaq1cc8d594bc3843f18a93769d4569", "connection_status": "online", "connection_type": "WiFi+BTOnboarding+BTNotify", "device_type": "LAP-V201S-WUS", "type": "wifi-air", "uuid": "**REDACTED**", "config_module": "VS_WFON_APR_LAP-V201S-WUS_US", "mac_id": "**REDACTED**", "mode": "auto", "speed": 0, "extension": null, "current_firm_version": null, "device_region": "US", "pid": null, "sub_device_no": null, "config": { "display": false, "display_forever": false }, "device_status": "on", "enabled": true, "_config_dict": { "module": "VeSyncAirBaseV2", "models": [ "LAP-V201S-AASR", "LAP-V201S-WJP", "LAP-V201S-WEU", "LAP-V201S-WUS", "LAP-V201-AUSR", "LAP-V201S-AUSR", "LAP-V201S-AEUR" ], "modes": [ "manual", "auto", "sleep", "off", "pet" ], "features": [ "air_quality" ], "levels": [ 1, 2, 3, 4 ] }, "_features": [ "air_quality" ], "modes": [ "manual", "auto", "sleep", "off", "pet" ], "air_quality_feature": true, "details": { "filter_life": 93, "mode": "manual", "level": 0, "display": false, "child_lock": false, "night_light": "off", "air_quality": 1, "light_detection_switch": true, "environment_light_state": false, "screen_switch": false, "air_quality_value": 1, "auto_preference_type": "default" }, "timer": null, "set_speed_level": 2, "auto_prefences": [ "default", "efficient", "quiet" ] } ], "outlets": [], "switches": [] } } }

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

@home-assistant
Copy link

Hey there @markperdue, @webdjoe, @TheGardenMonkey, @cdnninja, @iprak, mind taking a look at this issue as it has been labeled with an integration (vesync) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of vesync can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign vesync Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


vesync documentation
vesync source
(message by IssueLinks)

@CloCkWeRX
Copy link
Contributor

What stood out to me from that issue was this line
'LV-PUR131S': { 'module': 'VeSyncAir131', 'models': ['LV-PUR131S', 'LV-RH131S'], 'features': ['air_quality'] }, }

You are absolutely right; if you are confident yours is simply an alias then you can do a quick and easy pull request.

It looks like

"LV-RH131S": "LV-PUR131S", # Alt ID Model LV-PUR131S
is where you want to edit.

If you feel like having a go; should be all doable via the github UI.
If not, happy to do it on your behalf.

@cdnninja
Copy link
Contributor

First needs to be added here: https://github.com/webdjoe/pyvesync/blob/cb3868913927a53496be49532b9cde95cc5874fe/src/pyvesync/vesyncfan.py#L119-L125

Issue exists in that library for it: webdjoe/pyvesync#300

Once that is done core can be updated. A PR also exists to remove the need for mapping on fan.py within core.

@giuseppebaldi
Copy link
Author

Issue exists in that library for it: webdjoe/pyvesync#300

Yes, I created that issue and you can see from the log output I posted that it sees the unknown device and model #.

@CloCkWeRX if you don't mind putting in that PR I would appreciate it, never done it myself.

@CloCkWeRX
Copy link
Contributor

CloCkWeRX commented Feb 15, 2025

@giuseppebaldi
Copy link
Author

@cdnninja I saw the Bump pyvesync for vesync was included in yesterday's HA core update so should this work now? Should I see that air purifier show up in the integration or is there something else that needs to be updated? My apologies, I am not familiar with how this whole process works. Thanks for your help with it all though.

@iprak
Copy link
Contributor

iprak commented Feb 22, 2025

Yes, the version was bumped to 2.1.18 which had a fix for that.

@giuseppebaldi
Copy link
Author

Hmmm...still not adding that device for some reason. Ran test.py and still got this:
`2025-02-22 12:09:13,396 - DEBUG - New device list initialized
2025-02-22 12:09:13,397 - DEBUG - Unknown device named Bedroom Air Filter model LV-RH131S-WM
2025-02-22 12:09:13,397 - DEBUG - Error - 'VeSync' object has no attribute 'unknown'
2025-02-22 12:09:13,398 - DEBUG - LV-RH131S-WM device not added
2025-02-22 12:09:13,398 - DEBUG - Start updating the device details one by one
2025-02-22 12:09:13,399 - DEBUG - =======call_api=============================
2025-02-22 12:09:13,399 - DEBUG - [post] calling '/cloud/v2/deviceManaged/bypassV2' api
2025-02-22 12:09:13,399 - DEBUG - API call URL:
https://smartapi.vesync.com/cloud/v2/deviceManaged/bypassV2
2025-02-22 12:09:13,400 - DEBUG - API call headers:
{
"Content-Type": "application/json; charset=UTF-8",
"User-Agent": "okhttp/3.12.1"
}
2025-02-22 12:09:13,400 - DEBUG - API call json:
{
"timeZone": "America/New_York",
"acceptLanguage": "en",
"accountID": "##REDACTED##",
"token": "##REDACTED##",
"appVersion": "2.8.6",
"phoneBrand": "SM N9005",
"phoneOS": "Android",
"traceId": "1740247753",
"method": "bypassV2",
"debugMode": false,
"deviceRegion": "US",
"cid": "##REDACTED##",
"deviceId": "vsaq1cc8d594bc3843f18a93769d4569",
"configModule": "VS_WFON_APR_LAP-V201S-WUS_US",
"configModel": "VS_WFON_APR_LAP-V201S-WUS_US",
"payload": {
"method": "getPurifierStatus",
"source": "APP",
"data": {}
}
}
2025-02-22 12:09:13,743 - DEBUG - API response:

{
"traceId": "1740247753",
"code": 0,
"msg": "request success",
"module": null,
"stacktrace": null,
"result": {
"traceId": "1740247753",
"code": 0,
"result": {
"powerSwitch": 1,
"filterLifePercent": 91,
"workMode": "auto",
"manualSpeedLevel": 2,
"diySpeedLevel": 1,
"fanSpeedLevel": 0,
"AQLevel": 1,
"PM25": 1,
"screenState": 0,
"childLockSwitch": 1,
"screenSwitch": 0,
"lightDetectionSwitch": 1,
"environmentLightState": 0,
"autoPreference": {
"autoPreferenceType": "default",
"roomSize": 0
},
"scheduleCount": 0,
"timerRemain": 0,
"efficientModeTimeRemain": 0,
"sensorCalibration": {
"calibrationId": 0,
"remainTime": 70,
"totalTime": 70,
"status": 0
},
"sleepPreference": {
"sleepPreferenceType": "default",
"cleaningBeforeBedSwitch": 1,
"cleaningBeforeBedSpeedLevel": 3,
"cleaningBeforeBedMinutes": 5,
"whiteNoiseSleepAidSwitch": 1,
"whiteNoiseSleepAidSpeedLevel": 1,
"whiteNoiseSleepAidMinutes": 45,
"duringSleepSpeedLevel": 5,
"duringSleepMinutes": 480,
"afterWakeUpPowerSwitch": 1,
"afterWakeUpWorkMode": "auto",
"afterWakeUpFanSpeedLevel": 1
},
"errorCode": 0
}
}
}

2025-02-22 12:09:13,745 - DEBUG - [DevClass: VeSyncAirBaseV2, Name:Living Room Air Purifier, Device No: None, DevStatus: on, CID: vsaq1cc8d594bc3843f18a93769d4569]
2025-02-22 12:09:13,745 - DEBUG - Living Room Air Purifier

Device Name:.................. Living Room Air Purifier
Model: ....................... LAP-V201S-WUS
Subdevice No: ................ None
Status: ...................... on
Online: ...................... online
Type: ........................ wifi-air
CID: ......................... vsaq1cc8d594bc3843f18a93769d4569
UUID: ........................ 203ff875-61c1-40e7-883d-200ce81c5709
Mode: ........................ auto
Filter Life: ................. 91 percent
Fan Level: ................... 0
Display: ..................... False
Child Lock: .................. True
Night Light: ................. off
Display Config: .............. False
Display_Forever Config: ...... False
Air Quality Level: ........... 1
Air Quality Value: ........... 1 ug/m3
2025-02-22 12:09:13,749 - DEBUG - None`

From integration diagnostics got this:
"data": { "vesync": { "bulb_count": 0, "fan_count": 2, "outlets_count": 0, "switch_count": 0, "timezone": "America/Chicago" }, "devices": { "bulbs": [], "fans": [ { "manager": "**REDACTED**", "device_name": "Bedroom Air Filter", "device_image": "https://image.vesync.com/defaultImages/deviceDefaultImages/wf_apr_lv-rh131s-wm_us_240.png", "cid": "vsaq7f99e1f8411cbf062b975e7b2559", "connection_status": "online", "connection_type": "wifi", "device_type": "LV-RH131S-WM", "type": "wifi-air", "uuid": "**REDACTED**", "config_module": "WF_APR_LV-RH131S-WM_US", "mac_id": "**REDACTED**", "mode": "sleep", "speed": "4", "extension": { "airQuality": -1, "airQualityLevel": 4, "mode": "sleep", "fanSpeedLevel": "4" }, "current_firm_version": null, "device_region": "US", "pid": null, "sub_device_no": null, "config": {}, "device_status": "on", "enabled": true, "_config_dict": { "module": "VeSyncAir131", "models": [ "LV-PUR131S", "LV-RH131S", "LV-RH131S-WM" ], "modes": [ "manual", "auto", "sleep", "off" ], "features": [ "air_quality" ], "levels": [ 1, 2 ] }, "_features": [ "air_quality" ], "modes": [ "manual", "auto", "sleep", "off" ], "air_quality_feature": true, "details": { "active_time": 0, "filter_life": {}, "screen_status": "off", "level": 4, "air_quality": 4 } }, { "manager": "**REDACTED**", "device_name": "Living Room Air Purifier", "device_image": "https://image.vesync.com/defaultImages/deviceDefaultImages/vs_wfon_apr_lap_v201s-wus_us_240.png", "cid": "vsaq1cc8d594bc3843f18a93769d4569", "connection_status": "online", "connection_type": "WiFi+BTOnboarding+BTNotify", "device_type": "LAP-V201S-WUS", "type": "wifi-air", "uuid": "**REDACTED**", "config_module": "VS_WFON_APR_LAP-V201S-WUS_US", "mac_id": "**REDACTED**", "mode": "auto", "speed": 0, "extension": null, "current_firm_version": null, "device_region": "US", "pid": null, "sub_device_no": null, "config": { "display": false, "display_forever": false }, "device_status": "on", "enabled": true, "_config_dict": { "module": "VeSyncAirBaseV2", "models": [ "LAP-V201S-AASR", "LAP-V201S-WJP", "LAP-V201S-WEU", "LAP-V201S-WUS", "LAP-V201-AUSR", "LAP-V201S-AUSR", "LAP-V201S-AEUR" ], "modes": [ "manual", "auto", "sleep", "off", "pet" ], "features": [ "air_quality" ], "levels": [ 1, 2, 3, 4 ] }, "_features": [ "air_quality" ], "modes": [ "manual", "auto", "sleep", "off", "pet" ], "air_quality_feature": true, "details": { "filter_life": 91, "mode": "manual", "level": 0, "display": false, "child_lock": true, "night_light": "off", "air_quality": 1, "light_detection_switch": true, "environment_light_state": false, "screen_switch": false, "air_quality_value": 1, "auto_preference_type": "default" }, "timer": null, "set_speed_level": 2, "auto_prefences": [ "default", "efficient", "quiet" ] } ], "outlets": [], "switches": [] } } }

@iprak
Copy link
Contributor

iprak commented Feb 22, 2025

You might want to comment on your issue - webdjoe/pyvesync#300

@giuseppebaldi
Copy link
Author

You might want to comment on your issue - webdjoe/pyvesync#300

I have done this, thank you @iprak

@cdnninja
Copy link
Contributor

@giuseppebaldi please also check your custom_component folder does not have a vesync folder in it.

@giuseppebaldi
Copy link
Author

@cdnninja it does not, thank you. At the request of @webdjoe, I updated the pyvesync library and ran test.py again and got a different output this time, posted that to https://github.com/webdjoe/pyvesync/issues/300

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.

4 participants