Python command line control

Suggest, post, or discuss plugins for Deluge
Post Reply
ivanxx
New User
New User
Posts: 3
Joined: Sat Jul 10, 2010 7:56 pm
Location: Madrid, Spain

Python command line control

Post by ivanxx »

Hi all,

I've been looking for a way to control Deluge from the command line (to modify up/down rates mainly), and found little or no info about it, so rewrote a small python script that existed for previous versions of Deluge (original author Garett Harnish), and now it's working under Deluge 1.2

I'm sharing it here, and hope it's useful for someone else.

Ivan.
Attachments
delugecontrol.tgz
(1.72 KiB) Downloaded 357 times
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Python command line control

Post by johnnyg »

What's wrong with deluge-console?
ivanxx
New User
New User
Posts: 3
Joined: Sat Jul 10, 2010 7:56 pm
Location: Madrid, Spain

Re: Python command line control

Post by ivanxx »

johnnyg wrote:What's wrong with deluge-console?
well, er, nothing, I guess...
The only thing is I had to update deluge manually (compiled from source instead of using the ubuntu 10.4 included version) in order to get it working with the Transdroid app for my phone (supporting only v1.2 and above). Now deluge-console is reporting broken packages when I try to install it, so I guess I'll have to download and compile it manually (now that I'm aware of its existence, I mean :oops: )

Anyway, I made the python script just to deal with a problem of uploading rate interfering with my phone service (SIP through yacom Spain). My ADSL is 20Mbit/1Mbit (12Mbit/768Kbps as reported by my router) and if I allow deluged to upload over 10Kb/sec the SIP audio becomes choppy, so I intend to run the script when a call initiates in the FreePBX asterisk (running on the same host as deluge daemon) to lower the rate, and then again when the call ends to reset it to my "normal" value (30 Kb/sec). I'm having a hard time with FreePBX to integrate the calls for the script, so had no much time to investigate into deluge-console, my fault.

Will try it as soon as I get the FreePBX script integration solved. Thanks for the tip!

Ivan.
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Python command line control

Post by johnnyg »

Does your router support QoS?
ivanxx
New User
New User
Posts: 3
Joined: Sat Jul 10, 2010 7:56 pm
Location: Madrid, Spain

Re: Python command line control

Post by ivanxx »

johnnyg wrote:Does your router support QoS?
Yep!, it comes preloaded from the ISP with their SIP traffic mapped to forwarding group EF, and their RTP traffic mapped to group AF4x.
I added another rule for marking Bittorrent traffic (ports 7021-7041 in my setup) as BE for the lowest priority, but the outgoing audio keeps getting choppy and incomplete if Deluge is uploading more than 10Kbyte/sec. Incoming audio is always OK, so the problem seems to be related to my upload capacity. Maybe I should keep on playing with the values there, but not quite an expert myself regarding QoS.

Any suggestion for marking bittorrent traffic under QoS will be welcome!

Ivan.
Post Reply