Official Alexa Smart Home Skill for openHAB 2

No doubt about it, eh?

I had to bother Ikea for a few weeks about this… for the first few go-rounds they insisted that their skill really was available (it wasn’t), but I guess that’s just because their Canadian PR people aren’t really involved with or aware of their Tradfri product line.

I don’t want to cross-post too much about this except to offer any help or assistance that may be required to make a Canadian OpenHAB Alexa skill possible.

I would like to know this as well. I have a Yale YRD446 smart lock with z-wave plus, and am very interested in being able to set up the same functionality that I am able to with SmartThings.

Currently with SmartThings, I have figured out how to change the lock codes, and I have also figured out how to have it send me a push notification with the name of the code when it is used.

I would really like to know if any of this is possible, or is at the very least being worked on and will be possible in the near future. I don’t have the hardware required for me to be able to test this out myself yet, and knowing this may impact my decision to buy the required hardware or not.

What do I need to do so Alexa knows the state of the lamps etc?

Right now I can ask Alexa to turn on or turn off lights etc… but I can not ask something like Alexa which lamps are on.

So If I connect the 2 will I be able to control Alexa smart home items from in openhab? Or is it only openhab items from Alexa ?

It will only let you control openHAB items from Alexa. To do the other thing they will probably have to add a binding for Alexa in openHAB.

This is to control openHAB from Alexa. To control Alexa from openHAB, have a look at Beta: Openhab2 AmazonEchoControl Binding (controlling alexa from openhab2).

Do you know if Axexa can grab a Humidity value from MQTT and output them?

I have a DHT11 Temp and Humidity sensor connected through MySensors and shows my bedroom Temp and Humidity. I would like to ask

“Alexa, what is the Bedroom Humidity” and she responds the Humidity that is reading. Is this possible? I have the temperature working, but humidity is not showing under my devices in the Alexa devices page.

Number mqtt_bedroom_humidity “Bedroom Humidity [%.1f %%]” (gMasterBedroom, gHumidSensors) [“CurrentHumidity”] {mqtt="<[mosquitto:mysensors-out/1/1/1/0/1:state:default]"}

Also, is there a list of all tags supported by Alexa?

Thanks!

2 Likes

Humidity isn’t supported by the Alexa Home Skill API. So we will have to wait for them to add it.

I have a Trane XR524 Z-Wave thermostat. It has two setpoints for heating and cooling. How do I make it so that Alexa can address them separately?

I have tried to bind them to the same item, and create two “TargetTemperature” tags on separate heat and cool in my items file. It technically dose work, but causes my thermostat to freak out sense both setponts can be the same number due to the Delta separation that it want to keep between then.

Any Ideas would be appreciated.

This is excellent! Unfortunately the openhab skill is not available for the Canadian market yet. Do you have any ideas when it will be?

I suggest deploying it yourself until it becomes available.

Great skill, thanks guys! It really makes life easier/more fun.

Not sure if this is on the wish list already, but with the AmazonEchoControl binding enabling for text to Speech (TTS), it would be great to ask Alexa questions as well in addition to commands. This could be “Where”, “Who” and “What” instead of “Switch”, “Activate” or “Set”.

A feature like this would enable for status queries like “Where is Tom right now?” (Alexa: “Tom is at home”, “Tom is at 22 main street, Liverpool, England”) or just simple status updates.

Anything like this in the roadmap?

I have adde an humidity device and for the homekit i have added [ “CurrentHumidity” ] like on openhab site, and on my home application on iphone it appear, but both alexa and google home don’t find it. Why?

Humidity isnt supported

You can do that now with “Routines” on the Alexa App.

You can choose your text and what happens when Alexa hears that text.

You need to create the item (a switch will do with an expire) in openHAB first, discover it in the Alexa app and then create the routine, in that order.

Fire a rule when the switch is set to ON and have the TTS in the rule.

Thanks! That’s cool and works … almost.
Is there a way to find out which Alexa device has sent the command so that the TTS can be send to just this device?

I think that would depend on the Alexa App routines being able to distinguish between Echo devices but I don’t think routines can be set up as device specific. The only ‘round-about’ way of doing this would perhaps be to have one Alexa app instance set up for each Echo and a separately named routine (but with the same TTS) for each Echo (and a separate openHAB rule for each too).

I’ve only one Echo and so cannot test whether the above would work or if there is a more elegant solution. I’m sure someone else has a better idea.

Can you do anything with “groups” in the Alexa app? I know that when creating groups you are able to specify which Alexa devices are included.

Hi @digitaldan,
I stopped over at the alexa V3 skill and was fascinated by the new metadata layout, so I updated my items files with the hopes of an even better experience with my echos.

Here is an example of some of my items…

Switch	Yale_Lock_FrontDoor	"The Front Door"	(Echo_Controllers) {alexa="LockController.lockState"}
Dimmer	LivingRoom_Lights	"Living Room Lights"	(Echo_Controllers) {alexa="PowerController.powerState,BrightnessController.brightness"}
Switch	Coffee_Maker	"The Coffee"	(Echo_Controllers) {alexa="PowerController.powerState" [category="OTHER"]}
Switch	LivingRoom_TV	"Living Room TV Power" (Echo_Controllers)	{alexa="PowerController.powerState" [category="TV"]}
Number	FamilyRoom_Volume	"Family Room Volume"	(Echo_Controllers)	{alexa="Speaker.volume"}
Switch	Garage_Door	"The Garage Door"	(Echo_Controllers)	{alexa="PowerController.powerState"	[category="DOOR"]}

Unfortunately, none of the devices show up when I scan with the alexa app on my iphone.

I am running 2.3.0-SNAPSHOT Build #1281. My linkage to the Alexa Smart Home API is through the openHAB Cloud service. Is the V3 metadata supported in this way at the moment or would one need to setup his own AWS account with Alexa and Lambda access? The Version 2 Item mapping has been working flawlessly up until today.

Thanks for your help!

I see that when I run discovery in the app, the openhab log shows the following error many times over:

2018-05-19 17:18:32.432 [ERROR] [ersey.server.ServerRuntime$Responder] - An I/O error has occurred while writing a response message entity to the container output stream.
org.glassfish.jersey.server.internal.process.MappableException: org.eclipse.jetty.io.EofException
	at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:92) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:711) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) [15:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [82:org.eclipse.jetty.security:9.3.21.v20170918]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.Server.handle(Server.java:534) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) [77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [88:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [88:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [88:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [88:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [88:org.eclipse.jetty.util:9.3.21.v20170918]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: org.eclipse.jetty.io.EofException
	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:199) ~[77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:147) ~[77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:739) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[88:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[88:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:519) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:750) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:235) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:219) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:470) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.glassfish.jersey.servlet.internal.ResponseWriter$NonCloseableOutputStreamWrapper.write(ResponseWriter.java:325) ~[?:?]
	at org.glassfish.jersey.message.internal.CommittingOutputStream.write(CommittingOutputStream.java:229) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$UnCloseableOutputStream.write(WriterInterceptorExecutor.java:299) ~[?:?]
	at org.glassfish.jersey.message.internal.ReaderWriter.writeTo(ReaderWriter.java:116) ~[?:?]
	at org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider.writeTo(AbstractMessageReaderWriterProvider.java:79) ~[?:?]
	at org.glassfish.jersey.message.internal.InputStreamProvider.writeTo(InputStreamProvider.java:105) ~[?:?]
	at org.glassfish.jersey.message.internal.InputStreamProvider.writeTo(InputStreamProvider.java:60) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) ~[?:?]
	at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) ~[?:?]
	at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86) ~[?:?]
	... 46 more
Caused by: java.io.IOException: Broken pipe
	at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) ~[?:?]
	at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) ~[?:?]
	at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) ~[?:?]
	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:179) ~[77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:147) ~[77:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:739) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[88:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[88:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:519) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:750) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:235) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:219) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:470) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.glassfish.jersey.servlet.internal.ResponseWriter$NonCloseableOutputStreamWrapper.write(ResponseWriter.java:325) ~[?:?]
	at org.glassfish.jersey.message.internal.CommittingOutputStream.write(CommittingOutputStream.java:229) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$UnCloseableOutputStream.write(WriterInterceptorExecutor.java:299) ~[?:?]
	at org.glassfish.jersey.message.internal.ReaderWriter.writeTo(ReaderWriter.java:116) ~[?:?]
	at org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider.writeTo(AbstractMessageReaderWriterProvider.java:79) ~[?:?]
	at org.glassfish.jersey.message.internal.InputStreamProvider.writeTo(InputStreamProvider.java:105) ~[?:?]
	at org.glassfish.jersey.message.internal.InputStreamProvider.writeTo(InputStreamProvider.java:60) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) ~[?:?]
	at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) ~[?:?]
	at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86) ~[?:?]
	... 46 more