pschroeder89 / homebridge-levoit-humidifiers

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

[Device Request] #55

Closed jarvismeier closed 7 months ago

jarvismeier commented 8 months ago

Model number: LEH-S601S-WUS

Number of cool mist levels: 0

Number of warm mist levels: 0

Auto mode? Yes

Sleep mode? Yes

Night Light? No

Any other features not listed above?

this is an evaporative humidifier. It has fan speed setting (no mist levels).

Number of cool mist levels:

Number of warm mist levels:

Auto mode?

Sleep mode?

Night Light?

Any other features not listed above? image

image

pschroeder89 commented 8 months ago

Hey @jarvismeier, I can take a look at this over the weekend. Thanks for the logs!

eoddc5 commented 8 months ago

+1 on this request @pschroeder89 - would be cool to see this.

just got this from VeSync to test out and would love to add it to HomeKit. thanks!

pschroeder89 commented 8 months ago

@eoddc5 @jarvismeier Please try 1.9.2-beta1. There should not be a cool mist slider for this model, it will only support "auto" mode.

jarvismeier commented 8 months ago

Device is discovered however there are some inconsistencies with accessories and a few other quirks.  I’ll manually go through each feature in the app and record what the debug picks up when it queries the humidifier.  I’ll post my results here.Jarvis MeierSent from my iPhoneOn Dec 18, 2023, at 11:04 PM, Paul Schroeder @.***> wrote: @eoddc5 @jarvismeier Please try 1.9.2-beta1. There should not be a cool mist slider for this model, it will only support "auto" mode.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

jarvismeier commented 8 months ago

This is how your functionality works right now.
power: On/off works. Current humidity: reads accurately.
Mist slider: will auto switch to manual mode and adjust the fan speed accordingly.
Humidity set point slider: will adjust humidity only if set to humidity mode in the Levoit app.
Other on/off switch: when on switches to sleep mode. When switch off it does nothing.

I’ve been looking at the logs and have skimmed the following when adjusting settings in the vesync app

workMode: is used for the current mode (autoPro, sleep, manual, humidity) powerSwitch: turn on or off the device (0, 1) targethumidity: humidity set point for humidity mode (30 to 80) mistLevel: fan speed in manual and humidity modes (1 to 9)

I’ve attached more log screen shots.

IMG_0016

IMG_0015

IMG_0013

IMG_0017

pschroeder89 commented 8 months ago

Thanks so much for the detailed logs! I have some changes ready to go that I think might help the issues you brought up.

Question: What is the difference between Humidity and AutoPro modes? It looks like Humidity works like Auto works on other models, where you set the target humidity and it turns off once it reaches that level.

pschroeder89 commented 8 months ago

1.9.2-beta4 is up with a bunch of fixes.

  1. Mist slider: The mist slider was not supposed to be visible for this model, so that was bug number 1. I'm also unsure why it was working for you, it should be following the new API structure that I haven't been able to figure out. The good news is that someone discovered the correct API structure to get it working, so now in beta3 it's supposed to be visible. If it breaks things, I'll revert to the previous implementation, but I'll be confused about it lol.
  2. Humidity slider: The slider should now enable Humidity mode as well as control the target humidity.
  3. Sleep mode: Using the sleep switch should now turn on Sleep Mode and when turned off, go to Auto mode. It might be better to set this to Humidity mode instead of Auto mode, but I'll wait to see your response of what Auto mode does on this model.
jarvismeier commented 8 months ago

thanks for the changes. autoPro mode dynamically selects the best humidity level based on the current detected room temperature. It also dynamically adjusts the fan level. It’ll spin down as it gets closer to the ideal humidity level. In humidity mode the fan level is a static set value.

pschroeder89 commented 7 months ago

@eoddc5 @jarvismeier Ok I made an additional change and would appreciate some testing of the 1.9.2-beta6 version when you have time.

Thanks!

Edit: Also, make sure to remove the accessory from cache in your Homebridge settings, first, otherwise you may see 2 mist sliders.

jarvismeier commented 7 months ago

Thanks for the update. It mostly works well except for the AutoPro switch. Turning it on engages AutoPro Mode but turning it off does nothing. From how the sleep switch works each mode seems to require its own switch. A manual mode would require a separate switch. Other than that small issue everything else works.

pschroeder89 commented 7 months ago

Hmm, when you turn on and off AutoPro from HomeKit, does the VeSync app stay on AutoPro mode? It should switch to Manual mode and the mist level should be the previous mist level.

I'll double check my logic in the code, too. Edit: The code looks ok, but maybe you can share your device with my account so I can debug? My email is Paul.J.Schroeder.29@gmail.com if you want to do that

jarvismeier commented 7 months ago

When switching it to off nothing is logged and it immediately goes back to showing on. VeSync doesn’t show anything either.

i’ve shared the device. Let me know when you are done and I’ll remove the share.

pschroeder89 commented 7 months ago

I didn't get the share invite, but I did find a piece of wrong logic that I fixed. Can you try again with beta7? If that doesn't work, please try to revoke the share and then try again with the email in a downcased format like paul.j.schroeder.29@gmail.com. Thanks!

jarvismeier commented 7 months ago

That worked! Thanks for all the hard work. It’s much appreciated.

pschroeder89 commented 7 months ago

Published 1.10.1