Closed ferllings closed 2 years ago
- Do I need to SetValue on TargetPosition? and when?
I would set the TargetPosition to the CurrentPosition when the shutter is manually positioned. Otherwise the target != current position and the Home app will show that the shutter is moving.
- Does PositionState need to be updated as well? Or is it handeled by the protocol?
I think you don't have to because HomeKit can determine if the shutter is moving by comparing the target with the current position. But it's still a good idea to update the position state as well – just in case HomeKit uses it internally for some reason.
Thanks for the confirmation !
Hello again, I'm trying to build a gateway with my shutters. I just want some clarification about the process to update / get update with a WindowsCovering device.
1) As I understand it CurrentPosition is the actual position of the shutter. TargetPosition is the desired value when you use the Homekit UI. Is That correct?
My Actual process is the following:
On TargetPosition.OnValueRemoteUpdate event is received I activate the shutter. When I receive a confimation that the shutter reached the desired position, I SetValue on CurrentPosition.
If the shutter is manually positionned, I SetValue on CurrentPosition
2) Do I need to SetValue on TargetPosition? and when?
3) Does PositionState need to be updated as well? Or is it handeled by the protocol?
Thanks for your time