IHC / ELKO Binding, OH2, Amazon Echo skill


I have a toggle issue which I can’t quite figure out how to solve.

I have recently setup the Amazon Echo to control my lights, etc. All my lights are controlled by IHC, and I’m using the IHC / ELKO Binding for OH2, in order to control my house from the OH app.

The IHC uses toggle switches to turn ON / OFF the lights, wall plugs, etc. The way I have handled this so far, is that I have made a rule, which always switches an ON command back to OFF - not pretty, but it works :slight_smile:

Here is my config i OH2:

Switch IHC_Kontor1sal "My Room" ["Lightning"] {ihc="0xE35A"}
rule "IHC_Kontor1sal"
        Item IHC_Kontor1sal changed
        if(IHC_Kontor1sal == ON){
        else {

Now my issue is that the Amazon Echo receives the following two commands:
“Alexa, turn on My Room”
“Alexa, turn off My Room”

The “off” command does not work with the toggle switching of IHC, as the state is off already due to the rule. Also, it seems wrong to be telling Alexa to turn “on” a light in order to turn if back off again :smiley:

Any advise on how to handle this? Maybe I should setup my items and rules etc. totally differently?

Thanks in advance.


I may have found a workaround - It seems to work :slight_smile: Any other suggestions?

Switch IHC_KoekkenSpots "Kitchen lights" ["Lighting"] {ihc="0x6D5A"}
Switch IHC_KoekkenSpots_state {ihc="0x955B"}
rule "IHC_KoekkenSpots"
	Item IHC_KoekkenSpots changed
	if(IHC_KoekkenSpots_state == ON){
	else {
1 Like

Andersen, this resource id is from one input or output??

Remember, you shouldn’t map the inputs, just the output to the lamps and other devices.

The only input you should map are contact sensors, and other of the same type.


Thanks. Hmm, I didn’t know that I could just stimulate the output?

The resource id is from the input. The resource id _state is from the output.

So what you are telling me is that I need not worry about my input switches, but only use my outputs and thus change their state?


Yes exactly! Map the outputs, and forget about the inputs. You only need to map inputs, when you want to get information about the state of the input, for example one door sensor. Try it and give me some feedback.


I’ll get back to you.


1 Like

Thanks a lot. It worked perfectly! Now I can call out the on/off commands and I have also gotten rid of all my previous rules.

Only thing that I can’t figure out is the shutoff all function in my house. The output of the function block in IHC does not shutoff everything when triggered from OH or Alexa.

Any hints?

You dont need to use the ihc shutdown all function.

Use Something like this:
Group:Switch:OR(ON, OFF) Lights “All Lights [(%d)]”

You can check this in openhab demo.