Problem with add_schedule

DVBLink Remote API clients and tools

Problem with add_schedule

Postby privatesam » Fri Sep 04, 2015 3:37 pm

I'm trying to use the API to add a schedule recording. I've tried using two different clients to send the POST command but neither is achieving what I want.

Firstly I'm trying to use Tasker on Android to send the command through the RESTask plugin. This allows me to specify parameters and decide between POST GET etc. However when I use this to set a schedule it doesn't work - no schedule shows up in the web client and the recording doesn't happen. When I take a look in the dlrecorder.db I see it has made an entry under the schedule table but this is what it looks like:

Image

I'm pretty sure this info is completely wrong for DVBLink to make the recording. The weird thing is the response from the server provides Status code 0 and obviously it connects sends some data, DVBLink receives it and enters stuff into its database its just the wrong kinda data? I've noticed it does the same thing whether I specify as GET or POST - the same thing happens. Do I need to specify the headers more explicitly? Anyone have any ideas?
privatesam
 
Posts: 12
Joined: Thu Aug 01, 2013 8:59 am


Re: Problem with add_schedule

Postby privatesam » Fri Sep 04, 2015 3:56 pm

Also I checked my POST request with an online service and it looks like its been sent up correctly:

Image
privatesam
 
Posts: 12
Joined: Thu Aug 01, 2013 8:59 am

Re: Problem with add_schedule

Postby Oberon » Fri Sep 04, 2015 4:03 pm

It looks like you are not closing the tags correctly in xml - for example
Code: Select all
<channel_id/> 11220000

has to be
Code: Select all
<channel_id>11220000</channel_id>
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am

Re: Problem with add_schedule

Postby privatesam » Fri Sep 04, 2015 4:28 pm

Thanks Oberon thats exactly the issue. I got confused by the way the tags are laid out in the API documentation - although I'm a very beginner developer so it may well be that I was reading the documentation incorrectly. Its working now.

Another quick question - I'm ok with sqlite - is it possible to add a schedule by directly adding an entry to the schedule table in the dlrecorder.db with all the relevant fields filled?
privatesam
 
Posts: 12
Joined: Thu Aug 01, 2013 8:59 am


Return to Development corner

Who is online

Users browsing this forum: No registered users and 1 guest