Giter VIP home page Giter VIP logo

green-bean's Introduction

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);
});

green-bean's People

Contributors

bakerface avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.