I have it set up to run a project where a subreddit has control over the watering of a live plant in my apartment. The pi runs a reddit bot that reads the votes, and can switch on a pump to water. It also collects data about sunlight, moisture, temp and humidity to help inform the decision about watering. Despite many people's preconceptions about the goodness of the internet, I must admit that they do a wonderful jo…
Ask HN: What do you do with your Raspberry Pi?
281–290 of 1001 posts
Re: Ask HN: What do you do with your Raspberry Pi?
#282I'm kinda concerned by the number of mentions here of using the Pi to run OctoPrint (I think that's right?) to remotely admin and monitor a 3D printer... I've always been of the mind that a 3D printer should never be left physically unattended - even with monitoring (via camera and such), as they can potentially start a fire if something goes wrong (failed print spewing random filament?). Is this a wrong viewpoint? A…
Re: Ask HN: What do you do with your Raspberry Pi?
#283I run a grid of about 250 Pi 2 and 3s across several offices and datacenters. They are the backbone of our graphics playback system (i.e. slates) and low latent IPTV system. Users can subscribe to any channel necessary without expensive re-encoding or RF antenna systems. I absolutely love them and 4k60 HEVC is a huge upgrade for the 4!
This turns out to be ... somewhat frustratingly difficult.
There are numerous Bluetooth-based systems, some WiFi-based ones. The hard part is sorting out the interface to control the system -- there's nothing quite so frictionless as either on-device controls or a remote, though going with an iPad or cheap tablet seems the best option.
Re: Ask HN: What do you do with your Raspberry Pi?
#284I use it to automate my weed garden in my closet. It turns on and off the LED lights everyday and waters my plants with a pump based on the moisture level of the soil. I measure the moisture level through a moisture sensor. Weed is fun.
Re: Ask HN: What do you do with your Raspberry Pi?
#285And then I have a shelf of other Pis doing nothing, but you know, one day I will finish all those projects...
Re: Ask HN: What do you do with your Raspberry Pi?
#286A security camera NVR. (Help wanted! I'm developing it here: https://github.com/scottlamb/moonfire-nvr I'm proud of the design but it's still far from a polished system that does everything a reasonable person would expect. Lots of opportunities to extend it if you're looking for a fun Rust + Javascript project.) A Raspberry Pi 2 will run a working setup; the new Raspberry Pi 4 should be a lot more pleasant in terms…
Moonfire NVR looks like an amazing project that I can learn a lot from for an entirely different project with streams and stuff that I’m interested in and have zero experience with! Also great that it’s written in rust Is there any way to test it without rpi/camera? If I understand the readme correctly, you store frames individually (as jpegs?) on disk and construct flexible mp4 streams on the fly. Naturally I would…
> Is there any way to test it without rpi/camera?
Without a Raspberry Pi, yes. It should run on any Unix-like OS. I've tested Linux/arm32, Linux/x86-64, and macOS/x86-64. (For the last, install ffmpeg via homebrew first.)
Without an IP camera...hmm, there are probably some public RTSP live streams somewhere. Not sure offhand.
> If I understand the readme correctly, you store frames individually (as jpegs?) on disk and construct flexible mp4 streams on the fly. Naturally I would have assumed that this would be inefficient so I’m wondering if I got this right, not very familiar with stream/video/codec tech
No, I store the video stream in the compressed form the camera gave it to me. Currently that's H.264; it wouldn't be hard to add H.265 support as well. I break it apart into roughly one-minute segments at convenient locations. The schema design doc talks about that here: https://github.com/scottlamb/moonfire-nvr/blob/master/design...
.mp4 serving will aggregate those together (maybe clipping the start and end segment) to give you a .mp4 segment for any time range of interest. It comes up with a mp4::File struct which knows what video segments to serve and maps byte locations to parts of the .mp4 container format. I don't have a good doc about how this works other than the source code right now. https://github.com/scottlamb/moonfire-nvr/blob/master/src/mp... [edit: and you probably won't be successful in understanding it without having a pdf of the ISO/IEC 14496-12 specification open next to it.] Here's some debug output for generating a five-minute video segment: https://pastebin.com/Wzfz7BF7
Storing individual frames as jpegs would be inefficient I agree in all sorts of ways: recording CPU (you have to decode the H.264 and re-encode it as JPEGs), disk space, disk seeks, playback bandwidth, browser CPU, etc. My understanding is this is how Zoneminder currently works. I imagine it worked better with the cameras Zoneminder was originally designed for: low-resolution, low-qps webcams that didn't do their own H.264 encoding.
Re: Ask HN: What do you do with your Raspberry Pi?
#287Doorlocks of our hackerspace has been RPi controlled almost since the original RPi came out, maybe 2013. Nowadays we got 4 doors on 3 RPIs (internal and external), with over 200 members that has access. Using MQTT to communicate with our membersystem since 2016 or so.
Re: Ask HN: What do you do with your Raspberry Pi?
#288I have it set up to run a project where a subreddit has control over the watering of a live plant in my apartment. The pi runs a reddit bot that reads the votes, and can switch on a pump to water. It also collects data about sunlight, moisture, temp and humidity to help inform the decision about watering. Despite many people's preconceptions about the goodness of the internet, I must admit that they do a wonderful jo…
I love it, well done!
Re: Ask HN: What do you do with your Raspberry Pi?
#289I'm kinda concerned by the number of mentions here of using the Pi to run OctoPrint (I think that's right?) to remotely admin and monitor a 3D printer... I've always been of the mind that a 3D printer should never be left physically unattended - even with monitoring (via camera and such), as they can potentially start a fire if something goes wrong (failed print spewing random filament?). Is this a wrong viewpoint? A…
Here is an example of what this guy had to go through: https://www.thissmarthouse.net/dont-burn-your-house-down-3d-...