shermp / Kobo-UNCaGED

UNCaGED, for Kobo devices
GNU Affero General Public License v3.0
93 stars 7 forks source link

Clara 2E support? #51

Closed cal-87364 closed 1 month ago

cal-87364 commented 1 year ago

Hi all:

I'm a relatively new e-reader owner and trying to find my way concerning content management self-hosting etc... I've run into this info about the KU project and it sounds like an exciting fit for me. I've installed NickelMenu, NickelDBus and the latest KU and believe I've confirmed from ku.log that the Clara 2E is unsupported.

I don't have the skills to contribute code, but I do have the skills to test. Curious whether there's any planned support for the Clara 2E?

Thanks!

pgaskin commented 1 year ago

IIRC, that's since I haven't updated koboutils for the 2E yet. I've been neglecting it for a bit, but if you want, I'll accept a PR to finish it up.

pgaskin commented 1 year ago

@NiLuJe started one: https://github.com/pgaskin/koboutils/pull/8

cal-87364 commented 1 year ago

@pgaskin @NiLuJe Awesome! Thank you! Looking forward to testing.

graymouser commented 11 months ago

Thanks for working on this @pgaskin & @NiLuJe ! I am also interested in this and have some coding background, if there's anything I could do to help please let me know. I don't have a Elipsa & Elipsa 2E unfortunately, just a Clara 2E

cal-87364 commented 10 months ago

@pgaskin @NiLuJe Just checking in. I lack the skills and environment to cross compile this project from source - not sure if work is complete and there's something, somewhere I should be giving a try? Like graymouser, I only have a Clara 2E. Cheers!

rafael-munoz commented 7 months ago

@pgaskin @NiLuJe Any news about this? I have a Clara 2E also and can test it if necessary

cal-87364 commented 2 months ago

@pgaskin @NiLuJe Hi there - any news?

pgaskin commented 2 months ago

koboutils has the required changes; KU just needs to update the dependency

shermp commented 2 months ago

Hi. I'll try and update this weekend. I'm sorry that I haven't been keeping on top of this, I just haven't had any motivation to work on KU for a long time now. (I have started about two or three re-writes to date, but none have got very far).

I accept PR's though if anyone wants to help improve it.

SmatMan commented 2 months ago

I can send in a pull request if all that is required is a dependency upgrade, let me do that now

SmatMan commented 2 months ago

I updated koboutils to v2.2.0, and built kobo-uncaged, however it fails to install NickelDBus upon launch. Not sure if this is due to my device (Libra Colour). I'll send a PR for the dep upgrade though

SmatMan commented 2 months ago

I see https://github.com/shermp/NickelDBus/issues/19 talks about this issue with the Kobo Libra Colour, so maybe these changes to kobo-UNCaGED will work for other devices.

SmatMan commented 2 months ago

Installing the latest build of NickelDBus from Github Actions finally allows UNCaGED to bypass the automatic installation, however it does not run. Maybe there's something interesting in the logs- though I can't locate them for the life of me.

This issue isn't about the Libra Colour however, hopefully the simple dependency upgrade works for the Clara 2E

cal-87364 commented 2 months ago

Hi all - I'm excited to see the activity in the thread. As mentioned in the OP - I don't have developer skills. Because there are no new releases indicated on the code page since 9-Apr-2022, is it safe to assume that there's nothing which I can install and test as a pure user just yet? Thanks for your donated time and effort @SmatMan @shermp

SmatMan commented 2 months ago

@cal-87364 you can try downloading the updates I made from my fork: https://github.com/SmatMan/Kobo-UNCaGED/actions/runs/9616988263

You should be able to scroll down to artifacts on that link and get the zip to copy to your kobo. I think for the Clara 2E it should work fine, let me know though!

shermp commented 2 months ago

Hi, I've approved the workflow run on the PR. Please test the latest artifact. If it works, I'll tag a new release.

cal-87364 commented 2 months ago

@SmatMan Thanks!

I have downloaded and installed. It appears to run without any errors. I am not at home, but I am at a location which can connect to my calibre server over site-to-site VPN (but I can't rely on server autodiscovery) e.g. it's not on the same network but is reachable. I have hardcoded the numerical IP addr and port of my calibre content server so DNS isn't required. The kobo displays a timeout error after attempting connection. A PC on the same Wifi using the same numerical IP and port connects to the calibre server just fine.

I am assuming I am supposed to be pointing the kobo to the HTTP (not HTTPS) content server port (my install defaulted to port 8081) and not the calibre administration port (defaulted to port 8080)? I have also tried disabling user authentication on the content server (it's not exposed to the Internet so it doesn't matter for testing). My firewall logs the connection from kobo to calibre and permits it.

I will keep testing and working through ideas on my own. It's possible that if I was at home this would be working. For what it's worth, my calibre server runs in a docker container in my homelab.

Worst case it will be several days and I can test back at home from local wifi after a few days' holiday.

Thanks again @SmatMan and @shermp for your donated time and effort on this. If you have any suggestions on my connection failure I'm all ears. I'm not convinced that this isn't a "me" problem with a special case network connection just yet, so I cannot declare it "working" or "non-working". (Or perhaps I've misunderstood how it's supposed to integrate entirely)

shermp commented 2 months ago

Hi @cal-87364

KU uses the wireless device connection, not the content server, and it is raw TCP, not HTTP(s). When enabling the wireless device connection in Calibre, there is an option to set a fixed port that you can use.

cal-87364 commented 2 months ago

@shermp Ha! Well that explains my trouble. Seems to work perfectly once I knew what I was trying to do. I've never used a fully functioning calibre connection with an e-reader so I'm still getting the hang of the extra features I get this way. Downloading through browser+calibre-web was not syncing lots of information I wanted (especially Series info) so this will be fantastic for the way I use my device.

Thank you, both! @SmatMan

SmatMan commented 2 months ago

Glad it's working for you! Hopefully it should work on my device- will test tomorrow.

cal-87364 commented 2 months ago

I'll echo another round of thanks for @shermp and @SmatMan - since I got my first ereader ~1 year ago I've been unable to use Series information based on the way I have deployed calibre in my homelab. And I read mostly series. So this is a fantastic new experience.

After puttering around with things for a few days I can only report two persistent problems, and I'm not sure that either is KU, but I'll briefly describe them here just in case. I'm new to calibre in general and a lot of the advice out there online has changed over the long time and many versions of calibre which are out there. I realize this isn't a place for general calibre support, but I'm unsure if these issues could be related to KU. If there's no possibility, I'll pursue here no further. If there is a chance this is KU, I can open new issues if required.

I am running Calibre 7.13 in docker (ghcr.io/linuxserver/calibre).

1/ The reigning advice out there is to use KoboTouchExtended plug in, and one could select to convert to kepub on the fly as the books are transferred without having a KEPUB version of the book sitting around in the calibre library. This simply doesn't work for me with calibre+KU+Clara 2E. Books are transferred but not converted to KEPUB. If I set KU that only kepub is supported, then I get an error from calibre that there's no compatible format.

I was unsure whether it was because perhaps KU wasn't doing something to properly interface with KTE but I have seen calibre indicate in its status message line that it sees a Clara 2E as the connected device (does it know it's a Kobo Clara 2E and use KTE? Or is this just a string echoed from one place to another?). I also then saw comments referring to the "late, great" author of KTE and that it shouldn't be used any longer, even though there are posts online less than 4 months old still pointing to use it. Right now I have switched to KT driver, installed the KEPUB format plugins and use "transfer specific format" to pre-convert and push KEPUBs. It's working and gets me KEPUB format, but isn't how I read things should work and leaves extra versions of books in my library.

2/ Sometimes during a sync my series information gets mangled. Let's say I have three series loaded: Star Wars, Indiana Jones and Jurassic Park. One sync everything will be laid out perfectly, but following another operation I will find all series lumped under one (e..g Star Wars) with duplicates (e.g. three books labelled Star Wars #3, one from each series). All the authors and titles are right, but series data has been corrupted. Sync things again and it's often fixed. Again, don't know if KU could be playing any role in this going awry.

NiLuJe commented 2 months ago

KoboTouchExtended

Will only work over USB, so you're not doing anything wrong. (I've also never used it myself, even over USB, because calibre already does enough magical crap during transfers to my taste, I didn't want to see more of that happening ;)).

TL;DR: My vote is nope on that one, regardless of workflows. (Keep in mind I came from Kindles, so I'm used dealing with extra random device-specific formats in my library ;)). Plus, I like knowing that the epub file is a pristine one.

shermp commented 2 months ago

Yeah, KU is using the "SmartDevice App Interface" driver in Calibre. The KoboTouch & KoboTouchExtended drivers are USB only. If you want kepub, you will have to convert them in Calibre first.

The series issue is a bug in KU I was never able to figure out. Since I have moved on from using KU myself, I've never had any motivation to try and figure out what the problem is.

(I don't use KU myself anymore because I copy books to my Kobo with a lot less frequency these days, and when I do copy books, I also need to charge the device anyway, so I just use USB.)

shermp commented 2 months ago

Also, I don't like the "SmartDevice" API. I think it's overly complicated and it's a pain to work with.

NiLuJe commented 2 months ago

I don't use KU myself anymore because I copy books to my Kobo with a lot less frequency these days, and when I do copy books, I also need to charge the device anyway, so I just use USB.

FWIW, that was always sort of my feeling about the whole thing. It's pretty cool and all, but the fact that I need to be in front of the computer anyway kind of makes the whole "wireless" point moot ;). Especially if, like me, you always have USB cables hanging around the desk for those purposes anyway ;p.

On the other hand, I find OPDS moderately useful, because it truly is wireless, and I can do things directly from the device itself without needing access to any other device (i.e., be a couch potato; assuming networking and said OPDS server is available & reachable, of course).

(Not that I use that much either, but it can be handy in a pinch).

shermp commented 2 months ago

On the other hand, I find OPDS moderately useful, because it truly is wireless, and I can do things directly from the device itself without needing access to any other device (i.e., be a couch potato; assuming networking and said OPDS server is available & reachable, of course).

I actually started writing a Kobo OPDS interface once upon a time. Like most of my Kobo projects since I started working full time, it's been sitting around half complete, and I haven't had much desire to continue.

(A running theme here is that working full time really muted most of my desire to work on Kobo stuff)

cal-87364 commented 2 months ago

The discussion here is greatly appreciated, especially the responsiveness. So TL;DR - KTE is working as intended, and the series bug is a confirmed KU thing but no fix is expected. Got it!

Comments in general, since others have made them - perhaps OPDS is more what I was initially expecting KU to provide which would have given the "ultimate". Because I have a "homelab", NAS and other services I run, I would like my calibre library to be the same. Calibre's "no network storage" single PC-centric model (which made sense when calibre was started) annoys me and many others, but we work around it. Calibre is a capable platform available for no charge and I respect that so don't want to seem overly critical of it or unappreciative. I very much want my ebook library to be a homelab service, not loaded on a particular Windows PC, and the docker+KU model lets me (mostly) do that.

I was also wondering at one point whether Calibre could operate in a mode where the actual server with all the content, metadata management etc... was in my homelab, but I ran software (perhaps calibre in a different mode like a client) to make the connection to the ereader. That would also meet my goals - the library is centralized, but the content loading to devices is distributed.

Oh, and having to work full time squashes lots of my side interests, so understood there LOL :)

cal-87364 commented 1 month ago

@shermp Curious - did you ever find any kind of workaround or mitigation for the series bug? I scanned all of the titles of "issues" and didn't find one open or closed on the series bug specifically so I thought I'd ask.

I've observed that a decent percentage of the time if I actually move books on or off of the Kobo the series info will be right, but sometimes it's wrong. It can go from right to wrong just by connecting and disconnecting, even with no books changed. It seems to go wrong in the library rescan operation following disconnection. When I connect/disconnect (no books in/out) and it rescans while the series info is wrong, it will move all the books to a different "wrong" series. I have tried a half dozen connect/disconnect just to see if it randomly fixes it one time - so far nothing, just different kinds of wrong.

Wondering if I need to add a book to increase the chances of it fixing the series info? Or if I can connect/disconnect until it's right one random time? Or maybe you have no idea. I don't load content all that often and try to load several of my next reads any time I do connect. So far it does seem that if I sort by "on device" and tell Calibre to push every book again, series info will be fixed. Curious if a more efficient workaround has ever been observed.

shermp commented 1 month ago

I've never looked in depth into it, but I suspect the issue was introduced when I added Series ID support. The Series ID stuff is probably buggy...

shermp commented 1 month ago

v0.5.6 has been released with the fix from @SmatMan

cal-87364 commented 1 month ago

I've never looked in depth into it, but I suspect the issue was introduced when I added Series ID support. The Series ID stuff is probably buggy...

Understood! I may open a new issue to document it and provide the workaround I'm likely going to keep using. I realize that you aren't intending to work it. With a few new devices supported, you never know who might have the time, skills and interest to take a look ;)

Thank you for the release of v0.5.6!