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

node-red-contrib-pisupply-pijuice-pis0212

v1.0.1

Published

Node-RED nodes for a Pi Supply PiJuice model PIS0212

Downloads

9

Readme

node-red-contrib-pisuppy-pijuice-pis0212

A set of Node-RED nodes to monitor a PiJuice battery backup system

Install

First follow the instructions on the Pi Supply PiJuice site. I enable I2C using sudo raspi-config, in the Interface options. Note that some battery types can be configured by adjusting the PiJuice DIP switches or any battery type can be selected via later software configuration.

I run sudo apt-get install pijuice-base as in my application the GUI is not required.

After I verify thru testing that the hardware and pijuice_cli work, then its time to install this Node-RED node.

Either use the Node-RED Menu - Manage Palette option to install, or run the following command in your Node-RED user directory - typically ~/.node-red

    npm i node-red-contrib-pisupply-pijuice-pis0212

The node provides an example flow. In Node-RED, click the right side hamburger menu, "import", "Examples", "node-red-contrib-pisupply-pijuice-pis0212"

I would suggest trying the example demo flow before creating your own flow.

Usage

Battery Capacity

  • msg.payload - any

msg.payload any input triggers the start of a poll.

The output payload will be a numeric percentage of battery capacity.

For example, given an input payload of a timestamp, a fraction of a second later will result in an output payload of number 97, if the battery is 97 percent charged.

See help file for more detail.

Battery Temperature

  • msg.payload - any

msg.payload any input triggers the start of a poll.

The output payload will be a numeric Celsius temperature of the battery.

For example, given an input payload of a timestamp, a fraction of a second later will result in an output payload of number 25, if the battery is around 25 degrees C room temperature.

See help file for more detail.

Battery Voltage

  • msg.payload - any

msg.payload any input triggers the start of a poll.

The output payload will be a numeric battery voltage in units of Volts.

For example, given an input payload of a timestamp, a fraction of a second later will result in an output payload of number 4.165, if the battery is nearly fully charged.

See help file for more detail.

GPIO Current

  • msg.payload - any

msg.payload any input triggers the start of a poll.

The output payload will be a numeric current in mA on the UPS GPIO pins.

For example, given an input payload of a timestamp, a fraction of a second later will result in an output payload of number 594, implying the Pi is using 594 mA of current at this instant.

See help file for more detail.

GPIO Voltage

  • msg.payload - any

msg.payload any input triggers the start of a poll.

The output payload will be a numeric voltage in Volts on the UPS GPIO pins.

For example, given an input payload of a timestamp, a fraction of a second later will result in an output payload of number 5.039, which is pretty close to the designed Pi operating voltage of 5 volts.

See help file for more detail.

USB Power

  • msg.payload - any

msg.payload any input triggers the start of a poll.

The output payload will be a numeric percentage of battery capacity.

For example, given an input payload of a timestamp, a fraction of a second later will result in an output payload of string PRESENT, if the USB charge input has power to charge the battery, or NOT_PRESENT, if there is no or not enough power at the USB charge input to charge the battery.

See help file for more detail.

Links

https://uk.pi-supply.com/products/pijuice-standard

https://learn.pi-supply.com/make/pijuice-quick-start-guide-faq/

https://learn.pi-supply.com/make/how-to-save-power-on-your-raspberry-pi/

https://github.com/PiSupply/PiJuice

https://gitlab.com/SpringCitySolutionsLLC/pisupply-pijuice-pis0212

https://www.npmjs.com/package/node-red-contrib-pisupply-pijuice-pis0212

https://flows.nodered.org/node/node-red-contrib-pisupply-pijuice-pis0212

https://nodered.org/

Copyrights and Licenses

Majority of code Copyright (c) 2020 Spring City Solutions LLC and other contributors and licensed under the Apache License, Version 2.0

Icon made from http://www.onlinewebfonts.com/icon aka Icon Fonts is licensed by CC BY 3.0