├── .gitignore ├── .vscode └── launch.json ├── BLE ├── cycling-power-measurement-characteristic.js ├── cycling-power-service.js ├── fitness-machine-status-characteristic.js ├── ftms-service.js ├── indoor-bike-data-characteristic.js ├── keiserBLE.js └── static-read-characteristic.js ├── README.md ├── index.js ├── keiser.service ├── keiserParser.js ├── package-lock.json ├── package.json └── run.sh /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Attach by Process ID", 9 | "processId": "${command:PickProcess}", 10 | "request": "attach", 11 | "skipFiles": [ 12 | "/**" 13 | ], 14 | "type": "pwa-node" 15 | }, 16 | { 17 | "name": "Launch Program", 18 | "program": "${workspaceFolder}/index.js", 19 | "request": "launch", 20 | "type": "pwa-node", 21 | }, 22 | { 23 | "type": "node", 24 | "name": "Launch via NPM", 25 | "cwd": "${workspaceFolder}", 26 | "request": "launch", 27 | "runtimeExecutable": "npm", 28 | "runtimeArgs": ["run-script", "debug"], 29 | "port": 9229 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /BLE/cycling-power-measurement-characteristic.js: -------------------------------------------------------------------------------- 1 | 2 | var Bleno = require('@abandonware/bleno'); 3 | var DEBUG = false; 4 | 5 | // Spec 6 | //https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.cycling_power_measurement.xml 7 | 8 | class CyclingPowerMeasurementCharacteristic extends Bleno.Characteristic { 9 | 10 | constructor() { 11 | super({ 12 | uuid: '2A63', 13 | value: null, 14 | properties: ['notify'], 15 | descriptors: [ 16 | new Bleno.Descriptor({ 17 | uuid: '2901', 18 | value: 'Cycling Power Measurement' 19 | }), 20 | new Bleno.Descriptor({ 21 | // Server Characteristic Configuration 22 | uuid: '2903', 23 | value: Buffer.alloc(2) 24 | }) 25 | ] 26 | }); 27 | this._updateValueCallback = null; 28 | } 29 | 30 | onSubscribe(maxValueSize, updateValueCallback) { 31 | if (DEBUG) console.log('[powerService] client subscribed to PM'); 32 | this._updateValueCallback = updateValueCallback; 33 | return this.RESULT_SUCCESS; 34 | }; 35 | 36 | onUnsubscribe() { 37 | if (DEBUG) console.log('[powerService] client unsubscribed from PM'); 38 | this._updateValueCallback = null; 39 | return this.RESULT_UNLIKELY_ERROR; 40 | }; 41 | 42 | notify(event) { 43 | if (!('power' in event) && !('rpm' in event)) { 44 | // ignore events with no power and no crank data 45 | return this.RESULT_SUCCESS;; 46 | } 47 | 48 | if (this._updateValueCallback) { 49 | if (DEBUG) console.log("[powerService] Notify"); 50 | var buffer = new Buffer(8); 51 | // flags 52 | // 00000001 - 1 - 0x001 - Pedal Power Balance Present 53 | // 00000010 - 2 - 0x002 - Pedal Power Balance Reference 54 | // 00000100 - 4 - 0x004 - Accumulated Torque Present 55 | // 00001000 - 8 - 0x008 - Accumulated Torque Source 56 | // 00010000 - 16 - 0x010 - Wheel Revolution Data Present 57 | // 00100000 - 32 - 0x020 - Crank Revolution Data Present 58 | // 01000000 - 64 - 0x040 - Extreme Force Magnitudes Present 59 | // 10000000 - 128 - 0x080 - Extreme Torque Magnitudes Present 60 | 61 | buffer.writeUInt16LE(0x0000, 0); 62 | 63 | if ('power' in event) { 64 | var power = event.power; 65 | if (DEBUG) console.log("[powerService] power: " + power); 66 | buffer.writeInt16LE(power, 2); 67 | } 68 | 69 | if ('rpm' in event) { 70 | var rpm = event.rpm; 71 | if (DEBUG) console.log("[powerService] rpm: " + event.rpm); 72 | buffer.writeUInt16LE(rpm * 2, 4); 73 | } 74 | this._updateValueCallback(buffer); 75 | } 76 | return this.RESULT_SUCCESS; 77 | } 78 | 79 | 80 | }; 81 | 82 | module.exports = CyclingPowerMeasurementCharacteristic; 83 | -------------------------------------------------------------------------------- /BLE/cycling-power-service.js: -------------------------------------------------------------------------------- 1 | const Bleno = require('@abandonware/bleno'); 2 | 3 | const CyclingPowerMeasurementCharacteristic = require('./cycling-power-measurement-characteristic'); 4 | const StaticReadCharacteristic = require('./static-read-characteristic'); 5 | 6 | // https://developer.bluetooth.org/gatt/services/Pages/ServiceViewer.aspx?u=org.bluetooth.service.cycling_power.xml 7 | class CyclingPowerService extends Bleno.PrimaryService { 8 | 9 | constructor() { 10 | let powerMeasurement = new CyclingPowerMeasurementCharacteristic(); 11 | super({ 12 | uuid: '1818', 13 | //uuid: '1515', 14 | characteristics: [ 15 | powerMeasurement, 16 | new StaticReadCharacteristic('2A65', 'Cycling Power Feature', [0x08, 0, 0, 0]), // 0x08 - crank revolutions 17 | new StaticReadCharacteristic('2A5D', 'Sensor Location', [13]) // 13 = rear hub 18 | ] 19 | }); 20 | 21 | this.powerMeasurement = powerMeasurement; 22 | } 23 | 24 | notify(event) { 25 | this.powerMeasurement.notify(event); 26 | return this.RESULT_SUCCESS; 27 | }; 28 | } 29 | 30 | module.exports = CyclingPowerService; 31 | -------------------------------------------------------------------------------- /BLE/fitness-machine-status-characteristic.js: -------------------------------------------------------------------------------- 1 | const Bleno = require('@abandonware/bleno'); 2 | var DEBUG = false; 3 | 4 | // Spec 5 | // Status op code 6 | var StatusOpCode = { 7 | reservedForFutureUse: 0x00, 8 | reset: 0x01, 9 | stoppedPausedUser: 0x02, 10 | stoppedPausedSyfety: 0x03, 11 | startedResumedUser: 0x04, 12 | targetSpeedChanged: 0x05, 13 | targetInclineChanged: 0x06, 14 | targetResistanceLevelChanged: 0x07, 15 | targetPowerChanged: 0x08, 16 | targetHeartRateChanged: 0x09, 17 | targetExpendedEnergyChanged: 0x0a, 18 | targetNumberStepsChanged: 0x0b, 19 | targetNumberStridesChanged: 0x0c, 20 | targetDistanceChanged: 0x0d, 21 | targetTrainingTimeChanged: 0x0e, 22 | indoorBikeSimulationParametersChanged: 0x12, 23 | wheelCircumferenceChanged: 0x13 24 | } 25 | 26 | class FitnessMachineStatusCharacteristic extends Bleno.Characteristic { 27 | constructor () { 28 | super({ 29 | uuid: '2ADA', 30 | value: null, 31 | properties: ['notify'], 32 | descriptors: [] 33 | }) 34 | this._updateValueCallback = null 35 | } 36 | 37 | onSubscribe (maxValueSize, updateValueCallback) { 38 | if (DEBUG) console.log('[fitness-machine-status-characteristic.js] - client subscribed') 39 | this._updateValueCallback = updateValueCallback 40 | return this.RESULT_SUCCESS 41 | } 42 | 43 | onUnsubscribe () { 44 | if (DEBUG) console.log('[fitness-machine-status-characteristic.js] - client unsubscribed') 45 | this._updateValueCallback = null 46 | return this.RESULT_UNLIKELY_ERROR 47 | } 48 | 49 | notify (event) { 50 | if (DEBUG) console.log('[fitness-machine-status-characteristic.js] - notify') 51 | var buffer = new Buffer.from(2) 52 | // speed + power + heart rate 53 | buffer.writeUInt8(StatusOpCode.startedResumedUser, 0) 54 | 55 | if (this._updateValueCallback) { 56 | this._updateValueCallback(buffer) 57 | } else { 58 | if (DEBUG) console.log('[fitness-machine-status-characteristic.js] - nobody is listening') 59 | } 60 | return this.RESULT_SUCCESS 61 | } 62 | } 63 | 64 | module.exports = FitnessMachineStatusCharacteristic -------------------------------------------------------------------------------- /BLE/ftms-service.js: -------------------------------------------------------------------------------- 1 | // Doc: https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.fitness_machine.xml 2 | const Bleno = require('@abandonware/bleno'); 3 | 4 | const IndoorBikeDataCharacteristic = require('./indoor-bike-data-characteristic'); 5 | const StaticReadCharacteristic = require('./static-read-characteristic'); 6 | const FitnessMachineStatusCharacteristic = require('./fitness-machine-status-characteristic'); 7 | 8 | class FitnessMachineService extends Bleno.PrimaryService { 9 | 10 | constructor() { 11 | 12 | let indoorBikeData = new IndoorBikeDataCharacteristic(); 13 | let fitnessMachineStatus = new FitnessMachineStatusCharacteristic() 14 | 15 | super({ 16 | uuid: '1826', 17 | characteristics: [ 18 | new StaticReadCharacteristic('2ACC', 'Fitness Machine Feature', [0x02, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), // Feature Characteristics 19 | indoorBikeData, 20 | fitnessMachineStatus 21 | ] 22 | }); 23 | 24 | this.indoorBikeData = indoorBikeData; 25 | } 26 | 27 | /* 28 | * Transfer event from Kettler USB to the given characteristics 29 | */ 30 | notify(event) { 31 | this.indoorBikeData.notify(event); 32 | }; 33 | 34 | } 35 | 36 | module.exports = FitnessMachineService; 37 | -------------------------------------------------------------------------------- /BLE/indoor-bike-data-characteristic.js: -------------------------------------------------------------------------------- 1 | var Bleno = require('@abandonware/bleno'); 2 | var DEBUG = false; 3 | 4 | class IndoorBikeDataCharacteristic extends Bleno.Characteristic { 5 | 6 | constructor() { 7 | super({ 8 | uuid: '2AD2', 9 | value: null, 10 | properties: ['notify'], 11 | descriptors: [] 12 | }); 13 | this._updateValueCallback = null; 14 | } 15 | 16 | onSubscribe(maxValueSize, updateValueCallback) { 17 | if (DEBUG) console.log('[IndoorBikeDataCharacteristic] client subscribed'); 18 | this._updateValueCallback = updateValueCallback; 19 | return this.RESULT_SUCCESS; 20 | }; 21 | 22 | onUnsubscribe() { 23 | if (DEBUG) console.log('[IndoorBikeDataCharacteristic] client unsubscribed'); 24 | this._updateValueCallback = null; 25 | return this.RESULT_UNLIKELY_ERROR; 26 | }; 27 | 28 | notify(event) { 29 | if (!('power' in event) && !('hr' in event)) { 30 | // ignore events with no power and no hr data 31 | return this.RESULT_SUCCESS; 32 | } 33 | 34 | if (this._updateValueCallback) { 35 | if (DEBUG) console.log("[IndoorBikeDataCharacteristic] Notify"); 36 | var buffer = new Buffer(10); 37 | // speed + power + heart rate 38 | buffer.writeUInt8(0x44, 0); 39 | buffer.writeUInt8(0x02, 1); 40 | 41 | var index = 2; 42 | if ('speed' in event) { 43 | var speed = parseInt(event.speed); 44 | if (DEBUG) console.log("[IndoorBikeDataCharacteristic] speed: " + speed); 45 | buffer.writeInt16LE(speed, index); 46 | index += 2; 47 | } 48 | 49 | if ('rpm' in event) { 50 | var rpm = event.rpm; 51 | if (DEBUG) console.log("[IndoorBikeDataCharacteristic] rpm: " + rpm); 52 | buffer.writeInt16LE(rpm * 2, index); 53 | index += 2; 54 | } 55 | 56 | if ('power' in event) { 57 | var power = event.power; 58 | if (DEBUG) console.log("[IndoorBikeDataCharacteristic] power: " + power); 59 | buffer.writeInt16LE(power, index); 60 | index += 2; 61 | } 62 | 63 | if ('hr' in event) { 64 | var hr = event.hr; 65 | if (DEBUG) console.log("[IndoorBikeDataCharacteristic] hr : " + hr); 66 | buffer.writeUInt16LE(hr, index); 67 | index += 2; 68 | } 69 | this._updateValueCallback(buffer); 70 | } 71 | else 72 | { 73 | if (DEBUG) console.log("[IndoorBikeDataCharacteristic] nobody is listening"); 74 | } 75 | return this.RESULT_SUCCESS; 76 | } 77 | 78 | }; 79 | 80 | module.exports = IndoorBikeDataCharacteristic; 81 | -------------------------------------------------------------------------------- /BLE/keiserBLE.js: -------------------------------------------------------------------------------- 1 | const bleno = require('@abandonware/bleno'); 2 | const EventEmitter = require('events'); 3 | const CyclingPowerService = require('./cycling-power-service'); 4 | const FitnessMachineService = require('./ftms-service'); 5 | 6 | var keiserDeviceId = -1; 7 | var isPoweredOn = false; 8 | 9 | class KeiserBLE extends EventEmitter { 10 | 11 | constructor() { 12 | super(); 13 | 14 | this.setName(); 15 | 16 | this.csp = new CyclingPowerService(); 17 | this.ftms = new FitnessMachineService(); 18 | 19 | let self = this; 20 | console.log(`[${this.name} starting]`); 21 | 22 | bleno.on('stateChange', (state) => { 23 | console.log(`[${this.name} stateChange] new state: ${state}`); 24 | 25 | self.emit('stateChange', state); 26 | 27 | if (state === 'poweredOn') { 28 | isPoweredOn = true; 29 | this.checkStartConditions(); 30 | } else { 31 | console.log('Stopping...'); 32 | isPoweredOn = false; 33 | bleno.stopAdvertising(); 34 | } 35 | }); 36 | 37 | bleno.on('advertisingStart', (error) => { 38 | console.log(`[${this.name} advertisingStart] ${(error ? 'error ' + error : 'success')}`); 39 | self.emit('advertisingStart', error); 40 | 41 | if (!error) { 42 | bleno.setServices([self.csp 43 | , self.ftms 44 | ], 45 | (error) => { 46 | console.log(`[${this.name} setServices] ${(error ? 'error ' + error : 'success')}`); 47 | }); 48 | } 49 | }); 50 | 51 | bleno.on('advertisingStartError', () => { 52 | console.log(`[${this.name} advertisingStartError] advertising stopped`); 53 | self.emit('advertisingStartError'); 54 | }); 55 | 56 | bleno.on('advertisingStop', error => { 57 | console.log(`[${this.name} advertisingStop] ${(error ? 'error ' + error : 'success')}`); 58 | self.emit('advertisingStop'); 59 | }); 60 | 61 | bleno.on('servicesSet', error => { 62 | console.log(`[${this.name} servicesSet] ${ (error) ? 'error ' + error : 'success'}`); 63 | }); 64 | 65 | bleno.on('accept', (clientAddress) => { 66 | console.log(`[${this.name} accept] Client: ${clientAddress}`); 67 | self.emit('accept', clientAddress); 68 | bleno.updateRssi(); 69 | }); 70 | 71 | bleno.on('disconnect', (clientAddress) => { 72 | console.log(`[${this.name} disconnect] Client: ${clientAddress}`); 73 | self.emit('disconnect', clientAddress); 74 | }); 75 | 76 | bleno.on('rssiUpdate', (rssi) => { 77 | console.log(`[${this.name} rssiUpdate]: ${rssi}`); 78 | }); 79 | 80 | } 81 | 82 | // notifiy BLE services 83 | notifyFTMS(event) { 84 | this.csp.notify(event); 85 | this.ftms.notify(event); 86 | }; 87 | 88 | setDeviceId(deviceId) { 89 | keiserDeviceId = deviceId; 90 | this.setName(); 91 | this.checkStartConditions(); 92 | } 93 | 94 | setName() { 95 | if (keiserDeviceId == -1) { 96 | this.name = "KeiserM3"; 97 | } else { 98 | this.name = "KeiserM3-" + keiserDeviceId; 99 | } 100 | 101 | process.env['BLENO_DEVICE_NAME'] = this.name; 102 | } 103 | 104 | checkStartConditions() { 105 | if (isPoweredOn && keiserDeviceId != -1) { 106 | bleno.startAdvertising(this.name, [this.csp.uuid 107 | , this.ftms.uuid 108 | ]); 109 | } 110 | } 111 | }; 112 | 113 | module.exports = KeiserBLE; -------------------------------------------------------------------------------- /BLE/static-read-characteristic.js: -------------------------------------------------------------------------------- 1 | const Bleno = require('@abandonware/bleno'); 2 | 3 | class StaticReadCharacteristic extends Bleno.Characteristic { 4 | constructor(uuid, description, value) { 5 | super({ 6 | uuid: uuid, 7 | properties: ['read'], 8 | value: null, 9 | descriptors: [ 10 | new Bleno.Descriptor({ 11 | uuid: '2901', 12 | value: description 13 | }) 14 | ] 15 | }); 16 | this.uuid = uuid; 17 | this.description = description; 18 | this._value = Buffer.isBuffer(value) ? value : new Buffer(value); 19 | } 20 | 21 | onReadRequest(offset, callback) { 22 | console.log('OnReadRequest : ' + this.description); 23 | callback(this.RESULT_SUCCESS, this._value.slice(offset, this._value.length)); 24 | }; 25 | } 26 | 27 | module.exports = StaticReadCharacteristic; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Keiser2Zwift 2 | 3 | Use your Keiser M3 bike with apps like Zwift without buying a converter from Keiser which never really worked for me. This project was built to use make use of a Raspberry pi 4 | with 2 bluetooth adapters. Other systems may work but your on your own to get it setup. Two bluetooth adapters are required to make this work. I use the built in one on a Raspberry Pi 3/4 or the Pi Zero W 5 | and an additional one plugged into the usb port. The steps to install are below. 6 | 7 | # USB bluetooth adapters known to work 8 | Any one available from Amazon with linux support should work but I have tried these: 9 | - https://www.amazon.com/gp/product/B0775YF36R/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 10 | - https://www.amazon.com/IOGEAR-Bluetooth-Micro-Adapter-GBU521/dp/B007GFX0PY/ref=sr_1_1?dchild=1&keywords=iogear+bluetooth&qid=1599502460&s=electronics&sr=1-1 11 | 12 | # Installation 13 | 1. Setup your Pi with Raspbian or Raspbian Lite. https://www.raspberrypi.org/downloads/ 14 | 2. Disable the default bluetooth service. Note that I actually move the file to a backup location to make sure it doesnt come back after a reboot. 15 | * ```sudo systemctl stop bluetooth``` 16 | * ```sudo systemctl disable bluetooth``` 17 | * ```sudo mv /usr/lib/bluetoothd bluetoothd.bak``` 18 | 3. Install the development requirements 19 | * ```sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev``` 20 | 4. Install NVVM to manager Node.js versions (Make sure to close and reopen your shell after this step) 21 | * ```curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash``` 22 | 5. Install the latest binary build of Node.js to support Pis (anything newer and your need to spend a lot time with building it) 23 | * ```nvm install 10.22.0``` 24 | 6. Download this repo or clone it locally. I put it in a directory off the home folder for pi called /home/pi/code/keiser 25 | 7. Go to that directory and run 26 | * ```npm install``` 27 | 8. Make sure both bluetooth adapters are connected and issues the following two commands 28 | * ```sudo hciconfig hci0 up``` 29 | * ```sudo hciconfig hci1 up``` 30 | 9. Verify that you see two devices when you run: 31 | * ``` hcitool dev``` 32 | 10. Start this project manually as root. You should see log messages that indicate its looking for an M3i. 33 | * ``` sudo npm start``` 34 | 11. Wake up your bike and do a few revolutions of the pedals. You should see log messages indicating that its connected to that bike 35 | 12. Launch Zwift and connect to the Power meter whose name starts with KeiserM3-. Then connect to the Cadence sensor. Enjoy 36 | 37 | ### Running without root/sudo 38 | 39 | Run the following command: 40 | 41 | ```sh 42 | sudo setcap cap_net_raw+eip $(eval readlink -f `which node`) 43 | ``` 44 | 45 | This grants the ```node``` binary ```cap_net_raw``` privileges, so it can start/stop BLE advertising. 46 | 47 | __Note:__ The above command requires ```setcap``` to be installed, it can be installed using the following: 48 | 49 | * apt: ```sudo apt-get install libcap2-bin``` 50 | * yum: ```su -c \'yum install libcap2-bin\'``` 51 | 52 | 53 | # Setting up to always run 54 | You can setup the program to run at Pi boot time by doing the following steps: 55 | 1. Edit the keiser.service file in the root of this project to change the path if you didnt take my suggestion. 56 | 2. Copy the service definition into the correct location 57 | * ```sudo cp keiser.service /etc/systemd/system``` 58 | 3. Enable the service 59 | * ```sudo systemctl enable keiser``` 60 | 4. Start the service (Make sure you aren't still manually running the project using npm) 61 | * ```sudo systemctl start keiser``` 62 | 5. Verify it started 63 | * ```systemctl status keiser``` 64 | 6. Reboot the system and verify that the service started automatically using step 5 65 | 66 | # Issues with USB adapters at system boot 67 | Several people have reported issues at system boot with both adapters being recognized. A known work around by @djwasser is described in issue: https://github.com/hypermoose/Keiser2Zwift/issues/2 68 | 69 | 70 | # Thanks 71 | I leveraged several other great projects to build this. They are: 72 | - Bleno: https://github.com/abandonware/bleno 73 | - Noble: https://github.com/abandonware/noble 74 | - KettlerUSB2BLE: https://github.com/360manu/kettlerUSB2BLE 75 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | // Setup multi role support and two different adapters for Peripheral and Central 2 | process.env['NOBLE_MULTI_ROLE'] = 1 3 | process.env['NOBLE_REPORT_ALL_HCI_EVENTS'] = 1 4 | process.env['BLENO_HCI_DEVICE_ID'] = 0 5 | process.env['NOBLE_HCI_DEVICE_ID'] = 1 6 | 7 | const noble = require('@abandonware/noble'); 8 | const keiserParser = require('./keiserParser.js') 9 | const KeiserBLE = require('./BLE/keiserBLE') 10 | 11 | var fillInTimer = null; 12 | var dataToSend = null; 13 | var connectedCount = 0; 14 | var targetDeviceId = -1; 15 | 16 | console.log("Starting"); 17 | 18 | var keiserBLE = new KeiserBLE(); 19 | 20 | keiserBLE.on('advertisingStart', (client) => { 21 | //oled.displayBLE('Started'); 22 | }); 23 | keiserBLE.on('accept', (client) => { 24 | connectedCount++; 25 | //oled.displayBLE('Connected'); 26 | }); 27 | keiserBLE.on('disconnect', (client) => { 28 | connectedCount--; 29 | //oled.displayBLE('Disconnected'); 30 | }); 31 | 32 | noble.on('stateChange', async (state) => { 33 | console.log(`[Central] State changed to ${state}`); 34 | if (state === 'poweredOn') { 35 | console.log(`[Central] starting scan`); 36 | await noble.startScanningAsync(null, true); 37 | } else if (state === 'poweredOff') { 38 | console.log('No adapter detected, exiting in 5 seconds'); 39 | setTimeout(() => { 40 | process.exit(); 41 | }, 5000); 42 | } 43 | }); 44 | 45 | function sendFillInData() { 46 | if (!dataToSend || (connectedCount < 1)) { 47 | console.log("Aborting nothing to send"); 48 | } 49 | 50 | console.log("Sending fill in data"); 51 | keiserBLE.notifyFTMS(dataToSend); 52 | fillInTimer = setTimeout(sendFillInData, 1000); 53 | } 54 | 55 | noble.on('discover', (peripheral) => { 56 | 57 | //console.log(`[Central] Found device ${peripheral.advertisement.localName} ${peripheral.address}`); 58 | if (peripheral.advertisement.localName == "M3") 59 | { 60 | try 61 | { 62 | var result = keiserParser.parseAdvertisement(peripheral); 63 | if (targetDeviceId == -1) { 64 | if (result.realTime) { 65 | console.log(`Attaching to bike id ${result.ordinalId}`); 66 | targetDeviceId = result.ordinalId; 67 | keiserBLE.setDeviceId(targetDeviceId); 68 | } else { 69 | return; 70 | } 71 | } 72 | 73 | if (result.ordinalId == targetDeviceId) { 74 | console.log(`Bike ${result.ordinalId}: ${result.realTime} ${result.cadence} ${result.power} ${result.gear} ${result.duration}`); 75 | if (result.realTime) { 76 | dataToSend = { 77 | rpm: result.cadence, 78 | power: result.power, 79 | hr: result.heartRate, 80 | speed: result.cadence * .73 // 30 cog 34 cassette for now 81 | }; 82 | if (fillInTimer) { 83 | clearTimeout(fillInTimer); 84 | fillInTimer = null; 85 | } 86 | 87 | if (connectedCount > 0) { 88 | keiserBLE.notifyFTMS(dataToSend); 89 | fillInTimer = setTimeout(sendFillInData, 1000); 90 | } 91 | } 92 | } 93 | } 94 | catch (err) { 95 | console.log(`\tError parsing: ${err}`); 96 | console.log(`\t ${err.stack}`); 97 | } 98 | } 99 | }); 100 | -------------------------------------------------------------------------------- /keiser.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=KeiserM3 3 | After=network.target 4 | 5 | [Service] 6 | ExecStart=/home/pi/code/keiser/run.sh 7 | WorkingDirectory=/home/pi/code/keiser 8 | Type=idle 9 | Restart=always 10 | StandardOutput=syslog 11 | SyslogIdentifier=keiserm3 12 | 13 | [Install] 14 | WantedBy=multi-user.target 15 | -------------------------------------------------------------------------------- /keiserParser.js: -------------------------------------------------------------------------------- 1 | global.atob = require("atob"); 2 | 3 | const encodeStringToBytes = (rawString) => { 4 | let data = atob(rawString) 5 | let bytes = new Uint8Array(data.length) 6 | for (let i = 0; i < bytes.length; i++) { 7 | bytes[i] = data.charCodeAt(i) 8 | } 9 | return bytes 10 | } 11 | 12 | const getAdvertisingData = (response) => { 13 | let advertisingData; 14 | if (typeof response.advertisement !== 'string') { 15 | let advertisement = encodeStringToBytes(response.advertisement.manufacturerData) 16 | advertisingData = [].slice.call(advertisement, 2) 17 | } else { 18 | let advertisement = encodeStringToBytes(response.advertisement) 19 | if (advertisement.length > 17) { 20 | advertisingData = [].slice.call(advertisement, 11) 21 | } else { 22 | advertisingData = Array.from(advertisement) 23 | } 24 | } 25 | return advertisingData 26 | } 27 | 28 | const buildValueConvert = (value) => { 29 | return parseInt(value.toString(16), 10) 30 | } 31 | 32 | const twoByteConcat = (lower, higher) => { 33 | return (higher << 8) | lower 34 | } 35 | 36 | var parseAdvertisement = function(response) { 37 | let data = getAdvertisingData(response) 38 | let broadcast = { 39 | takenAt: (new Date()).getTime(), 40 | ordinalId: 0, 41 | buildMajor: 0, 42 | buildMinor: 0, 43 | interval: 0, 44 | realTime: false, 45 | cadence: 0, 46 | heartRate: 0, 47 | power: 0, 48 | caloricBurn: 0, 49 | duration: 0, 50 | gear: null, 51 | distance: 0 52 | } 53 | 54 | let index = 0 55 | 56 | broadcast.buildMajor = buildValueConvert(data[index++]) 57 | if (broadcast.buildMajor !== 6) { 58 | throw new Error('Invalid build major') 59 | } 60 | broadcast.buildMinor = buildValueConvert(data[index++]) 61 | 62 | if (broadcast.buildMajor === 6 && data.length > (index + 13)) { 63 | let dataType = data[index] 64 | if (dataType === 0 || dataType === 255) { 65 | broadcast.interval = 0 66 | } else if (dataType > 128 && dataType < 255) { 67 | broadcast.interval = dataType - 128 68 | } 69 | broadcast.realTime = dataType === 0 || (dataType > 128 && dataType < 255) 70 | 71 | broadcast.ordinalId = data[index + 1] 72 | if (broadcast.ordinalId < 0 || broadcast.ordinalId > 200) { 73 | throw new Error('Invalid machine id') 74 | } 75 | 76 | broadcast.cadence = Math.round(twoByteConcat(data[index + 2], data[index + 3]) / 10) 77 | broadcast.heartRate = Math.round(twoByteConcat(data[index + 4], data[index + 5]) / 10) || null 78 | broadcast.power = twoByteConcat(data[index + 6], data[index + 7]) 79 | broadcast.caloricBurn = twoByteConcat(data[index + 8], data[index + 9]) 80 | broadcast.duration = data[index + 10] * 60 + data[index + 11] 81 | 82 | broadcast.distance = twoByteConcat(data[index + 12], data[index + 13]) 83 | if ((broadcast.distance & 32768) !== 0) { 84 | // Metric 85 | broadcast.distance = broadcast.distance / 10 86 | } else { 87 | // Imperial (to Metric) 88 | broadcast.distance = ((broadcast.distance & 32767) / 10) * 1.60934 89 | } 90 | 91 | if (broadcast.buildMinor >= 21 && data.length > (index + 14)) { 92 | broadcast.gear = data[index + 14] 93 | } 94 | } 95 | 96 | return broadcast 97 | } 98 | 99 | module.exports.parseAdvertisement = parseAdvertisement -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "keiser2zwift", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@abandonware/bleno": { 8 | "version": "0.5.1-2", 9 | "resolved": "https://registry.npmjs.org/@abandonware/bleno/-/bleno-0.5.1-2.tgz", 10 | "integrity": "sha512-NYGw4sC6v/UI6jHhWv0OOzViQ/icJEPYkpG+FQow1ziV/HzQ/QPqrM8Jc/M0HTW0y6dFZ3cPtiGETrlLEjnGMw==", 11 | "requires": { 12 | "@abandonware/bluetooth-hci-socket": "^0.5.3-5", 13 | "bplist-parser": "0.2.0", 14 | "debug": "^4.1.1", 15 | "xpc-connect": "^2.0.0" 16 | } 17 | }, 18 | "@abandonware/bluetooth-hci-socket": { 19 | "version": "0.5.3-5", 20 | "resolved": "https://registry.npmjs.org/@abandonware/bluetooth-hci-socket/-/bluetooth-hci-socket-0.5.3-5.tgz", 21 | "integrity": "sha512-q9DupPXYcqLyLFrmJqYDaqXoN0fOR4qOZA39dJbEeu1M583Ghr5Bn+JlEAnA6l88DJSBZiyjtCgItDeUfuRwMA==", 22 | "optional": true, 23 | "requires": { 24 | "debug": "^4.1.1", 25 | "nan": "^2.14.0", 26 | "node-pre-gyp": "^0.14.0", 27 | "usb": "^1.6.2" 28 | } 29 | }, 30 | "@abandonware/noble": { 31 | "version": "1.9.2-9", 32 | "resolved": "https://registry.npmjs.org/@abandonware/noble/-/noble-1.9.2-9.tgz", 33 | "integrity": "sha512-aKQoYXrou4fWUQarmFm7ITrGXmXCUcOHL2es9fNXMnExGWbe8s8RhTWyM5xWCV/10iaygO0GPtvQKa7oLG+G5A==", 34 | "requires": { 35 | "@abandonware/bluetooth-hci-socket": "^0.5.3-5", 36 | "debug": "^4.1.1", 37 | "napi-thread-safe-callback": "0.0.6", 38 | "node-addon-api": "^2.0.0" 39 | } 40 | }, 41 | "abbrev": { 42 | "version": "1.1.1", 43 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 44 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", 45 | "optional": true 46 | }, 47 | "ajv": { 48 | "version": "6.12.3", 49 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", 50 | "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", 51 | "optional": true, 52 | "requires": { 53 | "fast-deep-equal": "^3.1.1", 54 | "fast-json-stable-stringify": "^2.0.0", 55 | "json-schema-traverse": "^0.4.1", 56 | "uri-js": "^4.2.2" 57 | } 58 | }, 59 | "ansi-regex": { 60 | "version": "2.1.1", 61 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 62 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", 63 | "optional": true 64 | }, 65 | "aproba": { 66 | "version": "1.2.0", 67 | "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", 68 | "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", 69 | "optional": true 70 | }, 71 | "are-we-there-yet": { 72 | "version": "1.1.5", 73 | "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", 74 | "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", 75 | "optional": true, 76 | "requires": { 77 | "delegates": "^1.0.0", 78 | "readable-stream": "^2.0.6" 79 | } 80 | }, 81 | "asn1": { 82 | "version": "0.2.4", 83 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", 84 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", 85 | "optional": true, 86 | "requires": { 87 | "safer-buffer": "~2.1.0" 88 | } 89 | }, 90 | "assert-plus": { 91 | "version": "1.0.0", 92 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 93 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", 94 | "optional": true 95 | }, 96 | "asynckit": { 97 | "version": "0.4.0", 98 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 99 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", 100 | "optional": true 101 | }, 102 | "atob": { 103 | "version": "2.1.2", 104 | "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", 105 | "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" 106 | }, 107 | "aws-sign2": { 108 | "version": "0.7.0", 109 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 110 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", 111 | "optional": true 112 | }, 113 | "aws4": { 114 | "version": "1.10.0", 115 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", 116 | "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", 117 | "optional": true 118 | }, 119 | "balanced-match": { 120 | "version": "1.0.0", 121 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 122 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 123 | "optional": true 124 | }, 125 | "base64-js": { 126 | "version": "1.3.1", 127 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", 128 | "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", 129 | "optional": true 130 | }, 131 | "bcrypt-pbkdf": { 132 | "version": "1.0.2", 133 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 134 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 135 | "optional": true, 136 | "requires": { 137 | "tweetnacl": "^0.14.3" 138 | } 139 | }, 140 | "big-integer": { 141 | "version": "1.6.48", 142 | "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", 143 | "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==", 144 | "optional": true 145 | }, 146 | "bindings": { 147 | "version": "1.5.0", 148 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 149 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 150 | "optional": true, 151 | "requires": { 152 | "file-uri-to-path": "1.0.0" 153 | } 154 | }, 155 | "bl": { 156 | "version": "4.0.2", 157 | "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz", 158 | "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==", 159 | "optional": true, 160 | "requires": { 161 | "buffer": "^5.5.0", 162 | "inherits": "^2.0.4", 163 | "readable-stream": "^3.4.0" 164 | }, 165 | "dependencies": { 166 | "readable-stream": { 167 | "version": "3.6.0", 168 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 169 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 170 | "optional": true, 171 | "requires": { 172 | "inherits": "^2.0.3", 173 | "string_decoder": "^1.1.1", 174 | "util-deprecate": "^1.0.1" 175 | } 176 | } 177 | } 178 | }, 179 | "block-stream": { 180 | "version": "0.0.9", 181 | "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", 182 | "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", 183 | "optional": true, 184 | "requires": { 185 | "inherits": "~2.0.0" 186 | } 187 | }, 188 | "bplist-parser": { 189 | "version": "0.2.0", 190 | "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", 191 | "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", 192 | "optional": true, 193 | "requires": { 194 | "big-integer": "^1.6.44" 195 | } 196 | }, 197 | "brace-expansion": { 198 | "version": "1.1.11", 199 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 200 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 201 | "optional": true, 202 | "requires": { 203 | "balanced-match": "^1.0.0", 204 | "concat-map": "0.0.1" 205 | } 206 | }, 207 | "buffer": { 208 | "version": "5.6.0", 209 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", 210 | "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", 211 | "optional": true, 212 | "requires": { 213 | "base64-js": "^1.0.2", 214 | "ieee754": "^1.1.4" 215 | } 216 | }, 217 | "caseless": { 218 | "version": "0.12.0", 219 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 220 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", 221 | "optional": true 222 | }, 223 | "chownr": { 224 | "version": "1.1.4", 225 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", 226 | "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", 227 | "optional": true 228 | }, 229 | "code-point-at": { 230 | "version": "1.1.0", 231 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", 232 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", 233 | "optional": true 234 | }, 235 | "combined-stream": { 236 | "version": "1.0.8", 237 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 238 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 239 | "optional": true, 240 | "requires": { 241 | "delayed-stream": "~1.0.0" 242 | } 243 | }, 244 | "concat-map": { 245 | "version": "0.0.1", 246 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 247 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 248 | "optional": true 249 | }, 250 | "console-control-strings": { 251 | "version": "1.1.0", 252 | "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", 253 | "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", 254 | "optional": true 255 | }, 256 | "core-util-is": { 257 | "version": "1.0.2", 258 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 259 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", 260 | "optional": true 261 | }, 262 | "dashdash": { 263 | "version": "1.14.1", 264 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 265 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 266 | "optional": true, 267 | "requires": { 268 | "assert-plus": "^1.0.0" 269 | } 270 | }, 271 | "debug": { 272 | "version": "4.1.1", 273 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 274 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 275 | "requires": { 276 | "ms": "^2.1.1" 277 | } 278 | }, 279 | "decompress-response": { 280 | "version": "4.2.1", 281 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", 282 | "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", 283 | "optional": true, 284 | "requires": { 285 | "mimic-response": "^2.0.0" 286 | } 287 | }, 288 | "deep-extend": { 289 | "version": "0.6.0", 290 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 291 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", 292 | "optional": true 293 | }, 294 | "delayed-stream": { 295 | "version": "1.0.0", 296 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 297 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", 298 | "optional": true 299 | }, 300 | "delegates": { 301 | "version": "1.0.0", 302 | "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 303 | "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", 304 | "optional": true 305 | }, 306 | "detect-libc": { 307 | "version": "1.0.3", 308 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", 309 | "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", 310 | "optional": true 311 | }, 312 | "ecc-jsbn": { 313 | "version": "0.1.2", 314 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 315 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 316 | "optional": true, 317 | "requires": { 318 | "jsbn": "~0.1.0", 319 | "safer-buffer": "^2.1.0" 320 | } 321 | }, 322 | "end-of-stream": { 323 | "version": "1.4.4", 324 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 325 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 326 | "optional": true, 327 | "requires": { 328 | "once": "^1.4.0" 329 | } 330 | }, 331 | "expand-template": { 332 | "version": "2.0.3", 333 | "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", 334 | "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", 335 | "optional": true 336 | }, 337 | "extend": { 338 | "version": "3.0.2", 339 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 340 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", 341 | "optional": true 342 | }, 343 | "extsprintf": { 344 | "version": "1.3.0", 345 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 346 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", 347 | "optional": true 348 | }, 349 | "fast-deep-equal": { 350 | "version": "3.1.3", 351 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 352 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 353 | "optional": true 354 | }, 355 | "fast-json-stable-stringify": { 356 | "version": "2.1.0", 357 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 358 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 359 | "optional": true 360 | }, 361 | "file-uri-to-path": { 362 | "version": "1.0.0", 363 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 364 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", 365 | "optional": true 366 | }, 367 | "forever-agent": { 368 | "version": "0.6.1", 369 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 370 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", 371 | "optional": true 372 | }, 373 | "form-data": { 374 | "version": "2.3.3", 375 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", 376 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 377 | "optional": true, 378 | "requires": { 379 | "asynckit": "^0.4.0", 380 | "combined-stream": "^1.0.6", 381 | "mime-types": "^2.1.12" 382 | } 383 | }, 384 | "fs-constants": { 385 | "version": "1.0.0", 386 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", 387 | "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", 388 | "optional": true 389 | }, 390 | "fs-minipass": { 391 | "version": "1.2.7", 392 | "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", 393 | "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", 394 | "optional": true, 395 | "requires": { 396 | "minipass": "^2.6.0" 397 | } 398 | }, 399 | "fs.realpath": { 400 | "version": "1.0.0", 401 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 402 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 403 | "optional": true 404 | }, 405 | "fstream": { 406 | "version": "1.0.12", 407 | "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", 408 | "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", 409 | "optional": true, 410 | "requires": { 411 | "graceful-fs": "^4.1.2", 412 | "inherits": "~2.0.0", 413 | "mkdirp": ">=0.5 0", 414 | "rimraf": "2" 415 | } 416 | }, 417 | "gauge": { 418 | "version": "2.7.4", 419 | "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", 420 | "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", 421 | "optional": true, 422 | "requires": { 423 | "aproba": "^1.0.3", 424 | "console-control-strings": "^1.0.0", 425 | "has-unicode": "^2.0.0", 426 | "object-assign": "^4.1.0", 427 | "signal-exit": "^3.0.0", 428 | "string-width": "^1.0.1", 429 | "strip-ansi": "^3.0.1", 430 | "wide-align": "^1.1.0" 431 | } 432 | }, 433 | "getpass": { 434 | "version": "0.1.7", 435 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 436 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 437 | "optional": true, 438 | "requires": { 439 | "assert-plus": "^1.0.0" 440 | } 441 | }, 442 | "github-from-package": { 443 | "version": "0.0.0", 444 | "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", 445 | "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", 446 | "optional": true 447 | }, 448 | "glob": { 449 | "version": "7.1.6", 450 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 451 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 452 | "optional": true, 453 | "requires": { 454 | "fs.realpath": "^1.0.0", 455 | "inflight": "^1.0.4", 456 | "inherits": "2", 457 | "minimatch": "^3.0.4", 458 | "once": "^1.3.0", 459 | "path-is-absolute": "^1.0.0" 460 | } 461 | }, 462 | "graceful-fs": { 463 | "version": "4.2.4", 464 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", 465 | "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", 466 | "optional": true 467 | }, 468 | "har-schema": { 469 | "version": "2.0.0", 470 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 471 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", 472 | "optional": true 473 | }, 474 | "har-validator": { 475 | "version": "5.1.5", 476 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", 477 | "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", 478 | "optional": true, 479 | "requires": { 480 | "ajv": "^6.12.3", 481 | "har-schema": "^2.0.0" 482 | } 483 | }, 484 | "has-unicode": { 485 | "version": "2.0.1", 486 | "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", 487 | "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", 488 | "optional": true 489 | }, 490 | "http-signature": { 491 | "version": "1.2.0", 492 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 493 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 494 | "optional": true, 495 | "requires": { 496 | "assert-plus": "^1.0.0", 497 | "jsprim": "^1.2.2", 498 | "sshpk": "^1.7.0" 499 | } 500 | }, 501 | "iconv-lite": { 502 | "version": "0.4.24", 503 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 504 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 505 | "optional": true, 506 | "requires": { 507 | "safer-buffer": ">= 2.1.2 < 3" 508 | } 509 | }, 510 | "ieee754": { 511 | "version": "1.1.13", 512 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", 513 | "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", 514 | "optional": true 515 | }, 516 | "ignore-walk": { 517 | "version": "3.0.3", 518 | "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", 519 | "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", 520 | "optional": true, 521 | "requires": { 522 | "minimatch": "^3.0.4" 523 | } 524 | }, 525 | "inflight": { 526 | "version": "1.0.6", 527 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 528 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 529 | "optional": true, 530 | "requires": { 531 | "once": "^1.3.0", 532 | "wrappy": "1" 533 | } 534 | }, 535 | "inherits": { 536 | "version": "2.0.4", 537 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 538 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 539 | "optional": true 540 | }, 541 | "ini": { 542 | "version": "1.3.5", 543 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", 544 | "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", 545 | "optional": true 546 | }, 547 | "is-fullwidth-code-point": { 548 | "version": "1.0.0", 549 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", 550 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", 551 | "optional": true, 552 | "requires": { 553 | "number-is-nan": "^1.0.0" 554 | } 555 | }, 556 | "is-typedarray": { 557 | "version": "1.0.0", 558 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 559 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", 560 | "optional": true 561 | }, 562 | "isarray": { 563 | "version": "1.0.0", 564 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 565 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", 566 | "optional": true 567 | }, 568 | "isexe": { 569 | "version": "2.0.0", 570 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 571 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 572 | "optional": true 573 | }, 574 | "isstream": { 575 | "version": "0.1.2", 576 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 577 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", 578 | "optional": true 579 | }, 580 | "jsbn": { 581 | "version": "0.1.1", 582 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 583 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", 584 | "optional": true 585 | }, 586 | "json-schema": { 587 | "version": "0.2.3", 588 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", 589 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", 590 | "optional": true 591 | }, 592 | "json-schema-traverse": { 593 | "version": "0.4.1", 594 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 595 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 596 | "optional": true 597 | }, 598 | "json-stringify-safe": { 599 | "version": "5.0.1", 600 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 601 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", 602 | "optional": true 603 | }, 604 | "jsprim": { 605 | "version": "1.4.1", 606 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", 607 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", 608 | "optional": true, 609 | "requires": { 610 | "assert-plus": "1.0.0", 611 | "extsprintf": "1.3.0", 612 | "json-schema": "0.2.3", 613 | "verror": "1.10.0" 614 | } 615 | }, 616 | "mime-db": { 617 | "version": "1.44.0", 618 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", 619 | "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", 620 | "optional": true 621 | }, 622 | "mime-types": { 623 | "version": "2.1.27", 624 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", 625 | "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", 626 | "optional": true, 627 | "requires": { 628 | "mime-db": "1.44.0" 629 | } 630 | }, 631 | "mimic-response": { 632 | "version": "2.1.0", 633 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", 634 | "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", 635 | "optional": true 636 | }, 637 | "minimatch": { 638 | "version": "3.0.4", 639 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 640 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 641 | "optional": true, 642 | "requires": { 643 | "brace-expansion": "^1.1.7" 644 | } 645 | }, 646 | "minimist": { 647 | "version": "1.2.5", 648 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 649 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 650 | "optional": true 651 | }, 652 | "minipass": { 653 | "version": "2.9.0", 654 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", 655 | "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", 656 | "optional": true, 657 | "requires": { 658 | "safe-buffer": "^5.1.2", 659 | "yallist": "^3.0.0" 660 | } 661 | }, 662 | "minizlib": { 663 | "version": "1.3.3", 664 | "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", 665 | "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", 666 | "optional": true, 667 | "requires": { 668 | "minipass": "^2.9.0" 669 | } 670 | }, 671 | "mkdirp": { 672 | "version": "0.5.5", 673 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", 674 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", 675 | "optional": true, 676 | "requires": { 677 | "minimist": "^1.2.5" 678 | } 679 | }, 680 | "mkdirp-classic": { 681 | "version": "0.5.3", 682 | "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", 683 | "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", 684 | "optional": true 685 | }, 686 | "ms": { 687 | "version": "2.1.2", 688 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 689 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 690 | }, 691 | "nan": { 692 | "version": "2.14.1", 693 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", 694 | "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", 695 | "optional": true 696 | }, 697 | "napi-build-utils": { 698 | "version": "1.0.2", 699 | "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", 700 | "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", 701 | "optional": true 702 | }, 703 | "napi-thread-safe-callback": { 704 | "version": "0.0.6", 705 | "resolved": "https://registry.npmjs.org/napi-thread-safe-callback/-/napi-thread-safe-callback-0.0.6.tgz", 706 | "integrity": "sha512-X7uHCOCdY4u0yamDxDrv3jF2NtYc8A1nvPzBQgvpoSX+WB3jAe2cVNsY448V1ucq7Whf9Wdy02HEUoLW5rJKWg==" 707 | }, 708 | "needle": { 709 | "version": "2.5.0", 710 | "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.0.tgz", 711 | "integrity": "sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA==", 712 | "optional": true, 713 | "requires": { 714 | "debug": "^3.2.6", 715 | "iconv-lite": "^0.4.4", 716 | "sax": "^1.2.4" 717 | }, 718 | "dependencies": { 719 | "debug": { 720 | "version": "3.2.6", 721 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", 722 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", 723 | "optional": true, 724 | "requires": { 725 | "ms": "^2.1.1" 726 | } 727 | } 728 | } 729 | }, 730 | "node-abi": { 731 | "version": "2.18.0", 732 | "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.18.0.tgz", 733 | "integrity": "sha512-yi05ZoiuNNEbyT/xXfSySZE+yVnQW6fxPZuFbLyS1s6b5Kw3HzV2PHOM4XR+nsjzkHxByK+2Wg+yCQbe35l8dw==", 734 | "optional": true, 735 | "requires": { 736 | "semver": "^5.4.1" 737 | } 738 | }, 739 | "node-addon-api": { 740 | "version": "2.0.2", 741 | "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", 742 | "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" 743 | }, 744 | "node-gyp": { 745 | "version": "3.8.0", 746 | "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", 747 | "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", 748 | "optional": true, 749 | "requires": { 750 | "fstream": "^1.0.0", 751 | "glob": "^7.0.3", 752 | "graceful-fs": "^4.1.2", 753 | "mkdirp": "^0.5.0", 754 | "nopt": "2 || 3", 755 | "npmlog": "0 || 1 || 2 || 3 || 4", 756 | "osenv": "0", 757 | "request": "^2.87.0", 758 | "rimraf": "2", 759 | "semver": "~5.3.0", 760 | "tar": "^2.0.0", 761 | "which": "1" 762 | }, 763 | "dependencies": { 764 | "nopt": { 765 | "version": "3.0.6", 766 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", 767 | "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", 768 | "optional": true, 769 | "requires": { 770 | "abbrev": "1" 771 | } 772 | }, 773 | "semver": { 774 | "version": "5.3.0", 775 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", 776 | "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", 777 | "optional": true 778 | }, 779 | "tar": { 780 | "version": "2.2.2", 781 | "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", 782 | "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", 783 | "optional": true, 784 | "requires": { 785 | "block-stream": "*", 786 | "fstream": "^1.0.12", 787 | "inherits": "2" 788 | } 789 | } 790 | } 791 | }, 792 | "node-pre-gyp": { 793 | "version": "0.14.0", 794 | "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz", 795 | "integrity": "sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==", 796 | "optional": true, 797 | "requires": { 798 | "detect-libc": "^1.0.2", 799 | "mkdirp": "^0.5.1", 800 | "needle": "^2.2.1", 801 | "nopt": "^4.0.1", 802 | "npm-packlist": "^1.1.6", 803 | "npmlog": "^4.0.2", 804 | "rc": "^1.2.7", 805 | "rimraf": "^2.6.1", 806 | "semver": "^5.3.0", 807 | "tar": "^4.4.2" 808 | } 809 | }, 810 | "noop-logger": { 811 | "version": "0.1.1", 812 | "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", 813 | "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=", 814 | "optional": true 815 | }, 816 | "nopt": { 817 | "version": "4.0.3", 818 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", 819 | "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", 820 | "optional": true, 821 | "requires": { 822 | "abbrev": "1", 823 | "osenv": "^0.1.4" 824 | } 825 | }, 826 | "npm-bundled": { 827 | "version": "1.1.1", 828 | "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", 829 | "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", 830 | "optional": true, 831 | "requires": { 832 | "npm-normalize-package-bin": "^1.0.1" 833 | } 834 | }, 835 | "npm-normalize-package-bin": { 836 | "version": "1.0.1", 837 | "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", 838 | "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", 839 | "optional": true 840 | }, 841 | "npm-packlist": { 842 | "version": "1.4.8", 843 | "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", 844 | "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", 845 | "optional": true, 846 | "requires": { 847 | "ignore-walk": "^3.0.1", 848 | "npm-bundled": "^1.0.1", 849 | "npm-normalize-package-bin": "^1.0.1" 850 | } 851 | }, 852 | "npmlog": { 853 | "version": "4.1.2", 854 | "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", 855 | "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", 856 | "optional": true, 857 | "requires": { 858 | "are-we-there-yet": "~1.1.2", 859 | "console-control-strings": "~1.1.0", 860 | "gauge": "~2.7.3", 861 | "set-blocking": "~2.0.0" 862 | } 863 | }, 864 | "number-is-nan": { 865 | "version": "1.0.1", 866 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 867 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", 868 | "optional": true 869 | }, 870 | "oauth-sign": { 871 | "version": "0.9.0", 872 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 873 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", 874 | "optional": true 875 | }, 876 | "object-assign": { 877 | "version": "4.1.1", 878 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 879 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", 880 | "optional": true 881 | }, 882 | "once": { 883 | "version": "1.4.0", 884 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 885 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 886 | "optional": true, 887 | "requires": { 888 | "wrappy": "1" 889 | } 890 | }, 891 | "os-homedir": { 892 | "version": "1.0.2", 893 | "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", 894 | "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", 895 | "optional": true 896 | }, 897 | "os-tmpdir": { 898 | "version": "1.0.2", 899 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 900 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", 901 | "optional": true 902 | }, 903 | "osenv": { 904 | "version": "0.1.5", 905 | "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", 906 | "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", 907 | "optional": true, 908 | "requires": { 909 | "os-homedir": "^1.0.0", 910 | "os-tmpdir": "^1.0.0" 911 | } 912 | }, 913 | "path-is-absolute": { 914 | "version": "1.0.1", 915 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 916 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 917 | "optional": true 918 | }, 919 | "performance-now": { 920 | "version": "2.1.0", 921 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 922 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", 923 | "optional": true 924 | }, 925 | "prebuild-install": { 926 | "version": "5.3.5", 927 | "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.5.tgz", 928 | "integrity": "sha512-YmMO7dph9CYKi5IR/BzjOJlRzpxGGVo1EsLSUZ0mt/Mq0HWZIHOKHHcHdT69yG54C9m6i45GpItwRHpk0Py7Uw==", 929 | "optional": true, 930 | "requires": { 931 | "detect-libc": "^1.0.3", 932 | "expand-template": "^2.0.3", 933 | "github-from-package": "0.0.0", 934 | "minimist": "^1.2.3", 935 | "mkdirp": "^0.5.1", 936 | "napi-build-utils": "^1.0.1", 937 | "node-abi": "^2.7.0", 938 | "noop-logger": "^0.1.1", 939 | "npmlog": "^4.0.1", 940 | "pump": "^3.0.0", 941 | "rc": "^1.2.7", 942 | "simple-get": "^3.0.3", 943 | "tar-fs": "^2.0.0", 944 | "tunnel-agent": "^0.6.0", 945 | "which-pm-runs": "^1.0.0" 946 | } 947 | }, 948 | "process-nextick-args": { 949 | "version": "2.0.1", 950 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 951 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", 952 | "optional": true 953 | }, 954 | "psl": { 955 | "version": "1.8.0", 956 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", 957 | "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", 958 | "optional": true 959 | }, 960 | "pump": { 961 | "version": "3.0.0", 962 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 963 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 964 | "optional": true, 965 | "requires": { 966 | "end-of-stream": "^1.1.0", 967 | "once": "^1.3.1" 968 | } 969 | }, 970 | "punycode": { 971 | "version": "2.1.1", 972 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 973 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 974 | "optional": true 975 | }, 976 | "qs": { 977 | "version": "6.5.2", 978 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", 979 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", 980 | "optional": true 981 | }, 982 | "rc": { 983 | "version": "1.2.8", 984 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 985 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 986 | "optional": true, 987 | "requires": { 988 | "deep-extend": "^0.6.0", 989 | "ini": "~1.3.0", 990 | "minimist": "^1.2.0", 991 | "strip-json-comments": "~2.0.1" 992 | } 993 | }, 994 | "readable-stream": { 995 | "version": "2.3.7", 996 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 997 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 998 | "optional": true, 999 | "requires": { 1000 | "core-util-is": "~1.0.0", 1001 | "inherits": "~2.0.3", 1002 | "isarray": "~1.0.0", 1003 | "process-nextick-args": "~2.0.0", 1004 | "safe-buffer": "~5.1.1", 1005 | "string_decoder": "~1.1.1", 1006 | "util-deprecate": "~1.0.1" 1007 | } 1008 | }, 1009 | "request": { 1010 | "version": "2.88.2", 1011 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", 1012 | "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", 1013 | "optional": true, 1014 | "requires": { 1015 | "aws-sign2": "~0.7.0", 1016 | "aws4": "^1.8.0", 1017 | "caseless": "~0.12.0", 1018 | "combined-stream": "~1.0.6", 1019 | "extend": "~3.0.2", 1020 | "forever-agent": "~0.6.1", 1021 | "form-data": "~2.3.2", 1022 | "har-validator": "~5.1.3", 1023 | "http-signature": "~1.2.0", 1024 | "is-typedarray": "~1.0.0", 1025 | "isstream": "~0.1.2", 1026 | "json-stringify-safe": "~5.0.1", 1027 | "mime-types": "~2.1.19", 1028 | "oauth-sign": "~0.9.0", 1029 | "performance-now": "^2.1.0", 1030 | "qs": "~6.5.2", 1031 | "safe-buffer": "^5.1.2", 1032 | "tough-cookie": "~2.5.0", 1033 | "tunnel-agent": "^0.6.0", 1034 | "uuid": "^3.3.2" 1035 | } 1036 | }, 1037 | "rimraf": { 1038 | "version": "2.7.1", 1039 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", 1040 | "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", 1041 | "optional": true, 1042 | "requires": { 1043 | "glob": "^7.1.3" 1044 | } 1045 | }, 1046 | "safe-buffer": { 1047 | "version": "5.1.2", 1048 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1049 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 1050 | "optional": true 1051 | }, 1052 | "safer-buffer": { 1053 | "version": "2.1.2", 1054 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1055 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1056 | "optional": true 1057 | }, 1058 | "sax": { 1059 | "version": "1.2.4", 1060 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 1061 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", 1062 | "optional": true 1063 | }, 1064 | "semver": { 1065 | "version": "5.7.1", 1066 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 1067 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 1068 | "optional": true 1069 | }, 1070 | "set-blocking": { 1071 | "version": "2.0.0", 1072 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 1073 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", 1074 | "optional": true 1075 | }, 1076 | "signal-exit": { 1077 | "version": "3.0.3", 1078 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 1079 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", 1080 | "optional": true 1081 | }, 1082 | "simple-concat": { 1083 | "version": "1.0.1", 1084 | "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", 1085 | "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", 1086 | "optional": true 1087 | }, 1088 | "simple-get": { 1089 | "version": "3.1.0", 1090 | "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", 1091 | "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", 1092 | "optional": true, 1093 | "requires": { 1094 | "decompress-response": "^4.2.0", 1095 | "once": "^1.3.1", 1096 | "simple-concat": "^1.0.0" 1097 | } 1098 | }, 1099 | "sshpk": { 1100 | "version": "1.16.1", 1101 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", 1102 | "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", 1103 | "optional": true, 1104 | "requires": { 1105 | "asn1": "~0.2.3", 1106 | "assert-plus": "^1.0.0", 1107 | "bcrypt-pbkdf": "^1.0.0", 1108 | "dashdash": "^1.12.0", 1109 | "ecc-jsbn": "~0.1.1", 1110 | "getpass": "^0.1.1", 1111 | "jsbn": "~0.1.0", 1112 | "safer-buffer": "^2.0.2", 1113 | "tweetnacl": "~0.14.0" 1114 | } 1115 | }, 1116 | "string-width": { 1117 | "version": "1.0.2", 1118 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", 1119 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", 1120 | "optional": true, 1121 | "requires": { 1122 | "code-point-at": "^1.0.0", 1123 | "is-fullwidth-code-point": "^1.0.0", 1124 | "strip-ansi": "^3.0.0" 1125 | } 1126 | }, 1127 | "string_decoder": { 1128 | "version": "1.1.1", 1129 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1130 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 1131 | "optional": true, 1132 | "requires": { 1133 | "safe-buffer": "~5.1.0" 1134 | } 1135 | }, 1136 | "strip-ansi": { 1137 | "version": "3.0.1", 1138 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 1139 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 1140 | "optional": true, 1141 | "requires": { 1142 | "ansi-regex": "^2.0.0" 1143 | } 1144 | }, 1145 | "strip-json-comments": { 1146 | "version": "2.0.1", 1147 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 1148 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", 1149 | "optional": true 1150 | }, 1151 | "tar": { 1152 | "version": "4.4.13", 1153 | "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", 1154 | "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", 1155 | "optional": true, 1156 | "requires": { 1157 | "chownr": "^1.1.1", 1158 | "fs-minipass": "^1.2.5", 1159 | "minipass": "^2.8.6", 1160 | "minizlib": "^1.2.1", 1161 | "mkdirp": "^0.5.0", 1162 | "safe-buffer": "^5.1.2", 1163 | "yallist": "^3.0.3" 1164 | } 1165 | }, 1166 | "tar-fs": { 1167 | "version": "2.1.0", 1168 | "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz", 1169 | "integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==", 1170 | "optional": true, 1171 | "requires": { 1172 | "chownr": "^1.1.1", 1173 | "mkdirp-classic": "^0.5.2", 1174 | "pump": "^3.0.0", 1175 | "tar-stream": "^2.0.0" 1176 | } 1177 | }, 1178 | "tar-stream": { 1179 | "version": "2.1.3", 1180 | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.3.tgz", 1181 | "integrity": "sha512-Z9yri56Dih8IaK8gncVPx4Wqt86NDmQTSh49XLZgjWpGZL9GK9HKParS2scqHCC4w6X9Gh2jwaU45V47XTKwVA==", 1182 | "optional": true, 1183 | "requires": { 1184 | "bl": "^4.0.1", 1185 | "end-of-stream": "^1.4.1", 1186 | "fs-constants": "^1.0.0", 1187 | "inherits": "^2.0.3", 1188 | "readable-stream": "^3.1.1" 1189 | }, 1190 | "dependencies": { 1191 | "readable-stream": { 1192 | "version": "3.6.0", 1193 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 1194 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 1195 | "optional": true, 1196 | "requires": { 1197 | "inherits": "^2.0.3", 1198 | "string_decoder": "^1.1.1", 1199 | "util-deprecate": "^1.0.1" 1200 | } 1201 | } 1202 | } 1203 | }, 1204 | "tough-cookie": { 1205 | "version": "2.5.0", 1206 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", 1207 | "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", 1208 | "optional": true, 1209 | "requires": { 1210 | "psl": "^1.1.28", 1211 | "punycode": "^2.1.1" 1212 | } 1213 | }, 1214 | "tunnel-agent": { 1215 | "version": "0.6.0", 1216 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 1217 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 1218 | "optional": true, 1219 | "requires": { 1220 | "safe-buffer": "^5.0.1" 1221 | } 1222 | }, 1223 | "tweetnacl": { 1224 | "version": "0.14.5", 1225 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 1226 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", 1227 | "optional": true 1228 | }, 1229 | "uri-js": { 1230 | "version": "4.2.2", 1231 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", 1232 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", 1233 | "optional": true, 1234 | "requires": { 1235 | "punycode": "^2.1.0" 1236 | } 1237 | }, 1238 | "usb": { 1239 | "version": "1.6.3", 1240 | "resolved": "https://registry.npmjs.org/usb/-/usb-1.6.3.tgz", 1241 | "integrity": "sha512-23KYMjaWydACd8wgGKMQ4MNwFspAT6Xeim4/9Onqe5Rz/nMb4TM/WHL+qPT0KNFxzNKzAs63n1xQWGEtgaQ2uw==", 1242 | "optional": true, 1243 | "requires": { 1244 | "bindings": "^1.4.0", 1245 | "nan": "2.13.2", 1246 | "prebuild-install": "^5.3.3" 1247 | }, 1248 | "dependencies": { 1249 | "nan": { 1250 | "version": "2.13.2", 1251 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", 1252 | "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", 1253 | "optional": true 1254 | } 1255 | } 1256 | }, 1257 | "util-deprecate": { 1258 | "version": "1.0.2", 1259 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1260 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", 1261 | "optional": true 1262 | }, 1263 | "uuid": { 1264 | "version": "3.4.0", 1265 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", 1266 | "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", 1267 | "optional": true 1268 | }, 1269 | "verror": { 1270 | "version": "1.10.0", 1271 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 1272 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 1273 | "optional": true, 1274 | "requires": { 1275 | "assert-plus": "^1.0.0", 1276 | "core-util-is": "1.0.2", 1277 | "extsprintf": "^1.2.0" 1278 | } 1279 | }, 1280 | "which": { 1281 | "version": "1.3.1", 1282 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 1283 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 1284 | "optional": true, 1285 | "requires": { 1286 | "isexe": "^2.0.0" 1287 | } 1288 | }, 1289 | "which-pm-runs": { 1290 | "version": "1.0.0", 1291 | "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", 1292 | "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", 1293 | "optional": true 1294 | }, 1295 | "wide-align": { 1296 | "version": "1.1.3", 1297 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 1298 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 1299 | "optional": true, 1300 | "requires": { 1301 | "string-width": "^1.0.2 || 2" 1302 | } 1303 | }, 1304 | "wrappy": { 1305 | "version": "1.0.2", 1306 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1307 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1308 | "optional": true 1309 | }, 1310 | "xpc-connect": { 1311 | "version": "2.0.0", 1312 | "resolved": "https://registry.npmjs.org/xpc-connect/-/xpc-connect-2.0.0.tgz", 1313 | "integrity": "sha512-r7J493GkXt+c931hju91N0UDSZCjqQ4/02MJNSe+948myXSAf/oyBd8zQ9XP1l/IZWuQhdkroMyCaj7gmg413Q==", 1314 | "optional": true, 1315 | "requires": { 1316 | "bindings": "^1.5.0", 1317 | "nan": "^2.14.0", 1318 | "node-gyp": "^3.8.0" 1319 | } 1320 | }, 1321 | "yallist": { 1322 | "version": "3.1.1", 1323 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", 1324 | "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", 1325 | "optional": true 1326 | } 1327 | } 1328 | } 1329 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "keiser2zwift", 3 | "version": "1.0.0", 4 | "description": "Adapter for Keiser m3i bikes to Zwift", 5 | "main": "index.js", 6 | "scripts": { 7 | "debug": "node --nolazy --inspect-brk=9229 index.js", 8 | "start": "node index.js" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@abandonware/bleno": "^0.5.1-2", 14 | "@abandonware/noble": "^1.9.2-9", 15 | "atob": "^2.1.2" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | hciconfig hci0 up 4 | hciconfig hci1 up 5 | /home/pi/.config/nvm/versions/node/v10.22.0/bin/node index.js 6 | 7 | --------------------------------------------------------------------------------