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-od-grovepi

v0.0.2

Published

Node Red Nodes for GrovePi, for use with OpenDASH

Downloads

19

Readme

OpenDASH GrovePI Nodes

Package on npm

Installation

  1. npm install -s node-red-contrib-od-grovepi
  2. node-red-restart

Sensors

The blue sensors are DHT11 humidity & temperature sensors.

Nodes

See https://www.dexterindustries.com/GrovePi/engineering/port-description/

In addition to a node for each of the most common sensors, there are four “general” nodes.

  1. Digital Input, values: 0 or 1
  2. Analog Input, values: 0 to 1023
  3. Digital Output, values: 0 or 1
  4. Analog Output, values: 0 to 255

msg Properties

See https://nodered.org/docs/user-guide/messages

Usually, the "value" of a message is stored in its payload field. To make integration with other nodes easy, the payload of a sensor message only contains its values, all additional information is stored in other properties.

If a sensor returns multiple values (e.g. temperature and humidity), msg.payload is an array of these values.

In addition to that, msg.valueTypes is an array of value type specifications {unit: ..., name: ..., type: ...}.

This additional information is used for displaying sensor values on the LCD and when sending datapoints to the OpenDash platform.

The name and id values used in the open.DASH JSON object are stored in msg.sensorname and msg.sensorid.

user is set by the "RMQ Output" node and uses the "Username" value entered in the node configuration.

“Event Mode”

For some sensors, like the button, it might be useful to send an event only when the sensor value changes.

To do so, set the reading interval to a low value (e.g. 200ms), then connect the sensor to a "rbe" node.

This node only lets messages through if their payload has changed. It can be found at the bottom of the "Functions" section.

Inputs / Sensors

From left to right:

  1. Ultrasonic Ranger
  2. DTH22 Temperature & Humidity Sensor
  3. Light Sensor
  4. Loudness Sensor
  5. Button
  6. Rotary Angle Sensor
  7. Gas Sensor
  8. Air Quality Sensor

At the bottom:

  1. Heart Rate Sensor

Outputs / Actuators

From left to right:

  1. LCD RGB-Backlight
  2. LED
  3. Buzzer
  4. Relay

Sensors

I2C Sensors

When connecting a I2C sensor, it doesn't matter which pin is used.

Loudness Sensor

Records 5 samples per second, then sends out the average and the maximum value.

Troubleshooting

If a sensor returns false instead of a numeric value, check if the red LED on the GrovePI board is on.

In that case, disconnect all sensors from the board, detach the GrovePI board and put it back on.

Credits

There are two existing collections of GrovePI sensor nodes for NodeRed:

What makes this package different from the ones listed above is that each sensor includes some metadata about the values it sends in the message. This way, sensors can be connected to meaningful OpenDASH data streams without configuring the value types by hand.