Problem Calling /Frontend/PlayRecording From Alexa Skill

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
velorider562
Newcomer
Posts: 6
Joined: Fri Jan 20, 2017 7:59 am
United States of America

Problem Calling /Frontend/PlayRecording From Alexa Skill

Post 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
User avatar
dizygotheca
Developer
Posts: 267
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Post 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
velorider562
Newcomer
Posts: 6
Joined: Fri Jan 20, 2017 7:59 am
United States of America

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Post 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
daraden
Senior
Posts: 175
Joined: Tue Feb 23, 2016 7:33 am
United States of America

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Post by daraden »

https://code.mythtv.org/trac/ticket/11453 see comment 3 for a workaround.
velorider562
Newcomer
Posts: 6
Joined: Fri Jan 20, 2017 7:59 am
United States of America

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Post by velorider562 »

Will try and update.
velorider562
Newcomer
Posts: 6
Joined: Fri Jan 20, 2017 7:59 am
United States of America

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Post 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
daraden
Senior
Posts: 175
Joined: Tue Feb 23, 2016 7:33 am
United States of America

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Post 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.
velorider562
Newcomer
Posts: 6
Joined: Fri Jan 20, 2017 7:59 am
United States of America

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Post 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.
mdrons
Newcomer
Posts: 1
Joined: Thu Jul 27, 2017 3:46 pm
United States of America

Re: Problem Calling /Frontend/PlayRecording From Alexa Skill

Post 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
Post Reply