julianh2o / RokuAlexaLambdaSkill

An Alexa Skill that allows voice control of your Roku
MIT License
104 stars 55 forks source link

Converting the Alexa skill to "Smart Home Skill" #27

Open etedj opened 6 years ago

etedj commented 6 years ago

First off, just discovered this yesterday while trying to get my new Roku TV to work with Alexa. Works like a charm... Thanks!

I am trying to train my family to use the phrase "Alexa, Tell Roku...". But it is hard for them to remember that and they usually say things like: "Alexa, turn on the TV" which fails

I did some research and it looks like Amazon has a special API for controlling Entertainment devices:

https://developer.amazon.com/docs/smarthome/build-smart-home-skills-for-entertainment-devices.html

Before I invested time into forking and modifying this skill, I was curious if there was a reason this skill didn't use this route initially.

Is there a reason why this shouldn't work? Thanks!

mikehobi commented 6 years ago

Have not been able to read the full documentation, but I'm fairly certain that powering on the tv is not possible. When the tv is off, there is no network endpoint for Alexa to post requests.

That said, if possible, the Playback, Input and Channel controllers could prove to be useful.

julianh2o commented 6 years ago

Hey Mike,

The biggest reason is that this skill predates that API. When I was building this, the ASK was still fairly new and a lot of features didn't exist.

Another rec I have is to take a look at this project: https://github.com/armzilla/amazon-echo-ha-bridge

It circumvents the API's shortcomings by simply imitating a simple hue bulb. You can easily create a "fake" hue bulb called TV that will then respond to the "on" and "off" commands in any way you choose. I use this in my set up right now and it works quite well.

My last advice is to consider a Google Home. As much as I love my Echo, the home is much better suited for custom setups as you can control anything without any command preamble. Eg.. you can assign an IFTTT command to any phrase as long as it starts with the wake words (eg "hey google, fire the phasers")

Julian

On Mon, Nov 20, 2017 at 10:28 AM, Mike Hobizal notifications@github.com wrote:

Have not been able to read the full documentation, but I'm fairly certain that powering on the tv is not possible. When the tv is off, there is no network endpoint for Alexa to post requests.

That said, if possible, the Playback, Input and Channel controllers could prove to be useful.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/julianh2o/RokuAlexaLambdaSkill/issues/27#issuecomment-345785175, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH4WBBaUaSyZTKGEN_ltVX9RMNYbPCmks5s4cTNgaJpZM4QjvnI .

etedj commented 6 years ago

Thanks for the link to the other project. I'll take a look. Turning the TV on is possible if you have your Roku TV power options go to standby instead of a full power-off mode. In which case, "keypress/Power" will turn on/off the TV. I've added it (along with Volume Up/Down/Mute) to my own server, skill, and lambda and everything seems to work great.