icsy7867 8 Posted December 25, 2021 Posted December 25, 2021 (edited) I posted this in the rapsberry pi reddit, but thought I would share here since it applies to emby and others might find it neat or helpful. A few years ago I made this project for my father (I think I originally posted here a few years ago): https://github.com/icsy7867/PocketVPN It allows one to connect Ethernet to a PI and make a wifi access point. So if you are traveling and are in a hotel or room with poor wifi, but access to an Ethernet port, you can generate your own wifi AP, and I included some features to provide openvpn capabilities through a web interface and some neat statistics like CPU temperature, reboot and shutdown. It's been a while since I've touched it, but all works perfect out of the box. I definitely need to clean up some of the files and code though. Using this project I actually found simply installing emby (which I prefer over Plex for a server with no external internet access) allowed for easy steaming access in the car with no external network connectivity. I also installed a PiJuice for a UPS. This is an expensive option, but it is well made and it allows me to easily, automatically and safely shutdown the Pi when the car is turned off, and automatically start when the power is restored. (Currently working on Buster, had a couple of issues with bullseye). Ideally, I would power via the car battery and detect the accessory power, but I wanted something I could switch between cars and easily bring into a hotel room. Lastly, I have a pimorini shim fan. I had to raise the pijuice, and I am using the pijuice tall case. It's all a touch too large for the case, but it works well! Can easily get 2-3 streams as long as there is no transcoding. Also, one gotcha, is the pi emby server and whatever clients all need to connect while the pi has external internet to cache my lifetime premier key (caches for a week). Merry Christmas! Edited December 26, 2021 by icsy7867
Luke 42078 Posted December 26, 2021 Posted December 26, 2021 HI, this is very cool, thanks for sharing ! @cayars fyi
Carlo 4561 Posted December 26, 2021 Posted December 26, 2021 Merry Christmas @icsy7867. I missed out on the whole Pi thing for years but just got the new Raspberry Pi 4 8GB Extreme edition with the updated clock speed about 1.5 to 2 months ago. Little suckers are addicting as you want to see how far you can push their use. I've had both 32 and 64 bit versions of Raspbian on it. Ubuntu 64, Majaro (pretty) and even a hacked version of Windows 11 that was surprising how well it worked. No graphics drivers to take advantage of any hardware decoding so video playback wasn't that great. Better drivers will come in time. I've got a dumb 8 drive hot swap enclosure that has both eSata and USB3 connections. I had to try the Pi connected to it via USB3 to see how it would work as a standalone NAS. It was able to use all 8 drives and be able to server them up via Emby or as network shares over either Ethernet or Wifi but all the IO is a bit much for it. With one of the daughter cards to offload some of this it would work really well. I've had it running VPNs, Docker, MK8 and of course Emby Server. I totally agree this would make a fine portable wifi hotspot. What would make that even better is adding Pi-Hole to it (native or docker) https://pi-hole.net/ . This adds proper DHCP, network-wide protection, block in-app advertisements and malware which makes pages load faster and safer and has a great statistics and web UI. It runs great on the Pi. I've been thinking about getting it some "bling" with a new case. This case is cool and includes an M2 SSD slot and board that should make it run even faster. You can get to the SSD easy as well with this design. Check out this video of the case with the optional M2 bottom. This case with M2 is a bit pricey at $40-$45 on Amazon but worth Probably worth it and it keeps everything nice a clean, adds IR and gives you full size ports as well making the box more versatile. If you want to make one portable, pick up a lithium car jumper kit when you see them on sale for $20-$40. Charge in the house or car lighter socket and then can be used to power cell phones, Pi or anything else that uses 5 or 12 volts. USB is 5 volts and most have a 12 volt outlet. Think what you could do with a battery pack like that and 1 to 4TB SSD drive plugged into the Pi's USB3 jack. Portable Emby server with a nice selection of things to watch, VPN Server, DNS/Ad Blocker, etc Setup correctly it's an amazing little device. These things are just as fun to talk about as actually playing with them. LOL
CassTG 113 Posted December 26, 2021 Posted December 26, 2021 I have owned that Argon one case and it is indeed a really well made case. The script they provide for power button and fan speeds works only on Pi OS, but there is a github repo for Ubuntu based distros which works exactly the same.
Carlo 4561 Posted December 26, 2021 Posted December 26, 2021 Sounds good. As long as it's documented I should be able to write whatever driver is needed and be covered if I can't find a proper driver. I actually just ordered the case with m2 bottom option a few minutes ago. On checkout got one of those "are you interested in this" products https://smile.amazon.com/gp/product/B07W8MCBMS/ref=ox_sc_act_title_2?smid=A23ZJC4YM22CMP&th=1 Mini UPS sort of like the power banks but can be left plugged in and function like a real UPS to notify you when on backup. Thought that was funny. Are you running the 32 or 64 bit OS? I found the 64 bit version a little faster.
icsy7867 8 Posted December 26, 2021 Author Posted December 26, 2021 3 minutes ago, cayars said: Sounds good. As long as it's documented I should be able to write whatever driver is needed and be covered if I can't find a proper driver. I actually just ordered the case with m2 bottom option a few minutes ago. On checkout got one of those "are you interested in this" products https://smile.amazon.com/gp/product/B07W8MCBMS/ref=ox_sc_act_title_2?smid=A23ZJC4YM22CMP&th=1 Mini UPS sort of like the power banks but can be left plugged in and function like a real UPS to notify you when on backup. Thought that was funny. Are you running the 32 or 64 bit OS? I found the 64 bit version a little faster. Jumping in here. I have to many battery backups. I like the pijuice and the (pisugar2 pro and S too) is they integrate with the raspberry pi, had a much smaller footprint and can automatically boot and shutdown the Pi depending on if there is power or not. One of my requirements was that when I turn off the car, I wanted the pi to gracefully shutdown, and when power is restored, the raspberry pi4 automatically boots. I saw that mini battery backup ups. Just seems like a fancy 10000mAh battery backup. The DC inputs are nice if you have other things. But my 64gb micro SD card works fine for me, but an m.2 opens a lot of doors. You can also check out ETAPrime on youtube. He reviews a lot of these types of things.
Carlo 4561 Posted December 27, 2021 Posted December 27, 2021 The only advantage I see for the mini-ups over the power bricks is actual true UPS functionality like being able to be signaled via USB that main power was lost, what the status of power left is, etc... In this fashion the Pi could run until 15% power left then shut down gracefully. Same type things you can do with a PC plugged into a UPS. For me it would be more novelty than anything so I wouldn't go out and buy it for that since I have something already I could use. I myself don't really need the ups functionality as I'd use it camping or similar where the Pi is plugged into the 12 volt port for power. Then you can plug your cell phone into the USB connection for power as well. The only thing I would worry about using it with the car lighter socket is the abrupt loss of power which could corrupt things. Like you said you want that to be a the trigger to shutdown gracefully. I know the Pi can power up when power is applied and that is supports the halt, shutdown and power off commands. But they would need to be issued before killing the power. I'm sure a little circuit could be rigged up to sense this loss of power and trigger that with 3 small batteries for power in the case. Couldn't you actually just use the power button added to the Pi from the Argon case? That can both powerup/down the Pi right?
icsy7867 8 Posted December 27, 2021 Author Posted December 27, 2021 You could 100% use a power button. But I much prefer an automated approach. A small portable ups with NUT support would work as well. But I really like the simplicity of a UPS hat. To each their own. Detecting the 12v using a voltage divider and a gpio pin would be easy to do as well. However, I don't have tons a free time these days and the pijuice is well made.
CassTG 113 Posted December 27, 2021 Posted December 27, 2021 13 hours ago, cayars said: Sounds good. As long as it's documented I should be able to write whatever driver is needed and be covered if I can't find a proper driver. I actually just ordered the case with m2 bottom option a few minutes ago. On checkout got one of those "are you interested in this" products https://smile.amazon.com/gp/product/B07W8MCBMS/ref=ox_sc_act_title_2?smid=A23ZJC4YM22CMP&th=1 Mini UPS sort of like the power banks but can be left plugged in and function like a real UPS to notify you when on backup. Thought that was funny. Are you running the 32 or 64 bit OS? I found the 64 bit version a little faster. Yeah it's on Github somewhere easy to find, i don't use Ubuntu or Raspberry os on any of my pi devices as i really like the dietpi distro. Probably been the most rock solid easiest to setup and apply special configs, as well as you get to install the software you want upon first setup via gui (inc emby!), and a great support forum, was testing the overclocking abilities of the pi zero w 2 for them prior to wide avaliability, and they literally updated the profiles over night based on my findings.
Carlo 4561 Posted December 27, 2021 Posted December 27, 2021 That's cool. I've got dietpi on my list of OSes to try on it. My "problem" with the Pi is that I can't figure out what I want to do with it long term. Ideally I'd like it to have of a web based NAS like UI so it's easy to access/config with a phone or tablet when you're not around a computer or something easy to SSH with. Something like https://casaos.zimaboard.com/ could be ideal as it combines the ability to have things run in docker along with adding said items to a web based menu. It's likely something to keep an eye on to see how it progresses. But I'll probably end up doing something close to your OP post so you've got a portable wifi router, VPN, Emby Server. 1
Davey's 37 Posted December 27, 2021 Posted December 27, 2021 This really sounds great, thanks for sharing the link of Casa-os, Cayars
CassTG 113 Posted December 27, 2021 Posted December 27, 2021 (edited) 25 minutes ago, cayars said: That's cool. I've got dietpi on my list of OSes to try on it. My "problem" with the Pi is that I can't figure out what I want to do with it long term. Ideally I'd like it to have of a web based NAS like UI so it's easy to access/config with a phone or tablet when you're not around a computer or something easy to SSH with. Something like https://casaos.zimaboard.com/ could be ideal as it combines the ability to have things run in docker along with adding said items to a web based menu. It's likely something to keep an eye on to see how it progresses. But I'll probably end up doing something close to your OP post so you've got a portable wifi router, VPN, Emby Server. That Looks cool, i know what im testing tomorrow lol, To be fair My main Pi4 is set up as a nas with docker (nextcloud for office duties, photoprism to replace google photos and adguard bitwarden for their uses etc), sure most is set up manual at first, so SMB serves files locally, but rclone syncs to my Onedrive and Googledrive for backup. Dietpi just introduced dashboard as well for management in the browser but not as nice looking as that os your linked too. But having the setup the Op mentioned in the car sounds a cool use case. Alas i would need to hire some actors to act as friends or family to make use of it myself hopwever lol. Edited December 27, 2021 by CassTG
Carlo 4561 Posted December 28, 2021 Posted December 28, 2021 It is pretty cool. The company behind that open source software just did fund raising (two rounds) and is producing single board computers designed to be mini servers (ZimaBoard) in the fashion of the Raspberry Pi on steroids'. 3 different configs all pretty reasonable in a steel shell. All models featuring Intel HD Graphics 500, Dual Gigabit Ethernet LAN ports which would be handy as a NAS or router/firewall. and offer a $30 upgrade card to 2.5GHz Ethernet. It even has a full size PCI slot on the side of the unit but I'm not sure how I feel about that. Might have been better as a docking port. But there PCI options they have are cheap The $180 model is just about a Synology 920+ at heart so it would run Emby pretty well. In some ways it's even more powerful since this comes with a PCI x4 slot you can use so you could add anything. They already have PCIe to NVMe SSD Adapter that holds two sticks for $10, PCIe to 4 Channel USB Adapter$15, PCIe to 2.5GbE Ethernet $29, 5-Port PCIe SATA Adapter - PCI Express x1 to x5 SATA $39, WiFi 6 PCIe WiFi Card with Heat Sink with 2 big antenna $28. That's going to be a nice go to project box vs the Pi except for very light power applications. Really nice if they have that nice GUI on it as well.
Davey's 37 Posted December 28, 2021 Posted December 28, 2021 Allright! I see that they use An sort of industrial add on board to their PCI slot from CORAL. https://coral.ai/legal/ Maybe this is more for the use of Development
icsy7867 8 Posted December 28, 2021 Author Posted December 28, 2021 (edited) The caraos is interesting. For docker containers a command line works fine for me. I use k3s in an ovirt hypervisor at home. Rancher for kubernetes. Freenas/truenas for files/data/media storage. All the things from my git repo could be dockerized with some effort, not sure about the Hostapd portion. Openvpn/wireguard, emby, Plex, whatever is pretty easy, but I've never tried Hostapd. Honestly I run my streaming media server as a standalone VM at home and do a gpu passthrough. I know you can use docker/kubernetes and give containers and pods access to the GPU, but I haven't gotten around to testing that out. *Edit* I hate you all, it looks like Hostapd wouldn't be too difficult. I might have to see about converting everything to docker containers and writing a docker compose file. Edited December 28, 2021 by icsy7867
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now