jamesnesfield / node-waterrower Goto Github PK
View Code? Open in Web Editor NEWa node server for communicating with the WaterRower S4/S5 USB performance monitor
a node server for communicating with the WaterRower S4/S5 USB performance monitor
Hello!
Currently am unable to build node-waterrower due to it using a now-unsupportable version of node-serial. Switching to building from directly from the github source (as opposed to from npm) seems to work fine--so, would you please consider updating npm with the new version of things?
Thank you very much!
For reference, here's the issue I'd mistakenly filed on it:
Using the test code, all readings are accurate - however 'stroke rate' just keeps going up and up. Even when I slow down, it's hitting 99 - it's almost like it's cumulative?
Any advise?
Thanks
../Waterrower/index.js:261
if (this.wr5.hasOwnProperty(message.substring(0, 6))) {
^
TypeError: Cannot read property 'wr5' of undefined
Although the monitor seems to connect to the serial port for my mac, ubuntu, and windows they all throw this error.
Hi, line 261 of index.js - I get an error 'Cannot read property 'wr5' of undefined'
else if (type == "wr5") {
response.device = 'waterrower';
response.connected = true;
if (message.length >= 6){
if (this.wr5.hasOwnProperty(message.substring(0, 6))) {
full debug:
HA501698:node-waterrower sharan$ node test.js
undefined
attempting to open port
Number of ports=2
com name /dev/cu.Bluetooth-Incoming-Port
port ID
com name /dev/cu.usbmodem1421
port ID
in readWrite open call read
in read connecting to /dev/cu.usbmodem1421
in read open
<
in read>SS<
in read>SE<
in read>P04<
in read>P03<
in read>P03<
in read>P03<
in read>P04<
in read>P05<
in read>P05<
in read>P05<
in read>P05<
in read>P05<
in read>P04<
in read>P05<
in read>P04<
in read>P04<
in read>P04<
in read>P04<
Stroke Rate ....................0
Total Speed ....................0
Average Speed ..................0
Distance... ....................0
Heart Rate .....................0
in read>P05<
in read>P04<
in read>P04<
in read>P04<
in read>P04<
in read>P03<
in read>P05<
in read>P04<
in read>P05<
in read>P05<
in read>P06<
in read>P06<
in read>P06<
in read>SS<
in read>P07<
in read>P06<
in read>P07<
USB
in read>P06<
in read>WR<
<WR
WR
in read>P06<
in read>P06<
in read>P06<
in read>P06<
in read>P06<
in read>P06<
in read>P06<
in read>P06<
in read>P06<
in read>P06<
in read>SE<
in read>P06<
in read>P05<
in read>P05<
in read>P05<
in read>P04<
in read>P05<
in read>P04<
in read>P05<
in read>P05<
in read>P06<
in read>P05<
in read>P05<
in read>P05<
in read>P05<
in read>P05<
in read>P05<
in read>P05<
in read>P05<
in read>P04<
in read>P05<
in read>P05<
IRD140
in read>P04<
in read>IDD1400044<
<IDD1400044
IDD1400044
IDD1400044
/Users/sharan/node_modules/node-waterrower/Waterrower/index.js:262
if (this.wr5.hasOwnProperty(message.substring(0, 6))) {
^
TypeError: Cannot read property 'wr5' of undefined
at readMessage (/Users/sharan/node_modules/node-waterrower/Waterrower/index.js:262:11)
at /Users/sharan/node_modules/node-waterrower/Waterrower/index.js:103:17
at SerialPort. (/Users/sharan/node_modules/node-waterrower/Waterrower/index.js:169:3)
at SerialPort.emit (events.js:107:17)
at /Users/sharan/node_modules/node-waterrower/node_modules/serialport/parsers.js:25:17
at Array.forEach (native)
at Object.parser (/Users/sharan/node_modules/node-waterrower/node_modules/serialport/parsers.js:24:13)
at Object.SerialPort.opts.dataCallback (/Users/sharan/node_modules/node-waterrower/node_modules/serialport/serialport.js:181:12)
at SerialPortFactory.SerialPort._emitData (/Users/sharan/node_modules/node-waterrower/node_modules/serialport/serialport.js:396:20)
at afterRead (/Users/sharan/node_modules/node-waterrower/node_modules/serialport/serialport.js:372:20)
Really hope you can help! Nearly working I think. Thanks
Using OSX 10.11.1 Beta, Node v4.2.1 and Python 2.7.10. I had a problem with the serialport version "^1.4.10" causing a number of npm install errors. I am sure that this is due to my configuration but wanted to pass it along in case anyone else had a similar problem.
If I change the package.json to "serialport": "^2.0.0" it installed and ran fine.
The errors started like this after npm install.
CXX(target) Release/obj.target/serialport/src/serialport.o
In file included from ../src/serialport.cpp:3:
In file included from ../src/serialport.h:5:
../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:256:25: note: previous definition is here
NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) {
^
../node_modules/nan/nan.h:661:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../node_modules/nan/nan.h:672:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
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.