resume and pause with a http command

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
link1423
Newbie
Newbie
Posts: 5
Joined: December 6th, 2016, 6:20 pm

resume and pause with a http command

Post 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
tomdones
Newbie
Newbie
Posts: 13
Joined: November 28th, 2016, 7:28 pm

Re: resume and pause with a http command

Post 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).
User avatar
safihre
Administrator
Administrator
Posts: 5362
Joined: April 30th, 2015, 7:35 am
Contact:

Re: resume and pause with a http command

Post by safihre »

All the commands you could ever want :) :
https://sabnzbd.org/wiki/advanced/api
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
link1423
Newbie
Newbie
Posts: 5
Joined: December 6th, 2016, 6:20 pm

Re: resume and pause with a http command

Post 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")
tomdones
Newbie
Newbie
Posts: 13
Joined: November 28th, 2016, 7:28 pm

Re: resume and pause with a http command

Post by tomdones »

You had to set the output?
User avatar
safihre
Administrator
Administrator
Posts: 5362
Joined: April 30th, 2015, 7:35 am
Contact:

Re: resume and pause with a http command

Post 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?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
link1423
Newbie
Newbie
Posts: 5
Joined: December 6th, 2016, 6:20 pm

Re: resume and pause with a http command

Post 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
User avatar
safihre
Administrator
Administrator
Posts: 5362
Joined: April 30th, 2015, 7:35 am
Contact:

Re: resume and pause with a http command

Post by safihre »

In that tab you should fill 0.0.0.0 for SABnzbd Host.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
link1423
Newbie
Newbie
Posts: 5
Joined: December 6th, 2016, 6:20 pm

Re: resume and pause with a http command

Post 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
User avatar
safihre
Administrator
Administrator
Posts: 5362
Joined: April 30th, 2015, 7:35 am
Contact:

Re: resume and pause with a http command

Post 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?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
link1423
Newbie
Newbie
Posts: 5
Joined: December 6th, 2016, 6:20 pm

Re: resume and pause with a http command

Post 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
Post Reply