GE Green Bean open source smart appliance adapter. - Page 1
Forum section: electronics / general

author: lapoltba
author_rank: Contributor
timestamp: February 24, 2016, 07:51:45 pm
content: This is not an advertisement or a product plug, just a combination of a request for help/info/rant on open source.I just purchased a new hybrid water heater, specifically the GE GEH80DFEJSR found here:http://products.geappliances.com/appliance/gea-specs/GEH80DFEJSRI am interested in using their ConnectPlus, or the "Open Source" Green Bean maker module:http://market.firstbuild.com/products/greenbeanto automate some energy saving controls I would like to do.My issues are:1. The application that works with ConnectPlus, including IFTTT do not support the functions I want to use.2. The protocol and API does not seem to be readily available.3. The Green Bean device is supposed to be "open source" but includes ZERO hardware information.4. The Green Bean uses node.js which I have no desire to learn how to use and I can't seem to get even a basic example running on my windoze box.5. Same as #2 but for the Green Bean.The Green Bean is touted as GEs offering to the open source community to allow development of smart capabilities for older products that do not have the native functionality. Limited support (from 2 years ago) for some appliances and zero development leads me to believe they really don't give a damn about open source. They released just enough to make it look open, when in reality they left out all the useful information that would allow someone to do something really nifty and useful. From what I can see the node.js commands are for the most part completely locked down and read only. The only thing you can do with them is change basic operating modes and temperatures. Hardware documentation is non-existant and obviously was purposely omitted. I feel like they threw the OS community a bone in order to get some good publicity and since they got their hurahs the project dies a slow silent death. You can't call something OS and then withhold information, that is exactly the opposite of what the movement is about.Does anyone know of any hacking/sniffing that has been done to figure out what the RJ45 interface on these water heaters actually is? I can't imagine it's more complicated than a RS232/RS422/RS485 communication port. I get that this is a consumer product, but if you're going to call something open source, it should all be open source at least up to the guts of the water heater itself.I'm an automation/controls engineer, and I play with stuff like this every day. If I know the communication protocol, memory addresses, command set, and communication protocol doing what I want would be a cake walk. I'm sure just about any Arduino could handle the job.

author: JonnyBoats
author_rank: Regular Contributor
timestamp: March 08, 2017, 01:20:00 pm
content: I just purchased one of the now discontinued GE GeoSpring 50-Gallon Electric Water Heater with Hybrid Heat Pump from Lowes here in the USA. It was a great deal because my state (Maine) gives a $750 energy rebate so the net cost is less than a regular water heater. Anyway I too would like to use the Green Bean interface and would like to know if anyone has more information on this.

author: lapoltba
author_rank: Contributor
timestamp: March 08, 2017, 02:23:59 pm
content: Give up. I was in touch with the "developers" around the time I wrote that post and didn't get any further than what you can find on Google. The Api is fore Nodejm and basically useless to me as I do not have time to learn another language. If it was python or something else it would be workable. I couldn't even get info on the raw communication protocol so I could just talk directly to the WH. I suspect it is probably RS485. UT even if I could sniff it, it is probably encrypted somehow and I wouldn't even know the structure of the data registers and what they do.TLDR: Green Bean seems to have been a half hearted attempt by GE to throw the OS community a bone and now that they have discontinued their line, there is little chance for expanded support for it. I love the water heater but I have better things to do with my time than connecting it to the Internet of poorly secured things.

author: mwalker
author_rank: Contributor
timestamp: March 09, 2017, 11:35:25 am
content: Seems like there is a fair bit of info on the protocol for water heaters in this file:https://github.com/GEMakers/gea-plugin-water-heater/blob/master/hewh-interface.docxAs for the node.js stuff, it is just JavaScript, if you know python you would be able to make sense of it. That said all it seems to be doing is opening up USB HID device with a specific vendor and product id and passing strings back and forth. The packet format is fairly well documented in:https://github.com/GEMakers/gea-adapter-usb/blob/master/index.jsBased on comments there seems to be a micro controller in the Green Bean device so I reckon I would go with that rather than work out how to reverse engineer the wire protocol.

author: lapoltba
author_rank: Contributor
timestamp: March 09, 2017, 09:02:55 pm
content: Well, I can put my foot in my mouth now. I did not find that document when I was looking. I must not have been looking that hard.I would bet those are transmitted directly to the WH and the green bean is just a serial converter. Although, the picture of it shows a PIC24F microcontroller, so it may be more complicated than that. Worst case the module is only $20 so it isn't worth screwing around with trying to figure out the exact protocol. If the GB module enumerates as a serial port, that is easy enough to play around with in Realterm to see if the WH will respond to a status command.Now to set it up with a Raspberry pi and USBIP so I don't have to go down to my basement to fiddle with it.

author: mwalker
author_rank: Contributor
timestamp: March 09, 2017, 09:50:36 pm
content: Good luck!It seems like it presents as a HID (human input device) rather than a serial port so you might need a USB library likehttps://github.com/walac/pyusb/blob/master/docs/tutorial.rstto talk to it.Reading the packet format it looks like there are two encapsulations, probably that PIC strips one, but who knows what else it might do.

author: nidlaX
author_rank: Frequent Contributor
timestamp: March 10, 2017, 03:07:48 am
content: Node.js is simplistic. Have you seen how little code you need to run their demos?https://github.com/GEMakers/green-beanAs for setting up Node, simply install the LTS version fromhttps://nodejs.org/en/. Create a project directory and runCode:npm install green-bean. Copy paste their example into a text file, then runCode:node your_file.jsand Bob's your uncle.That said, I have no fucking clue why anyone would want to expose their oven controls to the Internet. But hey, it's your house.

author: lapoltba
author_rank: Contributor
timestamp: March 19, 2017, 12:52:02 am
content: So it's not *THAT* easy. I got node installed, had to install git too which was not mentioned anywhere. Did "npm install green-bean" and I think that installed as there are all the related green bean modules in the nodejs npm directory. I created a simple .js script to get the current set temperature of the water heater and ran "node test.js" and got nothing. The cmd.exe just sat there doing nothing. I have USBalyzer installed and ran that while i opened a new cmd.exe and ran the test.js again. A bunch of stuff seems to be happening on the green bean HID but the water heater doesn't seem to be responding. If I unplug the USB cable from the green bean I get an error something like it couldn't find the device.What is the best practice for creating a project directory? I tried just putting my test.js file into the node npm-modules directory but that entire folder tree seems to be made read-only. If I put the test.js file on my desktop and run it from cmd.exe I get a bunch of errors telling me the modules are not found.So still just as useless as it was before when I didn't have the module.Any suggestions?

author: mwalker
author_rank: Contributor
timestamp: March 19, 2017, 08:01:13 am
content: It sounds like everything you need is installed if you're getting USB activity, I would suggest first just using node in interactive mode with the hid to see if you can see the green bean device, using the code at:https://github.com/node-hid/node-hid#list-all-hid-devices-connectedYou should see a device with a vendor id of 1240 and a product id of 64752. Presuming that works then I'd see if I can connect to it, without the GE infrastructure:Code:var device = new HID.HID(1240, 64752);// These are callbacks for when data or errors are received from the Green Beandevice.on("data", function(data) { console.log('Received: ' + JSON.stringify(data))});device.on("error", function(error) { console.log('Received Error: ' + JSON.stringify(error))});// Best I can work out this should send the most basic command to the Green Bean, asking for a list of devices on the busdevice.write([0xde, 0xad, 0x00, 0x01, 0x02, 0x01, 0x00]);Hopefully that triggers one of the call back functions which will dump its output on to the console. It seems the GE code ignores any responses to this command however, so maybe there aren't any.Best I can guess this is the next command:Code:device.write([0xde, 0xad, 0x00, 0x01, 0x0b, 0x02, 0xde, 0xad, 0xbe, 0xef, 0x01, 0x04, 0xff, 0x08, 0x1b, 0x01]);But honestly it is not clear from the source code what that does, but it does seem to be run every time an adapter is opened. The second last byte may need to be 0xcb rather than 0x1b, this is the bus address of the green bean, they use both in different places, possibly you can pick anything you want, it's not clear.An alternative would be to drop console.logs into gea-adapter-usb/blob/master/index.js to blat out the contents of outgoing and incoming packets. but I suspect you are going to need to bit bang away to try and get an understanding of the format, and where things might be going wrong, possibly this will be easier in USBAlyzer. If so you could use this example code fromhttps://github.com/GEMakers/gea-sdkCode:var gea = require("gea-sdk");var adapter = require("gea-adapter-usb");// configure the applicationvar app = gea.configure({address: 0xcb,version: [ 0, 0, 1, 0 ]});// bind to the adapter to access the busapp.bind(adapter, function (bus) {// send a messagebus.send({command: 0x01,data: [ 1, 2, 3, 4 ],source: 0xcb,destination: 0xff});});I'd addCode:console.log('sendPacket: ' + JSON.stringify(writer.toArray()));at line 54 in the try block andCode:console.log('onPacketReceived: ' + JSON.stringify(packet));at line 96 as the first line in the onPacketReceived function.I didn't think node needed anything special for a project directory, but my experience is only on Linux, it does sound like some sort of pathing problem though.

author: lapoltba
author_rank: Contributor
timestamp: March 19, 2017, 04:08:55 pm
content: ReferenceError: HID is not definedat Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\test2.js:1:80)at Module._compile (module.js:570:32)at Object.Module._extensions..js (module.js:579:10)at Module.load (module.js:487:32)at tryModuleLoad (module.js:446:12)at Function.Module._load (module.js:438:3)at Module.runMain (module.js:604:10)at run (bootstrap_node.js:394:7)at startup (bootstrap_node.js:149:9)at bootstrap_node.js:509:3

author: mwalker
author_rank: Contributor
timestamp: March 19, 2017, 09:45:42 pm
content: Oops! Missed a line.Code:var HID = require('node-hid');var device = new HID.HID(1240, 64752);// These are callbacks for when data or errors are received from the Green Beandevice.on("data", function(data) { console.log('Received: ' + JSON.stringify(data))});device.on("error", function(error) { console.log('Received Error: ' + JSON.stringify(error))});// Best I can work out this should send the most basic command to the Green Bean, asking for a list of devices on the busdevice.write([0xde, 0xad, 0x00, 0x01, 0x02, 0x01, 0x00]);You should also be able to run this all in interactive mode, rather than having to use a script. Just run node, and then you should get a node prompt. You can then copy and past line by line.

author: lapoltba
author_rank: Contributor
timestamp: March 19, 2017, 10:28:24 pm
content: I did try that and got a similar error.

author: mwalker
author_rank: Contributor
timestamp: March 19, 2017, 11:54:23 pm
content: In interactive mode this is what I get (I type/paste in the bits after the > prompts):Code:> var HID = require('node-hid');undefined> HID{ HID:{ [Function: HID]super_:{ [Function: EventEmitter]EventEmitter: ,usingDomains: true,defaultMaxListeners: [Getter/Setter],init: ,listenerCount:  } },devices:  }> var devices = HID.devices();undefined> devices[ { vendorId: 0,productId: 0,path: 'IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/SBUS@1F,3/AppleSMBusPCI/BUS0@0/AppleSMBusControllerICH/MKY0/AppleMikeyDriver/AppleMikeyHIDDriver',serialNumber: '',manufacturer: '',product: 'Apple Mikey HID Driver',release: 0,interface: -1,usagePage: 12,usage: 1 },… etc.I'm loading the node-hid library, checking that I got something, then asking it for a list of devices, then inspecting the list. If you get that far successfully then you could try:Code:> var device = new HID.HID(1452, 33346)undefined> deviceHID {domain:Domain {domain: null,_events: { error:  },_eventsCount: 1,_maxListeners: undefined,members: [] },_events: { newListener:  },_eventsCount: 1,_maxListeners: undefined,_raw: HID {},write: [Function: bound write],getFeatureReport: [Function: bound getFeatureReport],sendFeatureReport: [Function: bound sendFeatureReport],setNonBlocking: [Function: bound setNonBlocking],readSync: [Function: bound readSync],readTimeout: [Function: bound readTimeout],getDeviceInfo: [Function: bound getDeviceInfo],_paused: true }Here I'm opening a device (an IR receiver in my case), and then inspecting it. You will need to change the vendor and product ids to do it for the Green Bean (1240, 64752).If you can paste the output of what you get that may help us narrow down the issue.

author: lapoltba
author_rank: Contributor
timestamp: March 20, 2017, 12:37:12 pm
content: I will look at it again tonight if I have time. I'm guessing I don't have the HID library. Unless it is installed by default. I don't remember seeing it.

author: mwalker
author_rank: Contributor
timestamp: March 20, 2017, 12:39:55 pm
content: Just off to bed hereIt should have been pulled in by installing the green-bean package as a dependency.

author: nidlaX
author_rank: Frequent Contributor
timestamp: March 22, 2017, 10:29:49 am
content: The npm_modules folder contains all the dependencies of your project. It should be in your project's root directory, your own files (in this case) don't go in there. You can debug by console.log()ing key variables.Quote from: lapoltba on March 20, 2017, 12:37:12 pmOn GE's git, package.json (the file that defines your project's general information and dependencies) already includes node-hid, so it should be installed for you when you install their app.

author: Michael256
author_rank: Newbie
timestamp: April 18, 2017, 07:21:10 pm
content: I just bought a Green-Bean to talk with my GeoSpring. I'm looking to monitor it's operation first, then maybe customize the operation to ensure that it is up to full temperature at the time when people take showers. It seems that the tank temperature varies quite a bit, probably due to a fairly large hysteresis. If it's low when showers start, they aren't as warm as we would like. Sure I could just crank up the temperature, but if I can make this work I get a fun project and can fix the issue without wasting energy...Anyway, my first experience (after finding my way through git and npm installation) was just like yours. It gets an error when not installed, but just hangs there when plugged in.I haven't finished going through all your posts in detail, but one thing I found online that I didn't see mentioned was that there is a known issue with the water heater plugin:https://github.com/GEMakers/gea-plugin-water-heater/issues/1. It sounds like what we are experiencing.From the discussion there, there was an earlier version of code that did work, but the current code on GitHub doesn't. Unfortunately I haven't been able to find that yet. I'm hoping that FirstBuild has a copy of that. I sent them email, but they haven't replied yet (< 48 hours).I tried doing a bit of debug on the .js code to see where it is hanging, but apparently I'm going to actually have to learn more about javascript because the last line of a function is executing, but the function doesn't seem to be returning.I inserted a console.log in the last line of green-bean\index.js[exports.connect] and that gets printed out, but a console.log I have after greenBean.connect in my test code below isn't printing.Code:var greenBean = require("green-bean");console.log("start.");greenBean.connect("water-heater", function(waterHeater) {console.log("connect.");waterHeater.userSetpoint.read(function(value) {console.log("user setpoint is:", value);});});

author: lapoltba
author_rank: Contributor
timestamp: April 18, 2017, 07:28:59 pm
content: Honestly I gave up and haven't found where I put the GB module to throw it away yet. I hope you come up with a solution, but I'm not holding my breath. I did go back and try a few things and still couldn't get it to work.

author: nidlaX
author_rank: Frequent Contributor
timestamp: May 04, 2017, 04:01:49 am
content: Quote from: Michael256 on April 18, 2017, 07:21:10 pmTry console.log(waterHeater) to get some more info on the object.EDIT: Sorry nevermind, your connect function never runs the callback right?

author: BamaBoyDon
author_rank: Newbie
timestamp: May 09, 2017, 05:54:07 pm
content: Hello,I installed a GeoSpring HPWH and back in October 2014 I got a greenbean and got it working with my RaspberryPi (Wheezy) in February 2016. I got the sdk from git hub, and I remember having issues getting it going then I found GeoSpringHack on github and GeoSprintHack works with my greenbean. I shelved working on this until I get around too it after writing a blog post:http://g-r-i-t.blogspot.com/2016/02/getting-green-bean-going.htmlToday I fired it up and it's still working. I used the command:sudo node geospring-test.js(if you don't use sudo you can't open the HID device).There's a link in the blog post to the GeoSpringHack code and if I remember right I just followed the readme and it worked.I'm going to be messing with this again using the Pi. If there is something you want me to try let me know.Thanks,Don Miller

author: Michael256
author_rank: Newbie
timestamp: June 10, 2017, 09:19:13 am
content: I got this working finally in Linux.Don, thanks for your info. Too bad I didn't read it before today. That would have saved me quite a bit of time figuring out that I needed to use "sudo" to access the HID device. And yes, the callback for connect was never executed (In Windows 10).FirstBuild did reply to my email, and after some discussion with them, it seems that this was never tested with Windows and the guy there couldn't make it work with Windows either. I eventually got it running on Linux. Also, I was able to install Linux on an Oracle VirtualBox (free), and control the GreenBean with that so I can continue to use Windows while this runs in the background. I may eventually get myself a Raspberry Pi, but now that I have this working I'll probably table it for a few months. I did use this to determine that yes, there is a significant hysteresis. When I first connected, the tank temp was 116.x when it was set to 120. It had been maybe 10 hours since the last shower. I haven't set up logging yet to see how low it will get, but when I bumped the temp to 122, it came on and got to 122 in about an hour. So my plan should be able to work: Force the heat pump on an hour before showers will start if the water isn't up to temp.-Michael

author: the1snm
author_rank: Contributor
timestamp: September 22, 2017, 08:39:54 pm
content: I'm looking to automate some of my Geospring functions and have been searching all over to find a GreenBean maker module available for sale. Has anyone see one elsewhere besides the FirstBuild site (it was on there and I ordered it only to have them cancel it a week later, still waiting on my money back) I figure somewhere out there someone must have picked one up for sale or never used it and is willing to part with it. If anyone has any suggestions or an extra one please shoot me a message.

author: the1snm
author_rank: Contributor
timestamp: November 09, 2017, 12:58:12 pm
content: So I've been tinkering with trying to get my RPi up and running to be able to connect to the GreenBean module and have not made any break through progress. I keep ultimately getting issues with the HID not able to connect to the module. I know this isn't a huge amount of help without logs or pictures either. I haven't really used anything Linux based in nearly 20 years so the learning curve is essentially all new again.I was wondering if anyone would be willing to help walk through this with me either online or offline. I would guess it's probably best at this point to wipe what I have installed and start fresh. I figure for someone who knows what they are doing it should only take minutes not counting the time to actually install the software on my end.I'd be more than willing to compensate someone for their time getting my connection up and running with something like a new Raspberry Pi or the like... Just shoot me a PM if you wanna go offline and can move to emails.Thanks in advance,Steve

author: the1snm
author_rank: Contributor
timestamp: November 13, 2017, 02:10:57 pm
content: I've been able to get the GreenBean via RPi to connect to the water heater so far. I've tested some basic scripts reading and changing modes and such. Would anyone be willing to share the JS scripts developed so far to log some of this data or other functionality they've discovered?

author: daklein
author_rank: Newbie
timestamp: January 22, 2019, 06:07:06 pm
content: Anyone still working with the GreenBean and your GE heat pump water heater? What functionality are you implementing with controlling or monitoring it?I would like to understand and data log the WH operating modes, temperatures and component status. I have noted it running the resistance elements sometimes, even when in eHeat mode, wondering why. I suppose it could be lack of abundance source heat from a cold & dry basement in winter. Sometimes I see long recovery times, other times it seems very fast (running the resistance elements?)... Maybe I should disconnect the resistance elements....I have started using the WH for waste heat recovery and the control I want to add is to run the WH when there is additional available heat or humidity to be recovered. I may integrate it with a wintertime ventilation system, sending stale air through the WH to recover energy and then exhausting outdoors, with a matched fresh air supply into the house. I would also like to duct shower steam to it, there's a lot of energy there being dumped outside.Currently the exhaust from a conventional electric clothes dryer is ducted next to the WH, and I would like to run the WH in concert with the dryer. The WH is also installed next to a relatively in-efficient gas hydrionic boiler, to use the waste heat from that. Some of the time, I think..., the water heater is already running at appropriate times to use the waste heat. Someone showered or washed clothes, creating demand for hot water, and then they put some clothes in the dryer. Or showers use hot water in the morning or evening, when the furnace runs. But it would be neat to actively control it. If the WH stores up an additional 5 or 10 dF, the hot water loving family will not complain, and it should reduce the WH energy consumption.A simple control I am thinking try first: offset the T2 (tank temperature) thermistor by adding a resistance in series with a relay, causing the WH control to see lower tank temperature and turn on the heat pump, if there is increased heat or humidity available. Making a note of the temperature and resistance shown in the component status screens, the T2 sensor has a range of 4 to 8 kOhms, and the slope is about 9 dF per 1kOhm. We'll see if this causes any diagnostic codes to set? Or use the GreenBean to increase the setpoint.Thanks, Dale

author: electromotive
author_rank: Regular Contributor
timestamp: March 05, 2019, 05:13:15 pm
content: Quote from: daklein on January 22, 2019, 06:07:06 pmI'm not working on Green Bean, but I've got a new Rheem water heater that *should* be convertable into one of the network enabled smart heaters.