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.
- Connecting the Green Bean to an Appliance
- Connecting the Green Bean to a Laptop
- Installing the Software
- Reading the Cycle Status of the Dishwasher
- Starting a Cook Mode on the Oven
- Receiving a Temperature Alert from the Refrigerator
- Receiving an End of Cycle Notification from the Dryer
- Changing the Setpoint on the Water Heater
There are a few steps that must be performed before we will be able to start controlling an appliance.
The Green Bean must be connected to a supported appliance using 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 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.
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
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.
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);
});
});
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
});
});
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);
});
});
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);
});
});
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);
});