Closed jbmurphy closed 9 years ago
make sure the user running gateblu-forever has rights to the devicePath
and tmpPath
specified in your meshblu.json file. It defaults to <current_working_dir>/devices
and <current_working_dir>/tmp
.
If you check the tmp dir, did it install the meshblu-hue package in node_modules?
I created the devices directory, that did not help. I even tried creating: devices/UUID/meshblu.json
I am running as root (this is temp VM.)
if you run DEBUG=gateblu* npm start
you will get a lot more output that may help narrow it down. Will you post the output you get from that?
I don't know if it is important to remove UUIDs but I did it anyway. here is the part that fails.
gateblu:deviceManager connector installed +0ms meshblu-hue gateblu:deviceManager setupDevice +0ms { uuid: 'UUID', name: undefined } gateblu:deviceManager path +0ms devices/UUID gateblu:deviceManager connectorPath +0ms tmp/node_modules/meshblu-hue gateblu:deviceManager copying files +0ms devices/UUID gateblu:deviceManager done copying +2ms devices/UUID gateblu:index devicesToStart +0ms [ { category: 'device', connector: 'meshblu-hue', discoverWhitelist: [ 'bfd044a0-b143-11e4-b992-6f94cdaa9870' ], gateblu: '05411b47-2f21-4d9c-8fd5-378cdf65730d', geo: { range: [Object], country: 'US', region: 'NY', city: 'New York', ll: [Object], metro: 501 }, ipAddress: 'IP', online: false, owner: 'bfd044a0-b143-11e4-b992-6f94cdaa9870', timestamp: '2015-05-15T20:18:26.847Z', type: 'device:hue', uuid: 'UUID', token: '00759893f329027db361db5bcf57922422a6a193' } ] gateblu:deviceManager startDevice +3ms { name: undefined, uuid: 'UUID' } gateblu:deviceManager writing meshblu.json +0ms devices/UUID ENOENT, no such file or directory 'devices/UUID/meshblu.json' Error: ENOENT, no such file or directory 'devices/UUID/meshblu.json' at Object.fs.openSync (fs.js:438:18) at Object.fs.writeFileSync (fs.js:977:15) at DeviceManager.writeMeshbluJSON (/root/tmp/gateblu-forever/index.coffee:146:8) at DeviceManager.writeMeshbluJSON (/root/tmp/gateblu-forever/index.coffee:1:1) at DeviceManager.startDevice (/root/tmp/gateblu-forever/index.coffee:39:6) at DeviceManager.startDevice (/root/tmp/gateblu-forever/index.coffee:1:1) at /root/tmp/gateblu-forever/node_modules/gateblu/index.coffee:99:22 at iterate (/root/tmp/gateblu-forever/node_modules/async/lib/async.js:149:13) at Object.async.eachSeries (/root/tmp/gateblu-forever/node_modules/async/lib/async.js:165:9) at Gateblu.startDevices (/root/tmp/gateblu-forever/node_modules/gateblu/index.coffee:98:11) at Gateblu.startDevices (/root/tmp/gateblu-forever/node_modules/gateblu/index.coffee:1:1) at /root/tmp/gateblu-forever/node_modules/gateblu/index.coffee:67:24 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:610:21 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:249:17 at iterate (/root/tmp/gateblu-forever/node_modules/async/lib/async.js:149:13) at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:160:25 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:251:21 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:615:34 at /root/tmp/gateblu-forever/node_modules/gateblu/index.coffee:66:38 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:157:25 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:254:17 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:157:25 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:251:21 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:615:34 at /root/tmp/gateblu-forever/index.coffee:130:9 at /root/tmp/gateblu-forever/node_modules/fs-extra/lib/copy.js:35:21 at Object.oncomplete (fs.js:107:15)
UUIDs are OK to post, but be sure to remove the tokens, treat those like passwords.
Are there any errors when it talks about installing the meshblu-hue connector? I have a feeling it's failing earlier which is causing this error.
If you check the tmp dir you should have a node_modules/meshblu-hue directory. There may also be a npm-debug.log in tmp or tmp/node_modules, post that if you've got it.
There is nothing in the tmp dir. The node_modules/meshblu-hue directory is in the right place.
Here is the build of the meshblu-hue part:
gateblu:deviceManager npm:stdout +1ms
ws@0.4.31 install /root/tmp/gateblu-forever/node_modules/meshblu-hue/node_modules/meshblu/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory /root/tmp/gateblu-forever/node_modules/meshblu-hue/node_modules/meshblu/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished COPY Release/bufferutil.node CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node SOLINK_MODULE(target) Release/obj.target/validation.node: Finished COPY Release/validation.node make: Leaving directory
/root/tmp/gateblu-forever/node_modules/meshblu-hue/node_modules/meshblu/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
meshblu-hue@1.3.0 ../node_modules/meshblu-hue
├── tinycolor2@1.1.2
├── request@2.55.0 (caseless@0.9.0, json-stringify-safe@5.0.0, aws-sign2@0.5.0, forever-agent@0.6.1, form-data@0.2.0, stringstream@0.0.4, oauth-sign@0.6.0, tunnel-agent@0.4.0, isstream@0.1.2, node-uuid@1.4.3, qs@2.4.2, combined-stream@0.0.7, mime-types@2.0.11, http-signature@0.10.1, bl@0.9.4, tough-cookie@1.1.0, hawk@2.3.1, har-validator@1.7.0)
└── meshblu@1.22.0 (json-stable-stringify@1.0.0, url@0.10.3, lodash@3.8.0, node-rsa@0.2.23, socket.io-client@1.3.5)
gateblu:deviceManager connector installed +0ms meshblu-hue gateblu:deviceManager setupDevice +0ms { uuid: '704266cc-2a19-4f67-8e7b-65c0e4bdd293', name: undefined } gateblu:deviceManager path +1ms devices/704266cc-2a19-4f67-8e7b-65c0e4bdd293 gateblu:deviceManager connectorPath +0ms tmp/node_modules/meshblu-hue gateblu:deviceManager copying files +0ms devices/704266cc-2a19-4f67-8e7b-65c0e4bdd293 gateblu:deviceManager done copying +1ms devices/704266cc-2a19-4f67-8e7b-65c0e4bdd293
Try making devicePath
and tmpPath
absolute paths.
Same. Maybe I am doing something else wrong. All I did, in Designer, was add Hue to my GateBlu (which was online).
You did that right. What looks weird to me is it is installing the meshblu-hue into he gateblu-forever/node_modules and it should be in gateblu-forever/tmp/node_modules. Let me see if I can replicate it
I am sure I am doing something screwy. Thanks.
Will you post your /root/tmp/gateblu-forever/meshblu.json file? (Without token)
{ "server": "meshblu.octoblu.com", "port": 443, "nodePath": "", "devicePath": "devices", "tmpPath": "tmp", "uuid": "05411b47-2f21-4d9c-8fd5-378cdf65730d", "token": "TOKEN" }
Try this:
{
"server": "meshblu.octoblu.com",
"port": 443,
"nodePath": "",
"devicePath": "/root/tmp/gateblu-forever/devices",
"tmpPath": "/root/tmp/gateblu-forever/tmp",
"uuid": "05411b47-2f21-4d9c-8fd5-378cdf65730d",
"token": "TOKEN"
}
I did try the absolute paths. I just didn't send that config.
ah ok. thanks. What OS / distro are you using?
CentOS 7. Selinux disabled. On a VM. No wifi if that matters. Firewall disabled.
I figured it out. CentOS 7 and EPEL uses npm -v 1.3.6, Once I uninstalled that and installed node via: curl -sL https://rpm.nodesource.com/setup | bash - . I ended up with npm -v 1.4.28. I was able to add my hue without crashing.
Thanks for your help.
Ah great! Thanks for letting us know.
When I add a Hue to GateBlu, I get the following error:
ENOENT, no such file or directory 'devices/UUID/meshblu.json' Error: ENOENT, no such file or directory 'devices/UUID/meshblu.json' at Object.fs.openSync (fs.js:438:18) at Object.fs.writeFileSync (fs.js:977:15) at DeviceManager.writeMeshbluJSON (/root/tmp/gateblu-forever/index.coffee:146:8) at DeviceManager.writeMeshbluJSON (/root/tmp/gateblu-forever/index.coffee:1:1) at DeviceManager.startDevice (/root/tmp/gateblu-forever/index.coffee:39:6) at DeviceManager.startDevice (/root/tmp/gateblu-forever/index.coffee:1:1) at /root/tmp/gateblu-forever/node_modules/gateblu/index.coffee:99:22 at iterate (/root/tmp/gateblu-forever/node_modules/async/lib/async.js:149:13) at Object.async.eachSeries (/root/tmp/gateblu-forever/node_modules/async/lib/async.js:165:9) at Gateblu.startDevices (/root/tmp/gateblu-forever/node_modules/gateblu/index.coffee:98:11) at Gateblu.startDevices (/root/tmp/gateblu-forever/node_modules/gateblu/index.coffee:1:1) at /root/tmp/gateblu-forever/node_modules/gateblu/index.coffee:67:24 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:610:21 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:249:17 at iterate (/root/tmp/gateblu-forever/node_modules/async/lib/async.js:149:13) at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:160:25 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:251:21 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:615:34 at /root/tmp/gateblu-forever/node_modules/gateblu/index.coffee:66:38 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:157:25 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:254:17 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:157:25 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:251:21 at /root/tmp/gateblu-forever/node_modules/async/lib/async.js:615:34 at /root/tmp/gateblu-forever/index.coffee:130:9 at /root/tmp/gateblu-forever/node_modules/fs-extra/lib/copy.js:35:21 at Object.oncomplete (fs.js:107:15)