Project

General

Profile

Control API for Tvheadend

Added by Dag Johansson almost 13 years ago

Is there an API where you can get channels, EPG-info, add recordings etc.
I have tried to use HTSP-protocol, but it's hard to implement (for me).


Replies (6)

RE: Control API for Tvheadend - Added by Hein Rigolo almost 13 years ago

for the moment the htsp protocol is the only methode to control tvheadend remotely.

RE: Control API for Tvheadend - Added by polini - almost 13 years ago

You can use simple HTTP-POST-Requests to control Tvheadend. The commands are not documented. With Firebug you can see which commands are used by the JavaScript Webinterface. The response text is in JSON, which can be easily parsed.

Be careful, because the commands/parameters could change with a new version of Tvheadend.

RE: Control API for Tvheadend - Added by Dag Johansson almost 13 years ago

Thanks for your tips.
This is what i need for now, and it seems easy to implement.

RE: Control API for Tvheadend - Added by Ben . over 12 years ago

Sorry to dig this up, but could you give me a bit of guidance? I can see in Firebug that if, f.e, I go http://myip:9981/epg/ then I can get a json object returned containing the current broadcasts. How do I then add parameters to this in order to get specific channels etc? When I try and add the parameters described in firebug to the end of the URL they are simply ignored.

Sorry if this seems a bit like asking how to suck eggs, this is an unfamiliar area to me.

RE: Control API for Tvheadend - Added by Dag Johansson over 12 years ago

You must do a POST request instead of GET and you have to send the parameters as post-data.
Parameter you can use for epg is like "start=0&limit=300&channel=TV4". In firebug you can see these parameters in the POST tab.

I hope this will help you to make it work.

RE: Control API for Tvheadend - Added by Shannon Haworth over 12 years ago

livehttp headers (a firefox plugin) is also very useful for inspecting, changing and sending http requests.

    (1-6/6)