New Add-on: Minimal Calibre Library HA COPS šŸ“š

I have noticed an issue with recent version of HA COPS where epub and mobi files cannot be downloaded from the web interface - instead the content of the file is being handled by COPS code as an error (most easily seen in the bootstrap5 template). Reloading the page when the odd characters are displayed results in the file being downloaded.

Downloading book files from the OPDS feed is not affected - this works as expected.

This appears to have arisen in a pre 2.0 version of HA COPS - I hope to have a fix soon.

Brilliant work on this, thank you @dunxd !

Bit of a strange issue …

I set this up a few days back, accessed the server via the web address no issue. Set up email to kindle in the browser (I’d already set it up within configuration options for the HA app itself and tested that from a pc).

Email to kindle however simply doesn’t work. I click ont he book, click the mail icon and get ā€œ404 Not Foundā€ nginx.

Not aware I changed any settings. My kindle email address does work. So not sure what the issue could be.

Any insight/suggestions would be gladly received!

Thank you so much in advance.

NB - from Logs I can see it is navigating to an ā€˜empty.php’ address, but cannot see why this would be.

e.g.

[03/Mar/2026:11:35:53 +0000] ā€œGET /books/270/Aesop/empty.php HTTP/1.1ā€ 404 146 ā€œhttp://192.168.15.133:8000/books/270/Aesop/Fablesā€

Also…

I noticed at first I had the option of an overlay when selecting a book, this has gone.

And finally, when opening a book to read within the web browser itself, how does one exit the book, without going back to the original address? I can’t see an ā€˜exit’ link anywhere.

Version 2.2 just released. This incorporates COPS 4.3.1 which fixes the downloading of book files. I’ve also switched to using S6-Overlay method for managing the services within HA COPS. This may not be something you notice, but it should make the service more reliable and possibly perform a bit better. I would appreciate any feedback on this version.

Thanks for your message - I’m glad you are enjoying HA COPS.

The mail link points to empty.php but the javascript that actually sends the book by email should activate when opening the link, and empty.php should never be opened. If you are getting this it is possible that your browser is not handling javascript, which would also explain why the book isn’t getting sent. I am unable to replicate what you describe in my testing, so it could be something your end. I would not expect v2.2 just released to resolve your issue.

Do you know of a reason why your browser may not be handling Javascript? Go to https://www.whatismybrowser.com/ which will detect what is going on with your browser including whether javascript is working.

If you go to https://www.whatismybrowser.com/detect/what-is-my-user-agent/ and then copy your Browser agent string and share it here, that would be helpful.

I’ve just discovered a bug in the rsync server - I’ll get this fixed soon.

2.2.1 fixes the rsync bug

2.2.2 released to fix the permissions for files and folders added using rsync. This prevented metadata.db from being visible if it had been added after 2.2 and probably prevented downloading newly added books.

If you started using this app since 2.2 and used rsync to sync your calibre library and are seeing the error message about missing metadata.db you should first try rsyncing your files again. Leave a message here in case that doesn’t fix it.

It’s a bit odd really, I’m just using the kindle’s in-built experimental browser…it did work, until it didn’t the next day, without any changes in between. Unless there were some updates / changes in the background?..

I’ve actually exchanged my device for one that fortunately came without having been previously updated/registered so now jailbroken :smiley: This means I can use KOReader, which is far preferable to be honest.

My browser info is as follows though (still doesn’t work on replacement kindle… A paperwhite 2024):

Mozilla/5.0 (X11; U; Linux armv7l like Android; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/533.2+ Kindle/3.0+

I will test the Kindle Experimental Browser again - its support of JavaScript is quite out dated and quirky so its possible that an update to code had this impact. As far as i am aware the experimental browser on the latest model is the same as the one on my 2012 Kindle Paperwhite. Support for Kindle browser is still important for this project - I’ll get it working again. However…

If you are using koreader, as i now do, i recommend the OPDS feed for downloading books. You can also sync reading progress if you enable the korrosync server in the app configuration.

I am unable to reproduce this in the Experimental Web Browser on my 2012 Kindle Paperwhite while running HA COPS 2.2.2.

Is it possible you have inadvertantly disabled JavaScript in the browser? Check in the Browser Settings menu where Javascript can be toggled.

While Javascript is not required for browsing HA COPS it relies on it for setting and reading cookies and sending emails.

I would not expect the web reader to work on Kindle Browser whether JavaScript is enabled or not. On the Kindle Browser the function of the COPS website is getting books onto the Kindle - either through downloading mobi format books to it directly or using the email function to send epub format books to your kindle email address.

I’ve definitely not disabled Java…

The web browser reader does actually work interestingly enough.

Honestly, now that I have a jailbroken kindle with KOReader I’m a happy chappy thank you!

Next step for myself - find a way to get this working with Audiobookshelf for synchronization!

I make use of the HA Audiobookshelf server app and I see there is an interesting project in the works ā€˜abs-kosync-bridge’ if you were ever interested in taking a look.

The synchronisation project:

The ABS home assistant app I’m using: