Remote control interface design

Discussions about the TCP Remote Control interface built into Newsbin. Includes discussion and announcements of remote control applications using this interface running on mobile devices including iPhone and iPad iOS, and Android phones and tablets.

Moderator: Jonny

Remote control interface design

Postby Quade » Mon Jul 04, 2011 8:37 pm

Design specification is now in the Help Wiki.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby Quade » Fri Jul 15, 2011 3:00 pm

Added some more commands.

10 - Downloads List Processing.

Download list commands all start with "Downloads"

>"Downloads Count"
<200 53 sets on the download list.

- Count

Returns a count of the download list. It's valid at the time the command was sent.

- Lock

Locks the download list. If you're going to do something complicated with the download list, this stops downloads and prevents anything from entering or leaving the download list.

>Downloads Lock
< 200 Download list Locked

- Unlock
< 200 Download list Unlocked

Unlocks the download list. After you make changes to the download list, this will unlock it and let normal downloads continue.

>Downloads Unlock
< 200 Download list Unlocked

- List <min> <max>

Will return a textual list of the download list contents.

>Downloads Count
<200 53 sets
>Downloads List 0 52
<...
<...
<.
>Downloads List 2
<....

- Sort <column> <ascend>

- Clear
> Download Clear
< 200 Download List Cleared

- Find <search string>

- Assemble
> Downloads Assemble 1
< 200 Download Assembled

- Delete <index>
- Pause <index>
- Resume <index>

Movement commands will invalidate the current indexing so, the application should re-acquire the current download list order.

- MoveUp <index>
- MoveDown <index>
- MoveTop <index>
- MoveBottom <index>
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby itimpi » Sat Jul 16, 2011 8:06 pm

Would it be possible/Useful to have a Help command that lists all currently available commands and their basic syntax? It occurs to me that you may have internal data structures you use for parsing commands that could be used to produce this ouput? Might be easier than trying to keep documentation updated :)
The Newsbin Online documentation
The Usenettools for tutorials, useful information and links
User avatar
itimpi
Elite NewsBin User
Elite NewsBin User
 
Posts: 12299
Joined: Sat Mar 16, 2002 7:11 am
Location: UK

Registered Newsbin User since: 03/28/03

Re: Remote control interface design

Postby sparks » Tue Jul 19, 2011 11:49 pm

Im not having much luck with this......

200 Newsbin Server
Downloads List
400 Command not Recognized
Downloads List 0 1
400 Command not Recognized
Count
400 Command not Recognized
Downloads Count
400 Command not Recognized

Using version 6.01 beta
sparks
Occasional Contributor
Occasional Contributor
 
Posts: 15
Joined: Mon Apr 07, 2008 12:55 am

Registered Newsbin User since: 04/11/08

Re: Remote control interface design

Postby Quade » Thu Aug 11, 2011 3:39 pm

Updated
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby oferlaor » Tue Aug 16, 2011 8:32 am

let us know when there are suitable client side apps that can use this.

Also, an uploading mechanism for NZB is critical.
oferlaor
Seasoned User
Seasoned User
 
Posts: 299
Joined: Sun Oct 08, 2006 11:02 am

Registered Newsbin User since: 04/21/06

Re: Remote control interface design

Postby Quade » Tue Aug 16, 2011 8:39 am

There's an IOS app in closed beta. Funny, the programmer of this app and I were just talking about NZB Uploads. It's working for me but, not for him currently.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby Jonny » Wed Aug 17, 2011 8:07 pm

NZB upload is working in the current beta.

It don't work very well though, as Safari refuses to download NZB files. It works if you open an NZB from mail though.

The dropbox app has an issue with NZB files as well, it downloads in and opens it in a text view. Then it refuses to acknowledge that any other app can open it. Seems like a bug in the Dropbox app.
Jonny
Seasoned User
Seasoned User
 
Posts: 108
Joined: Sat Mar 15, 2003 8:25 pm

Registered Newsbin User since: 04/29/03

Re: Remote control interface design

Postby itimpi » Thu Aug 18, 2011 5:13 am

Jonny wrote:It don't work very well though, as Safari refuses to download NZB files. It works if you open an NZB from mail though.

This appears to work fine for me in Safari on my iPhone 3G running iOS 4.2.1. When I click on a NZB file (from NZBMatrix) then Safari offers me the option to open it in NBRemote.

I am guessing that it would also work on my iPad1 running iOS5 - except for the fact tht I have not yet got NBRemote to install successfully there :(. Do you know if any other testers are running iOS 5 (on iPhone or iPad) and have successfully installed NBRemote?

The dropbox app has an issue with NZB files as well, it downloads in and opens it in a text view. Then it refuses to acknowledge that any other app can open it. Seems like a bug in the Dropbox app.

I suspect that this is due to some problem with the way that NBRemote is registered to handle NZB files? Loading the file as a text file in DropBox app is normal, but for other apps as soon as I add an app registered to handle that file type then it appears in the Send To option in the Dropbox viewer. However, since safari and mail seem to recognize the presence of NBRemnote I am not sure what the issue might be.

It would be nice iif the Dropbox app had an option to load a file directly into another app without first loading it into a 'viewer' in the Dropbox app itself, but I guess that is something to do with the way it makes sure the file is downloaded.

I guess longer term support for Dropbox could be built directly into NBRemote as I believe they offer a toolkit to make adding support to apps easy?
The Newsbin Online documentation
The Usenettools for tutorials, useful information and links
User avatar
itimpi
Elite NewsBin User
Elite NewsBin User
 
Posts: 12299
Joined: Sat Mar 16, 2002 7:11 am
Location: UK

Registered Newsbin User since: 03/28/03

Re: Remote control interface design

Postby Jonny » Thu Aug 18, 2011 5:23 pm

Jonny
Seasoned User
Seasoned User
 
Posts: 108
Joined: Sat Mar 15, 2003 8:25 pm

Registered Newsbin User since: 04/29/03

Re: Remote control interface design

Postby Quade » Mon Aug 22, 2011 11:59 am

Updated - added some new documentation for how NZB's are uploaded to Newsbin.

There are basically two way to upload. Similiar to loading an NZB into the post list or landing them in the autoload folder.

1 - nzbbinary - loads them into a post list you can browse through the interface and decide what to download.

2 - nzbautoload - saves the NZB to the autoload folder so all normal autoload features exist.


You can also DOWNLOAD files from the files list to your device. I tested a 1.3 GB MKV files for Newsbin to my test app. It worked great.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby Alex Atkin UK » Mon Sep 26, 2011 12:44 am

I am trying to write a simple web interface for Newsbin in PHP and am stuck getting Auth to work. Its not important for my situation really as I will be running both Newsbin and the web server on the same PC, but I would like to release the final result to the public so having Auth working would be nice.

I have tried generating an md5 using the command line "md5sum", I have tried using "hash("md5",$string)" in PHP as well as "md5($string)". I am clearly missing something as none of those methods are generating the correct login details (and all generate a completely different hash :cry:).

I am also a little unclear about what you mean by MIME encoding the hash before sending it to Newsbin. Aren't there a million different MIME encodings so just saying "encode it" is meaningless? I have tried BASE64 encoding but that isn't working either, although when I can't even be sure the MD5 hash is correct to begin with its no wonder really. :lol:

As you can no doubt tell, I haven't had many dealing with this sort of thing so am totally confused.
User avatar
Alex Atkin UK
Occasional Contributor
Occasional Contributor
 
Posts: 30
Joined: Wed Sep 27, 2006 10:22 pm

Registered Newsbin User since: 06/12/06

Re: Remote control interface design

Postby Quade » Mon Sep 26, 2011 1:27 am

What does you hash function generate? Ascii or binary? Seems that some MD5's generate ascii and some binary.

You can see I append the password to the key with a | between

"KEY|PASSWORD"

Then I do an MD5 hash. My hash function returns 16 bytes of binary. So, I then use the loop to convert it to a 32 byte hex string. Then uppercase the hash string and compare to what you send me. There's is no MIME (base64) at this point.

Dex has a sourceforge for the C# version of my test tool for talking to Newsbin. It has working auth you can try out.

http://sourceforge.net/projects/nbremote/

If you still can't get it to work, come to the IRC channel and we can work on it. I'm on east coast time.



Code: Select all
HRESULT
CTCPServer::TC_CheckKey(const char* pszKey,const char* pszPassword,string_t& sEncoded)
{
   if( !pszKey || !pszPassword )
   {
      ASSERT(0);
      return(E_ABORT);
   }


   vect_uchar_t   vKey;
   vKey.insert(vKey.end(),pszKey,pszKey+strlen(pszKey));
   vKey.push_back('|');
   vKey.insert(vKey.end(),pszPassword,pszPassword+strlen(pszPassword));

   byte KeyDest[32];
   memset(KeyDest,0,sizeof(KeyDest));

   CMD5HashBlock      HasherSSL;
   HasherSSL.HashInit();
   HasherSSL.HashBlock((byte*)&vKey.front(),vKey.size(),KeyDest);

   //Seems th
   // 820b4ad02742e6630b554a48de7d2d9f
   //
   string_t   sKey;
   char      pszOutput[32];
   for( uint32_t nLoop = 0; nLoop <  MD5_DIGEST_BYTES ; ++nLoop)
   {
      unsigned int cData = KeyDest[nLoop];
      sprintf(pszOutput,"%02X",cData);
      sKey += pszOutput;
   }
   ASSERT(sKey.size() == 32 );
   std::transform(sKey.begin(),sKey.end(),sKey.begin(),toupper);
   std::transform(sEncoded.begin(),sEncoded.end(),sEncoded.begin(),toupper);

   if( sKey == sEncoded )
   {
      return(S_OK);
   }
   return(E_ABORT);
}

User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby Alex Atkin UK » Mon Sep 26, 2011 7:41 pm

Hopefully that's enough to hack something together. I believe all the functions I tried so far are producing ASCII, so that certainly could explain where things are going wrong.

Is there any way I can get Newsbin to spit out the hash its expecting?
User avatar
Alex Atkin UK
Occasional Contributor
Occasional Contributor
 
Posts: 30
Joined: Wed Sep 27, 2006 10:22 pm

Registered Newsbin User since: 06/12/06

Re: Remote control interface design

Postby Quade » Mon Sep 26, 2011 8:06 pm

The string "TEST|TEST" - no quotes

Generates this auth string

FD58E3D2B1E517F4EE46063AE176EEE1

It's got to be upper cased.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby Jonny » Mon Sep 26, 2011 9:34 pm

What I think Quade meant to say with the upper case stuff is that you will need to upper case the serial number before calculating the hash (the password should be left as is).

The hash is hex encoded, and NB will upper case that string prior to comparing to your string, but that makes no difference at your end.

Regards;
/jb
Jonny
Seasoned User
Seasoned User
 
Posts: 108
Joined: Sat Mar 15, 2003 8:25 pm

Registered Newsbin User since: 04/29/03

Re: Remote control interface design

Postby mho » Mon Sep 26, 2011 9:51 pm

Quade wrote:The string "TEST|TEST" - no quotes

Generates this auth string

FD58E3D2B1E517F4EE46063AE176EEE1

It's got to be upper cased.

mhoria$~:echo -n "TEST|TEST"|md5|tr a-f A-F
FD58E3D2B1E517F4EE46063AE176EEE1
mhoria$~:

Straight-forward MD5 confirmed:-)
Note that in my world, it's slighty unusual to use UPPER CASE for MD5, so I'd suggest a case insensitive match, if it doesn't complicate code.

Also, make sure there are no stray newlines or trailing white space in your md5 input...

- mho
mho
Seasoned User
Seasoned User
 
Posts: 259
Joined: Sat Jan 02, 2010 8:57 pm

Registered Newsbin User since: 10/24/08

Re: Remote control interface design

Postby Alex Atkin UK » Wed Sep 28, 2011 1:34 pm

I agree as I just discovered my problem was as simple as trying to use a lowercase hash.

I just checked strtoupper(md5("TEST|TEST")) and it generates the correct hash.
User avatar
Alex Atkin UK
Occasional Contributor
Occasional Contributor
 
Posts: 30
Joined: Wed Sep 27, 2006 10:22 pm

Registered Newsbin User since: 06/12/06

Re: Remote control interface design

Postby Quade » Wed Sep 28, 2011 1:43 pm

Great!
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby Alex Atkin UK » Wed Sep 28, 2011 1:45 pm

I'm not going to celebrate quite yet as when I checked before with my regcode the command line md5 and the PHP md5 were not generating the same hash.
User avatar
Alex Atkin UK
Occasional Contributor
Occasional Contributor
 
Posts: 30
Joined: Wed Sep 27, 2006 10:22 pm

Registered Newsbin User since: 06/12/06

Re: Remote control interface design

Postby Quade » Wed Sep 28, 2011 2:17 pm

You uppercased the Newsbin key but, not the password? The Newsbin key is stored in Newsbin uppercased. The password isn't.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby Alex Atkin UK » Wed Sep 28, 2011 10:37 pm

I take them both how presented in Newsbin but also tried changing the password to TEST which didn't help.

I'm really puzzled at why when doing the REAL hash I still get a different result in PHP than I get with md5sum, despite the fact both give the same result for the test string. Neither are accepted by Newsbin of course. :?

In the meantime I have been looking at the commands and noticed it seems Downloads List starts from 1 not 0 as said. If I put 0 I get an out of range error, but if I have 5 downloads and put "Downloads List 1 5" it works as expected.

One thing though, it would be a lot easier if you could just put "Downloads List" or "Downloads List 1 100" without having to know how many downloads there are. It puzzled me for a moment until I realised I had to know EXACTLY how many downloads are in the list. Could be annoying if JUST as you issue the command one of the downloads finishes as it would produce an out of range error.

Also, does anyone know the best way to read from TCP in PHP? I am hitting a snag that all examples seem to assume the connection will close when all data has come in whereas naturally here I will want to fire off several commands in the same connection and parse the results.

[UPDATE]

Just upgraded to 6.10 and now there is no option to turn off Auth. It looks like leaving a blank password is supposed to turn it off, it says Auth=0 in the nbi, but the TCP connection still gives "413 Newsbin Server 6.10 - Auth is enabled but, no password is set", so I'm well and truly screwed. Guess I will wait for the Android app.

Also, why when SSL is enabled is it still accepting connections on the normal port? Surely it makes more sense for it to be TCP or SSL, not both at the same time. Its far too easy to forget to switch to the SSL mode in the remote client if it doesn't outright refuse you access otherwise. Its also a lot easier configuration wise as you only have to worry about a single port for either, rather than using up two different ports for no good reason. I assume its included as an emergency fallback in case SSL isn't working for some reason, but it seems a security risk to me.
User avatar
Alex Atkin UK
Occasional Contributor
Occasional Contributor
 
Posts: 30
Joined: Wed Sep 27, 2006 10:22 pm

Registered Newsbin User since: 06/12/06

Re: Remote control interface design

Postby hdskifreak » Sun Feb 19, 2012 7:23 pm

Greetings,

What is the status of the "Search Local" command? I have been trying to use it to no avail. Search internet seems to work fine.

It seems that the search "keyword" argument is tied only to the "from" field, so I cannot do subject searches Image link not allowed for unregistered users

How do I change the search mode?

I am using newsbin 6.21

Best Regards,
hdskifreak
n00b
n00b
 
Posts: 1
Joined: Sun Feb 19, 2012 7:17 pm

Re: Remote control interface design

Postby Quade » Sun Feb 19, 2012 9:03 pm

I'd say you need to upgrade to 6.3RC1.

Do that and if search local doesn't work, I can figure out why for you. Pretty sure it's working fine in 6.3 though. Jonny would be on my case if it didn't. He's the author of the IOS remote control app.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby Hiatus » Mon Mar 12, 2012 12:49 pm

Is there an updated remote interface spec for 6.3?
Hiatus
n00b
n00b
 
Posts: 4
Joined: Tue Feb 07, 2012 7:18 pm

Registered Newsbin User since: 06/13/05

Re: Remote control interface design

Postby Quade » Mon Mar 12, 2012 5:53 pm

I don't believe it changed much (if at all). Are you missing something? I believe I added a feature so Jonny could get better speed sampling.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby Hiatus » Mon Mar 12, 2012 6:25 pm

I was looking for the details on the new AUTH parameters as well as the speed sampling :) Thanks
Hiatus
n00b
n00b
 
Posts: 4
Joined: Tue Feb 07, 2012 7:18 pm

Registered Newsbin User since: 06/13/05

Re: Remote control interface design

Postby Quade » Mon Mar 12, 2012 6:35 pm

Got it.

Code: Select all
 private void
        OnConnect(object sender, EventArgs e)
        {

            int nResult = m_Command.ConnectServer(Properties.Settings.Default.IPAddress, int.Parse(Properties.Settings.Default.Port));
            StatusList.Items.Add(new ListViewItem(m_Command.GetReplyString()));
            if (480 == nResult)
            {
                String  sResponse = m_Command.GetReplyString();
                String[] Words = sResponse.Split(' ');
                String sSalt = Words[5];

                nResult = m_Command.AuthNew(Properties.Settings.Default.Password,sSalt);
                StatusList.Items.Add(new ListViewItem(m_Command.GetReplyString()));
                if (nResult < 0)
                {
                    return;
                }
            }
            bIsConnected = true;
....


So you connect and get a response from Newsbin. 5th word in is the salt


Code: Select all
       public int AuthNew( String sPass,String sSalt)
       {
           StringBuilder sKeyBuilder = new StringBuilder();
           sKeyBuilder.Append(sPass);
           sKeyBuilder.Append(sSalt);

           using (MD5 md5Hash = MD5.Create())
           {
               byte[] AsciiData = Encoding.ASCII.GetBytes(sKeyBuilder.ToString());

               byte[] data = md5Hash.ComputeHash(AsciiData, 0, AsciiData.Length);


               StringBuilder sBuilder = new StringBuilder();

               sBuilder.Append("AUTH ");
               for (int i = 0; i < data.Length; i++)
               {
                   sBuilder.Append(data[i].ToString("X2"));
               }
               SendCommand(sBuilder);
           }

           ReadResponse();
           Debug.Assert(m_nReplyCode < 299);
           if (m_nReplyCode > 299)
           {
           }
           return (m_nReplyCode);
       }


In AuthNew the salt is appended to the password. The result is hashed and sent to Newsbin in the auth request. So, there's a shared salt that unique per connection, a shared password with is the same on both sides. What this mechanism does is make it nearly impossible to do a "replay" attack where someone records the auth transaction and used the recorded key to gain access. Because the salt changes with each connection, the response to Newsbin changes with each connection too. It also means you don't have to store the Newsbin key on the device.


1 - Connect and get a 480 response that includes the salt.
2 - Extract the salt from the reply.
3 - Append the salt to the password.
4 - Hash and send the hex version of the hash in the auth commend
5 - Newsbin calculates the password/salt just like you did and compares the two.
If they match, you're authed.

Newsbin supports both the old and new auth method.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby Hiatus » Wed Mar 28, 2012 6:31 pm

Hi. Thanks again for the help so far. I have another question. What is the meaning of the columns returned by Downloads List?

I can infer some of them but no 100% on others. The details are not in the help page. Thanks!
Hiatus
n00b
n00b
 
Posts: 4
Joined: Tue Feb 07, 2012 7:18 pm

Registered Newsbin User since: 06/13/05

Re: Remote control interface design

Postby Quade » Thu Mar 29, 2012 1:40 am

Tabbed list:

Index,Subject,Size,UnixDate,<group> or <from>,Downloadpath,Unrar path,Progress Text,Status text, paused state - on or off.

"Index" is what you want to use to refer to it from other commands.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby vikinge » Wed May 02, 2012 12:47 pm

I tried to set a blank password with 6.31 and IOS 1.0.5.210
[11:44:10] DEBUG - 413 Newsbin Server 6.31 - Auth is enabled but, no password is set

then I set a four digit password on both newbin and ios and still cannot connect.
[11:44:29] DEBUG - 480 Newsbin Server 6.31 - B9D3A3A7933217B0 Need to authenticate
[11:44:29] DEBUG - 480 Newsbin Server 6.31 - B9D3A3A7933217B0 Need to authenticate

What version of newsbin and IOS works without regkey?
vikinge
n00b
n00b
 
Posts: 3
Joined: Sat Mar 12, 2005 1:36 pm

Registered Newsbin User since: 01/15/05

Re: Remote control interface design

Postby Jonny » Wed May 02, 2012 1:03 pm

All released versions of NBRemote require that you enter the Newsbin serial number in the computer settings as outlined in the first time setup guide:
https://sites.google.com/site/nbremote00/firstuse

The next version will only require the password to be entered.

Regards;
/jb
Jonny
Seasoned User
Seasoned User
 
Posts: 108
Joined: Sat Mar 15, 2003 8:25 pm

Registered Newsbin User since: 04/29/03

Re: Remote control interface design

Postby vikinge » Wed May 02, 2012 2:11 pm

OK. I have copied the key from email, I have tried passwords like 1111 or aaaa. And cannot get past Authentication failed. I did read there is a different between my problem
480 Authentication Failed - Auth <News....
480 Newsbin Server 6.31 xxxxxxx Need to authenticate
480 Newsbin Server 6.31 xxxxxxx Need to authenticate


And someone having these errors
401 - Authentication Failed - Auth <Newsbin Key> <Password>
480 - Authentication Failed - Auth <Newsbin Key> <Password>

But I am unsure what else to troubleshoot. I have logging set to Debug level and have no additional details.
vikinge
n00b
n00b
 
Posts: 3
Joined: Sat Mar 12, 2005 1:36 pm

Registered Newsbin User since: 01/15/05

Re: Remote control interface design

Postby Jonny » Wed May 02, 2012 3:12 pm

Is it when you press the Test connection button when you get this error?

Regards;
/jb
Jonny
Seasoned User
Seasoned User
 
Posts: 108
Joined: Sat Mar 15, 2003 8:25 pm

Registered Newsbin User since: 04/29/03

Re: Remote control interface design

Postby vikinge » Thu May 03, 2012 8:06 am

Yes!

Anything else I can do to TEST?
vikinge
n00b
n00b
 
Posts: 3
Joined: Sat Mar 12, 2005 1:36 pm

Registered Newsbin User since: 01/15/05

Re: Remote control interface design

Postby Jonny » Tue May 08, 2012 6:22 am

The serial number should be entered as is, with dashes, and note that the password is case sensitive, ie: aaaa does not match AAAA.

Regards;
/jb
Jonny
Seasoned User
Seasoned User
 
Posts: 108
Joined: Sat Mar 15, 2003 8:25 pm

Registered Newsbin User since: 04/29/03

Re: Remote control interface design

Postby ppan » Wed May 09, 2012 7:54 am

Is there some command to enable/disable a server?
ppan
Seasoned User
Seasoned User
 
Posts: 110
Joined: Mon Jun 20, 2011 6:49 pm

Registered Newsbin User since: 08/24/09

Re: Remote control interface design

Postby Jonny » Wed May 09, 2012 8:54 am

No. Why would you want that?

Regards;
/jb
Jonny
Seasoned User
Seasoned User
 
Posts: 108
Joined: Sat Mar 15, 2003 8:25 pm

Registered Newsbin User since: 04/29/03

Re: Remote control interface design

Postby Quade » Wed May 09, 2012 9:13 am

It could probably be built into the interface but, currently there's no support for it.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby ppan » Wed May 09, 2012 4:36 pm

Jonny wrote:No. Why would you want that?

Regards;
/jb

Because my ISP has "powerboost" which temporarily doubles the download speed from 16 Mbps to 32 Mbps for the first 10 MB of a new connection. Thus, by repeatedly disabling/enabling the server, I hope to double my download speed. I tried it manually just to check:
Image

I turned off (disabled) the server and then on (enabled) again repeatedly (valleys in graph) . Each time after enabling, my download speed transiently doubled (peaks in graph) . Unfortunately, doing it manually takes about 5 sec so the average speed does not increase in the example above. I need an automated way of disabling/enabling the server rapidly, and then repeat every 5-10 sec or so....

EDIT:
p.s. I am not sure yet if this will work. It could be that the ISP "measures" the time off, and don't increase the speed unless off for a few seconds. The only way to test would be to be able to rapidly disabling/enabling the server.
ppan
Seasoned User
Seasoned User
 
Posts: 110
Joined: Mon Jun 20, 2011 6:49 pm

Registered Newsbin User since: 08/24/09

Re: Remote control interface design

Postby Quade » Wed May 09, 2012 6:28 pm

Your news server might not like it too. News servers don't free up connections very quickly so, lots of disconnects can cause you to run out of connections.

This isn't something that belongs in the remote interface anyway. It's something that should be built into Newsbin.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby ppan » Fri May 11, 2012 5:29 am

Quade,

I tried the AutoMate scripting software as an automated way of disabling/enabling the server. The results are very encouraging. However, a problem is that I need to close and reopen the Server Options Window because there is no "Apply" button (only an "OK" button that closes the window).

If relatively easy, could you please add an "Apply" button to the Server Options Window [e.g. in the next beta]?

TIA!

p.s. Sorry for being off-Topic for this feature request that has nothing to do with the scripting interface. However, I thought that I would continue my post above rather than create a new post.
ppan
Seasoned User
Seasoned User
 
Posts: 110
Joined: Mon Jun 20, 2011 6:49 pm

Registered Newsbin User since: 08/24/09

Re: Remote control interface design

Postby guden » Wed Aug 08, 2012 3:16 am

Hello,
i am currently writing a program to remote control newsbin to autodownload series for me from various groups, so i downloaded the nbremote project from sourceforge.
But when i am using the nbremote project to connect to my local newsbin it pretty much ignores the password (it doesnt say it needs auth when i am connecting ? i am running newsbin 6.34 build 1886. is this because it is running on localhost?

My command sequence for finding and downloading is this:
<connect>
FilterAddGroupFilter normal
FilterSetAge <DaysToGoBack*24>
SearchLocal <DaysToGoBack> 0 <Search keyword>
LoadedList 1 <number of results>
LoadedDownload <ID of post from above list>

when connected, first time i send the filteraddgroupfilter i get a 400 command not recognized back, if i send the same command again right away after that i get a 200 filter addgroup - succeeded back, why is this, what am i doing wrong ?

Is there a better way of doing what i am doing above, loading specific group of groups and searching it going x days back and downloading what i need?

Also, is it possible to set what downloadfolder i want to use for the group, or better yet for the post i want to download ? i woult very much like the ability to move posts directly into the correct folders, if setting download folder is not possible currently i would love to see it in a future release!


Regards
Simon
guden
Occasional Contributor
Occasional Contributor
 
Posts: 14
Joined: Thu Jan 25, 2007 4:26 pm

Registered Newsbin User since: 05/02/06

Re: Remote control interface design

Postby Jonny » Wed Aug 08, 2012 7:41 am

The code on SourceForge didn't support running on the local machine, which is the reason you had a 400 response. Basically the client went out of sync with Newsbin.

I have released a new version that addresses that problem among with some other problems.

Regards;
/jb
Jonny
Seasoned User
Seasoned User
 
Posts: 108
Joined: Sat Mar 15, 2003 8:25 pm

Registered Newsbin User since: 04/29/03

Re: Remote control interface design

Postby Quade » Wed Aug 08, 2012 10:11 am

Yeah, localhost doesn't need a password. This was to support some legacy apps that use the old TCP interface.

I'll have to look into the download folder things.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 36280
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Remote control interface design

Postby guden » Wed Aug 08, 2012 11:15 am

Quade wrote:I'll have to look into the download folder things.


That would be great!
It is the same as the "Download to new folder" and "Download to existing folder" functions available in newsbin.

Regards
Simon
guden
Occasional Contributor
Occasional Contributor
 
Posts: 14
Joined: Thu Jan 25, 2007 4:26 pm

Registered Newsbin User since: 05/02/06

Re: Remote control interface design

Postby guden » Thu Aug 09, 2012 12:11 pm

Hello again,

A boolean telling if a result from the 'LoadedList' is complete or incomplete would be greatly appreciated!

Regards
Simon
guden
Occasional Contributor
Occasional Contributor
 
Posts: 14
Joined: Thu Jan 25, 2007 4:26 pm

Registered Newsbin User since: 05/02/06


Return to Newsbin Remote Control

Who is online

Users browsing this forum: No registered users and 1 guest