tijmenvangulik / ergometerjs Goto Github PK
View Code? Open in Web Editor NEWJava script ergometer driver for concept2 performance monitor with BLE/USB .
License: Other
Java script ergometer driver for concept2 performance monitor with BLE/USB .
License: Other
Hello.
Can you let me know how to run any demo with node js? I read that this project also make nodeJS version for linux, (including Raspberry pi <<- which one I need!! ) please?
I have a next js app running on linux server.
On my laptop running linux i can connect and receive data, on my company windows laptop i can't, it just says data Time out buffer.
I've tested on my laptop all demos working, on my company laptop nothing of them work.
Anyone running into this problem too?
Im using the USB connection.
Any more info needed to help me just ask, i can send.
I try to use the library via react-native on Android. (I just started with react-native, so it's possible that I'm making dump mistakes).
'npm install' fails while compiling libusb:
AR(target) Release/obj.target/usb.a
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
../src/node_usb.cc: In function ‘void handleHotplug(std::pair<libusb_device*, libusb_hotplug_event>)’:
../src/node_usb.cc:151:58: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char*, int, v8::Localv8::Value*)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../node_modules/nan/nan.h:1001:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
Shouldn't there be some kind of compile switch so that only the BLE-Version is build?
Hi,
I'm a little new to using Node. Is it possible for me to use ErgometerJS within a node server that would receive REST requests and command multiple concept 2 Ergs? Where would I begin?
Also, are there any plans to get ErgometerJS to work with react-native?
Moses
I'm using a Mac and can't get the Electron example to discover my PM5. I've actually tried using noble's example advertisement-discovery.js and it looks like my device is never "discover"ed.
Have you had success with the Electron version at all?
Thanks!
Hi,
Thanks for this work! My code currently sets up handlers for RowingGeneralStatus and RowingAdditionalStatus1. On my Windows 10 laptop, it works great.
However, on an Android running Chrome, using the same code, the RowingGeneralStatus handler fires as expected, but the RowingAdditionalStatus1 never fires.
Any thoughts?
Thanks,
Jeff
These properties also seem like they have some funky values unless I am totally off with counting in my head... this probably needs some further investigation. Just putting this here to keep track.
Hi,
will this work with PM3? You are mentioning just PM5.
I am trying to use the following code to select the first pre-programmed workout.
this.performanceMonitor.newCsafeBuffer()
.setProgram({value: 1})
.send()
It also correctly sends f1 24 02 01 00 25 f2
to the PM5 and the workoutDuration
value gets updated, however the screen on the PM5 does not change at all and if I start pulling it switches back to Just row
any idea what I am missing?
I am having a lot of issues with the BLE driver it seems. After connecting I get this log message a lot NotSupportedError: GATT operation failed for unknown reason.
After a while it will transmit partial data from the PM5. However not everything there should be and I also get tons of this logged. wrong csafe frame ending.
Any thoughts how to zero in on this bug?
It seems like this might be related: https://bugs.chromium.org/p/chromium/issues/detail?id=664863
It would be nice to have a demo for Ionic 1 as well. Do you plan on making one?
Hi, nice work! There is an issue with the filtering for requestDevice. It seems to be related to what services are published when the device is already paired.
navigator.bluetooth.requestDevice({
filters: [
{ services: [ble.PMDEVICE]
}
],
optionalServices: [ble.PMDEVICE_INFO_SERVICE, ble.PMCONTROL_SERVICE, ble.PMROWING_SERVICE]
ble.PMDEVICE = "ce060000-43e5-11e4-916c-0800200c9a66";
ble.PMDEVICE_INFO_SERVICE = "ce060010-43e5-11e4-916c-0800200c9a66";
ble.PMCONTROL_SERVICE = "ce060020-43e5-11e4-916c-0800200c9a66";
ble.PMROWING_SERVICE = "ce060030-43e5-11e4-916c-0800200c9a66";
The PMDEVICE service may not be available and thus no device is found. Changing the filter to namePrefix : "PM5 "
allows the device to be found every time. Filtering on PMDEVICE_INFO_SERVICE instead may also be an option. This was tested on Chrome OS 66.
Hey @tijmenvangulik,
Can you let us know if latest Chrome canary fixed your issue at https://bugs.chromium.org/p/chromium/issues/detail?id=681309?
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.