|
SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
SageTV Alexa Skill
I have made a simple Alexa skill for SageTV. Hopefully someone can take this and make it even better (and maybe more secure). I have only tested on SageTV Open Source on Windows, but should work on v7 .
Requirements: 1. Sagex-api-services on the SageTV server 1a. YouTube (2015) plugin if you want to use Youtube capabilty 2. ssl access to your SageTV jetty server exposed to the internet (if you are like me and can't figure out how to get ssl working in jetty, use the free "stunnel" software to easily translate https to http). You could re-write it to not require ssl, but I thought that would be unwise. 3. You need to know the basics of how to setup an custom Alexa skill. A good tutorial on setting up a skill is: http://analyticphysics.com/Diversion...20Cookbook.htm Directions: 1. Place the alexa.js in your sagex/services/ directory 1a. Edit alexa.js YouTube temp download directory to a location on your server (hardcoded a few times as 'E:/DownloadedShowsNew/YouTube/' ). A logfile "extender-tempLog.txt" is also made in this directory to allow skipping to the next likely search result more easily. 2. Edit node.js.txt to match your configuration: IP Address: your external IP (in single quotes) authstring: your jetty userNameassword (in single quotes) port: your external jetty port (no quotes) extender: '0' for client instance, extender MAC address for a specific extender (get from SageTV webserver home page) 2. Put the contents of the node.js.txt as your lambda function and the content of the other files in correct locations in the Amazon Alexa skill section. I named it "Sage Tee Vee". Then you can do things like: Alexa, ask Sage Tee Vee to watch XXX {XXX can be a show name, episode name, movie name} % Gives best match. You can say "Alexa, ask Sage Tee Vee Wrong show" for next match Alexa, ask Sage Tee Vee to XXX {XXX can be "skip", "pause","stop", "unpause"} Alexa, ask Sage Tee Vee what's on next {gives next 5 shows that are recording} Alexa, ask Sage Tee Vee what's new {gives last 5 shows that were recording} Alexa, ask Sage Tee Vee to search youtube for {video name} % Gives best match (most views).You can say "Alexa, ask Sage Tee Vee Wrong show" for next match. Give it a few seconds, as it will crash if you do it too quickly. It will not download the file from youtube if you already have it (but it will still play it). The temp download directory is not cleaned up, so you may want to do that every once is a while. I find every often that "one shot" commands sometimes don't work well. Instead say: Alexa, ask Sage Tee Vee. Wait for her response, then say the second command, eg. "Watch XXX" If the alexa.js script does not work, and you are on windows, make sure you are on java 1.7 (jdk-7u79-windows-i586) not java 1.8. If you have multiple clients, you may need to edit the alexa.js script to talk to the right one. I may add the capability to use voice to choose between multiple extenders or clients. Thanks to stuckless for the help on UIContext and to kricker as I stole his search code from his xmbc plugin. Thanks to tmiranda for help with YouTube (2015). Note: For the youtube functionality, you need SageTV 9, as it was implemented with progressive play (start playing while file is downloaded) Last edited by jonnydeath; 05-08-2016 at 10:00 AM. |
#2
|
|||
|
|||
Very cool!
__________________
Server: SageTV v9 on unRAID Docker; i5-2400; 16GB RAM; 9TB storage array; SiliconDust HDHR3 Client: Windows10; Intel Core2Duo; 4GB RAM; NVIDIA GeForce GT 1030 Client: NVIDIA ShieldTV Client: Fire TV Stick 4K |
#3
|
|||
|
|||
Nice! When I get some time I'll give it a try Thanks!
|
#4
|
|||
|
|||
Does this still work? Just got some Alexa devices
__________________
[size=1]Current Server:V9 UNRAID Docker, SuperMicro x9dri-LNF4+, 32 GB ECC, 2x Xeon e5-2660v2, storage array 6TB, 2 Dish r5000HD tuners, 1 HDHomerun Quatro, 1 HDHomerun Extend 4 Nvidia Shield TVs with Miniclient |
#5
|
||||
|
||||
I haven't used it in years. I'm not sure if it will work or not.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|