From 039765e1de0288be9847794be62befa345c6abbb Mon Sep 17 00:00:00 2001 From: Jerad Meisner Date: Sat, 3 Mar 2018 21:31:15 -0800 Subject: [PATCH 1/6] Updated documentation for SABnzbd. --- source/_components/sabnzbd.markdown | 124 +++++++++++++++++++++ source/_components/sensor.sabnzbd.markdown | 61 +--------- 2 files changed, 127 insertions(+), 58 deletions(-) create mode 100644 source/_components/sabnzbd.markdown diff --git a/source/_components/sabnzbd.markdown b/source/_components/sabnzbd.markdown new file mode 100644 index 000000000000..280346976bee --- /dev/null +++ b/source/_components/sabnzbd.markdown @@ -0,0 +1,124 @@ +--- +layout: page +title: "SABnzbd" +description: "Instructions how to integrate SABnzbd within Home Assistant." +date: 2018-03-03 19:09 +sidebar: true +comments: false +sharing: true +footer: true +logo: sabnzbd.png +ha_category: Downloading +ha_release: 0.65 +ha_iot_class: "Local Polling" +--- + + +The `sabnzbd` component will allow you to monitor and control your downloads with [SABnzbd](https://sabnzbd.org) from +within Home Assistant and setup automations based on the information. + +If SABnzbd is discovered on your network you can enter your API Key in the Configurator Press "CONFIGURE" to do it. + +

+ +

+ +This will create services for interacting with SABnzbd in scripts and automations, but no sensors will be created. + + +To configure SABnzbd, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sabnzbd: + api_key: YOUR_SABNZBD_API_KEY +``` + +{% configuration %} +api_key: + description: The API key used to interact with your SABnzbd instance + required: true + type: string +host: + description: The hostname of your SABnzbd instance, eg. 192.168.1.32. + required: false + default: localhost + type: string +name: + description: The name of your SABnzbd instance (this will be the prefix for all created sensors). + required: false + default: SABnzbd + type: string +port: + description: The port on which your SABnzbd instance is listening. + required: false + default: 8080 + type: integer +scan_interval: + description: How often (in seconds) to poll SABnzbd for updates. + required: false + default: 30 + type: integer +sensors: + description: List of variables for which to create sensor entities. + required: false + type: list +ssl: + description: Set to true to use ssl (https) to access SABnzbd. + required: false + default: false + type: boolean +{% endconfiguration %} + +Available sensors are: + + * `current_status`: The current status of SABnzbd (Idle, Paused, etc.) + * `speed`: The current download speed + * `queue_size`: The total size of the download queue + * `queue_remaining`: The remaining size of the download queue + * `disk_size`: The total disk size at SABnzbd's download location + * `disk_free`: The available disk space at SABnzbd's download location + * `queue_count`: The number of items in the download queue + * `day_size`: GB downloaded today + * `week_size`: GB downloaded this week + * `month_size`: GB downloaded this month + * `total_size`: Total GB downloaded + +## {% linkable_title Full examples %} + +```yaml +# Example configuration.yaml entry +sabnzbd: + api_key: YOUR_SABNZBD_API_KEY + host: 192.168.1.32 + name: sab + port: 9090 + scan_interval: 60 + ssl: true + sensors: + - current_status + - speed + - queue_size + - queue_remaining + - disk_size + - disk_free + - queue_count + - day_size + - week_size + - month_size + - total_size +``` +This will attempt to access your SABnzbd instance at https://192.168.1.32:9090 and will create sensors named +`sensor.sab_status`, `sensor.sab_speed`, etc. + +## {% linkable_title Services %} + +### {% linkable_title Media control services %} +Available services: `pause`, `resume`, `set_speed`. + +#### {% linkable_title Service `sabnzbd/set_speed` %} + +| Service data attribute | Optional | Description | +|------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `speed` | yes | Sets the download speed limit. If specified as a number with no units, will be interpreted as percent. If units are provided (eg. 500K) will be interpreted absolutely. Defaults to 100 | + diff --git a/source/_components/sensor.sabnzbd.markdown b/source/_components/sensor.sabnzbd.markdown index 27766435fd98..8175138b34cd 100644 --- a/source/_components/sensor.sabnzbd.markdown +++ b/source/_components/sensor.sabnzbd.markdown @@ -1,7 +1,7 @@ --- layout: page title: "SABnzbd" -description: "Instructions on how to integrate SABnzbd within Home Assistant." +description: "Instructions how to integrate SABnzbd within Home Assistant." date: 2015-03-23 19:59 sidebar: true comments: false @@ -14,61 +14,6 @@ ha_iot_class: "Local Polling" --- -The `sabnzbd` platform will allow you to monitor your downloads with [SABnzbd](http://sabnzbd.org) from within Home Assistant and setup automation based on the information. +The `sabnzbd` sensor platform will allow you to monitor your downloads with [SABnzbd](http://sabnzbd.org) from within Home Assistant. -If SABnzbd is discovered on your network you can enter your API Key in the Configurator Press "CONFIGURE" to do it. - -

- -

- -This will enable a minimal setup where `sensor.sabnzbd_status` is enabled. - - -For more advanced usage, add the following to your `configuration.yaml` file: - -```yaml -# Example configuration.yaml entry -sensor: - platform: sabnzbd - host: YOUR_SABNZBD_HOST - api_key: YOUR_API_KEY - monitored_variables: - - 'current_status' - - 'speed' - - 'queue_size' - - 'queue_remaining' - - 'disk_size' - - 'disk_free' - - 'queue_count' -``` - -Configuration variables: - -- **host** (*Required*): The host where your SABnzbd instance is running, eg. 192.168.1.32 -- **port** (*Optional*): The port to use with SABnzbd instance. Defaults to `8080`. -- **api_key** (*Required*): Name that will be used in the frontend for the pin. -- **name** (*Optional*): The name to use when displaying this SABnzbd instance. -- **ssl** (*Optional*): Use `https` instead of `http` to connect. Defaults to False. -- **monitored_variables** array (*Required*): List of the monitored variables. - - **current_status**: Current status of the SABnzbd instance - - **speed**: Current speed. - - **queue_size**: Size of the queue - - **queue_remaining**: Remaining elements in the queue - - **disk_size**: Disk size of the storage location - - **disk_free**: Free disk space at the storage location - - **queue_count**: Number of items in the queue - -Note that this will create the following sensors: - -``` - - sensor.sabnzbd_status - - sensor.sabnzbd_speed - - sensor.sabnzbd_queue - - sensor.sabnzbd_left - - sensor.sabnzbd_disk - - sensor.sabnzbd_disk_free - - sensor.sabnzbd_queue_count -``` - -As always, you can determine the names of sensors by looking at the dev-state page `< >` in the web interface. +To add SABnzbd sensors, please follow the instructions for the [SABnzbd component](/components/sabnzbd). From 69ebab5863a2f14d1a6dc6081a048c6d574732ff Mon Sep 17 00:00:00 2001 From: Jerad Meisner Date: Mon, 5 Mar 2018 19:37:30 -0800 Subject: [PATCH 2/6] Added a period --- source/_components/sabnzbd.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/sabnzbd.markdown b/source/_components/sabnzbd.markdown index 280346976bee..232d773d0b90 100644 --- a/source/_components/sabnzbd.markdown +++ b/source/_components/sabnzbd.markdown @@ -17,7 +17,7 @@ ha_iot_class: "Local Polling" The `sabnzbd` component will allow you to monitor and control your downloads with [SABnzbd](https://sabnzbd.org) from within Home Assistant and setup automations based on the information. -If SABnzbd is discovered on your network you can enter your API Key in the Configurator Press "CONFIGURE" to do it. +If SABnzbd is discovered on your network you can enter your API Key in the Configurator. Press "CONFIGURE" to do it.

From d148814df3175bd6287ee6bf7874891b9ceef9c8 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 23 Mar 2018 21:15:48 +0100 Subject: [PATCH 3/6] :pencil2: Tweaks --- source/_components/sabnzbd.markdown | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/_components/sabnzbd.markdown b/source/_components/sabnzbd.markdown index 232d773d0b90..ff67f331b434 100644 --- a/source/_components/sabnzbd.markdown +++ b/source/_components/sabnzbd.markdown @@ -1,7 +1,7 @@ --- layout: page title: "SABnzbd" -description: "Instructions how to integrate SABnzbd within Home Assistant." +description: "Instructions on how to integrate SABnzbd with Home Assistant." date: 2018-03-03 19:09 sidebar: true comments: false @@ -9,15 +9,14 @@ sharing: true footer: true logo: sabnzbd.png ha_category: Downloading -ha_release: 0.65 +ha_release: 0.66 ha_iot_class: "Local Polling" --- - The `sabnzbd` component will allow you to monitor and control your downloads with [SABnzbd](https://sabnzbd.org) from within Home Assistant and setup automations based on the information. -If SABnzbd is discovered on your network you can enter your API Key in the Configurator. Press "CONFIGURE" to do it. +If SABnzbd is discovered on your network, you can enter your API Key in the Configurator. Press "CONFIGURE" to do it.

@@ -40,7 +39,7 @@ api_key: required: true type: string host: - description: The hostname of your SABnzbd instance, eg. 192.168.1.32. + description: The hostname of your SABnzbd instance, e.g., 192.168.1.32. required: false default: localhost type: string @@ -64,7 +63,7 @@ sensors: required: false type: list ssl: - description: Set to true to use ssl (https) to access SABnzbd. + description: Set to true to use SSL (https) to access SABnzbd. required: false default: false type: boolean @@ -120,5 +119,5 @@ Available services: `pause`, `resume`, `set_speed`. | Service data attribute | Optional | Description | |------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `speed` | yes | Sets the download speed limit. If specified as a number with no units, will be interpreted as percent. If units are provided (eg. 500K) will be interpreted absolutely. Defaults to 100 | +| `speed` | yes | Sets the download speed limit. If specified as a number with no units, will be interpreted as a percent. If units are provided (e.g., 500K) will be interpreted absolutely. Defaults to 100 | From b48aaef953e8ed6f05b14e641e6938027d4cb37c Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 6 Apr 2018 18:53:42 +0200 Subject: [PATCH 4/6] :arrow_up: ha_release -> 0.68 --- source/_components/sabnzbd.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/sabnzbd.markdown b/source/_components/sabnzbd.markdown index ff67f331b434..f510ca88a896 100644 --- a/source/_components/sabnzbd.markdown +++ b/source/_components/sabnzbd.markdown @@ -9,7 +9,7 @@ sharing: true footer: true logo: sabnzbd.png ha_category: Downloading -ha_release: 0.66 +ha_release: 0.68 ha_iot_class: "Local Polling" --- From a750f150a087755bbe5252bd9ce8405ad6c06f2f Mon Sep 17 00:00:00 2001 From: Jerad Meisner Date: Mon, 7 May 2018 08:52:16 -0700 Subject: [PATCH 5/6] Keep sensor page with link to component. Fix merge conflict from #5230 --- source/_components/sabnzbd.markdown | 8 +------- source/_components/sensor.sabnzbd.markdown | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/source/_components/sabnzbd.markdown b/source/_components/sabnzbd.markdown index f510ca88a896..40e595cb3990 100644 --- a/source/_components/sabnzbd.markdown +++ b/source/_components/sabnzbd.markdown @@ -9,7 +9,7 @@ sharing: true footer: true logo: sabnzbd.png ha_category: Downloading -ha_release: 0.68 +ha_release: 0.69 ha_iot_class: "Local Polling" --- @@ -53,11 +53,6 @@ port: required: false default: 8080 type: integer -scan_interval: - description: How often (in seconds) to poll SABnzbd for updates. - required: false - default: 30 - type: integer sensors: description: List of variables for which to create sensor entities. required: false @@ -92,7 +87,6 @@ sabnzbd: host: 192.168.1.32 name: sab port: 9090 - scan_interval: 60 ssl: true sensors: - current_status diff --git a/source/_components/sensor.sabnzbd.markdown b/source/_components/sensor.sabnzbd.markdown index 8175138b34cd..627379399ec5 100644 --- a/source/_components/sensor.sabnzbd.markdown +++ b/source/_components/sensor.sabnzbd.markdown @@ -1,7 +1,7 @@ --- layout: page -title: "SABnzbd" -description: "Instructions how to integrate SABnzbd within Home Assistant." +title: "SABnzbd Sensor" +description: "Instructions on how to integrate SABnzbd with Home Assistant." date: 2015-03-23 19:59 sidebar: true comments: false From bf8330b9bfb61c4cd9ea440b2e9c1968f0482d58 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 16 May 2018 19:21:09 +0200 Subject: [PATCH 6/6] :arrow_up: ha_release -> 0.70 --- source/_components/sabnzbd.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/sabnzbd.markdown b/source/_components/sabnzbd.markdown index 40e595cb3990..16e665b60021 100644 --- a/source/_components/sabnzbd.markdown +++ b/source/_components/sabnzbd.markdown @@ -9,7 +9,7 @@ sharing: true footer: true logo: sabnzbd.png ha_category: Downloading -ha_release: 0.69 +ha_release: 0.70 ha_iot_class: "Local Polling" ---