It might have to be part of the official distro, which is also why I want to get it approved. I’m not even sure how to go about doing that.
Right now the major limiting factor is that the MythTVServiceAPI code is still in a state of flux and not in PyPI, so if I hard-code a version to pull in, it could break, and therefore won’t work. I could copy the relevant parts of the code into the frontend component itself, but that goes against the “modular” design philosophy that hass wants to use. That, and I like the idea of having the API being able to be updated separately for new versions of MythTV in the future.
I’m still running 0.27 or 0.28 (can’t even remember now) so having a 29.0 tester is a good thing. I’m also not running anything (even hass) on a Pi, so it’s probably good to have a tester working on the hardware that’s more common.
@lindsayward has done all of the fun stuff like the video images. Sadly, I don’t even use the component yet. I have a whole house MythTV system, but just use the frontends on the TV to control everything. I’ve been too busy playing with servers and getting Z-Wave and automations set up to really get into the media_player components. That and my Samsung TVs don’t seem to play nicely with HA anyway, so I can’t just say “watch TV” and have the TV turn on, which takes a lot out of the magic - I still need the remote… at least until I build some IR blasters. Once I do get into HADashboard again, I’ll probably get back to using the component.
I delved into the mythtv services api and I see what you mean. I’m still trying to work out what I can do with the api that will help with my automation ideas and for voice commands via HA or Google Assistant.
BTW. My samsung TV also does not play so nice with HA. I use a chromecast connected to the TV so I can control it with HA or google assistant (inc. google home). Alternatively, I could control the TV from my RPi frontend by CEC, but I haven’t set that up yet. You could dedicate a PiZero to that job if it helps. Then you can also control inputs, etc.
I’ve spoken with the developer of MythTVServicesAPI a few times. Great guy, very helpful, but like the rest of is, is working on this as a hobby and skill improvement.
You can check that Frontend Services link that I sent as well as the DVR service or Videos service pages to get an idea of what you can do via the API. I think it’s possible to search for a program, even if we have to pull the list of programs and search within HA.
I just bought a few NodeMCU chips from Amazon for $7.50 (a little more than a PiZero but has WiFi built-in) that I could use; I had them slated to run wired sensors. Realistically, maybe I should just use the PCs running the frontends that already have IR receivers and wired IR outputs… though that requires the PC to be on before TV control is possible. I like that idea!
Hi @glenn20 and thanks for freshening up this thread
I do now use the component in its present state, on my main HA (no longer just dev), and it’s mostly going fine (some errors in logs, but nothing broken). I can use Siri (via homebridge) to start/stop MythTV playing.
I love the idea of saying something like “Hey Siri/Google, play the oldest episode of Community” or something, but that might be a bit much to ask.
Also, how are you doing the homebridge integration on the hardware side? I had homebridge working, but don’t have the Apple TV or spare iPad to sit at home. I found I moved things into groups on my phone, but all that work disappeared after a reboot.
That does sound like a good use case for the show search. Not sure we could get to being able to say oldest, but that might be a default option (oldest unwatched)?
I do have an Apple TV for remote Siri-homebridge, but I think it worked fine inside my house/network before I had that.
Here’s an excerpt from my logs recently (with nothing playing at the time). The Thread-2 warning entries are my/our own, which are then repeated by HA:
I had been running the plugin in my production environment also, at least until I removed all media_player components. I also found an occasional connection error. It would seem that could be a timeout error, if MythTV doesn’t respond fast enough. From the MythTVServicesAPI code:
We have the timeout coded pretty low (1s if I remember right) because local network access should be fast. But, if your MythTV server or network, or even HA server are under some stress at the moment of request, it might trip this error. Perhaps we could set up a config option to increase it?
Good. I’m happy to add timeout as a config option… I went to do it but the master and dev branches are a bit disjointed now (dev is is 2 commits ahead, 3 commits behind master) and I can’t quite tell what it should be.
Do you want to update this so that dev and master are both the latest, then I’ll checkout dev and add the next update to it?
Okay, I think I fixed it. Dev now shows 0 behind, 1 ahead (which just seems to be the merge request to get the master branch updates in). I also removed the novalidate option from the API requests, as the 0.27 version issue was fixed in MythTVServicesAPI.
I’m still pretty green with GitHub, so if I need to do something else, feel free to let me know what that is or if you have other input there, let me know.
Thanks. I noticed after upgrading to HA 0.88 that this component no longer works, so I’ll look into doing an update that fixes it and also refers to the Python bindings instead of the deprecated API.
Could I ask anyone using this component to test my latest update?
@calmor15014 - if it works for you, you could merge the PR into master. EDIT: merged and link updated.
I have chosen to change mythfrontend to mythtv and I’ve also included the notify platform, which was previously in another branch and has been updated.
I’ll update the code to use the new API/location when I can find out how
I’ve updated the readme and installation instructions.
It would be great if someone could give this a go and let me know if there are any areas that need improvement. Thanks.
I just updated my hass-dev environment to 0.89.2 and am still working out some of the config. I intend to finally upgrade my production environment soon, so I’ll be making a push to get everything sorted out here as well. I’ll merge and test by this weekend. Still on MythTV 0.27 though; that’s going to have to wait until after hockey season to upgrade…