Git Product home page Git Product logo

neurosity-sdk-js's People

Contributors

alexcastillo avatar andrewjaykeller avatar biasedbit avatar charliegerard avatar chrisvxd avatar dependabot[bot] avatar kylemath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neurosity-sdk-js's Issues

Questions on training, recording, fitting

Trying to implement the training API into a custom frontend to experiment with different training experiences.

I have read over the docs article, but I am still trying to understand how to get things working properly.

Couple of questions on this topic:

  • Is there an example of an implementation of a multi-trial training in the form of code available?

Recording

  • Will notion.training.record() will automatically take snapshots until notion.training.stop() is called, or those this requires to call record multiple times and is more like taking a "photo" and not "recording a video"?

Start/stop like this:

Screenshot 2022-11-08 at 12 09 06

Or single shots like this:

Screenshot 2022-11-08 at 12 09 39

Fitting

  • When doing a training with multiple rounds/trials, should fit: true be recorded after each round, after each pair of rest/active, or should it only be called once after all rounds have finished?
  • Is there a difference/preferred way between calling baseline: true, fit: true or baseline: false, fit: true?
  • Furthermore, should fit be recorded independently of the rest/active recordings, or should it be called along one of these?

Misc

  • The predefined labels available to train in the console, is there special/optimized analytics behind them when training them or is it the same as when doing training with a custom sting as label from scratch?

Problems with authentication state

Basically (already logged in previously in the same client session):

Does not receive any brain waves:

await neurosity.login({
    customToken: customToken,
}).catch((e) => {
    console.log(e) // Already logged in ...
})
neurosity.brainwaves("powerByBand").subscribe(console.log)

Does receive brain waves:

await neurosity.logout()
await neurosity.login({
    customToken: customToken,
}).catch((e) => {
    console.log(e)
})

neurosity.brainwaves("powerByBand").subscribe(console.log)

Same was happening with email and password

I have to logout and login the client every time

I had other issues related to state, I don't know if it's related to my environment: NextJS app dir 13.4.3 i run all this client-side in 'use client' components

Or is it because I am "already connected" I cannot receive brainwaves?

also I believe neurosity SDK crashes in edge runtime (will open an issue when I see it again)

Is the neurosity SDK storing tokens somewhere somehow? Ideally I can just instantiate the neurosity object once and authenticate it once and use it everywhere client-side
Of course for server-side it would require to re-instanciate and authenticate

PS: just doing the logout atm as work around and it works

Align SignalQuality Interface with Actual API Data Structure

Hello Neurosity team,

I've been working with this SDK and noticed an inconsistency between the SignalQuality interface definition and the actual data structure returned by the Neurosity API.

According to the SDK, the SignalQuality interface is defined as follows:

export interface SignalQuality {
  [channelName: string]: ChannelQuality;
}

This definition suggests that the object keys should be channel names (e.g., CP3, C3, etc.). However, the actual data I received
from the Neurosity API is indexed by numbers, as shown below:

[ChannelQuality, ChannelQuality, ...]

This discrepancy leads to type errors when trying to access the signal quality data in a Typescript project. To resolve this issue, I propose updating the SignalQuality interface to match the actual data structure returned by the API. Here's a possible revision:

export interface SignalQuality {
  [index: number]: ChannelQuality;
}

Alternatively, if the API is supposed to return channel names as keys and the current numeric indexing is a bug, it would be great to have that fixed on the API side.

I believe aligning the SDK's type definitions with the actual data structure is crucial for providing a seamless development experience. I'm looking forward to your thoughts on this matter.

Reproduction

The device type: CROWN 3

typo: getOAuthToken does not return the right type

the function is supposed to return a

): Promise<OAuthQueryResult> {

which is

export type OAuthQueryResult = {
  customToken: string;
  userId: string;
};

and actually returns a string:

.then((response) => JSON.parse(response.data)["access_token"]);

so it should be

.then((response) => ({accessToken: JSON.parse(response.data)["access_token"], userId: query.userId}))

.then((response) => JSON.parse(response.data)["access_token"]);

Feedback: on .focus() - records even though the Crown is not on my head

Problem:

I am recording the .focus() data and it trigger even when I don't wear the Crown (powered ON of course).
So the focus tends to be <.20.
Also I don't know why sometimes i open the box (original given with the Crown) and it's ON even though I powered OFF before (can i turn it ON somehow with movements/shocks?)

Current work around:

  • filter out < 0.3
  • making sure it's off when I don't wear it

Token returned from getOAuthToken is unusable

My users connect their Neurosity account by going to an url created with:

// server ...

import { Neurosity } from "@neurosity/sdk";
import { cookies } from 'next/headers'
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

const neurosity = new Neurosity({
    autoSelectDevice: false
});
export async function GET(request: NextRequest) {
    return neurosity
        .createOAuthURL({
            clientId: process.env.NEUROSITY_OAUTH_CLIENT_ID!,
            clientSecret: process.env.NEUROSITY_OAUTH_CLIENT_SECRET!,
            redirectUri: process.env.NEUROSITY_OAUTH_CLIENT_REDIRECT_URI!,
            responseType: "token",
            state: Math.random().toString().split(".")[1], // A random string is required for security reasons
            scope: [
                "read:devices-info",
                "read:devices-status",
                "read:signal-quality",
                "read:brainwaves",
                "read:focus",
            ]
        })
        .then((url) => NextResponse.json({url: url}))
        .catch((error) => NextResponse.json({ error: error.response.data }, { status: 400 }))
}


// ... later on client

const neurosity = new Neurosity();

console.log(token);

await neurosity.login({ customToken: token });

neurosity.focus().subscribe(console.log)
// works
{
  label: 'focus',
  metric: 'awareness',
  probability: 0.7761862422393826,
  timestamp: 1691170018286
}

OAuth tokens expire after 60 minutes, so I renew them with getOAuthToken.
When I try to use the token from getOAuthToken it fails:

const { Neurosity } = require("@neurosity/sdk");
const fs = require('fs');
const dotenv = require("dotenv");
dotenv.config();

main();

async function main() {

    const neurosity = new Neurosity();

    const token = await neurosity.getOAuthToken({
        clientId: process.env.NEUROSITY_OAUTH_CLIENT_ID!,
        clientSecret: process.env.NEUROSITY_OAUTH_CLIENT_SECRET!,
        userId: userId,
    });

    console.log(token);

    await neurosity.login({ customToken: token });

    neurosity.focus().subscribe(console.log)
}
            throw err;
            ^

Error: Neurosity SDK: You are trying to access data with an OAuth token without access to the following scopes: read:focus.
    at getScopeError (/Users/louisbeaumont/Documents/hello-world/node_modules/@neurosity/sdk/dist/cjs/utils/oauth.js:92:12)
    at validateOAuthScopeForFunctionName (/Users/louisbeaumont/Documents/hello-world/node_modules/@neurosity/sdk/dist/cjs/utils/oauth.js:88:19)
    at Neurosity.focus (/Users/louisbeaumont/Documents/hello-world/node_modules/@neurosity/sdk/dist/cjs/Neurosity.js:857:91)
    at main (/Users/louisbeaumont/Documents/hello-world/oauth.js:22:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.0.0

If I use the first token it works. Seems to be an unexpected behaviour? What is the usage of the new token?

Multiple kinesis streams not working properly

I noticed that when subscribing to multiple kinesis streams e.g. rightArm and leftArm, one of them becomes receives any activity, while the other one is receiving more activity than normal, like if it was receiving activity for both streams at the same time. Nevertheless, this activity data is always marked as being a single label, so it is still imposible to determine where it is coming from.

Is this a known limitation of the system?

I also noticed all the neurosity system is implemented based on firebase DB actions. Is the firebase neurosity underlying architecture also open source? Can we learn somwhow how is that implemented to see if there is a way to overcome this issue?

Also, I noticed that this does not only happens using the SDK but also while listening to kinesis in the neurosity portal. So it must be a known limitation.

Thanks in advance

Oauth token lifetime

hey, been using oauth for a few days and i'm still unsure if the token can be used forever in the backend for example or if the client has to renew manually when it expires or if the backend can renew the token anyhow (some refresh token)

I saw in the logs / application local storage references of a "3600" and "refreshToken" if digging far enough, i assume it means the token is valid for 60 minutes, probably the reason why i receive this:

[t [Error]: The custom token format is incorrect. Please check the documentation.] {
  code: 'auth/invalid-custom-token',
  a: null
}

which i suspect is an incorrect message because the same token was working before

i don't see any documentation to use the refreshToken, it would be nice to either:

  • increase lifetime of the access token
  • give a way for the backend to refresh the access token, eg:
POST /auth/v1/token?grant_type=refresh_token

{
  "refresh_token": "your_refresh_token" 
}

60 minutes feels really short and a lot of friction

Type error on streamingMode

Using the boilerplate code from the bluetooth streaming tutorial streaming mode returns a type error for any input (including the values that are meant to be typed: 'bluetooth-with-wifi-fallback' etc)

import { Neurosity, WebBluetoothTransport } from "@neurosity/sdk";
...
const neurosity = new Neurosity({
        autoSelectDevice: true,
        bluetoothTransport: new WebBluetoothTransport(),
        streamingMode: 'wifi-only'
      });

Bug on run

I was trying to run the examples but when i did npm start i got:

src/api/firebase/deviceStore.ts:4:9 - error TS2459: Type 'FirebaseNamespace' has no property 'database' and no string index signature.

4 const { database } = firebase;
          ~~~~~~~~


src/Notion.ts:2:25 - error TS2307: Cannot find module '@neurosity/ipk'.

2 import { metrics } from "@neurosity/ipk";
                          ~~~~~~~~~~~~~~~~


[17:43:15] Found 2 errors. Watching for file changes.

BUG: Re-subscribe when internet connection is lost and regained in notion-js

Expected

A client should be able to put their process to sleep and wake it up t time later, generally greater than 3 minutes, and be able to immediately resume getting metrics.

Problem

A new subscription is created when Notion is instantiated with this library. Then if the client is, say a developer console in a chrome tab, cut off from the internet for more than two minutes (e.g. 30 minutes during a commute to work) the subscription is automatically cleaned up by the firebase API. Then when the client reconnects to the internet again the subscription is not requested again and no metrics begin to stream into our client.

Solution

Implement a local store in Notion JS to request metrics again on reconnecting to firebase servers.

Notion sends 1 packet of data even though it is asleep

Notion device is charging and sleeping, but still sends one packet of data from the notion.brainwaves("raw") command.

notion.brainwaves('raw').subscribe(a => {
     console.log('a', a)
})
a {"data": [[292.7506448333972, 249.11804780111336, 443.72127490457626, 577.8197389418417, 572.6437675225485, 537.484434907631, 548.5428571207613, 586.7088458806332, 618.7083138200171, 644.50991178137, 671.5296326598088, 693.6509694825284, 706.4331875861494, 718.9582294638835, 740.261003177448, 765.185966574725, 782.5003747902583, 791.5989438076381, 802.2478377228027, 820.1437216950148, 840.5160127325819, 855.6974021865606, 863.9982528225667, 869.9771910945497, 877.723516216531, 885.9603209925042, 891.4086012035382, 894.5477509296718, 898.4885588723398, 904.3467948476417, 910.679944265218, 916.020490655369, 920.2681868651393, 924.0971144993077, 927.9681597371314, 931.4658580794643, 933.4793345166661, 933.6824684559467, 933.1816110773818, 932.9721804748518, 932.5865080842045, 931.0511031945766, 928.2071301163581, 924.2125747555424, 919.0013572733003, 912.6467846667394, 905.5909461897622, 898.53813799559, 891.7657318859369, 884.8217013578385, 877.2282345675077, 868.7670846802428, 859.041227401998, 847.6123480879146, 834.9739282201865, 822.2981138265495, 809.881162238011, 797.0157680584625, 783.1295668375756, 768.4076787880388, 753.6300420691696, 739.55286256907, 726.4782805259143, 714.2538914021932], [870.8019843300942, 715.9089200222926, 1271.0446027932048, 1629.5969254613833, 1557.9225661202863, 1389.764180878055, 1357.9557767590454, 1407.2973041689174, 1438.9020196614429, 1453.8541203252807, 1475.026349769245, 1481.8783558352739, 1458.0093619770855, 1431.016322821268, 1431.176814723529, 1445.2722017508759, 1439.401024561953, 1409.9665785963475, 1385.35018239179, 1383.826234503719, 1392.68019434513, 1390.5204188593375, 1374.9953286611467, 1361.221791357031, 1359.383521068485, 1362.6108673307263, 1358.3453900673553, 1344.3847710376072, 1327.6058935378562, 1312.0834392490574, 1295.225779934478, 1274.2178299212242, 1251.508473529824, 1231.7858309137441, 1216.189430792368, 1201.3661508002012, 1183.0151110580998, 1160.0669250342185, 1135.5064417715473, 1113.5056610274578, 1096.193594394881, 1083.2171053341428, 1073.366492694162, 1065.207019602496, 1057.4862906530102, 1049.6842291475502, 1042.0366096030473, 1035.8603267498602, 1032.9110979052775, 1034.6730415044967, 1042.8742923373384, 1058.180507949716, 1077.3841271838473, 1094.354439486719, 1104.3937097841617, 1105.6158280533682, 1098.231050101289, 1085.2077723342666, 1070.8469897247578, 1057.4492017895054, 1044.2075101262546, 1028.8312566686889, 1009.9779260998607, 988.0499083294421], [-982.0928000996904, -531.8973550895453, -1197.9026339230072, -1653.2792546775322, -1518.2398587373368, -1281.1085342973095, -1255.4779158203105, -1306.7425172579813, -1291.0524000146027, -1268.9269428048278, -1300.4269165232006, -1314.732052237615, -1244.7714879713892, -1152.7202591917692, -1140.7046218446876, -1205.0867067048055, -1252.7845467201328, -1226.983268971763, -1161.8624983223403, -1110.9574330730359, -1074.3531336146466, -1021.1097565169143, -944.5984086873457, -873.4642700086708, -830.319770182429, -802.6835297208081, -764.6872677025945, -707.7769002456755, -649.0335756575596, -609.186859373991, -591.7973012452651, -586.5604171379273, -577.6911861266931, -555.9260860813279, -518.6698214206784, -464.9066031511528, -400.54770921607144, -335.60100708275013, -280.4099630387868, -238.8806193181305, -203.13739696969463, -160.41376202672927, -97.95176997068697, -12.159788515975322, 89.2424921715209, 192.8471450325486, 281.71283662840216, 347.68315085022573, 396.8652118315089, 443.82067905470353, 501.6255054132411, 570.5651966094092, 640.9398293101831, 699.3696461953539, 737.1225370249797, 756.3401162292598, 766.5213566973541, 780.8246495736121, 806.0887286214813, 838.482726968007, 867.3133791417558, 879.7417261809239, 870.4420677324244, 842.4015886199759], [-3.8533211855703486, 83.71708936326534, 68.85055888779992, 55.35307446592642, 79.49986709383238, 105.39545005634672, 117.51006769763119, 137.5632305158229, 172.62899946777276, 201.00892242368212, 210.4754705667196, 217.10733149893042, 239.4632347261856, 271.2398778583401, 293.2369500647201, 301.3435033037113, 308.6668584480174, 326.57434747039326, 351.11586840634686, 371.3963873017752, 385.0373685801219, 397.9117220141087, 414.1965184146179, 431.1810105618114, 444.5708552895793, 454.06841103494605, 462.19036937003784, 471.96640399730944, 483.36038479500417, 493.9818782608898, 503.189517791967, 511.9583781661721, 521.3861574829859, 530.9464214025202, 539.7471282309343, 547.9543600755859, 555.2434481497977, 561.7292038033424, 567.9537409769415, 574.2242138208366, 580.3590602961461, 585.4887822310825, 589.8453233917734, 593.6152398069033, 596.5361022522011, 598.8724343642491, 600.6350325579101, 602.4248796168267, 604.392701280001, 605.99812510165, 607.1296616950398, 607.3325559320504, 606.3126766608991, 603.6344261287979, 599.7398777026517, 596.1867006584023, 593.0883481034687, 589.8489587618503, 585.7237413995799, 580.5461572836826, 575.2349253191878, 570.2290584359712, 565.861776871623, 561.7718162213315], [-1801.4567806598056, -1427.2552562815363, -2550.824484973939, -3260.1049708846676, -3077.3073757412158, -2715.112012220261, -2656.983381251215, -2770.7454064702015, -2837.187518536193, -2859.4030675262875, -2893.7111051467073, -2904.039421247823, -2859.589238847835, -2820.335194078937, -2848.1803447014754, -2908.7461023841674, -2923.469586604995, -2880.6963179522354, -2841.3098695353738, -2847.91598659826, -2874.329608860444, -2873.1979220601397, -2840.5159543716222, -2810.499321842393, -2804.3543829008304, -2808.5303450524634, -2800.0170208585478, -2775.4037119585764, -2748.986184046085, -2730.9640379218295, -2716.485052022902, -2695.7231017570757, -2667.4965365613107, -2638.400149146868, -2612.6493063636467, -2587.887397886396, -2560.153400056667, -2529.019367427426, -2496.530844342352, -2464.112464810333, -2431.629380829761, -2398.066385763805, -2362.9660183085603, -2326.9986339643897, -2291.020484368008, -2254.958706368755, -2217.9683733251713, -2179.52426810108, -2139.9361049517056, -2100.027791033223, -2060.1301169505778, -2019.8746177954804, -1979.3494062573845, -1939.135302732977, -1899.2065539202106, -1858.688714432513, -1816.9873407262048, -1774.640763416849, -1732.4754695525244, -1690.710570146844, -1648.7281085523255, -1605.5667789770814, -1560.9369379238294, -1515.1332456321848], [-52.688451869738174, -34.16523371562688, -64.36214957345254, -81.6956299646819, -70.5841890390694, -53.959288683555656, -47.39772427131625, -46.13128270954792, -42.47858089479207, -36.91521476276936, -32.08322315356641, -26.435048222372007, -17.97553099123998, -9.08469120821139, -3.2365238141821457, 0.03427189569155864, 3.8466692755464518, 9.517768484541628, 14.992564885973385, 17.68755790875652, 17.863198130602157, 17.419173647126044, 16.494586739505422, 14.046142931463539, 10.500979283483709, 7.350356314173144, 5.8744070690063515, 7.165768404520064, 11.362430272844957, 17.401190260203368, 24.501425627539437, 32.63601154769559, 41.51957049365781, 50.346020468283484, 58.66136745523691, 66.52019645425986, 73.76438900624635, 80.27512623047119, 86.59883824076005, 93.21392996177093, 99.58376102555766, 104.90135215919295, 109.07569724325363, 112.18823394016269, 114.14123348271113, 115.07133711398106, 115.50028649583643, 116.32955768305243, 118.26790435287754, 121.29576030179396, 124.98194608008166, 128.63816412028092, 131.0724299007387, 131.07837229791494, 128.73924411454996, 125.36604491078748, 121.81737854544977, 117.99686945441996, 113.92101315938676, 110.43724030916087, 108.7002113812924, 109.27964736795153, 111.9084156563201, 115.49886244493891], [61.02771602742495, 85.24268775897883, 113.70903707804825, 124.53790378467471, 120.4262929687842, 112.11479800552169, 109.06415858259786, 115.78932633113303, 127.92804870643877, 135.68654203579086, 135.0921101544969, 132.54230421875332, 136.16281286850037, 144.84011369576228, 150.74324534222166, 150.16067347780432, 146.97102066887365, 147.19216725845502, 151.64344434292678, 156.33458182621888, 158.90243999211995, 160.43119913085005, 162.31229853593607, 164.00257735812562, 164.4549298266873, 163.40056494787444, 161.47937660828666, 160.64635280624594, 161.84079573975094, 163.92794011348013, 165.81707311926817, 167.35027641947164, 168.90495209638362, 170.3675052401412, 171.58110457924187, 172.7923053667305, 173.71579970730244, 174.31053768128317, 175.1279229148423, 176.49594175011936, 177.87909722811173, 178.4085273804487, 178.3664498457349, 178.18193574686111, 177.75640979814887, 177.08848208172765, 176.222007237408, 175.71969433827877, 175.84845373497132, 176.24881240810095, 176.7281275012508, 176.98845097238006, 176.51891576284805, 174.60544502194762, 171.53910551830188, 168.6435383045036, 166.23213754129333, 163.80625363711198, 160.8520895582909, 157.4689213196151, 154.4730048105775, 152.32476119910382, 151.0485814792452, 150.15567187487895], [545.8423965238927, 436.7115250523611, 765.6034756012821, 958.946670936421, 883.9368454417627, 758.4612030692685, 726.9166199087683, 750.2968679463756, 762.8039392752504, 761.7493039361224, 761.0050774463382, 751.9563389542918, 729.3346650507814, 710.1307193995084, 708.123791992451, 711.0296448646883, 698.2981132725787, 670.927894659161, 648.3250229784594, 641.1707259418586, 640.7764798311197, 634.1290009044488, 620.0375971819394, 607.0935203792437, 600.4572917107213, 595.4975905544134, 585.3834135372581, 570.7447680166596, 557.1745829510628, 547.0639391568867, 538.0053650704016, 527.0457383223016, 514.1607765186241, 501.287992991123, 489.7969560822106, 479.1941493221333, 467.6507757075073, 454.40770207809226, 440.50300709935243, 426.87238775120784, 412.93405724766876, 397.76648921876733, 381.8719883314467, 366.2216923243569, 351.1431205082831, 336.53216656056526, 322.10220054901754, 307.8876347037185, 293.78212379778154, 279.2734503475399, 264.14419594595773, 248.44288610827607, 232.03303367948286, 214.54893980985847, 196.54947250759923, 179.73710849209982, 165.3735629586796, 153.86442013294965, 144.94303812410845, 137.66256526814993, 130.58907607551538, 122.17208912994907, 111.73900425171666, 100.06903315799013]], "info": {"channelNames": ["CP6", "F6", "C4", "CP4", "CP3", "F5", "C3", "CP5"], "notchFrequency": "50Hz", "samplingRate": 250, "startTime": 1591262833390}, "label": "raw"}

Bug: PSD and PowerByBand show out of range data

The PSD and PowerByBand come after the notch and bandpass filter. Therefore their useable range is limited to the range of the bandpass filters. For example, today, the bandpass goes from 2 to 45Hz for the Crown. The PSD and PowerBy Band use constants from eeg-pipes but has a much narrower range than the constants found in EEG-pipes.

For example, the PSD gives:

  label: 'psd',
  freqs: [
      0,   2,   4,   6,   8,  10,  12,  14,  16,  18,  20,  22,
     24,  26,  28,  30,  32,  34,  36,  38,  40,  42,  44,  46,
     48,  50,  52,  54,  56,  58,  60,  62,  64,  66,  68,  70,
     72,  74,  76,  78,  80,  82,  84,  86,  88,  90,  92,  94,
     96,  98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118,
    120, 122, 124, 126
  ],
  info: {
    notchFrequency: '60Hz',
    samplingRate: 256,
    startTime: 1628197298732
  },

But the 0, and everything above 44, maybe 46 is invalid and should not be used. A solution would be to limit what PSD shows dynamically based on the bandpass:

  label: 'psd',
  freqs: [
      2,   4,   6,   8,  10,  12,  14,  16,  18,  20,  22,
     24,  26,  28,  30,  32,  34,  36,  38,  40,  42,  44,  46
  ],
  info: {
    notchFrequency: '60Hz',
    bandpassLow: '2Hz',
    bandpassHigh: '45Hz',
    samplingRate: 256,
    startTime: 1628197298732
  },

The docs are therefore not correct and should be updated: https://docs.neurosity.co/docs/api/brainwaves

Calm score stopping

Problem

While using calm score in VSCode plugin, I notice that the metrics stop coming in. So I went to my app lab and connected to the same device and clicked start on the Metric Timeline for awareness/calm and to my surprise, the VSCode application started receiving metrics again!

Expected

I want the VSCode plugin to not stop receiving metrics.

Workaround

Use another application to subscribe to the same metric that failed.

Notion Version

v3.3.0

Video

Video of failure in action with work around

Bug: Unable to run example for training.js

When trying to run the examples to test out the new python code i wrote, I wanted to run the examples and select the training.js.

I manually install the lib-ipk @1.0.0 after i had cloned that repo, packed it, and installed

I got this error:

? What do example would you like to run? training.js
(node:47050) UnhandledPromiseRejectionWarning: Error: Cannot find module '../..'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/aj/Neurosity/notion-js/examples/node/training.js:1:82)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
(node:47050) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:47050) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.