Another Amazon Echo Thread (March 2016) (technical/programming discussion)

I am not sure I care anymore. I now have Alexa successfully reporting device states, albeit with a Mac voice over bluetooth. It is good enough to convince me it is not worth the effort to pursue the SmartThings side of this.

But the Hue side has peaked my interest. It seems to step over ASK’s service target requirement of an Internet facing, secure server. Echo is pairing directly with the Hue bridge. This means Echo is capable of routing requests to your LAN from the cloud.

Hmmm… This never occurred to me before. I guess it was so much like the way that SmartThings connects to LAN devices (included Hue Bridge), that I didn’t give it a second thought.

So what are the implications?

That the hardware is capable of round tripping a request to a skill that can be targeted back to the Echo with a restful request to a device on your LAN. This would facilitate custom verbiage for the request, and hopefully a custom response for the skill as well.

“Alexa, tell HAM Bridge to fire up my home theater”

“OK, your home theater is ready, enjoy the movie.”

And of course take SmartThings out of the loop for all devices with a local API.

And it seems it is not only possible to send custom speech to the Echo from the skill, but back to the skill from the Echo after checking the response from a local rest call.

I know this due to me occasionally having GE lights on the bridge that are "possibly not reachable’ flagged, but still work. In this case Alexa tells me they were unresponsive when I ask to turn on, even though it was successful (which would indicate it parsed a response, and routed it back to the skill for speech delivery back to Echo). Way cool.

Now I may be simplifying this, but the fact remains Echo has access to my Hues with no account credentials, so it has to be local HTTP GET and PUT.

Now we just need to convince Philips to share this with us or figure out how to get our own fingers between the fan blades. I seem to recall something new in the API that lets you monitor the bridge for debugging purposes.

Maybe I’m misunderstanding your question…

Access to the Hue Bridge via LAN only is and has always been possible. The Hue Bridge issued an OAuth access token to the service device (phone, SmartThings, Alexa) when you press the physical button during the discovery process.

Well, take the Dominos skill on the echo. After you’ve made your order you can ask the status of your pizza. It will tell you that it’s in the oven, or being prepped, or is ready for pick up.

So, yeah, the system can perform a query and respond.

I know. What is wanna know is what/how the Echo cloud is sending back to Echo that facilitates calls to LAN based devices.

Yes, but in your context it is reconnecting to the Dominos, server side service. Commanding local devices and parsing their responses is pretty different, and based on my initial walk through of ASK, something I thought wasn’t possible.

Ok, but, doesn’t that mean that it is possible to she what the temp is set to on the thermostat and get a response?

The system is capable of a commanded query with response.

1 Like

OK… I understand.

Well… I presume the feature is provided in the API, though maybe not in the public API (maybe only in partner API?). Have you checked Echo Developer forums?

No… not yet. The Masters is on. I did just recheck the Hue API… HOLY CRAP! It has exploded. Sensors classes; Rules classes; HomeKit; SDK/Frameworks for every conceivable environment. Where the hell have I been?

1 Like

OUT of the Blue question: is there an if-then-else capability yet?

I’m not sure of the context of your question. Within the current smart device integrations, the command methods are limited to turn on/off, set, dim, and brighten. No conditionals are available directly, although possible with smartapps assigned to virtual switches, even though you still need to call them with turn on, etc.

An ASK skill is capable of conditional operations, and custom verbiage, but currently the endpoint/service MUST reside on an internet facing, SSL equipped server.

A number of developers have opened dialogs requesting access to LAN based services, but that is not yet possible with the current dev environment. Dunno if that’s just due to Amazon not working out the security aspect of it, or simply a lack of interest (hopeful that it is the former).

very helpful. contextual case: alexa, wake me up at 6am… at 6am the alarm goes off. i would like it to have it acknowledge i woke up or it will some how generate a phone call. i hope this is clear

Not possible at this time. Many want “do this at when” so leave feedback for Amazon from within the app. The squeakiest wheels will get the grease.