dag81 / vesyncOpenhabPyPort

Port of Air Purifier support to openhab binding
3 stars 0 forks source link

Core 300S & Dual 200S working - Fixes for (P)PM25 and TimerExpir(y|e) #11

Open jangrewe opened 2 years ago

jangrewe commented 2 years ago

Thanks for your binding, i just added a Dual 200S and two Core 300S into my openHAB instance and it's working great so far!

I just noticed two things:

I'm assuming that timerExpiry is the correct channel, but i can't get any values from it in my sitemap after making sure it matches the item's name.

Oh, and in the sitemap you have "manual" and "sleep" for the Fan Mode, but you're missing "auto" - which works fine when added. :-)

jangrewe commented 2 years ago

The PM25 value also seems to be capped at 999, at least by the device if not by your code - maybe that's of interest. :-)

dag81 commented 2 years ago

Hi @jangrewe,

Apologies for the delay in replying - work commitments and family commitments meant I had to be offline for a while.

Thanks for confirming the units :) This is actually one of the points open in the MR request to get the binding in to the OpenHab repo's so your correction comes at a great time, as it was what I came back online to finish :) Thank you 👍

Thanks I'll check that first in the PR for OpenHab and then pull any updates back to this project, until that one gets merged, regarding the unit's and any sitemap corrections.

I'm just checking as your discussing the air quality, the two units you checked were the Dual 200S Air Humidifier, and the Core 300S Air Purifier I presume?

Regarding the timer expiry, I've only see it in my payload's from the 400S Air Purifiers I have here, when a timer is enabled for them to shutdown. (So its will only attempt to read the 400S Air Purifier).

If your happy to set the binding into debug mode, and capture the responses after a timer to shutdown has been set, can you capture the payloads please? Importantly for the 400S there's an extension object which get's a timerRemain value. If you have that for the 300S Air Purifier I'm happy to adjust it to support the timer calculation for that model as well. The same goes for the Air Humidifier.

For the PM25 value there is no cap it passes through the value so that will be capped by either the device, or the web service this binding pulls the data from as a proxy/gateway layer. My guess would be its capped by the device, as my unit only displays up to 3 digits or maybe they simulate it at the gateway layer. (How did you get 999 I've never seen our units go higher than 700 :) ).

Most importantly for the fan mode (is this the Core 300S Air Purifier), are you saying the device does report all three modes: auto, sleep, and manual? If it does, then currently I don't think the binding will let you switch to auto mode, as it will check the commands are valid for the known commands the device accepts, so it will only allow manual and sleep to be sent to the Core300S. If your happy to check I can do a custom build for you to test to see, if the device does respond to being commanded to auto mode, as well as sleep and manual? If it does accept auto mode, I can update the binding so it knows that the Core300S does accept auto as well.

Hopefully that all makes sense above, please ask if anything is unclear and I'll re-read and re-write.

Thanks in advance

David

pkoppels commented 11 months ago

Dear David,

In response to your last comment:

"Most importantly for the fan mode (is this the Core 300S Air Purifier), are you saying the device does report all three modes: auto, sleep, and manual? If it does, then currently I don't think the binding will let you switch to auto mode, as it will check the commands are valid for the known commands the device accepts, so it will only allow manual and sleep to be sent to the Core300S. If your happy to check I can do a custom build for you to test to see, if the device does respond to being commanded to auto mode, as well as sleep and manual? If it does accept auto mode, I can update the binding so it knows that the Core300S does accept auto as well."

I can confirm that the Core 300S Air Purifier does support auto mode. If I switch on auto mode through the app the binding channel fanMode (operation mode) reports "Auto" and the binding channel configAutoMode (Config: Auto Mode) reports Auto (Air Quality).

However, when I try to set the Air Purifier through openHAB to Auto Mode i get the following log entry: 2023-12-20 13:04:37.891 [WARN ] [dlers.VeSyncDeviceAirPurifierHandler] - Fan mode command for "auto" is not valid in the (Core200S/Core300S) API possible options manual,sleep

If you could update the binding so it knows that the Core300S does accept auto as well that would be great!

Kind regards, Philip