mvalla / openhab-addons

Add-ons for openHAB
Eclipse Public License 2.0
24 stars 16 forks source link

Read shutter position from OWN status message #97

Open feodor85 opened 4 years ago

feodor85 commented 4 years ago

I have Legrand 067263 shutter.

In the documentation for the equipment there is a section:

If your shutter has traditional limit switches, place the shutter in the fully open position and press the button indicated, holding for more than four seconds. The shutter closes fully, opens fully, and then settles in an intermediate position. Do not interfere with the unit during this phase. The unit has memorized the shutter opening and closing times. Next, memorise the desired position (preset).

After config the device sends position status messages:

Currently the binding ignores these messages:

2019-10-25 00:34:51.123 [INFO ] [org.openwebnet.OpenGatewayZigBee$a  ] - SERIAL RECEIVED  <<<<<<<<<<<<<<<<<<<<<<<< *2*0*770677101#9##*#2*770677101#9*10*10*100*000*0##
2019-10-25 00:34:51.129 [DEBUG] [org.openwebnet.OpenGatewayZigBee    ] - ##gw-openwebnet-ZB## onNewFrame *2*0*770677101#9##*#2*770677101#9*10*10*100*000*0##
2019-10-25 00:34:51.137 [DEBUG] [org.openwebnet.OpenGatewayZigBee    ] - ##gw-openwebnet-ZB## session stack is empty for message: <*#2*770677101#9*10*10*100*000*0##>
2019-10-25 00:34:51.136 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=2.7706771
2019-10-25 00:34:51.143 [DEBUG] [.handler.OpenWebNetAutomationHandler] - ==OWN:AutomationHandler== updateAutomationState() - msg=<*2*0*770677101#9##> what=STOP
2019-10-25 00:34:51.144 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=2.7706771
2019-10-25 00:34:51.152 [DEBUG] [.handler.OpenWebNetAutomationHandler] - ==OWN:AutomationHandler== # 770677101 # [[[ internalState=0 positionEst=-1 - calibrating=-1 shutterRun=-1 ]]]
2019-10-25 00:34:51.153 [DEBUG] [.handler.OpenWebNetAutomationHandler] - ==OWN:AutomationHandler== updateAutomationState() - msg=<*#2*770677101#9*10*10*100*000*0##> what=null
2019-10-25 00:34:51.162 [WARN ] [.handler.OpenWebNetAutomationHandler] - ==OWN:AutomationHandler== updateAutomationState() FRAME <*#2*770677101#9*10*10*100*000*0##> NOT SUPPORTED for thing openwebnet:zb_automation:myZBgateway:myzigbeeswitch_enter4, ignoring it.

It would be more precise to read the shutter position from status messages.