Kodi Community Forum

Full Version: configure tvh backend from kodi addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Do you think it would be possible to create an addon program to configure the tvheadend backend (like scanning muxes and adding services/channels) from the kodi interface?

VDR has something like this and it would seem like there may be api access to the configuration that would at least get some basic functions to be configurable from the frontend?

If someone has an idea on where to start - I'd be happy to try and help build the addon. Thanks!
While technically possible, it may be difficult. The HTSP protocol that Tvheadend uses isn't fully documented, but there is a JSON-RPC endpoint in the Tvheadend server, IIRC.
Not possible at the moment, tvheadend doesn't have an API for that. The newer versions of tvheadend have a wizard though when you enter the web interface for the first time, that's about as easy as it's going to get at the moment.
That's unfortunate - I'm trying to setup a standalone ATSC DVR type setup that wouldn't need a network for basic use. Maybe Tvh isn't the best choice for this.
Not exactly sure I understand you correctly, but if I do there is no problem with what you are looking for. Just get some NUC with tuners or Wetek or something, install LibreElec with both, a TVH server (probably 4.2) and pvr.hts TVH client. Install the Chromium webbrowser in Kodi and use that to connect to localhost (this is where your TVH "server" will be running). You can then still configure the backend on that NUC or Wetek or whatever via webbrowser without using "another computer". I would only recommend to attach some mouse and/or keyboard for the configuration process, but otherwise you should be ok...
(2016-09-24, 17:50)M4tt0 Wrote: [ -> ]I would only recommend to attach some mouse and/or keyboard for the configuration process, but otherwise you should be ok...

Thanks - the goal would be to make it a simple interface to be used by basic boxes with basic remotes. The full web interface would be difficult to navigate with that type of remote so I was looking for a way to build a kodi interface to the tvh setup.

Chromium is an ok workaround, but will require shipping an airmouse type remote with the boxes.
imo configure TVH is a bit too complicated to do from simple kodi addon. A webinterface like it now has is the best way to go.
Most of the correct settings can be configured in the build...the option that would be worth adding is a mux scan and services (channels) add. In the USA if you want to provide an OTA ATSC based tuner/dvr - you need to allow the end user to rescan for channels. We have 210 different television markets and people move around - like in RVs - so they need to be able to easily rescan channels.

It could be that TVH is too big for this and I should investigate an alternative backend - but it runs well on budget amlogic based devices...so building an affordable dvr seems possible. I'm just trying to solve this basic end user need. I am happy to build the kodi addon - I am just trying to figure out how to access the TVH functions I need. Which may not be possible if an api doesn't exist.
As long as tvheadend does not offer an API for channel scan and mux config there is nothing we can do on the Kodi side.
im running osmc on my rpi3.

Someone made a lxde desktop that works in osmc. This has chromium installed.

You can configure tvheadend inisde chromium and if you install vlc you can view the streams.

So this works great Smile

Heres link https://discourse.osmc.tv/t/testing-x11-...ller/16846