Socket
Book a DemoInstallSign in
Socket

pfsense-blink1

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pfsense-blink1

<img src="https://raw.githubusercontent.com/amacado/pfsense-blink1/main/docs/images/pfsense-logo

0.2.4
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

pfsense-blink(1)


blink(1) pfSense®

Introduction

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

Quickstart

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.

Run the application

  • 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)
  • Adjust settings in config/config.json5 to your needs. The default values are defined in ConfigurationManager
  • Install and startpfsense-blink1 application
    npm i pfsense-blink1 -g
    pfsense-blink1 [--config "/path/to/config.json5"]
    

Development or 'Go build yourself'

  • Install yarn package manager (see yarnpkg.com)
  • Clone this repository (gh repo clone amacado/pfsense-blink1)
  • Execute yarn install
  • Execute yarn serve for TypeScript watcher
  • Execute yarn build to build the project and create production ready project in /dist/
  • 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:



Keywords

pfSense

FAQs

Package last updated on 09 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.