openhab-addons: [velux addon] incorrect position in binding with Somfy devices for custom position
Expected Behavior
With Somfy devices, there is a feature to register a special position for each actuator (‘my’ position). For exemple the sunny position, or rainy, etc. When the actuator is set in this position with the remote, the binding should refresh the current real position as any other position.
Current Behavior
Currently the velux binding does not refresh the current position (when actuator set on this custom position) but instead failed and log an error (INFO level)
Exemple :
[INFO ] [.internal.handler.VeluxBridgeHandler] - handleCommandScheduled(velux:rollershutter:home:klf200_bureau:position,REFRESH): updating of item velux:rollershutter:home:klf200_bureau:position (type velux:rollershutter/position) failed.
Possible Solution
With log investigation in DEBUG/TRACE level, we can see that the KLF200 core API send this result for GW_GET_NODE_INFORMATION_CFM command :
[TRACE] [internal.bridge.slip.SlipVeluxBridge] - bridgeDirectCommunicate(): received packet C0 00 7F 02 10 07 00 07 00 62 75 72 65 61 75 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 05 F7 FF 50 00 F7 FF F7 FF F7 FF F7 FF 00 00 4F 06 ED F3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F2 C0.
Depending of the API documentation, we see that :
- “CurrentPosition” set as F7 FF (“No feed-back value known”) instead of a % value in hex
- “Target” set as “50 00”, the real current position of the actuator (which is the ‘MY’ position for this somfy device exemple)
- “state” set as “05”, the “done” status
Possible fix/workaround would be :
- check wether Somfy devices
- if state == 5 (done), then we send the “target” field which is correct instead of the “currentPosition” field, which is buggy
Steps to Reproduce (for Bugs)
- Record a custom/‘my’ position on somfy actuator
- Set the actuator on this position (with any method)
- Wait for binding to refresh the position
Context
Somfy devices with Velux addon
Your Environment
Any version of openhab or velux addon. Linux for hosting.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 56 (30 by maintainers)
My bad, it works flawlessly now ! I made some other tests and all is OK. I figure that i didnt’t wait for the 1 min timeout to have the status checked by the addon. (i made some tests too quickly i think) And my first test was with a multi roller remote, perhaps a hint for my futur tests… I will stay you inform.ed