Release Candidate and Support: Amazon Echo Control Binding

There are now also more possibilities coming from Alexa skill improvements. Recently added is support for v3 tags and in particular in Dec support semantic extensions , Toggle, Range and Mode controllers. You can then create a string item and capture an Alexa command or even get Alexa to convert a spoken command directly to an Action. This can remove the need for Alexa Routines, proxy items and openHAB rules. There even more possibilities with ‘Presets’ and ‘Action mappings’

eg
Here is my Group item definition with v3 tags to create a 3 state switch for my PIR lights which have ON, OFF and CONSTANT modes

Group WestLights "West lights" {alexa="Endpoint.LIGHT"}
    String WestLights_Command "West lights command [%s]" (WestLights) {alexa="ModeController.mode" [supportedModes="ON=ON,OFF=OFF,CONSTANT=CONSTANT", autoupdate="false"], expire="4h,command=NORMAL"}
    Switch WestLights_Switch "West lights switch" <light> (WestLights, gAllLights) {alexa="PowerController.powerState" [category="LIGHT"], channel="openwebnet:bus_on_off_switch:Screen10:13:switch"}

When the command string item changes to ‘constant’ it triggers a rule to run a sequence of ON and OFF’s which the PIR needs to see to get it into constant mode

In the next example for my blinds it shows how I could now enable the use of commands like Open, Close, Raise, Lower without Rules, Routines or other work arounds. I also created the possibility to use a STOP command which is not directly supported by Alexa.

Group OfficeBlind "Office blind" {alexa="Endpoint.EXTERIOR_BLIND"}
    String OfficeBlind_Command "Office shutter command" (OfficeBlind) {alexa="ModeController.mode" [supportedModes="STOP=STOP,UP=UP, DOWN=DOWN", autoupdate="false"]} 
    Rollershutter Office_RollerShutter "Office shutter [%d %%]" <blinds> (OfficeBlind,gAllBlinds) {alexa="RangeController.rangeValue" [supportedRange="0:100:10", unitOfMeasure="Percent", actionMappings="Close=100,Open=0,Lower=(+10),Raise=(-10)", stateMappings="Closed=100,Open=1:100"], channel="openwebnet:bus_automation:Screen10:55:shutter" }

See here for more details:

2 Likes