Skip to content

Adds sensors for an Audiobookshelf server to Home Assistant to show connection and active sessions

License

Notifications You must be signed in to change notification settings

wolffshots/hass-audiobookshelf

Repository files navigation

Audiobookshelf

GitHub Release GitHub Activity License

pre-commit Black

hacs_badge Project Maintenance BuyMeCoffee

This component will set up the following general sensors:

Entity Type Description
open_sessions sensor Show number of open audio sessions
libraries sensor Number of libraries on the server
users sensor Number of users on the server

It also adds the following library specific sensors (for each library that it finds during setup):

Entity Type Description
items sensor Number of items in the library
duration sensor Total time in hours of playable content in library
size sensor Total disk space used by library in GB

Examples

Example of sensors on device

Installation

Installation with HACS

  1. Make sure you have HACS fully set up (if you don't you can do so here)
  2. Open up HACS in you Home Assistant instance and search for "Audiobookshelf" and add it
  3. Restart Home Assistant once it is installed
  4. In the Home Assistant UI go to "Configuration" -> "Integrations" click "+" and search for "Audiobookshelf"
  5. Click on "Audiobookshelf" and proceed to Configuration

Manual installation

  1. Using the tool of choice open the directory (folder) for your Home Assistant configuration (where you find configuration.yaml)
  2. If you do not have a custom_components directory (folder) there, you need to create it
  3. Download the Audiobookshelf_vX.X.X.zip file from the latest release
  4. Unzip the folder and place it into custom_components
  5. Restart Home Assistant
  6. In the Home Assistant UI go to "Configuration" -> "Integrations" click "+" and search for "Audiobookshelf"
  7. Click on "Audiobookshelf" and proceed to Configuration

Configuration

Getting an access token

  1. Log in as the admin user
  2. Go to Settings > Users
  3. Click on the account
  4. Copy the API Token from beneath the user's name

For more info on what the token can be used for see: https://api.audiobookshelf.org/#introduction

Setting up via the UI

Config in UI

Variable Description
URL The URL and port of your Audiobookshelf instance (must start with the protocol, http:// or https://)
API key The API key that you got in the previous step
Scan interval How regularly the data should be fetched from your Audiobookshelf instance (in seconds), defaults to 300s

Credits

This project was generated from @oncleben31's Home Assistant Custom Component Cookiecutter template.

Code template was mainly taken from @Ludeeus's integration_blueprint template