SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV v9 Customizations (http://forums.sagetv.com/forums/forumdisplay.php?f=57)
-   -   Echo Skill (http://forums.sagetv.com/forums/showthread.php?t=63281)

tmiranda 06-18-2016 04:54 PM

Echo Skill
 
Latest installation instructions:
- Send me a PM with the email address used to register your Echo.
- Install the "Sage for Echo" UI Mod plugin.
- Follow the instruction here: https://github.com/tmiranda1962/Echo/wiki

*******************************************************

I started messing around with writing a skill for the Amazon Echo to communicate with SageTV. I have the basic plumbing working and will start to flesh out the functionality.

For those unfamiliar with the Echo, it's Amazon's home automation product. You speak to it in plain English and it does what you tell it to do (theoretically anyway). You add functionality to the Echo by writing "Skills". I am writing a Skill that will allow you to speak to your Sage server and ask things like "When will the next episode of The Kardashians be recorded" and "Did the last formula1 race get recorded?". The Echo will then speak the answer to you.

The device is actually very good and has a lot of Skills available. (One of my favorite is "The stupid cat joke of the day", but that is another subject. :D)

I'm looking for some help in the following areas, please let me know if you are interested:

- I need to create a few icons, and I know nothing about icon editors. A while back there were some prototypes done by one of the forum members and I'm hoping to use that as a basis. (I'm assuming the "official" Sage logo and icon are copyrighted.)

- I need to write a web based (simple) database to hold user information such as the URL to their Sage machine and the Jetty userID and password. Amazon provides a free service that can be used and integrates with the Echo very well. The first time the user install the Skill and uses it they will need to create an account and enter this required information.

jonnydeath 06-21-2016 08:48 PM

I already posted one. I had to hardcode too many variables (like user name, password, etc). I wish i could figure out a better way to do it, but I could not figure out the dynmo database and I am a very bad programmer. Hopefully, functionality I wrote can be integrated into your version.

http://forums.sagetv.com/forums/showthread.php?t=63164

tmiranda 06-23-2016 06:26 AM

Quote:

Originally Posted by jonnydeath (Post 589965)
I already posted one. I had to hardcode too many variables (like user name, password, etc). I wish i could figure out a better way to do it, but I could not figure out the dynmo database and I am a very bad programmer. Hopefully, functionality I wrote can be integrated into your version.

http://forums.sagetv.com/forums/showthread.php?t=63164

Doh, guess I'm late to the party. :)

Mine is pretty far along and does some things that yours does not. Yours also does things that mine does not. Maybe we can roll them up into one?

Right now I also have the jetty user:password hard coded pending getting a better grip on dynamo.

jonnydeath 06-24-2016 04:04 AM

please use any of the code you want. playing shows and youtube is the most popular function with my kids.

i found this xbmc alexa skill where he has the skill send a key to the alexa app to configure. i'm not sure how it works, but looks intriguing
http://forum.kodi.tv/showthread.php?tid=258165

tmiranda 06-24-2016 07:21 AM

Quote:

Originally Posted by jonnydeath (Post 590041)
please use any of the code you want. playing shows and youtube is the most popular function with my kids.

i found this xbmc alexa skill where he has the skill send a key to the alexa app to configure. i'm not sure how it works, but looks intriguing
http://forum.kodi.tv/showthread.php?tid=258165

Thanks. I will look into how you implemented searching for spoken literals. I am reading that Alexa isn't very good at deciphering words that are not within a certain restricted set of words.

tmiranda 07-25-2016 02:01 PM

I'm making decent progress on this. If anybody else is interested please let me know. My plan at this point is to not release it as an official skill but I will share it with anybody interested in using it.

Brent94Z 08-18-2016 05:30 PM

I'd be interested! I have an Echo in the main living room and have another Echo and two Dots to get setup when I get some free time away from work.

I love my Echo and will install this once you get it up and running and give it a shot! :)

Will this be able to do things like "Alexa, tell Sage TV to show all my movies with Anthony Hopkins" or "Alexa, tell Sage TV to show all my action movies"

I'm not a programmer so not sure how hard it would be to do this but one thing I notice that I always want to do is watch a trailer of one of my movies. I have a couple thousand or so movies in my Videos section of SageTV. If I have the window up where I would hit "Play" to watch the DVD/Movie, it would be bad ass to be able to say "Alexa, tell Sage TV to play trailer for current movie" and it would open a browser window and play the trailer then close the browser window. At that point I could either hit "Watch now" or find another movie. It seems like there used to be a "Play Trailer" but I don't seem to have it as an option any longer... besides, having it be voice controlled would be pretty cool :)

All that may be too complicated. I have no idea but it sounds like a nice feature. LOL

Thanks for making this!

tmiranda 08-19-2016 07:09 AM

Quote:

Originally Posted by Brent94Z (Post 591594)
I'd be interested! I have an Echo in the main living room and have another Echo and two Dots to get setup when I get some free time away from work.

I love my Echo and will install this once you get it up and running and give it a shot! :)

Will this be able to do things like "Alexa, tell Sage TV to show all my movies with Anthony Hopkins" or "Alexa, tell Sage TV to show all my action movies"

I'm not a programmer so not sure how hard it would be to do this but one thing I notice that I always want to do is watch a trailer of one of my movies. I have a couple thousand or so movies in my Videos section of SageTV. If I have the window up where I would hit "Play" to watch the DVD/Movie, it would be bad ass to be able to say "Alexa, tell Sage TV to play trailer for current movie" and it would open a browser window and play the trailer then close the browser window. At that point I could either hit "Watch now" or find another movie. It seems like there used to be a "Play Trailer" but I don't seem to have it as an option any longer... besides, having it be voice controlled would be pretty cool :)

All that may be too complicated. I have no idea but it sounds like a nice feature. LOL

Thanks for making this!

I've only been working on it in dribs and drabs and it's not ready for prime time yet. When it gets there I'll let you know. You will probably have to install it in "developer mode" because I doubt it will get past Amazon's certification process at this point :(

As for what it can and can't do; that's all up in the air since it's not fully developed :) I can tell you that the first example you gave is something that will probably not be done. The way the Echo works is that you must give it a list of possible responses, meaning I'd have to give it a list of every actor which is not possible. The second example however is already done :)

Brent94Z 08-19-2016 01:34 PM

Ahhh... I see what you are talking about and how actors won't be possible :)

I'm also still on V7 and I'm guessing this probably won't work on that. I probably should make the move to V9 at some point but V7 has been working so well for me that I'm a little scared to mess with it. hahahaa

tmiranda 08-19-2016 05:52 PM

Quote:

Originally Posted by Brent94Z (Post 591620)
Ahhh... I see what you are talking about and how actors won't be possible :)

I'm also still on V7 and I'm guessing this probably won't work on that. I probably should make the move to V9 at some point but V7 has been working so well for me that I'm a little scared to mess with it. hahahaa

Unless stuckless makes sagex V9 only, this will work fine with v7.

Brent94Z 08-22-2016 02:46 PM

Quote:

Originally Posted by tmiranda (Post 591626)
Unless stuckless makes sagex V9 only, this will work fine with v7.

Excellent! Thanks for that bit of info!

wayner 08-25-2016 08:04 AM

FYI - I believe that you can use the Echo with the web based Harmony remotes - I think it involves using IFTTT. It wouldn't give all of the capabilities discussed in this thread but it will let you do the basics like turn on the TV and go to Sage and replicate some/all of the remote control functionality.

https://ifttt.com/connect/harmony/amazon_alexa

tmiranda 09-19-2016 07:47 AM

Alpha
 
I think in a few weeks I'll be to the point where I have something worthy of Alpha testing. If you are interested in trying it out let me know.

The skill will not be available in the store, you will need to create an Amazon developer account, link your echo to it, and then setup the skill in developer mode. I can help you with some of the mechanics. I say this to warn you that installation will not (initially) be "plug and play". :)

You will be able to do some basic things like:

- Get all of the recordings.
- Group and sort (on limited fields such as title and date.)
- Filter (by watched, Favorite, Don't Like, Archived.)
- Save the view so the next time you ask about the recordings they will be grouped and sorted in the same way.
- Set/Clear Watched, Don't Like, Favorite, Archive.
- Watch. You will be able to name your extenders and then say things like "play it in the living room".
- Get system status (heap used, disk space available, what's currently recording, what will be recorded, etc)
- Give commands directly to an extender. (i.e. verbally issue commands that would normally come from the remote like play, stop, pause, right, left, enter, etc.)

It's not very polished at the moment and I've been playing with alternate ways to navigate.

It is kind of cool to be able to talk to my Sage server :)

psklenar 09-19-2016 02:19 PM

Neat! I just recently bought an Echo and this really sounds neat! :o

pat----

wayner 09-19-2016 02:49 PM

Once they start shipping the Echo Dots I will get one of those as they also interface well with my HA system. I least I hope they do since the Echo isn't technically supported in Canada but most things seem to work anyhow.

KarylFStein 09-19-2016 04:03 PM

I'm looking to get one of these for Christmas :). What HA system do you have? I was thinking of trying OpenHAB. It seems to support Echo and the Harmony hub, and not need a cloud connection.

wayner 09-19-2016 05:19 PM

I have a Control4 system that I first had installed when I had some renos done on my house nine years ago. It is a good system except Control4's model is that everything must be sold through a dealer, but you can do most of the programming on your own. It isn't cheap but it is less expensive than the highest end stuff like Crestron. I use it for lighting, blinds, HVAC, security, fireplace, etc. You can use it to control your AV system, and most people do, but I am happy with using Harmony remotes for that.

And the people that have these often have video distribution systems with matrix switches, etc. I don't understand why you would have something like that when something like SageTV, with extenders, is far better and way cheaper.

tmiranda 09-20-2016 07:21 AM

Quote:

Originally Posted by KarylFStein (Post 592878)
I'm looking to get one of these for Christmas :). What HA system do you have? I was thinking of trying OpenHAB. It seems to support Echo and the Harmony hub, and not need a cloud connection.

I don't use mine for HA, yet. I have to say I am very impressed with the device. I use it all the time to add keep track of my shopping list and To Do list. It's just so convenient to say "Alexa, add peanut butter to my shopping list".

I also use it to read books to me while I am puttering around the house. My son uses it all the time to play music.

tmiranda 09-25-2016 07:21 AM

Wiki
 
I started on a wiki that explains how to use the skill I am developing. The wiki (and the skill) is not complete, but this will give you an idea of the direction I am going in.

Comments and suggestions are welcome.

https://github.com/tmiranda1962/Echo/wiki

wayner 09-25-2016 09:59 AM

This sounds awesome - another reason to buy a six pack of the new Echo Dots when they are available in a month or so.

tmiranda 09-25-2016 10:27 AM

Quote:

Originally Posted by wayner (Post 593074)
This sounds awesome - another reason to buy a six pack of the new Echo Dots when they are available in a month or so.

I'm looking for input on what functionality people would be interested in. If you have ideas, let me know.

I'm currently working on adding views for movies.

tmiranda 09-27-2016 08:00 PM

Testers
 
I'll be ready to put something out for testing in a week or so. If you are interested in trying it out PM me your email address. If you have an Amazon account then you must send me the email address associated with the account. (I don't share email address with anybody.)

sic0048 09-29-2016 05:59 AM

Quote:

Originally Posted by wayner (Post 592880)

And the people that have these often have video distribution systems with matrix switches, etc. I don't understand why you would have something like that when something like SageTV, with extenders, is far better and way cheaper.

I guess it depends on how many TVs and sources you have. I use CQC automation system which is DIY friendly. I use an Extron video switcher and can distribute any source to any tv easily. All the source equipment is at the central AV rack which allows for totally clean installs (i.e. No boxes at the TV).

I set a similar system up at my parents house. They have 7 TVs with just the two of them living there. Buying enough source equipment to cover those 7 TVs would have been more expensive than the Extron switcher.

tmiranda 10-05-2016 03:44 PM

Anybody else willing to try this out and make suggestions?

wayner 10-08-2016 01:12 PM

I plan to get some Echo devices but I am waiting for the new Echo Dot and it doesn't ship for a couple of weeks and who knows how long it will take to catch up to the backlog. I also have to figure out a way to get them here in Canada as they don't ship here yet.

But I am game to be a beta testers once I get the hardware.

panteragstk 10-11-2016 09:27 AM

Quote:

Originally Posted by wayner (Post 593748)
I plan to get some Echo devices but I am waiting for the new Echo Dot and it doesn't ship for a couple of weeks and who knows how long it will take to catch up to the backlog. I also have to figure out a way to get them here in Canada as they don't ship here yet.

But I am game to be a beta testers once I get the hardware.

Same here. The dot looks to be the product I was waiting for.

Crusadre 10-23-2016 12:03 AM

Quote:

Originally Posted by tmiranda (Post 593636)
Anybody else willing to try this out and make suggestions?

I just got my Echo Dot and would be excited to try it. Please let me know how to install it. Thx!

tmiranda 10-23-2016 02:26 PM

Quote:

Originally Posted by Crusadre (Post 594430)
I just got my Echo Dot and would be excited to try it. Please let me know how to install it. Thx!

PM me the email address you used to register the Dot.

Then, follow the instructions here: https://github.com/tmiranda1962/Echo/wiki

Crusadre 10-23-2016 06:35 PM

tmiranda - thanks for the rapid response. I cannot email (no icon) or PM you (says I don't have access).

Skirge01 10-24-2016 08:34 AM

I don't know what the minimum post count is before PM's open up, but I'm pretty sure that's your issue. It might be 5.

tmiranda 10-24-2016 11:31 AM

Quote:

Originally Posted by Crusadre (Post 594459)
tmiranda - thanks for the rapid response. I cannot email (no icon) or PM you (says I don't have access).

Ah, you don't have enough posts. Make a few more and it will appear.

metapath 12-08-2016 10:26 AM

Has the SageTV Echo skill been polished beyond Alpha yet? It would be nice if it were available as a plug-in. I don't have the time right now for Alpha or Beta testing, but will when I retire in March. Looking forward to trying this out eventually. :)

tmiranda 12-08-2016 11:47 AM

Quote:

Originally Posted by metapath (Post 596465)
Has the SageTV Echo skill been polished beyond Alpha yet? It would be nice if it were available as a plug-in. I don't have the time right now for Alpha or Beta testing, but will when I retire in March. Looking forward to trying this out eventually. :)

I have the SageTV plugin portion ready to go but I doubt it will ever make it as an official Echo skill because it relies on a back end SageTV server.

metapath 12-12-2016 09:55 AM

Agree it would never make official Echo skill, but want to download via Plugin menu. Don't see it in the list. Guess I'll follow the link above and do it manually. May actually have time to configure it after Xmas...thanks for your work on this. :clap:

Oops, that's just instructions, not a download link. I'll PM you after Xmas. Thanks again.

wayner 12-12-2016 11:09 AM

I should be getting my Dots shortly so I will try this out.

@timiranda - One question. You talk about forwarding port 8080 on your router to get to your Sage server. Does this mean that you can therefore only have it working on one Sage server per location? I guess having multiple servers would cause a few issues as you would always be having to specify which server when you issue commands.

tmiranda 12-12-2016 12:13 PM

Quote:

Originally Posted by metapath (Post 596628)
Agree it would never make official Echo skill, but want to download via Plugin menu. Don't see it in the list. Guess I'll follow the link above and do it manually. May actually have time to configure it after Xmas...thanks for your work on this. :clap:

Oops, that's just instructions, not a download link. I'll PM you after Xmas. Thanks again.

PM me the email address to which the Echo is linked. I need that to set things up on the back end.

I'll also have to update the plugin, I've made some changes over the past month.

tmiranda 12-12-2016 12:15 PM

Quote:

Originally Posted by wayner (Post 596634)
I should be getting my Dots shortly so I will try this out.

@timiranda - One question. You talk about forwarding port 8080 on your router to get to your Sage server. Does this mean that you can therefore only have it working on one Sage server per location? I guess having multiple servers would cause a few issues as you would always be having to specify which server when you issue commands.

Yes, it only works on one server at a time. You can de-link it from one server and re-link it to another at will.

NetworkGuy 12-12-2016 04:12 PM

Quote:

Originally Posted by tmiranda (Post 596642)
Yes, it only works on one server at a time. You can de-link it from one server and re-link it to another at will.

The Harmony skill will only work with one Harmony hub. It seems pretty common for Echo skills.

wayner 12-12-2016 04:31 PM

Quote:

Originally Posted by NetworkGuy (Post 596662)
The Harmony skill will only work with one Harmony hub. It seems pretty common for Echo skills.

Not quite Sage related but can you change the friendly name for Harmony Activities after you complete the setup? I didn't bother with friendly names when I first added the Harmony Hub and I don't know that Alexa is that good at some of my activity names. Even SageTV - is that "saje tee vee" or "saget-vee" or who knows. It gets it right only part of the time when I say "turn on SageTV".

In terms of Echo skills only working with one hub - I guess that is true but with other devices you will usually only have one hub per household, like Hue lights. But with Harmony remotes it would be common to have one hub per TV and most family households probably have at least three TVs these days, although I admit that I am in the right tail on that one.

edit - I actually received my three Echo Dots today but I won't be able to do the Sage testing as I am about to leave for a trip until Saturday night.

tmiranda 12-13-2016 12:51 PM

Amazon just released an update to the development environment that may allow me to add more functionality to my skill. In the past you could not easily gather open ended responses, you needed to know in advance all of the possible responses the user would utter. Amazon now allows for the recognition of certain categories of responses including actor names, movie names, and TV show names.

I haven't had much time to look at the details but I think this will help me.


All times are GMT -6. The time now is 09:50 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.