gemakers / green-bean Goto Github PK
View Code? Open in Web Editor NEWAn Adapter for the Appliance Maker Community
License: GNU General Public License v2.0
An Adapter for the Appliance Maker Community
License: GNU General Public License v2.0
I have a Raspberry Pi that I have connected to my GB. I've been connecting the GB to a Viper and a Hawk.
While (slowly) learning about the data that comes back from the appliances, I've been connecting the GB to either the Viper or Hawk and leaving a trivial "status.js" program running in a "screen" for a week or so (I capture all the data for later analysis) -- see source here: https://gist.github.com/jsquyres/feb45fe7b34ffe0a034d
status.js runs just fine and outputs all manner of wonderful data (I leave it connected to a single appliance during these runs -- e.g., I'm not connected to the washer for a while and then unplug/replug into the dryer during a single status.js run).
However, after a few days, status.js stops and returns to a shell prompt for no apparent reason. There's no error, and I don't know why the program would just stop (none of the node.js subscriptions should have exited, so the loop should keep firing AFAIK...?).
In some cases, status.js terminates during the middle of a Hawk/Viper cycle. In other cases, it terminates not during a cycle (i.e., a cycle completed, and I don't have a data point for exactly when status.js terminated).
Is this a known issue? If not, is there anything I can run on my end to further diagnose this issue?
C:\Windows\system32>npm install green-bean
npm ERR! registry error parsing json
npm ERR! SyntaxError: Unexpected token <
npm ERR!
Apache Tomcat/5.5.28 - Error report<!
--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;f
ont-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-c
olor:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:whit
e;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-
serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-seri
f;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;
background:white;color:black;font-size:12px;}A {color : black;}A.name {color : b
lack;}HR {color : #525D76;}-->
HTTP Status 404 - /green
-bean
type Status report
m
essage /green-bean
description The requested resource
(/green-bean) is not available.
Apach
e Tomcat/5.5.28
npm ERR! at Object.parse (native)
npm ERR! at RegClient. (C:\Program Files\nodejs\node_modules\npm
node_modules\npm-registry-client\lib\request.js:274:23)
npm ERR! at Request._callback (C:\Program Files\nodejs\node_modules\npm\node
_modules\npm-registry-client\lib\request.js:246:65)
npm ERR! at Request.self.callback (C:\Program Files\nodejs\node_modules\npm
node_modules\request\request.js:236:22)
npm ERR! at Request.emit (events.js:98:17)
npm ERR! at Request. (C:\Program Files\nodejs\node_modules\npm\no
de_modules\request\request.js:1142:14)
npm ERR! at Request.emit (events.js:117:20)
npm ERR! at IncomingMessage. (C:\Program Files\nodejs\node_module
s\npm\node_modules\request\request.js:1096:12)
npm ERR! at IncomingMessage.emit (events.js:117:20)
npm ERR! at _stream_readable.js:943:16
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "green-bean"
npm ERR! cwd C:\Windows\system32
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! type unexpected_token
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Windows\system32\npm-debug.log
npm ERR! not ok code 0
Is this an issue related to network/proxies etc?
P.S: I am using Windows 7 (64bit) & using npm version 1.4.28
Can't find anything on the website, nor is google finding any source other than to that site. Is the module even still available?
Hello,
I am trying to communicate with a washer using the green bean and a Windows 7 notebook. I managed it to get everything installed but unfortunately it seems that there is no communication to the green bean at all.
If I run the following simple script in cmd.exe as admin I always get the same error message regardless of whether the washing machine is plugged to the green bean or not.
console.log("Program started.");
var greenBean = require("green-bean");
greenBean.connect("laundry", function (laundry)
{
laundry.cycleStatus.read(function (value)
{
console.log("cycle status:", value);
});
});
Program output:
Program started.
events.js:141
throw er; // Unhandled 'error' event
^
Error: Cannot write to HID device
at Error (native)
at sendPacket (C:\green-bean\node_modules\gea-adapter-usb\index.js:52:17)
at updateAddressList (C:\green-bean\node_modules\gea-adapter-usb\index.js:70:9)
at ensureAddressExists (C:\green-bean\node_modules\gea-adapter-usb\index.js:82:9)
at Adapter.send (C:\green-bean\node_modules\gea-adapter-usb\index.js:137:9)
at Adapter.bus.send (C:\green-bean\node_modules\gea-sdk\src\command.js:46:9)
at null._repeat (C:\green-bean\node_modules\gea-sdk\src\appliance.js:464:13)
at wrapper [as _onTimeout] (timers.js:275:19)
at Timer.listOnTimeout (timers.js:92:15)
I would be glad if somebody could tell me what to try to achieve a proper communication.
Thanks
Duke Nukem
Hi,
Thanks for all the hard work, can you please add support for:
PYE22PSHHSS
Thanks
I am trying to install green-bean inside of node.js using npm but I am getting an error:
..\hidapi\windows\hid.c<23>: fatal error C1083: Cannot open include file: 'windows.h': No such file of directory [C:\Windows\System32\node_modules\green-bean\node_modules\gea-adapter-usb\node_modules\node-hid\build\binding.sln]
I installed Visual Studio 2005 and looked in the include folder and didn't find windows.h. How can I solve this problem?
I am running windows 7 32bit.
Hi folks,
I originally posed this question on the 1B forums, but @MylesCaley recommended that I open an issue here as well.
I recently started doing some testing with my laundry pair and discovered an oddity with how the gea-sdk handles more than one Green Bean (and it's associated appliance) attached to my development machine. For example, if I call appliance.modelNumber.read() it will fire once for each connected appliance. This also seems to happen for the subscribe() function. Since there is no clear source to what GB/appliance is responding to the read() and subscribe() functions it can lead to confusion in handling the results.
Per @MylesCaley's suggestion, I tried defining different addresses for two sample applications (0xE5 for the dryer and 0xE4 for the washing machine), but this seems to have no bearing on the behavior. The first script to run appears to claim all the USB-attached Green Beans, resulting in a USB read error when the next script is started. I have posted full details of the scripts and the output to Gist here.
Hello,
I noticed that the hyperlink for the "This Table" link does not work. Please send guidance for working with connecting to appliances.
Sincerely,
Seth
My greenbean works fine with my macbook and GeoSpring 50, but I seem to be missing something when trying to talk to it through a Raspberry Pi Model B. The node npm installs go fine, and the device enumerates fine, but then node-hid fails to open the device:
/home/marc/development/greenbean/water-heater/node_modules/green-bean/node_modules/gea-adapter-usb/node_modules/node-hid/index.js:24
this._raw = new (Function.prototype.bind.apply(binding.HID,
^
Error: cannot open device with path 0001:0006:00
at Error (native)
at new HID (/home/marc/development/greenbean/water-heater/node_modules/green-bean/node_modules/gea-adapter-usb/node_modules/node-hid/index.js:24:14)
at Object.exports.bind (/home/marc/development/greenbean/water-heater/node_modules/green-bean/node_modules/gea-adapter-usb/index.js:171:22)
at configuration.bind (/home/marc/development/greenbean/water-heater/node_modules/green-bean/node_modules/gea-sdk/src/main.js:26:17)
...
Here it is with lsusb:
Bus 001 Device 006: ID 04d8:fcf0 Microchip Technology, Inc.
This is a pretty vanilla up-to-date raspbian image. Am I missing some kernel module or userspace package?
Thanks!
Has the information on the green bean been moved to a different location?
Tried install on a ARM Pi and Intel laptop - same result. I dug in and manually installed a bunch of dependencies (libhid and such) to see if I could get it to complete but it still petered out. At the moment there's no way to use this library, and my new green-bean is sitting there lonely.
npm install green-bean
[email protected] install /home/auser/node_modules/node-hid
prebuild-install || node-gyp rebuild
/usr/bin/env: βnodeβ: No such file or directory
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-92-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/auser/node_modules/node-hid
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/home/auser/package.json'
npm WARN auser No description
npm WARN auser No repository field.
npm WARN auser No README data
npm WARN auser No license field.
npm ERR! Linux 4.4.0-92-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "green-bean"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: prebuild-install || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'prebuild-install || node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-hid package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! prebuild-install || node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-hid
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-hid
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/auser/npm-debug.log
Hi,
How can I get a Green Bean? I have a Geospring water heater (the newer model) and I'd like to control it with my Raspberry Pi. I was pointed here by William Burke on Twitter. I can't find any information about this project anywhere. Help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.