piblog

adventures with my raspberry pi

dozens

about

Hi! This is my journal about my experiences, exploits, and hijinks while setting up a raspberry pi homelab. it is a Pi 3 Model B named guyute

- audiobooks

okay so tomasino reminded me today that i used to love listening to audiobooks.

https://labs.tomasino.org/audiobooks/

but i haven’t done it as fanatically as i used to in a long time. for a while, i didn’t have a commute. and now i do, but i often carpool. but sometimes i have a solo, quiet commute. ideal for some audiobooks!

further complications: i am unable to download and archive audiobooks from overdrive the same way i used to be able to. because they barely support their desktop apps anymore, and instead push really hard for everybody to use their streaming apps.

but i learned that if i spoof my user-agent

https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/

then i can get a ‘Have overdrive for mac/windows?’ link upon checkout that will enable me to download the odm file. which i can then use to download the mp3s thanks to this special little script.

https://github.com/jamestomasino/dotfiles-minimal/blob/master/bin/overdrive

so that’s great! while i was troubleshooting all of this, i downloaded a book to my linux laptop, because the download link is already readily available there, and then transferred it over to the pi.

so now i guess i’m going to start collecting and archiving audiobooks on the pi too! i might look into jellyfin in earnest so i can serve them and download them over my home network.

i might also have to start really considering a vpn so i can access my files away from the house.

- add email to calibre-web

just a quick note to look into configuring email for calibre-web so i can send books direct to my kindle

whoa this fork looks really great compared to what i have

https://github.com/janeczku/calibre-web

the ui looks good and it has single click send to e-mail and also “Magic Link” login for easy access on eReaders.. that’s great.

what is that i’m running?

just the base calibre-server that comes with the calibre package in apt.

okay new goal: install and run calibre-web, and stop using calibre-server?

- abduco + dvtm = tmux replacement?

i can’t remember how i fell down this rabbit hole.. i think it’s because elly had been talking about dtach over on #tildetown, which is a utility that just provides the attach/detach functionality of tmux.

so anyway i started using abduco + dvtm on my pi just to test it out and see what it was like and i quite like it! dvtm especially is kind of nice as a tiling window manager for the terminal.

abduco isn’t in the package repository at work, but i started using dtach + dvtm this week. we’ll see if i stick with it. pretty nice so far!

- jellyfin

just a quick note to remind myself to check out jellyfin

https://jellyfin.org/

a media server alternative to plex that is supposed to be much lighter and more simple than plex.

- DeDRM

shelled into the pi and curled the latest DeDRM tools release

https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.3

but i kept getting an empty file for some reason?

no matter, downloaded it to my laptop and scpd it

unzipped it on the pi and

calibre-customize --add DeDRM.zip

it wasn’t working at that point because i didn’t have any keys defined in the dedrm.json so I scpd my config json from my laptop to .config/calibre/plugins/DeDRM. at this point, i’m still unable to open the book after adding it via the web ui. but when i calibredb --add book.epub --with-library=books --duplicates on the pi terminal, it adds it. (--duplicates is necessary only in this test instance because—oops!—turns out i already have this book in my library, but i am determined to use this opportunity to set up DeDRM. i will delete the duplicate later.) I can’t verify in the web ui though because it’s not showing the duplicate. must have merged it with the old one.

oh well. i’ll try it again next time i get a book from the library. shortest wait: currently 6 weeks.

actually no, let’s just go checkout an Available Now book. Song of Achilles. I liked Circe. Let’s get this one.

what the hell. does calibre-server has a db cache or something? i don’t see anything

https://manual.calibre-ebook.com/generated/en/calibre-server.html

i give up for now

~

to kill the process:

ps aux | grep calibre

and then kill the id

removing the dulplicate:

calibredb search 'title:"world we make"' --with-library=books
> 1,2
calibredb list --search 'id:2' --with-library=books
> (book info)
calibredb list --search 'id:1' --with-library=books
> (book info)
calibredb remove 2

tags: #calibre #drm

- reboot

been uploading photos and books, and editing metadata for my rpgs.

pi became unresponsive last night / this morning to web and ssh so rebooted this morning and restarted web services. everything seems to be fine now.

found these resources recently and consider them next steps on my todo list:

Incidentally, mDNS seemed to just magically start working on its self at some point. I can hit my pi’s url on macbook and on my phone now. weeeeeird

tags: #reboot #mdns

- rpg library

tried searching for an rpg that i know is in my collection and couldn’t find it by title or by author. this is going to be really painful until i update the metadata on everything. i’ve done about 60 so far. out of 1.4k. big yikes!

tags: #calibre #rpg #metadata

- mDNS

still can’t hit any multi DNS urls on any of my devices.

not a solution but a workaround (for desktop only): added a line to /etc/hosts on my MBP:

192.168.0.83  pi.local

and now i can hit e.g. calibre with http://pi.local:8080

maybe i can configure something on my actual router?

tags: #mdns

- miniflux

rss reader!

one thing i would like to be able to do is to read my rss feeds on my computer and on my phone and on my tablet, and have my un/read status sync between decives.

which i guess means hosting a feed reader!

i glanced at awesome-selfhosted and then asked some of my friends in the basement because i know that they have already undertaken great adventures in rss, trailblazers that they are.

and they recommended miniflux.

written in go, and it uses postgres. luckily they have a docker image so i don’t have to install either. the docker-compose file on their installation instructions is a little out of date, but you can find a more correct ‘basic.yml’ on github at miniflux/v2

after a few tweaks, it is installed and running!

the ui is super minimal. i’m sure i’ll grow to like it, but at the moment i am missing the classic three-pane “feeds / entries / content” view.

Up next:

tags: #rss #feeds #miniflux

- calibre

had to add the upstream debian bullseye repo to install calibre-server. (and then remove it.) got the web server up and running pretty easy.

fussed around for a while trying to make a second calibre library out of my rpg collection. here’s what ended up working: create a new dir and then calibredb add path/to/file.pdf --library-path new/library/location. adding a single file this way created the necessary database file. then i was able to find rpgsbak -type f -name '*.pdf' -exec -I {} calibredb add {} --library-path new/library/loction. (or something like that; wrote the command just now from memory.) and pull all my pdfs in!

so now i have 1.4k pdfs in a new ‘rpgs’ library alongside my ‘books’ library.

on the whole, hobby ttrpg creators can stand to get a LOT better at exporting metadata with their pdfs. now i have a whole lot of manual updating to do. but i can read books and pdfs now from my calibre library on any device on the network.

also adding new items via the web ui is pretty easy!

TODO: disable converting to epub on ‘read’ for rpg library. ‘download’ to read still works great for reading in the meantime.

tags: #calibre

- photoprism

browsed the photo hosting options on awesome-selfhosted on github and decided on photoprism

it has a docker image and i was able to get it working no problem, with no modifications. quick and easy. this is the future containers promised us.

the ui is slow. i have the number of workers cranked down to 1. might bump it to 2.

i had been rsyncing photos to the pi and then reindexing the collection. but i’m finding it quicker to do a bulk upload using the web ui. it’s working rather reliably. it still has to reindex on upload, but i no longer have to reindex the entire collection.

tags: #photos #photoprism

- git

Add a “git” user. Create a home dir for it. Do git init --bare repo.git.

Copy my ssh key over and add an entry to .ssh/config:

  21   │ Host git
  22   │ Hostname 192.168.0.83
  23   │ User git
  24   │ IdentityFile ~/.ssh/id_rsa

Now I can git remote add pi git:repo.git in a local repo and push away!

tags: #git

- Hello World

Okay let’s get this party started!

I have a raspberry pi model 3b that has been gathering dust in a drawer for a couple years now.

I decided I wanted to dust it off and use it to backup some photos and some files.

I bought a 4TB external hard drive and a 128gb microSD card and hooked it all up.

I downloaded the NOOBS installer from raspberrypi.com/software and installed it on the SD card, which I was able to do because I have a ton of dongles thanks to the fact that my MacbookPro has no peripherals. I popped the card in to the pi, connected my usb keyboard and hdmi monitor and booted it up, and went through the setup.

Then, after testing that I can ssh into the pi, I unplugged my keyboard and monitor and never plugged them back in again.

Plugged in my hard drive and formatted it with an ext3 filesystem.

Created a backup user. (Not a spare user in case of emergencies, but a user specifically for creating backups.)

Copied my ssh keys over:

ssh-copy-id -i ~/.ssh/id_rsa pi.local

Mounted the drive, added it to /etc/fstab so it will auto-mount, and added a slight delay to the boot command so that there is time for the drive to mount before the system boots. As suggested here:

https://howtoforge.com/tutorial/raspberry-pi-as-backup-server-for-linux-and-windows/

Copied over my first photo export and my calibre library with an rsync -zaP.

Messed around with mDNS and avahi-daemon because I can’t hit http://pi.local in the browser. Still haven’t figured this out.

tags: #mdns #getting-started