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

homespun-grovepi

v0.2.0

Published

This is a Node.js module that reads sensors residing on a [Raspberry Pi](https://www.raspberrypi.org) and a [GrovePi+ Shield](http://www.dexterindustries.com/shop/grovepi-board/) and transcodes them to [TSRP](http://thethingsystem.com/dev/Thing-Sensor-Rep

Downloads

12

Readme

homespun-grovepi

This is a Node.js module that reads sensors residing on a Raspberry Pi and a GrovePi+ Shield and transcodes them to TSRP. You should review the homespun root in order to understand home this repository fits into the homespun family.

In brief, you need to be running a process on your home network that listens for TSRP traffic, and then feeds it to a server that listens for TSRP and uploads the sensor readings to the management cloud of your choice -- here's my choice.

Note that this repository does not have the "Wiki" section -- if you want to discuss the homespun framework or homespun-grovepi, please send an email to the maintainer requesting to be added to the homespun team.

Installation

The first step is to get a Raspberry Pi and a GrovePi+ Shield. (Note that there is an earlier version called the GrovePi shield -- no longer for sale; however, without loss of generality, the same instructions apply to both!)

Once you have the RPi configured, you'll need to install software on your RPi that will talk to the GrovePi+ shield. You can find the QuickStart here, but here's the gist:

First, gently mount on the GrovePi+ on the RPi, the pins should align exactly.

Next, install the software:

    pi@raspberrypi ~ $ git clone https://github.com/DexterInd/GrovePi.git
    ...
    pi@raspberrypi ~ $ cd GrovePi/Script
    pi@raspberrypi ~/GrovePi/Script $ chmod +x install.sh
    pi@raspberrypi ~/GrovePi/Script $ sudo ./install.sh
    ...

These commands may take a while, and (as of this writing) you'll be asked twice:

    Do you want to continue [Y/n]?

Please be patient. When complete, your RPi will reboot.

You can verify that everything installed OK, by running this command:

    pi@raspberrypi ~ $ sudo i2cdetect -y 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- 04 -- -- -- -- -- -- -- -- -- -- --
    ...

At this point you might as well upgrade the firmware on the GrovePi+ to the latest:

    pi@raspberrypi ~/GrovePi/Firmware $ sudo ./firmware_update.sh
    ...

The script may ask you to connect a jumper to the reset pin -- this is no longer necessary. You can check the firmware version by running:

    pi@raspberrypi ~/GrovePi/Software/Python $ python grove_firmware_version_check.py
    ('GrovePi has firmware version:', '1.2.2')

Finally, here is the list of supported sensors.

Programming

The "preferred" language for programming the GrovePi+ is Python. However in the GrovePi/Software directory, you will find examples in C, C#, Go, Node.js, and Python.

If you want to use the homespun.js script:

    pi@raspberrypi ~ $ cd homespun-master
    pi@raspberrypi ~/homespun-master $ npm -l install
    ...

In the file config.json, there are several configurations:

  • the first configuration is an example of using a Grove Water Sensor connected to pin D7; and,

  • the second configuration, the-kitchen-sink, is purposefully incomplete -- it contains definitions for all the Grove sensors known to work with the homespun.js script.

A configuration file is used to tell the homespun.js program which sensors are active, e.g.,

    pi@raspberrypi ~/homespun-master $ node homespun.js --config name whatever.json

Running

    pi@raspberrypi ~/homespun-master $ npm -l install
    ...
    pi@raspberrypi ~/homespun-master $ node homespun-grovepi.js

Without any arguments, homespun.js will use the first entry in the file config.json.

Not (Yet) Supported