[BTicino/OpenWebNet] New openHAB2 binding ready for testing

Hi,

I have voice commands now working with Alexa without need for an Alexa routine. ‘Alexa, Open, Close, Raise, Lower blind’ all work without Alexa routines or openHAB rules and proxy items. I now use the more capable v3 Alexa tagging. There was an issue with mixed language and locations like me. English language but in located Austria with .de Amazon server. However, Jeremy, the Alexa skill developer quickly fixed that bug.

The one missing command is STOP and for that I still need an openHAB work around. STOP will be added to the Alexa skill in a future update.

Here is the code with the stop work around: I will update it if needed later. It may need some polishing but it works.

items file

Group OfficeTest "Office test blind" {alexa="Endpoint.Other"}
String OfficeBlindStop "Stop office blind" (OfficeTest) {alexa="ModeController.mode" [supportedModes="STOP=STOP,UP=UP, DOWN=DOWN"]} //, expire="5s,command=STOPPED"
Rollershutter OfficeBlinds "Office blinds" (OfficeTest) {alexa="RangeController.rangeValue" [category="EXTERIOR_BLIND",supportedRange="0:100:10", unitOfMeasure="Percent", actionMappings="Close=100,Open=0,Lower=(+10),Raise=(-10)"], channel="openwebnet:bus_automation:Screen10:55:shutter" }

rules file

rule "STOP BLIND"
when 
    Item OfficeBlindStop changed to 'STOP'
then
    OfficeBlinds.sendCommand(STOP)
    Thread::sleep(1000)
    OfficeBlindStop.postUpdate('STOPPED')
end

Because of the work around in order to STOP a blind you must say …’ Alexa, Set office blind to stop’

I didn’t like that and so created an Alexa rule for saying…‘Alexa, Stop blind’

If @massi sees this it would be good to check the thread for the Alexa skill because the fix for the missing stop may require some collaboration, as I said in an earlier post

If you don’t need the STOP command to work or its fixed by an update, skill and or binding, then for natural blind commands to work natively you will only need one line of code like this:

Rollershutter OfficeBlinds "Office blinds" {alexa="RangeController.rangeValue" [category="EXTERIOR_BLIND",supportedRange="0:100:10", unitOfMeasure="Percent", actionMappings="Close=100,Open=0,Lower=(+10),Raise=(-10)"], channel="openwebnet:bus_automation:Screen10:55:shutter" }