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

pfsense-blink1

v0.2.4

Published

<br /> <div align="center"> <img src="https://raw.githubusercontent.com/amacado/pfsense-blink1/main/docs/images/blink1-logo.png" alt="blink(1)" height="60" /> <img src="https://raw.githubusercontent.com/amacado/pfsense-blink1/main/docs/images/pfsense-logo

Downloads

9

Readme

pfsense-blink(1)

Introduction

Watch your pfSense® firewall temperature with blink(1) using Node.js® runtime

Quickstart

Docker (recommended: docker-compose.yml)

docker pull ghcr.io/amacado/pfsense-blink1:latest

Requirements

  • blink(1) mk2 or mk3 by THINGM mk1 does not have two LEDs on both top and bottom which are independently addressable. It might work, but not tested.

Preparations & setup

The intended deployment of this script is on another machine (or container) than the pfSense®. It's recommended to keep your firewall server as "clean" as possible.

  1. Setup jaredhendrickson13/pfsense-api for pfSense®
  2. Create an API Token for the REST API (see jaredhendrickson13/pfsense-api instructions)
  3. Install libusb driver apt-get install libusb-1.0-0 which is required to access the blink(1) device using the node package sandeepmistry/node-blink1
  4. Install nodejs (see nodejs.org)
  5. Connect the blink(1) via USB

Run the application

  1. Copy config/config.sample.json5, rename it to /path/to/config.json5 (default /config/config.json5) and paste API credentials and pfSense® URI (see json5.org for more information about the this next level json project)
  2. Adjust settings in config/config.json5 to your needs. The default values are defined in ConfigurationManager
  3. Install and startpfsense-blink1 application
    npm i pfsense-blink1 -g
    pfsense-blink1 [--config "/path/to/config.json5"]

Development or 'Go build yourself'

  1. Install yarn package manager (see yarnpkg.com)
  2. Clone this repository (gh repo clone amacado/pfsense-blink1)
  3. Execute yarn install
  4. Execute yarn serve for TypeScript watcher
  5. Execute yarn build to build the project and create production ready project in /dist/
  6. Setup pre-push hook with following script
    #!/bin/sh
    yarn build
    git add dist/
    git diff-index --quiet HEAD || git commit -m ":octocat: build sources via pre-push hook"
       
    exit 0

Publishing new (npm package) version

This project follows Semantic Versioning 2.0.0 with the help ofnp CLI tool to ensure quality.

yarn global add np
npm install np -g

Create a new version and publish (np is installed as dev-dependency):

np

Known problems

Error TypeError: cannot open device with path

This error may occurs when the current user is not allowed to access the attached blink(1) device:

TypeError: cannot open device with path /dev/hidraw0

If you're running this script in a docker container you might want to check the bindings and mount /dev:/dev which allows the container to access the device.

Error libusb-1.0.so.0: cannot open shared object file
Error: libusb-1.0.so.0: cannot open shared object file: No such file or directory

This error occurs if you haven't installed libusb driver apt-get install libusb-1.0-0.

ERR! self signed certificate
ERR! self signed certificate

This error occurs when the SSL certificate which should secure your REST API connection is self signed. There are two solutions for this problem: Either authorize your SSL certificate or skip the check by setting configuration option api.httpsAgent.rejectUnauthorized = false (see /config/config.sample.json5).

Credits

Special thanks to these projects:

forthebadge forthebadge forthebadge forthebadge