Alexa commands for RollerShutter after Upgrade Hue Emulation

Hello,
i’ve upgraded to openhab 2.5 #1479 and had some issues with hue emulation (as many others, too). After port forwarding my installion on a raspberry from 8080 to 80 via nginx (reverse proxy settings) and changed my “Switchable” items to “Lighting” items, Alexa discovered my devices again… but without the RollerShutters.

So i changed to item type from “Rollershutter” to “Switch” and ALEXA discovered those devices, too.
But now the voice control is different as before …

If i say “Alexa set RollerShutter to 30 %” everything works fine.
If i say "Alexa set RollerShutter to 0 % ", Alexa confirms the command but nothing happens
If i say “Alexa set RollerShutter to 1 %”, Alexa say “I don’t know how to …”
If i say “Alexa set RollerShutter to 1”, the Rollershutter opens (this behaviour is caused by the spelling of german language, you say “ein Prozent” and Alexa understand’s “ON Percent”, if you say “eins Prozent” everything works fine, but nobody would talk like this … it’s a pitty. But there’s a solution …

That nothing happens by telling Alexa to set 0 % is caused by the fact, that Alexa send OFF to the item and not 0 as before. So you can create a simple rule for send 0 by receiving OFF for the item.

I hope this post will save a little time for many users and lowers the frustrating level…

1 Like

… just a short notification for creating the rule.
Because of the AutoUpdateFeature i recommend to use the “received command” trigger, instead for example “received update”. Just see
(What is ItemStatePredictedEvent?) . Otherwise, in my case i run into a loop of triggering the Shuttercontroller because of this feature.

Here’s an example that work’s for me

rule "Alexa Shutter set to 0"
when
Item Alexa_RollerShutter1 received command OFF
then
RollerShutter1.sendCommand(0)
end

Have fun …

You can use a dimmer item instead of a switch item to support percentages :slight_smile:

I think, I’ll just add rollershutters to the supported item types in the hue emulation code, they are internally a percentage with some accepted commands on top.

I tried it to get it working with a dimmer and a rule to control my rollershutter:
dRollos is my Dimmer
Rollos is my Rollershutter group for all Rollershutter

rule "Dimmer Rollos Rule"
when
    Item dRollos received command
then
    if 		(receivedCommand == ON)  	{Rollos.sendCommand(DOWN)            }
    else if (receivedCommand == OFF)	{Rollos.sendCommand(UP)              }
	else 								{Rollos.sendCommand(receivedCommand) }
end

Works great in general.
Except the following sequence:

  1. Set the rollershutter with Alexa via the Dimmer item to 0% (UP)
  2. Set the rollershutter with a event or the android app via the Rollershutter item to 100%
  3. Set the rollershutter with Alexa via the Dimmer item to 0% (UP)

In this case Alexa gives me a short sound for an okay. But nothing happens.
I think setting Dimmer from 0 to 0 doesn’t trigger my received command.

Does anyone have a solution for this ?

Hi,
I don’t know if you resolved yet, but it’s simple:

replace
(receivedCommand == ON) with (receivedCommand == ON || receivedCommand == 100)
and
(receivedCommand == OFF) with (receivedCommand == OFF || receivedCommand == 0)

I haven’t tried it but I think it will work.