Page 1 of 1
resume and pause with a http command
Posted: December 6th, 2016, 6:23 pm
by link1423
Hello all ,
I would likt to pause and resume sabnzb with a http command , so I can remotely pause-resume with my home automation.
I have heard this was possible, anyone knows how to do this?
Thanks,
link
Re: resume and pause with a http command
Posted: December 6th, 2016, 9:38 pm
by tomdones
Code: Select all
http://host:port/sabnzbd/api?mode=queue&name=pause&value=NZO_ID
https://sabnzbd.org/wiki/advanced/api#pause
Honestly I haven't tried working the URLs yet, but I'm looking for "timeleft:" and other output arguments. So maybe.... api?mode=queue&timeleft ... (not sure if I need a "=")? Again, I haven't gotten to any of that yet, but I'll get to it. I bring that up because a lot of the query data you might want comes out of the "Full Queue output", for instance "paused":false. But, as along as "pause" -> "pause" won't resume (or "resume" -> "resume" won't pause), you shouldn't need the query data (not really).
Re: resume and pause with a http command
Posted: December 7th, 2016, 2:48 am
by safihre
All the commands you could ever want

:
https://sabnzbd.org/wiki/advanced/api
Re: resume and pause with a http command
Posted: December 7th, 2016, 4:33 am
by link1423
Good morning!,
Thanks for the reply.
It is working although I needed some time to figure out how to insert this API key and how to insert the command than. But after several trial and error , I got it working.
Thanks,
Link
For future reference:
Code: Select all
http://IPadress:8080/sabnzbd/api?output=json&apikey=123456789APIKEY123456789&mode=pause
http://IPadress:8080/sabnzbd/api?output=json&apikey=123456789APIKEY123456789&mode=resume
luup.inet.wget("http://IPadress:8080/sabnzbd/api?output=json&apikey=123456789APIKEY123456789&mode=pause")
Re: resume and pause with a http command
Posted: December 7th, 2016, 11:51 am
by tomdones
You had to set the output?
Re: resume and pause with a http command
Posted: December 7th, 2016, 1:35 pm
by safihre
Think it works without the output set.
But the first part of the api manual mentions how to place the key, isn't it clear enough?
Re: resume and pause with a http command
Posted: August 21st, 2017, 3:26 pm
by link1423
Hello again,
I bought a new computer installed the new version of SABnzb , but I can't get this to work anymore. Anyone has an idea why?
I inserted the new ( longer) API key in this:
http://192.168.68.20:8080/sabnzbd/api?o ... mode=pause
Where 192.168.68.20 is the computer running Sabnzb. The answer in a webbrowser is: 192.168.68.20 refused to connect.
The other thing i noticed , the computer now says:
http://127.0.0.1:8080/sabnzbd/config/general/ where it used to say something like "localhost............
Do I need to set anything in the security TAB under "general"
Many thanks,
Cor
Re: resume and pause with a http command
Posted: August 21st, 2017, 3:38 pm
by safihre
In that tab you should fill 0.0.0.0 for SABnzbd Host.
Re: resume and pause with a http command
Posted: August 22nd, 2017, 12:55 pm
by link1423
@ Safihre:
Thanks , I got it partially working now.
When I insert this in my broswer:
http://192.168.68.20:8080/sabnzbd/api?o ... ode=resume
It is working.
When I use the below in my home automation it is not working , before , with an older version and on my older computer it was working like this. Anyhting else I need to do?
luup.inet.wget("
http://192.168.68.20:8080/sabnzbd/api?o ... ode=resume")
Many thanks,
Cor
Re: resume and pause with a http command
Posted: August 22nd, 2017, 1:37 pm
by safihre
Is that the right IP adres in the URL (
http://192.168.68.20:8080/sabnzbd/api?o ... ode=resume)?
So when you enter that from any other computer or device, it works?
Re: resume and pause with a http command
Posted: August 22nd, 2017, 1:43 pm
by link1423
Ah , I see you point .... on the local computer which runs sabnzb it works . I can not check with another computer right now , since I am working on that computer with teamviewer. Next week when I am home again I will try it with my notebook. With my homeautomation device It doesn't work.
Back in a week :-)
Thanks,
Cor