• 0 Posts
  • 14 Comments
Joined 3 years ago
cake
Cake day: June 25th, 2023

help-circle
  • __hetz@sh.itjust.workstoSelfhosted@lemmy.world•Deleted
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    What you’re describing works but probably not for me as you acknowledge. The “PC loses AC while running” part is what I actively try to avoid as part of the greater goal of minimizing risk of damage/data loss. It might be superstitious at this point, modern hardware and filesystems being a bit more resilient, but I feel better not risking it. Since I’m shutting down before the UPS battery dies, and power could restore before it does, there’s a real chance power will never be totally lost as far as the motherboard sees it. In that case a boot on AC restoral won’t get triggered. Otherwise I agree. It’s a lot of work. Or rather a lot of research, RTFM, and understanding before you can even do the a little bit of work to implement it.


  • __hetz@sh.itjust.workstoSelfhosted@lemmy.world•Deleted
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 months ago

    I was actually working on an edit to further clarify but that context helps. You’d think for a single machine, just run NUT (or whatever) directly on said machine. The two big reasons, even in that case, for using NUT on a RPi or other low power machine are actually what my edit was going to address: Power Consumption and Wake on LAN. After shutting down any power hog server(s) a decent UPS can probably keep a Pi Zero and travel router running for half a day. Ideally long enough to send a WoL packet to the server(s) once the UPS says power is restored. That can be pretty important, even in a “single” (ignoring the Pi) machine setup, if you’re out of town and nobody else has access to manually power it back up.

    I will admit NUT was one of the more convoluted things I ever set up, and one has to write their own scripts and such for it, but I find it worth the peace of mind knowing things shut down cleanly. Having them wake back up automatically is icing on the cake, even if my own setup is local only. There’s never a need, if I’m not home, to walk anyone over the phone through identifying which nondescript black rectangle needs its power button pushed.


  • __hetz@sh.itjust.workstoSelfhosted@lemmy.world•Deleted
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    2 months ago

    I’m not sure if there’s a fundamental misunderstanding but I felt a need to clarify that NUT works with a UPS. It isn’t either or. Whether you’ve got a homelab or a single desktop PC, you need some piece of software which can see when the UPS goes “Oh shit, power is gone” and instruct the machine(s) to shut down cleanly. NUT is that software. If it wasn’t NUT then it’d be whatever software the UPS manufacturer either provides or recommends for your combination of UPS and OS.

    To the example of how one provides media to other devices inside (and possibly outside) the local network, although I get the broader idea, it really becomes a matter of scope, scale and taste. If my goal were to provide access to family members outside my home, friends, possibly friends of friends (either by intent or as a result of account sharing) then I’ll probably want monitoring. I’ll want a dead simple app any of them can install and point to a memorable URL. I’ll want alerts if someone in Romania or Shanghai attempts to log in with a friend’s account… You get the gist. If it’s not something that matters outside my house and I’m not going to repeatedly need to setup VPNs and map network drives for people, I could just spin up a Samba share and add it to the handful of devices in my home network and let those devices decide what application opens whatever media.

    In actuality I’m extremely small scale (serving only my home) and still prefer Jellyfin for its simplicity and transcoding. It’s simple enough to slap on cheap Android TV boxes and hand someone the remote. No real reason to watch it like a hawk. Nor to track bandwidth; I’ve got an excess for the house. The GPU is capable enough; an Arc A380 that’ll never have enough simultaneous transcodes to be a bottleneck.

    To answer the “why?,” I am one of those people that enjoys learning things that often feel like (or factually are) work. Maybe it’s self flagellation and I just refuse to admit it. I am a Factorio addict. But it’s also because tackling those things usually means the other users have an easier time. Mamma don’t wanna learn to drive the network to her laptop or search the app store for a file thingamajig what can connect to that tango or salsa or whatever just to scroll through a bunch of video file icons with the text so small she has to break out the Walgreens readers. She wants a shiny interface that’s swipe-able on a phone or tablet or navigable with a remote control. Pretty movie posters and bold legible titles. And I haven’t touched my config in months for that matter. Just a little bit of work has propped up a really enjoyable, ongoing show/movie watching experience. Definitely worth.


  • Not a programmer either but I’ll throw in my anecdotes:

    • I was writing a “cog” for pycord (Python Discord bot framework). I wanted a slash command to hit an API for some reason or another. Whatever AI I was using hallucinated a non-existent endpoint to achieve that so, of course, it didn’t work. I wasted a half hour reading past and upcoming specs of the API to find that endpoint never existed and wasn’t going to exist in the next release. The code was structurally sound, pretty much identical to other functions I’d written by hand, but it reached out to something that does not exist. It did this with a popular, well-documented piece of software.
    • Speaking of structurally sound, there’s no real time save if I have to double back to make sure it filled in all the blanks correctly. If the AI can fuck up with an API that it should “know,” it’s a guarantee that will be necessary to correct everything when an AI has no knowledge of it whatsoever. So now time is spent making sure it isn’t referencing variables it failed to define, pointing to API endpoints that aren’t there, etc. I can define boilerplates and snippets in any decent text editor. An autocomplete plugin will fill out the entire structure of a function being defined the second I type def and leave me to fill in the blanks - all without deferring to a water and energy sucking, data mining, douchebag of a company. What’s being gained that isn’t costing me privacy, depriving myself the use of my own cognitive abilities, and ultimately making the world a little worse off?
    • Last one, I wrote a bash script years ago using exiv2 to pull the EXIF data and sort unsorted photos into ../YYYY/MM/DD/. directories. When the AI hype started gaining traction I tasked one with doing the same to see what it would do differently. Aside from some capitalization and variable names, it was identical. Now it’s not exactly a complicated task but my takeaway was either I’m a better programmer/scripter than I thought (not likely) or AI is just as bad (or worse) of a programmer as me. I’m leaning towards worse, considering I manage to actually know if an endpoint or variable exists before referencing it.

    Anyway, the only conclusion I can draw is those “programmers” are developing unmaintainable blackboxes out of twigs and playing cards. If some big bad wolf by the name of “Intellectual Debt” doesn’t inevitably come along to huff and puff, they’ll just end up collapsing under their own weight.


  • I can say that TubeArchivist is essentially single-user. Multiple accounts on a single TA instance will share the same underlying library with a ./library_dir/channel_id/video_id.ext directory structure. You could run an instance per user for individual TA libraries but, last I looked, the Jellyfin plugin doesn’t support multiple TA instances so it still wouldn’t be able to get the metadata from any instance(s) other than the one it’s configured to. It was a requested feature, on the plugin’s GitHub, but I’m not sure if it’s actively being implemented. The only workaround I can think of for now would be using a shared TA library and then manually tagging the videos in JF and using parental controls to hide them. Billy won’t see vids tagged #SusieYT, Susie has #BillyYT added to her blacklist, etc.


  • Gotcha, that sheds more light. For your use case you’d need to script up some solution that parses the URLs from the feed(s) and sends them to TA’s API. I don’t think it’d be terribly difficult but, if I wasn’t concerned with actually saving the content, I’d turn to something like SmartTube/FreeTube/etc for simplicity and to just stream it.

    For OP’s use case, throwing specific URLs at something which will download them and then have them pop up in Jellyfin, I can’t think of anything easier (at least after the initial setup) than TA. Unless any of the other suggestions here can also handle the metadata for JF, there’s gonna be a lot of manual work involved to have videos show up meaningfully and organized in JF.


  • TA is probably perfect, really. You get the TA Jellyfin plugin , mount TA’s library directory as read-only in Jellyfin, and add that mount as a “Shows” library with TA as the sole metadata provider. Channels become “Show” names and “Seasons” are the upload year. One-way or bi-directional watch progress between JF and TA. I don’t use the feature but I think it supports some sort of organizing by YouTube playlist these days too, maybe as “Collections.”

    The only issue I’ve had is JF seems to do some built-in stuff when it comes to filling in metadata based on file names. Occasionally an “S0” or “E12”, as examples, will erroneously put a video into “Specials” (Season 0) or give an “Episode 12” where there shouldn’t be if those or similar substrings are in the Video ID (which is also the filename). My hackish solution, for a while, was a script that ran a sqlite command against the Jellyfin DB to find any videos in the YouTube library with not null episode numbers and set them to null, and also set unexpected seasons to the year of the video’s upload.

    I had it automated to run right after my scheduled TA downloads completed but it felt a bit wrong doing that on live DB. So now I just periodically run the query, sans the updating, then fix the metadata from within JF’s UI if there are any query results. I could see that being a little irksome, and beyond what non-hobbyists could figure out, but it’s honestly a small price for me when it means I have all my archived YouTube content organized, with descriptions and thumbnails, with no other real work on my part.


  • __hetz@sh.itjust.workstoSelfhosted@lemmy.world•Deleted
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    Don’t know if I can pick a favorite but I’m often the most happy when I’m actively using Homebox and LubeLogger. I track my tools with the former and track service records, parts inventory, mileage and such with the latter. If I’m using those services extensively it’s because I’m wrenching on something and adding more RockAuto magnets to my collection. Even when the circumstances suck, I genuinely enjoy an opportunity to take things apart, tinker and repair them.

    No longer directly related to self hosting

    I like busting out the jack and stands, reefing on a breaker bar, field repairs that succeed in getting out of a bind without waiting 2 hours for a tow bill in the hundreds of dollars, then making it home safely and doing it the right way, meticulously cleaning gasket surfaces…

    It’s zen for me and I don’t know why. The same reason I enjoy stripping down a firearm and cleaning it more than the day at the range leading up to that point. Or why I’ll go through the trouble of disassembling a $30 tower fan to extract every bit of dust and pet hair that has found it’s way trapped inside. I couldn’t pay someone else to do that for less than the damn thing costs… I just know that I can do it and feel compelled to. I might be an overgrown gnome.

    I’ve got the family’s vehicles in LubeLogger, having become the mechanic for anything short of transmission problems or requiring welding or a machine shop. The riding mower is in there too just because. It’s never often enough and I’m tempted to find a bike or an old beater I can tune up just to have a project that doesn’t have me sitting at the keyboard.


  • Fave is (Doom) Emacs, even though I haven’t used it in a while. It was fun and mostly painless to customize it a tad with no prior Lisp experience. Things like Org Mode and Org Babel let me write a short story around my code blocks if I needed one to remember concepts, purposes, etc in a language I was tinkering with. They could execute in-document or I could tangle them to where they belonged. That just seemed brilliant to me. It being essentially an eLisp interpreter at its core, with the editor functionality and everything else built on top, it was neat being able to just pop open an interpreter window or tab and use what I learned for quick calculations or whatever. Previously I’d open a new terminal or tmux pane and use Python for that purpose. And currently mostly Bash and CLI utils over Python.

    Pretty sure my first was EDIT.COM on MS-DOS but I would’ve been a single-digit age at the time and mostly clueless so I say notepad.exe instead. The window in which I used DOS was very short before the family computer started running Win 3.1. Then 95, 98, ME, XP, Vista… every version except 2000 and 8. We had 8 long enough to back up our data and revert to 7

    Future, I’ll probably keep trucking with nvim.

    Honorable mention, gedit. My first GUI editor on Linux desktop before I leaned heavy into CLI applications.

    Loathed, VSCode. I’m not a dev so it was just too much. A Vim plugin made it usable for editing, and I liked how easy plugins were to find/install, but I’m not a dev and full IDEs are wasted on me. Same reason I finally stopped trying to turn nvim into one and minimized my plugins for it.

    Current is nvim. I like modal editing and its particular keybinds. I like regex search and find/replace. Multiline editing, motions, and macros defined on the fly. I bet I haven’t read 2% of the built-in documentation and know it already does more than I’d ever need right out of the box. For the same reason I still often find neat things I didn’t know about it and try to commit to memory for my future editing.

    Longest is n/vim. That probably won’t ever change for the same reasons above.


  • This has been my solution. Subscribe to a playlist or an entire channel, set up the schedule, and you’re done. If you’re a supporter of the project I believe it has real-time monitoring for new uploads.

    I will note that, somewhat recently, YouTube changed the URL format for playlists and this has broken subscribing/downloading playlists that use the new format. I haven’t checked today but there’s a patch that was still waiting to be merged. Unless there’s a new release incorporating it, you’ll have to apply it yourself or feed the URLs in manually for now.


  • Beets for importing, ascii only, lastgenre, fetchart, whatever other plugins I’m forgetting, /artist/yyyy_album_name/ directory structure, 01_title.ext for single disc, 01-01_title.ext for multi disc. I invoke beets manually just to keep an eye on how things get matched up and tagged during the process. I deal in full albums, LPs, compilations and such because it’s often easier to maintain and match metadata than with individual tracks. I guess it’s a data hoarder / archivist compulsion too, but it’s rare I can’t find at least one other track on an album appreciable so… why not?

    A weekly rsync pushes the beets DB and library from my TrueNAS server to another server with a 8TB external dedicated to backing up my most important stuff (personal projects, password store, compose files, confs, etc). I’ve got an rsync alias set up on my laptop I invoke manually because I’m nearing the limit of what I want to allot to music. At least until I decide to get a larger drive.

    That’s local in triplicate, with zraid on the NAS and a fourth copy on my phone, which leaves me feeling pretty good about not losing any music outside of a house fire or tornado. I was also rsync’ing all my media (music, movies, shows) to another TrueNAS setup at a relative’s but some things have changed with that so it’s on hold. Not fond of missing my off-site backup but hopefully can resolve it soon.

    Everything is local only right now. The library is mounted read-only in Jellyfin so can play music from pretty much any phone, TV, computer, my Steam Deck, etc throughout the house. If I ever decide to open things up, reverse proxy or whatever, I might look into Finamp but I buy a flagship phone every six to ten years for the storage space so I can just take my music with me. Might eventually switch that to a dedicated music device.


  • Desktop design decisions. A lot of folks hated Unity. I know I did - they turned something familiar into something Apple like and I couldn’t stand it. I’m genuinely not a fan of the unified menus and such. It didn’t help that users were basically forced out of Gnome 2 into it when Unity became the default.

    Within Unity they Integrated Amazon results into the Desktop Search. That was likened to spyware since your queries were being shared with Amazon, much like MS integrating web results into their own search. Ubuntu fucked up harder because, absent any filtering, their search occasionally produced adult products in the results - ie sex toys and such. Imagine telling your kid Fluffy needs a new knotted rope chew toy. They start searching “dog knot toy” just to have the results filled with BadDragon knockoffs.

    They’ve leaned heavier into enterprise over the years and that has alienated a lot of the Desktop audience which helped bring attention to OS in the first place. They went from “Linux for Human Beings,” making desktop computing more accessible throughout the world, to becoming essentially the Microsoft of the Linux world.

    Their snap backend is proprietary. You can’t just host your own snap repository. Even if you host your own local snap cache, it ultimately must point to and retrieve from their repository to populate that cache.

    I’m sure there’s other stuff worth pointing out that I’ve forgotten.


  • Yeah, Jellyfin was my best example. I’ve got the motions memorized, to get to the admin panel, as well but Homepage is my homepage so it saves those few seconds. I agree otherwise about urgent messages. Important stuff of mine hits a Discord webhook for now.

    Eventually I’ll set up some other alternative to get push notifications. I took the time to write a few half-assed cogs for pycord, and I enjoy(ed) the process and using them, but I don’t really trust the platform. I might need to give good old IRC a go again. I’m sure some Android client can do push notifications on a specific channel/sender basis.


  • Most are definitely just showing off; “Look at how many photos I have stored,” “I have so many podcasts and ebooks,” “Bow to me, mortals!”

    On the flip, some are useful. PeaNUT gives UPS off/on line power status at a glance, Jellyfin shows active streams iirc, FreshRSS shows if there are unread feeds, Portainer shows if any containers have stopped, etc. Jellyfin is a big one since I don’t have to get into the WebUI to see if updates or whatever are going to interrupt someone. Otherwise I’m mostly in agreement and just use links in lieu of widgets and silly API calls.