Adding MythTV Frontend component

media_player
Tags: #<Tag:0x00007fd0758b97f8>

#21

@anilet,

I’ve updated the installation instructions to explain how to install the services API. I’m not able to test it at the moment but it’s the same instruction set that was in before so it should work. Let us know if you’re having any issues after that. Also, what type of system do you have (MythTV version, number of front ends, etc…) and what features you’re looking for.


#22

I will try to update soon

MythTV Version : v29-pre-401-g8cf4fc4
MythTV Branch : master
Network Protocol : 91
Library API : 29.20170212-1

I just have one frontend at the moment, Just the basic functions like Pause and restart, so that it can be incorporated in to automations.
Anil


#23

MythTV Version : v29-pre-401-g8cf4fc4

I’ll be interested to see how it works on 0.29-pre. Please keep us posted!

Just the basic functions like Pause and restart, so that it can be incorporated in to automations.

By restart, do you mean restarting playback, or restarting the frontend? We have an open issue to add host power-off (likely using MythTV System Events) but that would be exceedingly long for a simple frontend restart, and require the host to use WOL.


#24

Volume controls are now implemented and controls are dependent upon the Mythfrontend settings (if the frontend is not set up to control the volume, volume controls will not be shown). Volume controls are also only shown when the frontend is playing media.

Track skip keys were also set to jump chapters when watching DVDs (and on my system when watching recordings, that also jumps 10 minutes, which I believe is the default setup).

If you’re testing, please wget the latest copy of the component. You’ll also need to update the API to 0.0.6. I added a shorter timeout to try to remove some of the “mythfrontend taking longer than 10 secs” messages I was getting. It didn’t work yet, but should still help prevent tying up a request for 5+ seconds if the frontend is off.


#25

Nice! I hope to make some time this weekend to check it out and contribute some more.
EDIT: media position implemented, now to see what I can do with the media image…


#26

OK, I’m pretty proud of myself :blush:


#27

Awesome! Did you get that by pulling the backend Fan art? Now I gotta check the code. :slight_smile:


#28

Nah, Photoshop :wink:


#29

Just kidding… Yeah, I’m getting all programs from the backend data that match the “Title” playing on the frontend, then if there are multiples, I look for the one with matching “SubTitle”. I hope there won’t be duplicates of those, but I guess there could be. Then I get the first artwork from the data, if there is anything. PR submitted, as you’ve no doubt seen.


#30

I will check it out today for sure! I might have to make a tweak or two before the merge, if you’re pulling from the backend services (I think Dvr is backend?) since I have a split config (separate backend) so hosts will be different. In any event, I was kind of procrastinating on that TODO so that’s awesome!


#31

I merged the image getter into master, as it seems to work very well!

I also tried to do the frontend shutdown using System Key Events, but it appears that it doesn’t play so well with my system. Oddly, triggering it on a fresh reboot does nothing. If I play something, then use the API to send a pause and play command, then triggering the system event shuts the device down. Unfortunately, it also shuts other frontends down on the system as well. Not so good, back to the drawing board.

May have to do something kind of hack-ish like SendAction back to the main menu then SendKey Escape, SendKey Down, SendKey Down, then SendKey OK to activate the shutdown based on the exit menu. Will have to have some function for “which option is the ‘shutdown’ option on the exit menu” in the config…


#32

Hi Jim. Long time no dev… :wave:

I was thinking we should look at getting this platform to a release.
There are some new versions of MythTV (like 29), and I see Bill has done more on the MythTVServicesAPI, so maybe there are some more updates required.
What do you think? :slight_smile:


#33

Long time mythtv user (0.21 or something) her. Just general wondering, why you guys stick to myth frontend when we have preatty well functioning kodi PVR integration? I still use mythtv backend but I have migrated all my frontends (5+) to Kodi having all benefits of mythtv platform in same time having much richer experience on fronted as well?


#34

I gotta get back into it, maybe over the holiday break? I’m in the process of containerizing my system and running into plenty of challenges (oddly, on the things I thought should be easy).

I agree though, we should get back into it! I’ll respond soon with more info.


#35

I’ve also used it since maybe 0.24. I have one TV running Kodi natively and so far it’s kind of okay but I honestly prefer the MythTV front-end. It isn’t as “pretty” but I don’t use the rest of the services as I find the Smart TV apps more stable, and I don’t like the way Kodi skips time (takes time to catch up) or even the main display of how recordings are shown. If you only use it for MythTV it’s rather clunky. I also found the touch screen version for Windows 10 clunky in all of the themes I tried, but it’s better than what’s available for Windows otherwise (nothing). If you use it for more, then it’s nice and better integrated than what mythfrontend provides.

I have considered going to Kodi and employing more of the services, but right now I’m still demoing on the one TV.


#36

Hi @bachulator. I’ve experimented with both Kodi (even XBMC a while ago) and Plex, but neither provides simple commercial skipping like MythTV.
99% of my MythTV is single-watch stuff recorded from free-to-air TV, not things I want to take time to edit for a ‘library’.
I do find the MythTV interface a bit tedious, but I’m used to just scrolling through 400 recordings now :slight_smile:
Are you using any of your media/TV system in Home Assistant?


#37

@lindsayward I noted that my TV will do automatic commercial skip sometimes, but sometimes it doesn’t. I also haven’t gotten live TV to work but I think it’s related to the IPv6 issue (which was one of the many reasons I wanted to containerize).

Kodi is a nice system and I didn’t mean to knock it (lack of coffee today), but the MythTV frontend isn’t bad for what I do with it. I netboot all of the boxes and I can watch all of the recorded or live TV, so basically like a cable box. And it’s got a high Wife Acceptance Factor, which is always important!


#38

Thank you to all the contributors for this work - esp. calmor and lindsay. I am very interested in mythtv support on home assistant. I am new to HA, but been using mythtv since the early days.

I will try to set this up and contribute (to testing at least).

I am assuming I won’t be able to do any testing with my hassio-based server and will need to build a test HA server following https://home-assistant.io/developers/development_environment/. I figure my laptop would be the most convenient dev environment rather than another RPi.

Any other recommendations? Any complications with running prod and dev HA on the same network?

I’m also keen to get mythtv control working through the google-assistant to appease the family :slight_smile: . Stretch goal would be starting programs by name like they can do with netflix.

Mythtv setup: Frontend and backend on seperate RPi3 (mythtv-light 0.29), 2xHauppage USB WinTV DualHD tuners, MariaDB and recordings on Synology NAS.
HA: Hassio on RPi3.


#39

I apologize that I haven’t been able to work on it much in the past few months. I had a few overseas trips, and was fighting with my server. I think I might have finally gotten the server sorted out last weekend, though, and it’s my hope to get this polished and stable enough to get into a future release of HA.

I haven’t tried hassio yet, so I’m not sure what the difference is between it and the normal hass variant. But, as for running prod and dev HA, I run two on the same server hardware (separate containers) and there are no issues as long as they have different IP addresses and aren’t fighting over the same resources (i.e. connecting to the same USB Z-Wave Hub). I’d recommend removing everything from the dev environment except items related to testing, to avoid overrunning polling limits of internet sources also, but it might be okay to leave them in, especially if you don’t leave the dev environment running often.

You can add the idea of starting programs by name / voice in the GitHub project. Right off the bat, I’d imagine the complication would be if you have more than one recording of a given show, which to start, etc… but nothing that couldn’t be overcome.

I’m not familiar with mythtv-light, but please check that you can access the Frontend API described here and the Backend API by going to http://backendip:6544 as that’s what this component uses.


#40

Thanks for the tips - and I’m very appreciative of the work you have done. I was able to set it up successfully in a dev env on my laptop and worked fine with my RPI3 frontend running mythtv-light v29.0.
Hassio is a more locked-down distro - I have to figure out how to install the mythtvservicesapi on hassio before I can use this on my production HA. Maybe tomorrow…