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

green-bean

v0.1.1

Published

An Adapter for the Appliance Maker Community

Downloads

9

Readme

Green Bean

An Adapter for the Appliance Maker Community

The Green Bean is a hardware adapter that provides a USB interface to General Electric appliances. This allows devices such as a laptop or a Raspberry Pi to easily connect with, and control, General Electric appliances. For the purpose of this guide, we will be assuming that you will be connecting an appliance to your laptop using the Green Bean.

Overview

  1. Getting Started
  1. Using the Green Bean Software

Getting Started

There are a few steps that must be performed before we will be able to start controlling an appliance.

Connecting the Green Bean to an Appliance

The Green Bean must be connected to the appliance with an RJ45 cable. Any off-the-shelf ethernet cable should work. It is important not to use a crossover cable as this may damage the Green Bean. The RJ45 port is in a different location for each appliance, and can be located by referencing this table.

Connecting the Green Bean to a Laptop

The Green Bean must be connected to your laptop with a USB micro cable. Again, any off-the-shelf USB micro cable should work. The Green Bean is powered over USB and should appear as a USB HID device on your laptop shortly after it is plugged in.

Installing the Software

The software that controls the Green Bean and communicates with the appliances must be installed before you can start developing applications to control your appliance. If you have not already, please download and install node.js and then install the Green Bean software by running the following command from a terminal.

npm install green-bean

Using the Green Bean Software

To demonstrate the features of the Green Bean, I will show how easy it is to connect to an appliance and start communicating with it. Below are a few node.js applications that demonstrate how to communicate with, and control, an appliance.

Reading the Cycle Status of the Dishwasher

Below is an example of how to read the cycle status of the dishwasher. For a more in-depth look at this example, see the cycle status documentation.

var greenBean = require("green-bean");

greenBean.connect("dishwasher", function (dishwasher) {
    dishwasher.cycleStatus.read(function (value) {
        console.log("cycle status:", value);
    });
});

Starting a Cook Mode on the Oven

Below is an example of how to start a cook mode on an oven. For a more in-depth look at this example, see the cook mode documentation.

var greenBean = require("green-bean");

greenBean.connect("range", function (range) {
    range.upperOven.cookMode.write({
        mode: 18,
        cookTemperature: 350,
        cookHours: 1,
        cookMinutes: 0
    });
});

Receiving a Temperature Alert from the Refrigerator

Below is an example of how to subscribe to temperature alerts for a refrigerator. For a more in-depth look at this example, see the temperature alert documentation.

var greenBean = require("green-bean");

greenBean.connect("refrigerator", function (refrigerator) {
    refrigerator.temperatureAlert.subscribe(function (value) {
        console.log("temperature alert:", value);
    });
});

Receiving an End of Cycle Notification from the Dryer

Below is an example of how to subscribe to an end of cycle notification from a dryer. For a more in-depth look at this example, see the end of cycle documentation.

var greenBean = require("green-bean");

greenBean.connect("laundry", function (laundry) {
    laundry.endOfCycle.subscribe(function (value) {
        console.log("end of cycle:", value);
    });
});

Changing the Setpoint on the Water Heater

Below is an example of how to change the user setpoint on a water heater. For a more in-depth look at this example, see the user setpoint documentation.

var greenBean = require("green-bean");

greenBean.connect("water-heater", function(waterHeater) {
    waterHeater.userSetpoint.write(100);
});