npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@brdk/node-red-picamera2

v1.0.0

Published

Node-RED node for taking photos on a Raspberry Pi using picamera2 library

Readme

@brdk/node-red-picamera2

A Node-RED node to take still photos on a Raspberry Pi using the picamera2 library. This node will only work on a Raspberry Pi with a camera module enabled.

Prerequisites on the Raspberry Pi

First, make sure your Raspberry Pi Camera is physically connected and detected. On Raspberry Pi OS Bookworm or later, the libcamera stack is enabled by default.

Install picamera2 if not already available:

        sudo apt-get update
        sudo apt-get install python3-picamera2

For 90°/270° rotation support, install Pillow:

        pip3 install Pillow

If you are using the default path during the file option set - the path ~/Pictures will be used.

Runtime information

This node requires Raspberry Pi OS bookworm or later with the libcamera camera stack. Tested with a docker container running Python 3, Node.js 22, and Node-RED 4.x+.

Quick start

  1. Drag picamera2-takephoto into your flow.
  2. Connect an inject node to trigger captures.
  3. Connect a debug node to inspect output.
  4. Select file mode: use Buffered Mode for in-memory processing, or use Default and Auto File Name to save to disk.
  5. Deploy and trigger.

Example flow idea:

  • inject -> picamera2-takephoto (Buffered Mode) -> function (base64 encode) -> storage/API node

Screenshot:

Example flow

Configuration fields

File settings

  • File Mode: 0 Buffered Mode, 1 Default, 2 Auto File Name
  • Image Name (autoname): used in auto mode as base name (no extension)
  • File Name (filename): used in default mode as base name (no extension)
  • File Path (filepath): output folder, default ~/Pictures/
  • File Format (fileformat): jpeg, png, bmp

Capture settings

  • Image Resolution: predefined list from 320x240 up to 3280x2464
  • Rotation: 0, 90, 180, 270
  • Image Flip: horizontal and vertical
  • Brightness: 0 to 100 (mapped internally to libcamera range)
  • Contrast: -100 to 100
  • Sharpness: -100 to 100
  • Quality: JPEG quality 0 to 100 (ignored for non-JPEG formats)
  • ISO: 0 (auto) or fixed values 100 to 800
  • Exposure: auto or manual
  • AWB: auto, daylight, cloudy, tungsten, fluorescent, incandescent, indoor
  • Wait for AGC (agcwait): delay before capture in seconds