Skip to content

Bewest/nodejs ify #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

bewest
Copy link

@bewest bewest commented Jan 8, 2015

Broken node version using websockets and comlink2-uart.

bewest added 4 commits January 7, 2015 18:35
remove results from what looks like accidental checkin of a
--bare repo.

Set executable chmod a+xr flag on cgi-bin scripts.
This uses comlink2-uart to implement a websocket server that
also talks usb usingn the carelink usb stick to talk to remote
pumps.
@bewest
Copy link
Author

bewest commented Jan 8, 2015

Unfortunately the node version is not as stable as the python version of these tools.

Here's the console.log on the client:

 window ready
3latest.js:6 connected to websocket
latest.js:19 MODEL 522
latest.js:12 CLOCK Invalid date Object {domain: null, _events: Object, _maxListeners: 10, opts: Object, data: Object…} ["Invalid date", Object]
moment.js:324 Deprecation warning: moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.
latest.js:14 NOW Moment {_isAMomentObject: true, _i: "Invalid date", _isUTC: false, _pf: Object, _locale: Locale…}_d: Invalid Date_i: "Invalid date"_isAMomentObject: true_isUTC: false_locale: Locale_pf: Object__proto__: Moment Invalid date
latest.js:22 HISTORY Object {record: Object, remainder: ArrayBuffer, json: Array[47]}json: Array[47]0: Objectbody: ArrayBufferdate: ArrayBufferhead: ArrayBufferiso8601: "2015-1-7T22:7:37"name: "TempBasal"op: 51rate: 4__proto__: Object1: Objectbody: ArrayBufferdate: ArrayBufferhead: ArrayBufferiso8601: "2015-1-7T22:7:37"minutes: 120name: "TempBasalDuration"op: 22__proto__: Object2: Objectamount: 189body: ArrayBufferdate: ArrayBufferhead: ArrayBufferiso8601: "2015-1-7T22:28:2"name: "CalBGForPH"op: 10__proto__: Object3: Object4: Object5: Object6: Object7: Object8: Object9: Object10: Object11: Object12: Object13: Object14: Object15: Object16: Object17: Object18: Object19: Object20: Object21: Object22: Object23: Object24: Object25: Object26: Object27: Object28: Object29: Object30: Object31: Object32: Object33: Object34: Object35: Object36: Object37: Object38: Object39: Object40: Object41: Object42: Object43: Object44: Object45: Object46: Objectlength: 47__proto__: Array[0]record: Objectremainder: ArrayBuffer__proto__: Object
latest.js:6 connected to websocket

@bewest
Copy link
Author

bewest commented Jan 9, 2015

Has known problems:

  • only works once 👎 , need to get close/open to work consistent
  • may not release usb interface back to serial (requires unplugging, replugging)

@bewest
Copy link
Author

bewest commented Jan 9, 2015

  • readclock returns error, 0x08

@bewest
Copy link
Author

bewest commented Jan 9, 2015

It can get the time now... just need to make it run more than once now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant