[SOLVED] 433MHz outlets controlled by Alexa

Hi Everybody,

I’m new to this forum, have just switched from HASS to openHAB. I have a problem with Alexa, it doesn’t see my openhab devices. I’ve enabled openHAB skill, integrated it with Alexa and enabled Simple Mode in Paper UI.
I can turn on and off my lamps (two 433 powerplugs: LeftLamp, RightLamp) but can’t control them with Alexa. Here’s my configuration:

Items:

Switch LeftLamp "Left Lamp" <poweroutlet> (GF_LivingRoom, gPower)
Switch RightLamp "Right Lamp" <poweroutlet> (GF_LivingRoom, gPower)

Switch Remote_Send   [ "Switchable" ]   { channel="exec:command:remote-send:run"    }
String Remote_Send_Args { channel="exec:command:remote-send:input"  }
String Remote_Send_Out  { channel="exec:command:remote-send:output" }
rule "Left Lamp"
    when
        Item LeftLamp received command
    then
        // wait for transmitter to be free
        // State will be NULL if not used before or ON while command is executed
        while(Remote_Send.state == ON){
            Thread::sleep(500)
        }

        if(receivedCommand == ON){
            Remote_Send_Args.sendCommand("4529999")
        }else{
            Remote_Send_Args.sendCommand("4528888")
        }

        // wait for the command to complete
        while(Remote_Send.state != OFF){
            Thread::sleep(500)
        }

        logInfo("LeftLamp", "Result:" + Remote_Send_Out.state )
end

rule "Right Lamp"
    when
        Item RightLamp received command
    then
        // wait for transmitter to be free
        // State will be NULL if not used before or ON while command is executed
        while(Remote_Send.state == ON){
            Thread::sleep(500)
        }

        if(receivedCommand == ON){
            Remote_Send_Args.sendCommand("4520000")
        }else{
            Remote_Send_Args.sendCommand("4521111")
        }

        // wait for the command to complete
        while(Remote_Send.state != OFF){
            Thread::sleep(500)
        }

        logInfo("RightLamp", "Result:" + Remote_Send_Out.state )
end

Sitemap:

        Text label="Living Room Lamps" icon="light" {
            Switch item=LeftLamp label="Left Lamp"
            Switch item=RightLamp label="Right Lamp"
        }

When I ask Alexa: “Left Lamp on” she replies: “Sorry, I didn’t find Left Lamp”. There’s nothing in the openhablog.

Any ideas what am I doing wrong? Thanks in advance for your help!

Cheers,
Slaw

Just a guess, but you define the labels in the Items and the Sitemap files.

The doc only defines the label in the Items file and then you won’t need them to define them in the sitemap.

Maybe remove the definition from the sitemap and reboot.

https://docs.openhab.org/addons/ios/alexa-skill/readme.html

Thanks for quick answer. I removed the label from the sitemap and left it only in the items file but still the same.

Not a helpful post, but I just read this topic and thought you have 433 individual plug sockets all being controlled with Alexa.

Made me laugh, that’s all.

That’s what I’m trying to achieve…sorry it confused you but happy it made you laugh :stuck_out_tongue:

Really? You want to control four hundred and thirty three sockets?

I just counted mine and I have 14. You must live in a big house.

433 = 433MHz - power sockets, I wish I had a mansion but I don’t :smiley:

Another guess:
Why are you connecting Alexa to the RemoteSend and not directly to the switches you are using on the sitemap?

thanks, opus! it works now! I changed my items to:

Switch Power_Plug_Socket_A <poweroutlet> (GF_LivingRoom, gPower)
Switch LeftLamp "Left Lamp" <poweroutlet> (GF_LivingRoom, gPower) [ "Switchable" ]
Switch RightLamp "Right Lamp" <poweroutlet> (GF_LivingRoom, gPower) [ "Switchable" ]

Switch Remote_Send   { channel="exec:command:remote-send:run"    }
String Remote_Send_Args { channel="exec:command:remote-send:input"  }
String Remote_Send_Out  { channel="exec:command:remote-send:output" }