I wanted to make my Calibre library easily available in my home, so my kids and vistors can browse my ebook collection and download any books they want to read. Since my HA server is always up and running, it felt like the right place to host the library.
The Add-on is based on COPS, a lightweight Calibre library web application built using PHP. You can browse your collection by author, title or tag through a web browser or an OPDS feed reader such as Moon+ or Librera and directly download them onto your ebook reader. You can also read ePub format books through an embedded web reader.
To keep things small and simple, the add-on uses the PHP built in web-server. In order to make it easier to get the library files onto the HA server, it also includes rsync. This is then used to copy the Calibre library folder into the /media folder on the HA server (seemed appropriate).
This is my first Home Assistant Add-on so I would really appreciate feedback and suggestions.
Thanks also to Mike’s Pub Organisation for updating COPS for compatibility with PHP 8, as well as rounding up various bug fixes and improvements made by other contributors.
Neat. This is a lighter version of the calibre-web application Alex converted? This has been on my list for a while to setup. https://github.com/alexbelgium/hassio-addons/tree/master/calibre_web
Yes - it is lighter weight than the full Calibre-web, which was the original motivation for Seb Lucas in creating COPS. It uses very little resource and most eBooks are very small compared to video or audio. I have 314 books in my library so far, including a few comic books which are larger - takes up 1.7 Gb. Probably better suited if your data drive is not an SD card.
I just released a new version of this add-on (well, actually several since my last post).
With the addition of support for Network Storage in Home Assistant 2023.5 it is now easy to access your library through this addon if it is stored on network attached storage.
You can still use library files stored on the Home Assistant server as before.
I have also made some improvements, and integrated recent bug fixes and improvements made to COPS by Mike’s Pub Organisation.
I just released a new version (1.9) that allows sending ePub’s via email directly from the server. This gives another way to get books onto Kindle (using Kindle email addresses) amongst other things.
Version 1.12 released today, which incorporates the most recent COPS release (1.4.5) as well as some template tweaks to bootstrap5 (need a better name!).
Version 1.13 released today. This incorporates a massive update to the backend code for COPS, and improvements to the bootstrap5 template, and fixes for functionality on Kindle eInk readers through the “Experimental” web browser.
Click this link to upgrade if you already installed
Follow the instructions in the first post to install.
Only a day later, and 1.15 is out. I fixed a bug where the customisation page was not working on Kindle experimental browser and also made the radio and check boxes larger on the kindle.
For users of Kindle Paperwhite, I recommend switching to the Default theme and Kindle style for easier usage.
I did look into Ingress support when I first made the add-on. Two things held me back:
I really wanted to be able to access my library from my Kindle. Kindle cannot handle the Home Assistant web page so it needs direct access, and Ingress only allows access via the internal home assistant IP address - not external clients.
The add-on includes an rsync server for copying your Calibre library into the HA server’s media folder - I wanted to store my library there rather than keep my laptop on all the time. Again, this is prevented by the Ingress requirement to only allow internal network communication.
There may well be workarounds for these things. I just wasn’t compelled to seek them out yet.
If you let me know why you want Ingress I will take another look and see if I can figure it out.
Version 1.19 just released. This incorporates changes in COPS 2.5.0, including:
switching to new epub reader Inity for in browser reading. This looks much better than the previous monocle browser, with a nice Table of Contents sidebar, bookmarking, notes and customisability. Settings persist with local browser storage, but will not be shared between different browsers/devices.
I have not implemented virtual library support in HA COPS as I have not yet figured out how to make it work with current mechanism for syncing calibre to the HA server filestore. I will look into this further if users let me know they are interested.
Initity epubbrowser looks really good - but not in Chrome on Android (and possibly other mobile browsers). I’m reverting to Monocle until this is fixed, which I plan to work on. So version 1.20 of this add-on is now released.
Includes update to COPS 2.6.1 and incorporation of Inity epubjs for in-browser reading. This is now set as the default but you can switch back to monocle through the configuration page.