Author Topic: qBittorrent Controller for Android  (Read 79992 times)

lgallard

  • VIP
  • Veteran
  • *****
  • Posts: 160
  • Karma: +15/-0
    • View Profile
Re: qBittorrent Controller for Android
« Reply #180 on: March 17, 2016, 03:56:50 pm »
For those using HTTPS, here I explain how to use a self-signed certificate in qBittorrent Controller

Enjoy  8)

HomeDope

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
    • View Profile
Re: qBittorrent Controller for Android
« Reply #181 on: March 28, 2016, 05:32:26 pm »
Hello there.
First of all thank you for the great app!

I would have a feature request =)

Wake-On-Lan.
Have an option to send WOL to that Specific Computer(IP / MAC) and wait it to wake and then add those torrent.

Thanks again!

~Home

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: qBittorrent Controller for Android
« Reply #182 on: March 28, 2016, 05:55:31 pm »
Quote
Have an option to send WOL to that Specific Computer(IP / MAC) and wait it to wake and then add those torrent


If the computer is "sleeping" the client and therefore the WebUI interface, which is how this controller communicates with the client is NOT going to be running to 'receive a signal.
It is your BIOS settings that determine whether the computer will 'wake up' if it receives a request at the network interface.
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

HomeDope

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
    • View Profile
Re: qBittorrent Controller for Android
« Reply #183 on: March 29, 2016, 07:10:26 am »
Quote
Have an option to send WOL to that Specific Computer(IP / MAC) and wait it to wake and then add those torrent


If the computer is "sleeping" the client and therefore the WebUI interface, which is how this controller communicates with the client is NOT going to be running to 'receive a signal.
It is your BIOS settings that determine whether the computer will 'wake up' if it receives a request at the network interface.

Yes I know this. Thats why I asked to Add an Option to Wol pc with Mac address before trying to connect the qbit Web ui

KitKat

  • Veteran
  • ***
  • Posts: 340
  • Karma: +26/-0
  • Here i stand with my bayonet...
    • View Profile
Re: qBittorrent Controller for Android
« Reply #184 on: March 29, 2016, 07:35:11 pm »
Quote
Have an option to send WOL to that Specific Computer(IP / MAC) and wait it to wake and then add those torrent


If the computer is "sleeping" the client and therefore the WebUI interface, which is how this controller communicates with the client is NOT going to be running to 'receive a signal.

I believe hes asking for a WoL "magic packet" function.
Because modern pcs in sleep/low power mode actively listen on ports 7 & 9  they can be woken /w a crafted packet containing MAC address regardless of the state of running applications on the machine.
« Last Edit: March 29, 2016, 07:45:57 pm by KitKat »
The following BBC is not allowed within your signature: html, img, php.

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: qBittorrent Controller for Android
« Reply #185 on: March 29, 2016, 10:22:20 pm »
okay,


Not really possible in any case, as MAC addresses are not 'routable' over TCP. only over NET BIOS (WINS resolver)
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

KitKat

  • Veteran
  • ***
  • Posts: 340
  • Karma: +26/-0
  • Here i stand with my bayonet...
    • View Profile
Re: qBittorrent Controller for Android
« Reply #186 on: March 29, 2016, 10:40:41 pm »
okay,
Not really possible in any case, as MAC addresses are not 'routable' over TCP. only over NET BIOS (WINS resolver)
Normally you'd be correct buuuuuut....
http://www.howtogeek.com/192642/how-to-remotely-turn-on-your-pc-over-the-internet/

You can cheat by portforwarding :)
Also you can shell into a headless box on the LAN then route the WoL call from there but that setup is unrealistic (2 servers??)

Honestly i cant think of a use scenario where I'd want a dedicated seed box to enter a sleep state ;)
« Last Edit: March 29, 2016, 10:48:56 pm by KitKat »
The following BBC is not allowed within your signature: html, img, php.

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: qBittorrent Controller for Android
« Reply #187 on: March 29, 2016, 11:01:17 pm »
Sure, but what has that got to do with adding it as a 'feature' to the WEB UI or the Android controller App??

You set it up on your router and your computer BIOS or NiC and that is what will happen any time a request  received that is to be routed to that particular LAN IP.

No 'special feature' needed.

Whether the computer and the client WILL start up in sufficient time to service that request, is a whole different can of worms.
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: qBittorrent Controller for Android
« Reply #188 on: March 29, 2016, 11:04:59 pm »
And .... ....

What happens when your 'sleeping' machine doesn't connect the drive or filing system BEFORE the client starts???
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

KitKat

  • Veteran
  • ***
  • Posts: 340
  • Karma: +26/-0
  • Here i stand with my bayonet...
    • View Profile
Re: qBittorrent Controller for Android
« Reply #189 on: March 29, 2016, 11:42:32 pm »
And .... ....

What happens when your 'sleeping' machine doesn't connect the drive or filing system BEFORE the client starts???
RIP torrent progress hf force rechecking.

Sure, but what has that got to do with adding it as a 'feature' to the WEB UI or the Android controller App??

You set it up on your router and your computer BIOS or NiC and that is what will happen any time a request  received that is to be routed to that particular LAN IP.

No 'special feature' needed.

Whether the computer and the client WILL start up in sufficient time to service that request, is a whole different can of worms.
I'd assume he's talking about the android controller app, because if he were at a PC there are alot of tools in existance already to perform this task..
I suspect the guy wants an all-in-one mobile solution for something hes doing or has encountered, where the "best" solution is NOT to let the machine sleep in the first place.
(Qbittorent > Tools > Options > Behaviour > Inhibit System Sleep When Torrents Are Active)
Or ya know plain old disable sleep mode..
Or failing that..  to use some form of RA tool to resolve/manage those scenarios outside of the qbittorent client.

Still you are correct, there are alot of problems related to this requested feature, thus why its a suggestion!
The following BBC is not allowed within your signature: html, img, php.

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: qBittorrent Controller for Android
« Reply #190 on: March 30, 2016, 12:44:48 am »
Quote
there are alot of problems related to this requested feature, thus why its a suggestion!

Of course,  that is why I am explaining why it is not really a viable suggestion, and hopefully making people learning or want to learn a bit more about networking before making impractical "feature" requests.


Quote
I'd assume he's talking about the android controller app
Given that this IS the forum thread for the Android 'app' I'd say that is a pretty reasonable assumption :)
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

KitKat

  • Veteran
  • ***
  • Posts: 340
  • Karma: +26/-0
  • Here i stand with my bayonet...
    • View Profile
Re: qBittorrent Controller for Android
« Reply #191 on: March 30, 2016, 01:27:17 am »
Quote
there are alot of problems related to this requested feature, thus why its a suggestion!

Of course,  that is why I am explaining why it is not really a viable suggestion, and hopefully making people learning or want to learn a bit more about networking before making impractical "feature" requests.
It is viable though, the only real concern would be loss of torrent state upon resuming due to slow to connect network drives, which in an "average user envrionment" (no network shares, everything saved to internal HDD) shouldn't be an overt concern and should merely be listed as a warning, infact its likely that the same "slow to connect" network drives would cause the same hypothesized faults/problems if qbittorent is set to start with the operating system without a delay.

IIRC qbittorent(libtorrent really..) currently has a bug(doesn't correctly set missing flag or no differentiation between deleted and missing files) regarding network drives & external HDDs when the computer goes into a sleep/hibernation state while qbittorent is still open. I cant remember the negative ramifications of it off the top of my head, i don't believe it was "overwriting 100% torrent with 0.01% torrent leading to massive dataloss" i think it was just simply torrents getting set to 0.00% and put into error state until force rechecked.
utorrent "fixes" this by not checking state of torrents until they are actually used.. and that behaviour is one of the last remaining "core" differences between utorrent and libtorrent.
I cant remember whether this has been resolved or not, i do recall sledgehammer been the person who brought the issue up on the libtorrent bug tracker & it been a relatively "new" issue.

ANYWAY BACK ON TOPIC!!
For casual use what hes asking is possible, android controller app only needs to supply fields for the user to enter an IP address(send here) MAC address(packet payload) and port (assuming portforward method for getting routed properly) this is all its required to do (along with actually craft & send the packet ofc..) the rest relies on the user setting their network up correctly..

If a user sets up their PC and network to work in that manner then 0 changes need to be made to qbittorent itself to support this as you are correct, this is entirely external to qbittorent itself, and thus why its a "viable" feature for the android based qbittorent controller and not qbittorent's internal webui itself.
The feature/addition itself may be outside the scope of the qbittorent android controller application however.

/e: the "alot of problems" i was was speaking about were hardware and user skill requirements, the hardware has to support portforwarding to ports 7 or 9, and the user has to be tech savvy enough to enable WoL and port forward himself correctly. There isnt a practical way of automating those things in either qbittorent or the controller application..
This would be an advanced user feature and to be completely honest, advanced users would NOT let their OS go to sleep with an active torrent client, because that is just begging for IO problems when it wakes..
« Last Edit: March 30, 2016, 02:13:05 am by KitKat »
The following BBC is not allowed within your signature: html, img, php.

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: qBittorrent Controller for Android
« Reply #192 on: March 30, 2016, 02:47:06 pm »
Quote
network drives would cause the same hypothesized faults/problems if qbittorent is set to start with the operating system without a delay.
The 'problem' is NOT hypothetical https://github.com/qbittorrent/qBittorrent/wiki/Status-of-"Missing-files"-at-start-up-or-after-restart, and having a delayed start will not help in the case of an external drive being disconnected or switched off for any reason.

And this is not likely to be solved any time soon, as it is a libtorrent issue not qbittorrent.


All that said, it is up to lgallard if {s}he is willing to "MacGyver"  this into the controller but would it not be far simpler for the ONE person who apparently 'needs' this, to install an already working "App" https://play.google.com/store/apps/details?id=com.benfinnigan.wol&hl=en_GB
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

HomeDope

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
    • View Profile
Re: qBittorrent Controller for Android
« Reply #193 on: March 30, 2016, 09:59:02 pm »
Heya. Thanks all for your replies.
I think that I was not really clear what is the situation atm.

Currently My qbit config is that it wont sleep IF torrents are downloading. What I Just wanted is this.

ADD torrent using app.
Ping the host PC to xheck IF its alive.
IF not then use wol to wake it up.
ADD torrents. Thats it.

Ofc I can send WoL commabd via My phone atm but I was Just asking IF it could Be added to app itself.
Thanks.

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: qBittorrent Controller for Android
« Reply #194 on: March 31, 2016, 05:51:34 am »
Quote
Ping the host PC to xheck IF its alive.
IF not then use wol to wake it up.

The Android qbittorrent controller communicates directly with qbittorrent which acts as a "web server", it does NOT communicate with the host machine directly. To do what you want, cannot be done with with qbittorrent, simply because if the machine  IS 'sleeping', qbittorrent is NOT running to act on the instructions from the WebUI.

You need to set this up on your network card and/or machine BIOS, so when your router forwards a packet to your machine for ANY requests to the port that your webui listens on it will send a "wake-up" call as well.

Simply "pinging" the IP will do absolutely nothing at all, because you are NOT sending a 'ping' to your machine. It is your router that responds to ICMP traffic ( PING, ToD Traceroute etc.), unless you forward ICMP ports to the machine you want to respond (Commonly known as a DMZ (DeMilitarised Zone) in LAN security terms which is NOT something you should do to a unless the machine has been 'hardened' against attacks and intrusions, and if the machine is running some edition of M$ Windows. Do not even contemplate about the merest possibility of  thinking of doing it.

Wake-up On LAN is really ONLY for use with machines that are all on the same LAN or LAN subnet it is not intended for WAN - LAN operations. IF you want a LAN machine to 'wake-up' to WAN activity, this HAS, HAS to be done by tour router sending the "magic packet".

The important bit you absolutely need to understand is that MAC (Media Access Control) addresses are NOT routable beyond your LAN, so a "magic packet" CANNOT be sent from a location that is outside (WAN/Internet) of your local area network (LAN) to a machine that is inside,
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html