Official Alexa Smart Home Skill for openHAB 2

The same as in the Homekit Addon:

http://docs.openhab.org/addons/io/homekit/readme.html#item-configuration

Example for zwave:
Switch Fibaro_1 "Hallway up" [ "Lighting" ] {channel="zwave:device:158b44ebf65:node28:switch_binary" }

Hello together,

I´m new to OpenHAB 2 and installed it on an Raspberry Pi3 (Openhabian)
Install was working fine and after some searching I was able to connect it to the OpenHAB Cloud.
After that i installed the Yamaha Binding within Paper UI.
Worked Fine. The Receiver is visible and controllable under the Control Tab.
After that I installed the Skill for Echo and connected it to the OpenHAB Cloud.
Within the Alexa App I tried to search for new Devices but nothing apperars.
After hours of reading in the web I added different kind´s of code the different locations (sitemap, items) but that doesn´t got me furher.
Has anyone done this before and can give me a short discription?

Thanks

Regards
Klumpstein

@Klumpstein What does your item file for the Yamaha look like?

@RichP
After trying different things I found in the Web my current status is the following.

I deleted the Binding within Paper UI and made a fresh install of the Binding.

After that I wrote the following in the demo.items file via Eclipse:

/*YamahaReceiver */
     Switch Yamaha_Power         "Power [%s]"         <tv> 
     Dimmer Yamaha_Volume         "Volume [%.1f %%]"       
     Switch Yamaha_Mute             "Mute [%s]"            
     String Yamaha_Input         "Input [%s]"              
     String Yamaha_Surround         "surround [%s]"        
     Number Yamaha_NetRadio  "Net Radio" <netRadio> 

and this in the demo.sitemap:

	Frame label="Receiver" {	
	 Selection item=Yamaha_NetRadio label="Sender"icon="recorder" mappings=[1="N Joy", 2="Radio Sport", 3="RDU", 4="91ZM", 5="Hauraki"]
     Selection item=Yamaha_Input label="Eingang"icon="player" mappings=[Bluetooth="Bluetooth",HDMI2="MacMini","NET RADIO"="NetRadio",TUNER="Tuner"]
		
		}

I know it´s a wild combination of things I found in different threads :grin:

Hello all together,

I am a step further!
Now I am able to use the receiver via the BasicUI. So far I have used the wrong UDN.
Can someone tell me maybe how to link it to Alexa?

My Code:

.items

/*YamahaReceiver */
     Switch Yamaha_Power         "Power [%s]"         <tv> {channel="yamahareceiver:yamahaAV:f6be843a:power"}
     Dimmer Yamaha_Volume         "Volume [%.1f %%]"       {channel="yamahareceiver:yamahaAV:f6be843a:volume"}
     Switch Yamaha_Mute             "Mute [%s]"            {channel="yamahareceiver:yamahaAV:f6be843a:mute"}
     String Yamaha_Input         "Input [%s]"              {channel="yamahareceiver:yamahaAV:f6be843a:input"}
     String Yamaha_Surround         "surround [%s]"        {channel="yamahareceiver:yamahaAV:f6be843a:surroundProgram"}
     Number Yamaha_NetRadio  "Net Radio" <netRadio>        {channel="yamahareceiver:yamahaAV:f6be843a:netradiotune"}

.sitemap

	Frame label="Receiver" {	
	 Selection item=Yamaha_NetRadio label="Sender"icon="recorder" mappings=[1="N Joy", 2="Radio Sport", 3="RDU", 4="91ZM", 5="Hauraki"]
     Selection item=Yamaha_Input label="Eingang"icon="player" mappings=[Bluetooth="Bluetooth",AV2="MacMini","NET RADIO"="NetRadio",TUNER="Tuner"]
	 Switch item=Yamaha_Power icon="switch"
	 Slider item=Yamaha_Volume label="Laustärke" icon="soundvolume"
		}

Regards
Klumpstein

Your starter would be to get the amp turning on and off. This is done by using the [ “Switchable” ] notation

 Switch Yamaha_Power         "Power [%s]"         <tv> [ "Switchable" ]{channel="yamahareceiver:yamahaAV:f6be843a:power"}

At the moment the official app only supports:
Switchable - On and Off
Lighting - Dimmable
Thermostat - Temperature set

Obviously Switchable will turn it on and off. Lighting might be hackable to set the volume as long as it’s on a scale from 0% to 100%, but you won’t be able to play/pause, etc.

1 Like

Switchable works fine for me.
Its easy to control with Alexa. Thanks for that!

Next Part now:
Get the Volume adjustable and choose from the different Inputs (AV, Bluetooth, etc)

At this moment Alexa don’t wan’t to recognize the Lightning Tag…so, a lot of things to try within the next days :joy:

     Dimmer Yamaha_Volume        "Lautstärke" 		    [ "Lightning" ]{channel="yamahareceiver:yamahaAV:f6be843a:volume"}

You’ve got a typo. It’s lighting, not light[N]ing :wink:

Ups! :joy:
That works!
Thank you!

With my Alexa I just create a dummy switch that fires a rule that sets pause and play etc.
i.e. Alexa turn on pause… I know it’s not a natural way to pause but it works.

1 Like

And have you found a way to set the Inputs via Alexa?

I have not found a way to do that. I haven’t put any effort into it yet but I am not sure it’s that important for my particular needs. - It would be a “nice to have”.

Any chance we will have the ability for Alexa 'Close" the switch instead of Turn off?

Close is not a supported word, but they just last week added lock/unlock , I am waiting for https://github.com/eclipse/smarthome/issues/1093 so we can start adding more functionality

I thought when building the Alexa skill there was a section where you could
add alternate phrases. I’m sure I’m relaying this incorrectly, but I
thought I saw that somewhere.

We are using the Alexa Smart home skill API, the main benefit to this is not requiring an application word ( Alexa ask/tell openHAB to …) as well being able to play in their smart home ecosystem (mix and match vendors) . Unfortunately the vocabulary is already defined and not extensible.

1 Like

Makes sense thanks for clarifying

Im sure i read somewhere on the internet that “open” and “close” might already work… My friday night plan is to get the Alexa skill working so will confirm later…

UPDATE : Okay that was quick and easy to setup!

“Alexa, Open the TV Leds” actually worked one or twice but not reliably enough. So she must have been guessing what to do…

1 Like

@digitaldan Would you be able to transfer your first posting here to docs.openhab.org?

Sure, i’ll get a PR ready soon, great idea.

1 Like