Page 1 of 1

Problem Calling /Frontend/PlayRecording From Alexa Skill

Posted: Fri Jan 20, 2017 8:19 am
by velorider562
I'm working on an Alexa skill to control mythtv via voice command. Everything works fine some times, other times the playback won't start. I'm using the restAPI, the frontend flickers when I request playback but nothing plays. I repeat the command and playback starts. When playback ends, the original request starts like they are queued up. I haven't found anything in the mythfrontend logs.

I'm more then willing to chase down the issue, any pointers where to start. I assume the call is correct since it works sometimes.

I've pushed my code to github, if that helps. I'll add more details to the readme file soon.


https://github.com/jpetrocik/alexa-mythtv/


Thanks
John

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Posted: Fri Jan 20, 2017 12:48 pm
by dizygotheca
Are you waiting long enough ?
Looks like a request can take up to 30 secs before failing. Retries before then will stack up.
https://github.com/MythTV/mythtv/blob/m ... d.cpp#L143

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Posted: Sun Jan 22, 2017 5:58 pm
by velorider562
Thanks for the reply. It's not a timing issue. I've waited minutes at times. I think it might be a state issue, it always seems to work the second time.

Thanks you very much for the code link. Hopefully I can trace it down.

Thanks
John

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Posted: Mon Jan 23, 2017 12:40 am
by daraden
https://code.mythtv.org/trac/ticket/11453 see comment 3 for a workaround.

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Posted: Mon Jan 23, 2017 12:50 am
by velorider562
Will try and update.

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Posted: Sat Feb 04, 2017 7:26 am
by velorider562
I tried using the SendAction but the call is ignored, even though the response is:

<?xml version="1.0" encoding="UTF-8"?>
<bool>true</bool>

I tried a few other SendAction and nothing seems to work. I can get SendKey to work but I don't think there is a key binding to jump to Record Programs. I found an issue report regarding this but it's unclear what the status is.

https://code.mythtv.org/trac/ticket/12738

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Posted: Sat Feb 04, 2017 3:31 pm
by daraden
I have it working in python. by ignored do you mean its not switching to the recording playback page or after the SendAction command the PlayRecording command still fails?
the send action should be changing the context of your commands not the page displayed on the frontend. Have not played with the api enough to find how to switch the displayed page yet.

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Posted: Wed Feb 08, 2017 8:03 am
by velorider562
After the sendAction the page displayed on the frontend does not change. I didn't actually try sending the play command because I assumed the sendAction didn't work. I will try sending the play command after the sendAction command.

Sorry about the slow responses, I've been traveling a lot.

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Posted: Fri Jul 28, 2017 11:33 pm
by mdrons
John, Have you made any progress with this? What are the instructions to add it to my alexa? Is it using AWS services?

Happy to help troubleshoot/debug if I can get it enabled on my Echo.

Thanks, Mike