NRCHKB / node-red-contrib-homekit-bridged

Node-RED Contribution - HomeKit Bridged : Node-RED nodes to simulate Apple HomeKit devices.
https://nrchkb.github.io
MIT License
412 stars 52 forks source link

[Feature]: Automatically manage PositionState for Window Covering #493

Closed Cyberbeni closed 1 year ago

Cyberbeni commented 1 year ago

Your Current NRCHKB Plugin Version

1.4.3

Operating System

Official Raspberry Pi Homebridge image

What is your idea?

I am bringing over my window covering handling to NodeRED. I have just finished my MVP (Automatically updating current position one by one based on a set open duration, going towards the target, issuing open/stop/close commands to the broadlink plugin as needed) and I originally added PositionState setting too. I read the docs to see if I missed anything and it said that PositionState had no effect, so I tried the flow without it.

When I had controlled PositionState then the Home app instantly updated the state when I reached the target. When I left it on 0 (closing) then it consistently took about 3-5 seconds to go from "Opening" to "Open". (My test was to fully open then start closing and then switch to opening after 5 seconds)

I think it would be useful to automatically set PositionState in NRCHKB. (Or at least the docs should be updated.)

Any more details?

No response

Additional comments?

No response

Any code or functions to add?

No response

Shaquu commented 1 year ago

Hi, pretty sure we will not do anything automatically the way you ask, sorry. I suggest to write some function nodes yourself :)

crxporter commented 1 year ago

The documents for window covering here (3rd paragraph) explain that if target does not equal current, you'll see a spinning icon.

My current window cover hardware sends a message when it's done moving - I use this to stop the "opening" or "closing". My previous hardware didn't have this so I manually sent the current position after a certain time (I think it was 12 seconds for mine) to stop the spinner.

I agree with Shaquu, this shouldn't be added - it should be left to the user to set up for how their own hardware works. Every window will be slightly different timing.