Closed mikeburgh closed 1 year ago
There's Entry (which performs and reports open/close) and EntrySensor (which reports open/close), and it seems your device might have both? I suspect removing the EntrySensorToBarrierOperator mapping completely would fix it because it would allow EntryToBarrierOperator to work correctly.
beta build out now
I run it under docker, so will try the beta once it's updated there.
Got to say, really nice dev experience the way you have it set up with VS code and the plugins, made it so easy to work with the real server and devices and debug the code!
the beta does not require a new docker build or anything, you can install a beta plugin from the dropdown list on zwave.
Ahh, totally missed that, even more impressive! Beta installed, position now showing correctly.
I started looking at this issue as the garage doors I added via zwave were not showing open/close properly.
I found the issue is that the position of the door, is being mapped to the entryOpen state via this line in index.ts : addCommandClassIndex(CommandClasses['Barrier Operator'], 'position', EntrySensorToBarriorOperator, 'EntrySensor');
However the position is reported in the range 0 to 100 so it does not map to the enums defined in zwave-js which are: Closed = 0, Closing = 252, Stopped = 253, Opening = 254, Open = 255
I tried changing that mapping to currentState in index.ts but then the open/close buttons went away..
Instead if I simply removed all the code in the updateState method in EntrySensorToBarriorOperator everything then worked fine. ?
I have not dug in deep enough yet to figure out how to keep the buttons and make it update against the currentState rather than the position.. can keep digging unless you see the obvious fix ?