kovapatrik / homebridge-midea-platform

Homebridge plugin for Midea devices
https://www.npmjs.com/package/homebridge-midea-platform
Apache License 2.0
29 stars 2 forks source link

Offset humidity reported to compensate for the sensor reporting incorrect values #98

Closed nbraunstein closed 1 month ago

nbraunstein commented 3 months ago

I appreciate the addition of the separate humidity sensor, that way I can create automations.

However, my dehumidifier consistently reports about 5% difference from the actual humidity. Is there a way to add a setting to compensate for this?

kovapatrik commented 3 months ago

So if I get it currently, you only need to adjust the displayed humidity, right? So when you set the target humidity, it's working as it is supposed to be right now. Or should I add the offset to the target humidity as well?

dkerr64 commented 3 months ago

Is this even wise? I'm hesitant to add any offsets as then what is set / displayed in HomeKit becomes different from what is set / displayed on the device and on the OEM apps, which doesn't feel like a good idea.

Also, the humidity sensor in the dehumidifier is affected by the immediate surrounding environment... which because the dehumidifier is located right there, could well be different from a separate sensor placed elsewhere in the same room.

kovapatrik commented 3 months ago

Yeah you are right, but from my perspective, if someone wants this feature, I can implement it. It's on the user after it doesn't work as they want to work.

dkerr64 commented 3 months ago

Yeah you are right, but from my perspective, if someone wants this feature, I can implement it. It's on the user after it doesn't work as they want to work.

Just be careful on the setting max/mins... you can set between 35% and 85%. If a user attempts to set outside of this range then I immediately set it back to the max or min. So if you set a 5% offset, then what is shown on the Apple Home UI needs to adjust itself, for example to either 30% or 40% (depending on whether a plus or minus offset) so that what is actually sent to the device is with 35%-85% range.

nbraunstein commented 3 months ago

I'm really just looking to offset it by 5-10 % +/-

Every sensor in my room reports lower than my dehumidifier. I'd just like to be able to match it. They are about a foot apart from each other too.

Is it possible to adjust in smaller than 5% increments when creating automations? Just trying to fine tune things

Essentially my dehumidifier is supposed to be on when it's over 45% and off when its under 40%. It just clicked on and it's actually 41% on my high end sensors. I really only need the offset in HomeKit, so maybe there is no need to alter anything else?

kovapatrik commented 3 months ago

I forgot to mention, but this was added since the first v1.1.2 beta version, I'm sorry. Could you please try it?

dkerr64 commented 3 months ago

I just looked at the code changes... am I correct that your change just changes what is reported to Homebridge as the current humidity? It does not change what is shown on the target humidity slider, nor what is sent to the dehumidifier when that slider is adjusted.

In other words, with a -5 adjustment, if the device thinks it is 50% we actually report 45%. And if the target humidity slider is set to 45% then we ask the dehumidifier for 45% and it will keep running because it thinks it is 50% and will not stop until it thinks it has reached 45%... which will be reported to HomeKit as 40%.

In other words, what a user might select in Apple Home is out-of-alignment with what we are reporting back as current, which is out of alignment with what the device itself will display.

I really think this is a bad idea. At a minimum caution against it in the schema description or readme. I do not want to extend the code changes to try and mess with the target humidity as well.

David.

kovapatrik commented 3 months ago

I think @nbraunstein wanted to just match it visually, but correct me if I'm wrong.

dkerr64 commented 3 months ago

I think @nbraunstein wanted to just match it visually, but correct me if I'm wrong.

Yes I understand that. But I don't think the implications were thought through especially if you want to add automations based on it.

If someone suspects that the dehumidifier is reporting the wrong humidity then either 1) return the device as faulty and request a replacement, or 2) accept it and place another humidity sensor in the room and use that to monitor and/or base automations on.

Remember also, that the humidity in the immediate vicinity of the dehumidifier is very likely to be different from that across the room. And the temperature is likely different too as hot air is a result of the dehumidifying process.

kovapatrik commented 2 months ago

You are totally right, but if it works as @nbraunstein requested, then I would leave it in (like with a lot of warning or so in the config UI).

@nbraunstein did you have any chance to try this out?

kovapatrik commented 1 month ago

Closed until further discussions.