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 🙏

© 2024 – Pkg Stats / Ryan Hefner

pi-obscura

v1.0.9

Published

Raspberry Pi timelapse camera

Downloads

4

Readme

Obscura

Obscura is a simple node app that runs on a RaspberryPi (in my case, a Pi Zero 2 W). It can be used to stream live video and take pictures remotely over the web, but it's principal function is to periodically take a snapshot and provide a streaming interface to allow time-lapse photography.

Features

  • Auto-adjusts quality & frame-rate to suit network conditions.
  • Simple, embedded API for viewing live video, taking HQ photos and playing time-lapses

required

Requirements

A RaspberryPi with enabled camera (see raspi-config). Developed and tested on RaspberryPi buster, later OS versions may need an additional download (for camera / MMAL support) as the camera module is built on that API for performance.

Installation

npm i pi-obscura

Alternatively, clone (and npm i) the repo at https://github.com/MatAtBread/obscura.git and run with pm2. In this configuration, you can aurto-deploy updates remotely (see Security for more info).

I run it with pm2 to ensure it starts up after a reboot or if the app crashes.

You can then view your images & video at http://<your-pi-host>:8000

Security

The app has no known security issues, however, connecting a Raspberry Pi to the internet without any protection is unwise. Potential mitigation strategies are:

  • Don't install anything else on the Pi. I recommend a "lite, headless" OS install to keep the performance up. Do not install browers or anything that stores passwords.
  • Don't save any passwords for other services you use on the Pi. In that case, even if your Pi is hacked (brute force on a Pi connected to the internet isn't very hard), there will be nothing of value other than your images.
  • Disable PasswordAuthetication in sshd and only allow access via pre-installed keys.
  • Don't use NAT or put a hole in your firewall that directly accesses the service (default port is 8000). If you want to see you images remotely, use SSH and a tunnel: ssh -L 8001:localhost:8000 and access the service as http://localhost:8001

The /admin page offers auto-deployment from source github repo (if you installed from github & run under pm2). If you make you Obscura available on the internet, any one can redeploy to your server. It is recommended that Obscura is not available to the public (ie only done on a home network, VPN or via a SSH tunnel) unless you disable this feature.

TO DO

  • Add some kind of simple auth to the /admin URL
  • Add options for managing storage (it will at present eventually fill your SD card)