SABnzbd for LCDSmartie

Usage: $dll(SABnzbd4LCDSmartie.dll,Function,Param1 ,Param2 )

1. Copy SABnzbd4LCDSmartie.dll and Newtonsoft.Json.dll to your plugin directory.
2. Edit lcdsmartie.exe.config (located in the main LCDSmartie folder) and edit the parameters as needed. I'll explain it more later in this documentation.

Description:
The Plugin enables LCDSmartie to read different stats directly from a local or remote SABnzbd client. The following functions are currently implemented:

Function 1
Usage: $dll(SABnzbd4LCDSmartie.dll,1,,)
Returns current SABnzbd status. This is "Downloading" if anything is being downloaded. Can be used in actions to switch to a specific screen or to disable/enable screens.
Function 2
Usage: $dll(SABnzbd4LCDSmartie.dll,2,,)
Returns current download speed without any spaces. Normally, the received download speed is returned like "#.# M" or "### K". As I only have a small display and space is limited I wrote this function that will strip the empty space. So the function will deliver #.#M instead of #.# M, saving one valuable space.

Function 10
Usage: $dll(SABnzbd4LCDSmartie.dll,10,<Item>,<Replace invalid chars>)
Returns the specified value.
You can choose any item from the main list from SABnzbds "Advanced Queue Output" (not any sub items). If you set <replace invalid chars> to 1 the function will also replace some chars that cannot be displayed on some LCD-Screens.

Function 11
Usage: $dll(SABnzbd4LCDSmartie.dll,11,<Item>,<Replace invalid chars>)
Returns the specified value.
You can choose any sub item that is part of the "slots"-values from SABnzbds "Advanced Queue Output". It will then return that value for the Item currently downloading. If there are no downloads going on, it will return "No Download"
If you set <replace invalid chars> to 1 the function will also replace some chars that cannot be displayed on some LCD-Screens.

All settings are specified in the "lcdsmartie.exe.config" file located in LCDSmarties main directory. These have to be added right below the <configuration>-tag (normally you'll have to enter the values directly after the first line. If you already have a <appSettings>-section in your file, just add the values in the section.

 

<configuration>

 <appSettings>
  <add key="SABnzbd4LCDSmartie.Host" value="xxx.xxx.xxx.xxx"/>
  <add key="SABnzbd4LCDSmartie.Port" value="xxxx"/>
  <add key="SABnzbd4LCDSmartie.User" value="<User>"/>
  <add key="SABnzbd4LCDSmartie.Pass" value="<Password>"/>
  <add key="SABnzbd4LCDSmartie.ApiKey" value="<ApiKey>"/>
  <add key="SABnzbd4LCDSmartie.Refresh" value="5"/>
  <add key="SABnzbd4LCDSmartie.RefreshInt" value="500"/>
 </appSettings>

<startup useLegacyV2RuntimeActivationPolicy="true">
...
...
...

 

Host Hostname or IP-Address of the machine running SABnzbd
It's 127.0.0.1 if it's running on the same machine as LCDSmartie
Port Port SABnzbd is using.
Normally 8080
User

Username that has to be entered to access SABnzbd
Leave empty if nothing has been set

Pass

Password that has to be entered to access SABnzbd
Leave empty if none has been set

Refresh Specifies how many seconds to wait until new information is fetched from SABnzbd. The plugin will cache the information in memory until then.
That means that you can call the plugin so often you would like to without producing more CPU-Load than necessary. You can use the plugin 3 times in one screen, but it still only gets new information once every 5 seconds from SABnzbd.
RefreshInt How often LCDSmartie will ask the plugin for new data.

Hints:
- I've also included a sample lcdsmartie.exe.config in the download


You can use the following Items in Function 10:
cache_limit
paused
new_rel_url
restart_req
helpuri
uptime
refresh_rate
isverbose
start
version
diskspacetotal2
color_scheme
darwin
nt
status
last_warning
have_warnings
cache_art
finishaction
noofslots
cache_size
finish
new_release
pause_int
mbleft
diskspace2
diskspace1
diskspacetotal1
timeleft
mb
newzbinDetails
eta
nzb_quota
loadavg
limit
kbpersec
speedlimit
webdir
queue_details

 

You can use the following Items for function 11:
status
index
eta
timeleft
avg_age
script
msgid
verbosity
mb
filename
priority
cat
mbleft
percentage
nzo_id
unpackopts
size 

Examples:

$dll(SABnzbd4LCDSmartie.dll,11,filename,2)

Will return the filename of the active download.

$Bar($dll(SABnzbd4LCDSmartie.dll,11,percentage,2),100,16)

Will display a progress bar showing how far your current download is (16 chars wide)

$dll(Scroller.dll,1,$dll(SABnzbd4LCDSmartie.dll,11,filename,2),11#1)$Right($dll(SABnzbd4LCDSmartie.dll,2,,),$5%)

You can also combine it with my Scroller.dll (also available for download here on CodePlex) so that it shows your current download scrolling on the first 11 chars of your display and the download speed on the other 5 chars. You will have to change the values if you display is wider than 16 chars:


DONATE

I wrote this plugin (and more plugins to come) in my free time. If you like my plugins, it would be nice if you would buy me a beer.

Last edited Jul 29, 2012 at 4:49 PM by IzeQube, version 5

Comments

No comments yet.