Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
tuyop
Sep 15, 2006

Every second that we're not growing BASIL is a second wasted

Fun Shoe

Martytoof posted:

Is there a fairly easy and out-of-the-box way to give a Zero some kind of hat to allow it a ~1min runtime on power loss to give it time to force a graceful shutdown?

I’m getting either a Zero W or Zero 2 W to stick onto my RaSCSI hat in an external enclosure to act as storage for some old music gear. I don’t want to have to manually initiate a shutdown via ssh or something when I finish using it for the day, and while I TECHNICALLY don’t need to shut it down at ALL, I do envision turning it off when I’m not using my music stack for days or weeks at a time.

I suppose one way would be to have a soft power button so I can bring it down without actually having to log in, which I guess is my backup position. But honestly if I can just flick off the power bar and not have to think about it then even better.

The pi zero still has the gpio stuff so just get one of those UPS hats.

Adbot
ADBOT LOVES YOU

some kinda jackal
Feb 25, 2003

 
 
I’m not sure why I typed words like “how do I add UPS functionality to a Pi” and didn’t immediately stop myself to google search for Pi UPS hat. Good call, thank you. It might or might not work with the RaSCSI given I think they might share some GPIO ports but that’s research for me to do.

Hadlock
Nov 9, 2004

I haven't tried this yet, but I think a pwm or mppt solar charge controller, attached to a lifepo4 battery on one end, and then a ~20v laptop battery charger on the solar input would work really well. Most mppt these days have a 5v USB A 2.4a port on them

The battery needed to run a pi for more than 18 hours is going to be much larger than making it mountable on a HAT is practical, so no point on integrating the power supply into the board itself, imo

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

There are a few USB battery banks that can charge and supply power at the same time. I'd think a Pi Zero could last a long time off a decent sized one, but I get the feeling that you're looking for something that can signal the pi for a safe shutdown and that would turn those into a project vs. a hat that already exists.

insta
Jan 28, 2009
Seconding the charge-and-use battery bank idea. I'd also like suggestions if anyone has any.

evil_bunnY
Apr 2, 2003

The problem with the battery bank is that it can't signal the Pi or let it monitor the state of charge.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
You could always just get a big capacitor, hack part of USB cable so you can set it up so the pi can monitor the voltage coming from your power source, and then have a script always running that checks the voltage of the pin connected to the USB cable. Then when it goes to zero, have the pi shut down before the capacitor runs out of charge.

Hadlock
Nov 9, 2004

If you get a non absolute cheapest solar controller, like a victron, generally they come with a programmable relay

Soysaucebeast
Mar 4, 2008




I didn't see anyone mention it yet, but there's a Raspberry Pi Humble Book Bundle going on for the next two weeks if anyone is interested. It looks like it's mostly manuals and beginners guides to programming, but still.

Also, I have a question I think I know the answer to but I wanted some outside opinions. I was using my Pi as an e-book server through Calibre, and it started acting up on me. Whenever I added a book to Calibre it would add it twice (even though they were the same format) and then would just straight up refuse to delete any of the files. It said it couldn't find a path to the trash can, and nothing I googled was able to fix it. I figured since I was having other issues with my Pi (the wifi just straight up refused to work if I had SSH on so I had to plug in an ethernet cable) I would just format the Pi and start over. And that got me thinking, I do all of my book organization on my main PC and then copy everything over to my Pi, and my computer is on basically 100% of the time anyway, so why don't I just use my personal PC as the server and use the Pi for something else entirely.

Is that a terribly risky plan? I make sure to use a username/password combo on my Calibre server anyway, and I wouldn't be sharing the IP address with anyone else so there's no chance of leaks, but I got hacked about six months ago (protip: don't download dodgy programs from Reddit!) so I'm still a little skittish about security. It would just make everything easier and more streamlined if I used my PC as the server, but if I gotta re-set up my Pi it's not a big deal.

njsykora
Jan 23, 2012

Robots confuse squirrels.


All those Pi books are available for free if you're using PiOS, though that beginners guide is pretty nice. I got it with my Pi 400.

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.
I have my calibre setup such that only the server runs on the pi. I edit my library on my desktop with the normal program, then I rsync the library directory to the pi where it is shared by the server.

I used to run the calibre server on my desktop, but sometimes I wanted to grab a book while the desktop is turned off.
Also, for security I have my devices only accessible through a vpn.

sonatinas
Apr 15, 2003

Seattle Karate Vs. L.A. Karate
Zero W 2 is a nice upgrade for homebridge. Everything runs a lot better and no real delays in homekit. I’m going to see how it handles video later this week.

Roundboy
Oct 21, 2008
I was seriously looking hard for a modern-ish Rpi for 3d printing work, and when I saw the chance to grab a Pi Zero 2, i grabbed a couple for testing and projects.

I never used the original, but the small form factor is cool and aside from some slow SSH, its doing everything i need it too so far. I just need to grab some proper cables for connectivity

GreenBuckanneer
Sep 15, 2007

What's the typical use-case for a 4 or 8 gb ram raspberry pi?

Mantle
May 15, 2004

GreenBuckanneer posted:

What's the typical use-case for a 4 or 8 gb ram raspberry pi?

same as all the others, pihole





















/s

wolrah
May 8, 2006
what?

GreenBuckanneer posted:

What's the typical use-case for a 4 or 8 gb ram raspberry pi?
Something that runs on a Pi, but needs more than 2GB of memory. :eng101:

Seriously though, there aren't many individual use cases where a Pi is otherwise suitable but you really need more memory. I have yet to come up with a reason to get one even though I kind of want to. I guess if you want to run a mini-server from one and have enough services that will all be mostly idle but each need memory of their own. Possibly also for Kubernetes labs and the line.

xzzy
Mar 5, 2009

People keep thinking they'll be able to turn a sub-$100 computer into a full PC, and the pi foundation is demonstrating their willingness to fuel that dream by stuffing more ram onto the board. And selling products that claim to be a PC.

That usually lasts until the first time they visit any javascript heavy website.

GreenBuckanneer
Sep 15, 2007

What about a pihole that's also just a cheap nas?

Like, for example could you use the Pi as a fileserver, and the transcoding done on a regular computer? Would 2GB ram still be enough?

Mantle
May 15, 2004

GreenBuckanneer posted:

What about a pihole that's also just a cheap nas?

Like, for example could you use the Pi as a fileserver, and the transcoding done on a regular computer? Would 2GB ram still be enough?

I think it makes way more sense to do it the other way. Get a cheap NAS, and run a docker container on it with pi-hole.

xzzy
Mar 5, 2009

GreenBuckanneer posted:

What about a pihole that's also just a cheap nas?

Like, for example could you use the Pi as a fileserver, and the transcoding done on a regular computer? Would 2GB ram still be enough?

This is actually a realistic use case. I tried to use a first gen pi as a linux server as backup destination, using rsync. On large files the rsync would crash because the pi didn't have enough memory. A git repo had the same issue.

Since then I've bought a NAS. :v: So I could try it again and it'd probably be fine, there's just no need.

Klyith
Aug 3, 2007

GBS Pledge Week

GreenBuckanneer posted:

What about a pihole that's also just a cheap nas?

Like, for example could you use the Pi as a fileserver, and the transcoding done on a regular computer? Would 2GB ram still be enough?

2GB of ram is plenty for a NAS, the cheaper models have that much or less. The thing that makes the Pi kinda suck as a NAS is that you're doing everything over USB attached disks with no raid acceleration. It works as a bottom-shelf NAS for someone who just wants a backup / file-dump NAS, but it's not really great at anything fancy.

Also there are sub-$200 NAS boxes like the Synology DS220j that have 4k-capable transcoding hardware.

GreenBuckanneer
Sep 15, 2007

Klyith posted:

2GB of ram is plenty for a NAS, the cheaper models have that much or less. The thing that makes the Pi kinda suck as a NAS is that you're doing everything over USB attached disks with no raid acceleration. It works as a bottom-shelf NAS for someone who just wants a backup / file-dump NAS, but it's not really great at anything fancy.

Also there are sub-$200 NAS boxes like the Synology DS220j that have 4k-capable transcoding hardware.

I was looking into the Synology, even the high tier ones for 4k transcoding and they are Not Good for that. Better off trying to justify a rackmount setup but that's too much $$$ too. (it's the decent hard drives that end up costing an arm and a leg for the storage amounts I want, 10TB+)

It's more of a thought experiment for now anyways, I only have a Raspberry pi 1 model B for now (if it even runs...)

tuyop
Sep 15, 2006

Every second that we're not growing BASIL is a second wasted

Fun Shoe
Yeah the clear 4K transcoding winning setup is one of those NASes like the 220j and an old 8th gen+ i5 workstation running Plex.

But that setup will consume like 120W at full tilt and costs $500 not including disks.

RPis are great for setting up DNS blocking and VPN and light fileshares, or media boxes in weird spots. All that outdoor hobbies datalogging stuff is awesome too! I don’t know why any of that needs 8gb of ram though, lol.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
By compiling random stuff I've got on my disk I found a Rust project that hit 1.3GB peak, I can see why you'd want 4GB, swapping slows compiling to poo poo. No reason for 8GB unless you've made the mistake of trying to use a Pi as a desktop.

GreenBuckanneer
Sep 15, 2007

Tried my hand at setting up a pihole through a VM, that was fairly easy, though finding blocklists and importing them that was actually worth a drat, is another story. Once it gets close to a million domains, it's better. It only starts off with like 30k

Hadlock
Nov 9, 2004

I've got a handful of 8gb for a hobby kubetnetes* cluster but only because I knew it was a terrible idea and did it anyways and I like throwing away money

*k3s

There is probably some IoT edge compute case where they're doing computer vision and applying neural network stuff that's memory heavy or whatever. Like, your home security system probably doesn't need to alert you if the family dog walks into the frame

Alternatively, maybe your app is low compute, but it's a bloated Java/.net app and there's no budget to pay a developer to fix the memory usage problems. If your app needs 4gb memory and the OS uses 256mb, you're probably going to need the 8gb

Edit: I was running grafana on a 4k tv and it was reallllly struggling at 1gb

RocketLunatic
May 6, 2005
i love lamp.
My horror story of using a Pi3+ as an Adguard Home Server (similar to pihole) is that I was literally heading out of town when the thing crashed and brought down my network (since internal DNS was pointing to it). I had to refresh the SD card to get the thing working again, so be wary. I have switched to NextDNS.

sonatinas
Apr 15, 2003

Seattle Karate Vs. L.A. Karate
W 2 zero is handling video all right in homebridge so overall pretty satisfied

tuyop
Sep 15, 2006

Every second that we're not growing BASIL is a second wasted

Fun Shoe
Does anyone have homebridge set up with Sengled WiFi bulbs? HomeKit doesn’t understand that they’re white as well as rgb so can’t make like, warm white and I’d rather not use the Sengled app

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.

RocketLunatic posted:

My horror story of using a Pi3+ as an Adguard Home Server (similar to pihole) is that I was literally heading out of town when the thing crashed and brought down my network (since internal DNS was pointing to it). I had to refresh the SD card to get the thing working again, so be wary. I have switched to NextDNS.
I've got an Odroid-C2 on eMMC as my primary pi-hole and a Pi3 as a secondary, so they'd both have to fail before it knocked my network offline
I've had SD cards in my Pis fail enough that I'd never rely on just a Pi

Klyith
Aug 3, 2007

GBS Pledge Week
The proper way to set up a DNS adblocker is to have a secondary DNS server in your config (either on the router or local PC). The pihole / other blocker responds fast, so the client should never proceed to check the DNS #2 backup.

wolrah
May 8, 2006
what?

Klyith posted:

The proper way to set up a DNS adblocker is to have a secondary DNS server in your config (either on the router or local PC). The pihole / other blocker responds fast, so the client should never proceed to check the DNS #2 backup.
This can cause very unpredictable behavior with at least Windows clients where they can decide to switch over to the secondary based on a single slow response and they will stick there for a period of time meaning that you lose whatever your Pi-Hole or other special DNS configuration was providing.

Blue Footed Booby
Oct 4, 2006

got those happy feet

wolrah posted:

This can cause very unpredictable behavior with at least Windows clients where they can decide to switch over to the secondary based on a single slow response and they will stick there for a period of time meaning that you lose whatever your Pi-Hole or other special DNS configuration was providing.

Yeah, this is why I use a pi that boots from a USB SSD. It hasn't eaten itself since I set that up. Though a few times I had to restart it twice after an update.

Rojo_Sombrero
May 8, 2006
I ebayed my EQ account and all I got was an SA account
I'm really new to the Pi and have been thinking of buying a few. One I would like to setup as a router. And the other two as Steam Link devices on my TV's. The burning question I have is how much RAM should the router Pi have and how much for the Steam Link Pi's? I'm planning on using 64MB MicroSD cards in each.

xzzy
Mar 5, 2009

Pi is a lousy router because it has only one ethernet port. If you want a cheap tinker friendly router get a mikrotik or flash an off the shelf router with OSS firmware. They come with an added bonus: the OS won't corrupt on power loss.

Klyith
Aug 3, 2007

GBS Pledge Week
And as a wireless router they have a tiny integrated antenna that will have terrible coverage compared to a cheap actual router.

wolrah
May 8, 2006
what?

Rojo_Sombrero posted:

I'm really new to the Pi and have been thinking of buying a few. One I would like to setup as a router. And the other two as Steam Link devices on my TV's. The burning question I have is how much RAM should the router Pi have and how much for the Steam Link Pi's? I'm planning on using 64MB MicroSD cards in each.
Please don't take this as me picking on you in particular, this comes up every now and then and I've never been able to figure it out so I felt the need to ask.

What led you to the idea of a Pi as a router?

Like I said, this comes up regularly so you're far from the only person, I just don't get why the idea is so persistent because the Pi family is historically famously bad at networking and even the Pi 4 that doesn't suck at it has very limited capabilities.

Blue Footed Booby
Oct 4, 2006

got those happy feet

wolrah posted:

Please don't take this as me picking on you in particular, this comes up every now and then and I've never been able to figure it out so I felt the need to ask.

What led you to the idea of a Pi as a router?

Like I said, this comes up regularly so you're far from the only person, I just don't get why the idea is so persistent because the Pi family is historically famously bad at networking and even the Pi 4 that doesn't suck at it has very limited capabilities.

People who are new to the platform have no idea what the Pi is historically bad at, but do know what a router is. It's one of a relatively short list of "how can I learn about Thing" projects that don't depend on some non-computer hobby. In other words, basically all prospective pi users use a router, but only a subset have a need for automated plant watering, a dedicated _____ server, or a pornography enabled toaster. So it makes sense that it's relatively common as babby's frist pi project.

Warbird
May 23, 2012

America's Favorite Dumbass

Off the shelf Linux machine with wide support and a pretty small barrier to entry on the cost front would be my guess. While grabbing a cheap used router and tossing Tomato/OWRT/whatever on there could be done cheaper/better the process is hinky enough that I suspect people may not consider it by default. That and the Pi’s reputation as a “do all sorts of things” all in one solution. I’d be interested in hearing OP’s line of thinking, I could see it working if you use a dedicated AP and switch and the Pi purely as a router.

Adbot
ADBOT LOVES YOU

Rojo_Sombrero
May 8, 2006
I ebayed my EQ account and all I got was an SA account

wolrah posted:

Please don't take this as me picking on you in particular, this comes up every now and then and I've never been able to figure it out so I felt the need to ask.

What led you to the idea of a Pi as a router?

Like I said, this comes up regularly so you're far from the only person, I just don't get why the idea is so persistent because the Pi family is historically famously bad at networking and even the Pi 4 that doesn't suck at it has very limited capabilities.

I completely get why you are asking this question. It's mostly driven by various videos I've seen on Youtube. And the desire to have a small router.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply