Open YasharF opened 8 years ago
Did you find any solution for that ?
No, and realized that using NodeRed is not a good idea due to security issues. The developers of NodeRed, at least when I was looking at the project were very concerned about supporting old hardware such as old Arduino boards which was causing them to use a deprecated version of NodeJS. Use of end-of-life software, software that is no longer maintained by its developers, is a poor security practice. Hence, I said goodbye to NodeRed. See https://github.com/nodejs/LTS for what versions of nodeJS are activly maintained.
I ended up writing a 100 line or so nodejs app from scratch, installed it on the Edison board, and got it done. The hardest part was getting bluetooth LE radio to initialize and work properly with the right drivers.
One thing though, the battery performance of the Bean was very poor. Even while following the recommended settings for sleep and data connections, the module was going through new batteries in a few days. After a couple of battery swaps, I just left the Bean to collect dust.
Ok, thanks for the reply.
Hey guys,
Just FYI, we have an official Node.js SDK now for interfacing with the Bean.
https://github.com/PunchThrough/bean-sdk-node
It's built on top of noble.js and works on Window/Linux/OS X. There is a very nice CLI built on top of the SDK and that is what most people use it for, but it can be used as a library as well! Here is some more documentation about the CLI and installation using npm
:
https://punchthrough.com/bean/docs/guides/getting-started/cli-loader/
Hi, great thanks, i will try it.
I was trying to get my Bean connected with node-red running on an Intel Edison Board (latest firmware, with changes per http://rexstjohn.com/configure-intel-edison-for-bluetooth-le-smart-development/). Tried the existing project at https://www.hackster.io/punch-through/logging-data-from-the-bean-7653e6, and after importing the code using copy-paste, node-red crashed. Node-red can't even start anymore. It looks like there is an uncaught exception:
30 Jul 20:11:16 - [red] Uncaught Exception: 30 Jul 20:11:16 - Error: service uuid a495ff10c5b14b44b5121370f02d74de not found! at NobleDevice.notifyCharacteristic (/home/root/.node-red/node_modules/node-red-contrib-bean/node_modules/ble-bean/node_modules/noble-device/lib/noble-device.js:120:21) at /home/root/.node-red/node_modules/node-red-contrib-bean/node_modules/ble-bean/lib/Bean.js:38:10 at null. (/home/root/.node-red/node_modules/node-red-contrib-bean/node_modules/ble-bean/node_modules/noble-device/lib/noble-device.js:71:14)
at Peripheral. (/home/root/.node-red/node_modules/node-red-contrib-bean/node_modules/ble-bean/node_modules/noble/lib/peripheral.js:38:7)
at Peripheral.g (events.js:260:16)
at emitOne (events.js:77:13)
at Peripheral.emit (events.js:169:7)
at Noble.onConnect (/home/root/.node-red/node_modules/node-red-contrib-bean/node_modules/ble-bean/node_modules/noble/lib/noble.js:148:16)
at emitTwo (events.js:87:13)
at emit (events.js:172:7)