pschroeder89 / homebridge-levoit-humidifiers

Levoit Humidifiers Plugin for Apple HomeKit via Homebridge
Apache License 2.0
70 stars 9 forks source link

Sleep Mode doesn't switch off to Auto on non-US LV600s models #35

Closed lzy31179 closed 1 year ago

lzy31179 commented 1 year ago

Describe The Bug:

To Reproduce:

Expected behavior:

Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

lzy31179 commented 1 year ago

I have isntalled the plugin,and there are 6 accessories display.I can use 5 of the 6 accessories except the Sleep Mode.I can turn it on,but when I tap it to off,it doesn't respond. image

pschroeder89 commented 1 year ago

Hey there, can you fill out the bug info above? There is most likely a Homebridge log that indicates what's going wrong. That will help me in fixing the issue

pschroeder89 commented 1 year ago

@lzy31179 I think I see what you mean. If the device is off and you turn on Sleep Mode, it turns the device on and enables sleep mode. When you turn Sleep Mode off, it turns the humidifier to Auto mode. This is on purpose and documented in the README. This behavior is due to the fact that we can't determine if Sleep Mode was turned on from an on or off state, so we assume the user just wants to turn the Sleep Mode functionality off but leave the humidifier on.

To turn the device off, you need to use the Humidifier Off button or decrease the Cool Mist to 0. This is also documented in the README and mirrors the VeSync logic.

If this is not what you mean, please include additional details. Thanks!

troopertino commented 1 year ago

I'm having the same issue here, too. I have the LV600S... When the device is in Auto mode, I can use the Sleep switch to turn Sleep on. But if I want to return to Auto, turning the Sleep switch off doesn't do anything.

pschroeder89 commented 1 year ago

When you say it doesn't do anything, does a log get generated that the mode was turned back to Auto? If you open the VeSync app, is the device still in sleep mode? Any errors in the homebridge log output?

Turning the Sleep mode switch off should switch the device back to Auto. The display will light up on the humidifier briefly to display the change, as well.

troopertino commented 1 year ago

Thanks for the quick reply! Below is a copy of my log. After flipping the Sleep switch "off", VeSync still shows the device in sleep mode.

[12/5/2022, 1:13:03 PM] [Levoit Humidifiers] Changing Mode to sleep [12/5/2022, 1:13:35 PM] [Levoit Humidifiers] Changing Mode to auto

Let me know if there's any other info I can provide.

pschroeder89 commented 1 year ago

@troopertino This is working on my LV600s: https://www.icloud.com/sharedalbum/#B0S5Uzl7VY8CNU;A9D4D740-9E79-4E99-8222-0A2D28EC42A1

  1. What firmware is your humidifier? Mine is 1.1.06(1.0.42), but I'm not sure how to even update it if it's out of date.
  2. What version of the plugin are you using?
  3. If possible, could you upload a similar video to mine so I can see if there are any differences in our config that may be causing the problem?

Thanks!

troopertino commented 1 year ago

Here's a video: https://share.icloud.com/photos/0c4mbDQiYtDEg7rDF_t-ICZVA

My humidifier firmware is 1.1.05(1.0.50), and there's no option to upgrade... VeSync says I'm up-to-date.

And the plugin is v1.7.6. Homebridge is running v1.6.0.

I don't have the Cool/Warm Mist Fan accessories enabled. Could that be part of the issue?

pschroeder89 commented 1 year ago

@troopertino I think I know the issue and can fix it tomorrow. Do you know the exact model number you have? Are you outside of the US by any chance?

troopertino commented 1 year ago

I'm in the US. Exact model is LUH-A602S-WUSC. Bought it at Costco.

pschroeder89 commented 1 year ago

That's helpful, thanks! There are actually 2 issues I need to resolve:

I will get both of these done tomorrow. Thanks for all the help debugging! I'll let you know when a new version is published so you can test it out.

pschroeder89 commented 1 year ago

@troopertino Would you mind giving v1.7.7 a try and letting me know if this is fixed?

troopertino commented 1 year ago

Updated/restarted and still having the same issue. Below is the log. Really appreciate your help on this!

[12/6/2022, 9:10:53 AM] [Levoit Humidifiers] Changing Mode to sleep [12/6/2022, 9:11:23 AM] [Levoit Humidifiers] Changing Mode to auto

pschroeder89 commented 1 year ago

Sorry, had a typo. Can you try with 1.7.8?

troopertino commented 1 year ago

Sadly still no luck.

pschroeder89 commented 1 year ago

Interesting. Can you add "enableDebugMode": true into your config.json? You can place it directly under "platform": "LevoitHumidifiers",, so it looks like:

      "name": "Levoit Humidifiers",
      "email": "email",
      "password": "password",
      "platform": "LevoitHumidifiers",
      "enableDebugMode": true

Save and restart Homebridbge...you should then see a log that says [GET DEVICES], please post that output

troopertino commented 1 year ago

You got it. Looks like the log is identifying the model as LUH-A602S-WUSR even though the machine itself is labelled LUH-A602S-WUSC.

[12/6/2022, 10:23:25 AM] [Levoit Humidifiers] [DEBUG]: [GET DEVICES] Device List -> JSON: [{"deviceRegion":"US","isOwner":true,"authKey":null,"deviceName":"Living Room Humidifier","deviceImg":"https://image.vesync.com/defaultImages/deviceDefaultImages/wfon_ahm_luh-a602s-wusr_us_240.png","cid":"vsaq7167bd3404cbb56f9bf71a1fc47e","deviceStatus":"on","connectionStatus":"online","connectionType":"WiFi+BTOnboarding+BTNotify","deviceType":"LUH-A602S-WUSR","type":"wifi-air","uuid":"723115ff-bac7-4ab5-98e3-d6991a78d59b","configModule":"WFON_AHM_LUH-A602S-WUSR_US","macID":"e8:9f:6d:c8:0a:d2","mode":null,"speed":null,"currentFirmVersion":null,"subDeviceNo":null,"subDeviceType":null,"deviceFirstSetupTime":"Dec 2, 2022 5:19:50 AM","subDeviceList":null,"extension":null,"deviceProp":null},{"deviceRegion":"US","isOwner":true,"authKey":null,"deviceName":"Bedroom Humidifier","deviceImg":"https://image.vesync.com/defaultImages/deviceDefaultImages/wfon_ahm_luh-a602s-wusr_us_240.png","cid":"vsaqaa78b254b7185d5b718f9d40604b","deviceStatus":"on","connectionStatus":"online","connectionType":"WiFi+BTOnboarding+BTNotify","deviceType":"LUH-A602S-WUSR","type":"wifi-air","uuid":"be882dfc-5f35-497b-994b-eec0eda88d4a","configModule":"WFON_AHM_LUH-A602S-WUSR_US","macID":"e8:9f:6d:c8:06:5a","mode":null,"speed":null,"currentFirmVersion":null,"subDeviceNo":null,"subDeviceType":null,"deviceFirstSetupTime":"Dec 1, 2022 10:20:41 PM","subDeviceList":null,"extension":null,"deviceProp":null},{"deviceRegion":"US","isOwner":true,"authKey":null,"deviceName":"Ellis Humidifier","deviceImg":"https://image.vesync.com/defaultImages/deviceDefaultImages/wifibtonboardingnotify_airhumidifier_dual200s_us_240.png","cid":"vsaq65cf923a4152be3c935caff99d75","deviceStatus":"on","connectionStatus":"online","connectionType":"WiFi+BTOnboarding+BTNotify","deviceType":"Dual200S","type":"wifi-air","uuid":"e762f686-7a05-444e-ad6a-cf2926eb162b","configModule":"WiFiBTOnboardingNotify_AirHumidifier_Dual200S_US","macID":"1c:9d:c2:78:03:3e","mode":null,"speed":null,"currentFirmVersion":null,"subDeviceNo":null,"subDeviceType":null,"deviceFirstSetupTime":"Nov 29, 2022 2:04:37 AM","subDeviceList":null,"extension":null,"deviceProp":null}]

pschroeder89 commented 1 year ago

Awesome, 1.7.9 is published! 🤞🏼

troopertino commented 1 year ago

I'm so sorry, still no luck. Here's the debug log if it helps:

[12/6/2022, 10:46:54 AM] [Levoit Humidifiers] [DEBUG]: [GET DEVICE INFO] Getting device info... [12/6/2022, 10:46:59 AM] [Levoit Humidifiers] DEBUGGING: model is: LUH-A602S-WUSR [12/6/2022, 10:46:59 AM] [Levoit Humidifiers] Changing Mode to auto [12/6/2022, 10:46:59 AM] [Levoit Humidifiers] [DEBUG]: [SEND COMMAND] Sending command setHumidityMode to Living Room Humidifier with ({"mode":"auto"})... [12/6/2022, 10:47:00 AM] [Levoit Humidifiers] [DEBUG]: [SEND COMMAND] Successfully sent command setHumidityMode to Living Room Humidifier with ({"mode":"auto"})! Response: {"traceId":"1670352419959","code":0,"msg":"request success","module":null,"stacktrace":null,"result":{"traceId":"1670352419959","code":0}}

pschroeder89 commented 1 year ago

Lol thanks for your patience. 1.7.9-beta1 is published and I found a way to test it locally this time. I'll let you test it out before publishing another non-beta version.

[06/12/2022, 12:17:42] [Levoit Humidifiers] DEBUGGING: model is: LUH-A602S-WUSR
[06/12/2022, 12:17:42] [Levoit Humidifiers] Changing Mode to humidity
[06/12/2022, 12:17:45] [Levoit Humidifiers] DEBUGGING: model is: LUH-A602S-WUSR
[06/12/2022, 12:17:45] [Levoit Humidifiers] Changing Mode to sleep
troopertino commented 1 year ago

Woohoo! This seems to work, thank you!

pschroeder89 commented 1 year ago

Awesome, thanks again for all of your testing! 1.8.0 is published. Closing this bug.