Closed chx2017 closed 5 years ago
by the default python example does not set debit number in "authorize" request. You should set it with a big number enough (may be 100) take a look in function async def authorize(self, license_id=None, debit=None) of file cortex.py
Dear Cuong Trinh Manh,
We have run the example.py with the value (debit = 500) and obtained the below information. (1) Is the number of get_data got {"pow":[.......]} the EEG data (red color)? How to define the corresponding items for the different EEG channels? (2) The example.py can not run continuously,and broken as shown with the blue information after several cycles. what is problem with it? async def authorize(self, license_id=None, debit=500): D:\Python\Python37\python.exe E:/myTFileschx/EmotivTesting/cortex-v2-example-master/python/example.py USER LOGIN Sending request: {"jsonrpc": "2.0", "method": "getUserLogin", "params": {}, "id": 1} sent; awaiting response GET CORTEX INFO HAS ACCESS RIGHT lib.cortex resp: {'currentOSUId': '1001', 'currentOSUsername': 'lenovo', 'loggedInOSUId': '1001', 'loggedInOSUsername': 'lenovo', 'username': '2259b2ef9eeebb5'} Sending request: {"jsonrpc": "2.0", "method": "getCortexInfo", "params": {}, "id": 2} sent; awaiting response lib.cortex resp: {'id': 2, 'jsonrpc': '2.0', 'result': {'buildDate': '2019-09-03T09:40:00', 'buildNumber': 'v2.0.2-417-g3845976', 'version': '2.2.0'}} Sending request: {"jsonrpc": "2.0", "method": "requestAccess", "params": {"clientId": "JwoNlMmZ7LqXAafsbr3ldnGIoF2F0W5DdUQ27mN9", "clientSecret": "D9LHZtzlgYvBEJegWLCMNXhyXCEIimga0W3PSTLJNaOMJDjCXzC8ULmZQ1bXOqaCCrsVbBTOec1bbPhXXCskfk2DbqMrRiDFgA8Ia2pAQhDXjnsAkJZPqcmeRo5bNkE8"}, "id": 3} sent; awaiting response REQUEST ACCESS lib.cortex resp: {'id': 3, 'jsonrpc': '2.0', 'result': {'accessGranted': True, 'message': 'The User has access right to this application.'}} Sending request: {"jsonrpc": "2.0", "method": "requestAccess", "params": {"clientId": "JwoNlMmZ7LqXAafsbr3ldnGIoF2F0W5DdUQ27mN9", "clientSecret": "D9LHZtzlgYvBEJegWLCMNXhyXCEIimga0W3PSTLJNaOMJDjCXzC8ULmZQ1bXOqaCCrsVbBTOec1bbPhXXCskfk2DbqMrRiDFgA8Ia2pAQhDXjnsAkJZPqcmeRo5bNkE8"}, "id": 4} sent; awaiting response lib.cortex resp: AUTHORIZE {'id': 4, 'jsonrpc': '2.0', 'result': {'accessGranted': True, 'message': 'The User has access right to this application.'}} Sending request: {"jsonrpc": "2.0", "method": "authorize", "params": {"clientId": "JwoNlMmZ7LqXAafsbr3ldnGIoF2F0W5DdUQ27mN9", "clientSecret": "D9LHZtzlgYvBEJegWLCMNXhyXCEIimga0W3PSTLJNaOMJDjCXzC8ULmZQ1bXOqaCCrsVbBTOec1bbPhXXCskfk2DbqMrRiDFgA8Ia2pAQhDXjnsAkJZPqcmeRo5bNkE8", "debit": 500}, "id": 5} sent; awaiting response lib.cortex resp: GET LICENSE INFO {'id': 5, 'jsonrpc': '2.0', 'result': {'cortexToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg='}} Sending request: {"jsonrpc": "2.0", "method": "getLicenseInfo", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg="}, "id": 6} sent; awaiting response QUERY HEADSETS lib.cortex resp: {'id': 6, 'jsonrpc': '2.0', 'result': {'isOnline': True, 'license': {'applications': ['com.emotiv.sdk.basic'], 'billingFrom': '2019-08-27T08:00:00.000+08:00', 'billingTo': '2029-08-24T08:00:00.000+08:00', 'deviceInfo': {'deviceLimit': 3, 'devicesPerSeat': 3, 'sessionLimit': {'day': None, 'month': None, 'year': None}}, 'expired': False, 'extenderLimit': 6, 'hardLimitTime': '2019-10-05T07:59:59.999+08:00', 'isCommercial': False, 'licenseId': 'afb3594c-5469-4a1f-a727-4499166584a2', 'licenseName': 'Basic License', 'localQuota': 1199, 'maxDebit': None, 'scopes': [''], 'seatCount': 1, 'sessionCount': 0, 'softLimitTime': '2019-09-28T07:59:59.999+08:00', 'totalDebit': 1200, 'totalRegisteredDevices': 1, 'validFrom': '2019-08-27T08:00:00.000+08:00', 'validTo': '2029-08-25T07:59:59.999+08:00'}}} Sending request: {"jsonrpc": "2.0", "method": "queryHeadsets", "params": {}, "id": 7} sent; awaiting response CREATE SESSION lib.cortex found headsets ['EPOCPLUS-3B9AEBCD'] lib.cortex resp: {'id': 7, 'jsonrpc': '2.0', 'result': [{'connectedBy': 'dongle', 'customName': '', 'dongle': '6ff', 'firmware': '625', 'id': 'EPOCPLUS-3B9AEBCD', 'motionSensors': ['GYROX', 'GYROY', 'GYROZ', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 256, 'eegRes': 16, 'memsRate': 0, 'memsRes': 16, 'mode': 'EPOCPLUS'}, 'status': 'connected'}]} Sending request: {"jsonrpc": "2.0", "method": "createSession", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg=", "headset": "EPOCPLUS-3B9AEBCD", "status": "active"}, "id": 8} sent; awaiting response CREATE RECORD lib.cortex resp: {'id': 8, 'jsonrpc': '2.0', 'result': {'appId': 'com.2259b2ef9eeebb5.jackcao_2019830', 'headset': {'connectedBy': 'dongle', 'customName': '', 'dongle': '6ff', 'firmware': '625', 'id': 'EPOCPLUS-3B9AEBCD', 'motionSensors': ['GYROX', 'GYROY', 'GYROZ', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 256, 'eegRes': 16, 'memsRate': 0, 'memsRes': 16, 'mode': 'EPOCPLUS'}, 'status': 'connected'}, 'id': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a', 'license': 'afb3594c-5469-4a1f-a727-4499166584a2', 'owner': '2259b2ef9eeebb5', 'recordIds': [], 'recording': False, 'started': '2019-09-16T17:11:35.765+08:00', 'status': 'activated', 'stopped': '', 'streams': []}} Sending request: {"jsonrpc": "2.0", "method": "createRecord", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg=", "session": "e90157b0-6333-4d09-8b4f-df1ac6d6381a", "title": "test record 1"}, "id": 9} sent; awaiting response SUBSCRIBE POW & MET lib.cortex resp: {'id': 9, 'jsonrpc': '2.0', 'result': {'record': {'applicationId': 'com.2259b2ef9eeebb5.jackcao_2019830', 'applicationVersion': '1.0', 'description': '', 'endDatetime': '', 'experimentId': 0, 'licenseId': 'afb3594c-5469-4a1f-a727-4499166584a2', 'licenseScope': [''], 'ownerId': '2990d9f7-c1f2-45ae-bcf3-3233811d3937', 'startDatetime': '2019-09-16T17:11:35.686570+08:00', 'tags': [], 'title': 'test record 1', 'uuid': '1f40e380-845c-4051-aca6-a2aed85c3596'}, 'sessionId': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a'}} Sending request: {"jsonrpc": "2.0", "method": "subscribe", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg=", "session": "e90157b0-6333-4d09-8b4f-df1ac6d6381a", "streams": ["pow", "met"]}, "id": 10} sent; awaiting response lib.cortex resp: {'id': 10, 'jsonrpc': '2.0', 'result': {'failure': [], 'success': [{'cols': ['AF3/theta', 'AF3/alpha', 'AF3/betaL', 'AF3/betaH', 'AF3/gamma', 'F7/theta', 'F7/alpha', 'F7/betaL', 'F7/betaH', 'F7/gamma', 'F3/theta', 'F3/alpha', 'F3/betaL', 'F3/betaH', 'F3/gamma', 'FC5/theta', 'FC5/alpha', 'FC5/betaL', 'FC5/betaH', 'FC5/gamma', 'T7/theta', 'T7/alpha', 'T7/betaL', 'T7/betaH', 'T7/gamma', 'P7/theta', 'P7/alpha', 'P7/betaL', 'P7/betaH', 'P7/gamma', 'O1/theta', 'O1/alpha', 'O1/betaL', 'O1/betaH', 'O1/gamma', 'O2/theta', 'O2/alpha', 'O2/betaL', 'O2/betaH', 'O2/gamma', 'P8/theta', 'P8/alpha', 'P8/betaL', 'P8/betaH', 'P8/gamma', 'T8/theta', 'T8/alpha', 'T8/betaL', 'T8/betaH', 'T8/gamma', 'FC6/theta', 'FC6/alpha', 'FC6/betaL', 'FC6/betaH', 'FC6/gamma', 'F4/theta', 'F4/alpha', 'F4/betaL', 'F4/betaH', 'F4/gamma', 'F8/theta', 'F8/alpha', 'F8/betaL', 'F8/betaH', 'F8/gamma', 'AF4/theta', 'AF4/alpha', 'AF4/betaL', 'AF4/betaH', 'AF4/gamma'], 'sid': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a', 'streamName': 'pow'}, {'cols': ['eng', 'exc', 'lex', 'str', 'rel', 'int', 'foc'], 'sid': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a', 'streamName': 'met'}]}} get_data got {"pow":[0.223,0.895,0.365,7.124,8.25,32.922,21.67,5.036,32.774,3.173,0.859,2.126,0.905,7.388,11.318,0.165,0.518,0.258,1.457,0.088,1.118,6.635,2.492,3.374,0.381,1.918,9.039,4.298,6.636,0.523,1.974,12.116,6.039,7.833,0.48,4.169,9.419,2.312,5.719,4.741,0.306,0.734,0.163,1.947,0.108,0.053,0.249,0.098,0.278,0.034,2.827,20.467,8.248,4.552,1.229,2.58,1.642,0.988,14.13,12.722,0.715,1.283,0.654,5.919,7.459,0.524,3.434,1.263,5.589,6.575],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625095.7024} get_data got {"pow":[0.212,0.973,0.327,7.208,8.529,31.895,22.454,4.205,33.158,2.922,0.713,2.325,0.865,7.242,11.609,0.159,0.495,0.229,1.538,0.096,1.103,6.606,1.96,3.317,0.362,1.871,8.635,3.591,6.49,0.527,2.098,12.044,4.888,7.657,0.529,3.65,8.834,2.172,5.755,4.983,0.298,0.821,0.108,1.984,0.11,0.054,0.249,0.086,0.258,0.029,2.335,23.032,7.195,5.02,1.179,2.504,1.72,1.041,14.92,13.244,0.68,1.207,0.698,5.57,7.496,0.543,3.422,1.115,5.683,6.654],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625095.8285} get_data got {"pow":[0.213,1.037,0.326,7.012,8.674,28.788,22.659,3.446,34.507,2.675,0.611,2.598,0.874,7.291,11.732,0.155,0.499,0.218,1.646,0.099,1.048,6.576,1.519,3.165,0.324,1.752,9.305,3.187,6.296,0.506,2.22,12.048,3.85,7.287,0.566,3.129,7.833,2.045,5.974,4.96,0.282,0.882,0.066,2.03,0.107,0.06,0.226,0.071,0.242,0.024,1.987,24.504,6.291,5.692,1.171,2.351,1.735,1.057,15.401,13.565,0.696,1.229,0.721,5.273,7.447,0.537,3.455,1.002,5.85,6.812],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625095.9548} get_data got {"pow":[0.231,1.1,0.368,6.633,8.603,24.373,22.866,3.148,36.41,2.446,0.559,2.851,0.942,7.539,11.748,0.159,0.523,0.222,1.747,0.097,1.012,6.553,1.233,2.944,0.278,1.636,10.821,3.098,6.057,0.488,2.351,12.124,3.097,6.755,0.58,2.644,6.508,1.871,6.248,4.786,0.26,0.899,0.045,2.097,0.1,0.068,0.186,0.058,0.236,0.02,1.871,24.797,5.625,6.348,1.216,2.178,1.687,1.072,15.404,13.569,0.719,1.284,0.729,5.073,7.291,0.511,3.536,0.918,6.059,7.001],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.0809} get_data got {"pow":[0.263,1.164,0.428,6.243,8.36,19.748,23.457,3.492,38.245,2.243,0.537,2.962,1.043,7.941,11.741,0.169,0.556,0.227,1.812,0.092,1.025,6.563,1.062,2.691,0.234,1.527,12.647,3.128,5.758,0.495,2.427,12.281,2.568,6.111,0.572,2.216,5.15,1.684,6.469,4.61,0.238,0.873,0.048,2.186,0.092,0.076,0.143,0.05,0.239,0.017,1.97,24.216,5.02,6.797,1.307,2.033,1.644,1.115,14.914,13.236,0.716,1.322,0.753,5.012,7.058,0.468,3.68,0.854,6.256,7.135],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.2069} get_data got {"pow":[0.307,1.217,0.467,5.981,8.07,16.097,24.525,4.558,39.374,2.062,0.527,2.847,1.117,8.396,11.757,0.182,0.589,0.218,1.824,0.088,1.085,6.618,0.973,2.466,0.201,1.399,14.187,3.099,5.421,0.538,2.346,12.464,2.152,5.451,0.558,1.879,4.207,1.57,6.578,4.549,0.218,0.822,0.072,2.285,0.084,0.08,0.107,0.045,0.251,0.014,2.177,23.28,4.469,6.924,1.43,1.922,1.676,1.182,14.088,12.625,0.694,1.329,0.819,5.122,6.822,0.45,3.897,0.805,6.382,7.138],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.3329} get_data got {"pow":[0.351,1.248,0.467,5.89,7.866,14.086,25.917,6.199,39.317,1.904,0.504,2.517,1.122,8.791,11.775,0.2,0.614,0.194,1.781,0.09,1.189,6.707,0.96,2.341,0.181,1.259,15.029,2.946,5.138,0.61,2.069,12.585,1.82,4.92,0.557,1.655,4.004,1.604,6.574,4.657,0.206,0.77,0.113,2.367,0.077,0.078,0.088,0.043,0.264,0.011,2.389,22.555,4.238,6.724,1.561,1.808,1.801,1.247,13.247,11.864,0.68,1.341,0.934,5.409,6.658,0.514,4.183,0.773,6.408,6.985],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.4593} get_data got {"pow":[0.394,1.28,0.45,5.921,7.829,13.669,27.574,8.136,37.964,1.785,0.466,2.106,1.06,9.039,11.731,0.219,0.621,0.159,1.696,0.096,1.34,6.79,1.009,2.381,0.174,1.136,15.013,2.69,5.065,0.687,1.653,12.554,1.576,4.68,0.579,1.526,4.557,1.797,6.509,4.907,0.204,0.734,0.16,2.414,0.075,0.074,0.086,0.042,0.272,0.01,2.536,22.292,4.624,6.24,1.67,1.64,1.968,1.264,12.745,11.113,0.714,1.433,1.112,5.855,6.612,0.697,4.523,0.797,6.356,6.712],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.5852} get_data got {"pow":[0.447,1.357,0.451,5.985,7.961,14.559,29.419,9.819,35.609,1.723,0.452,1.801,0.98,9.097,11.554,0.233,0.607,0.125,1.593,0.104,1.518,6.838,1.102,2.618,0.175,1.071,14.273,2.388,5.337,0.745,1.217,12.394,1.451,4.863,0.616,1.528,5.562,2.027,6.435,5.211,0.209,0.713,0.199,2.42,0.077,0.07,0.094,0.042,0.27,0.01,2.568,22.353,5.676,5.546,1.73,1.395,2.085,1.199,12.819,10.511,0.833,1.695,1.402,6.411,6.709,1.02,4.877,0.933,6.288,6.398],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.7108} get_data got {"pow":[0.528,1.526,0.499,6.025,8.215,16.334,31.436,10.784,32.847,1.721,0.518,1.723,0.952,8.995,11.218,0.238,0.581,0.098,1.494,0.118,1.669,6.94,1.212,3.019,0.185,1.077,13.225,2.097,5.949,0.767,0.86,12.297,1.444,5.443,0.65,1.797,6.678,2.158,6.371,5.456,0.213,0.701,0.214,2.391,0.084,0.069,0.11,0.042,0.256,0.012,2.481,22.422,7.027,4.744,1.728,1.111,2.083,1.055,13.471,10.139,1.057,2.17,1.897,6.987,6.927,1.451,5.151,1.226,6.26,6.142],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.8361} Sending request: {"jsonrpc": "2.0", "method": "injectMarker", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg=", "session": "e90157b0-6333-4d09-8b4f-df1ac6d6381a", "label": "halfway", "value": 1, "port": "", "time": 1568625096897}, "id": 11} sent; awaiting response lib.cortex resp: {'id': 11, 'jsonrpc': '2.0', 'result': {'marker': {'endDatetime': '2019-09-16T17:11:36.898728+08:00', 'extras': {}, 'label': 'halfway', 'port': 'Software', 'startDatetime': '2019-09-16T17:11:36.898728+08:00', 'type': 'instance', 'uuid': '8886192d-8039-42cb-9d35-b8c2bac30817', 'value': 1}, 'recordId': '1f40e380-845c-4051-aca6-a2aed85c3596', 'sessionId': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a'}} get_data got {"pow":[0.66,1.811,0.599,6.045,8.523,18.491,33.551,10.921,30.346,1.764,0.698,1.86,1.009,8.837,10.754,0.234,0.569,0.088,1.412,0.152,1.725,7.268,1.331,3.464,0.202,1.12,12.406,1.914,6.723,0.755,0.636,12.525,1.506,6.221,0.663,2.481,7.814,2.172,6.283,5.548,0.22,0.693,0.203,2.344,0.098,0.073,0.133,0.043,0.234,0.017,2.302,22.165,8.088,3.952,1.673,0.881,1.952,0.871,14.481,10.003,1.364,2.848,2.637,7.478,7.189,1.939,5.251,1.681,6.28,6.027],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.9613} get_data got {"pow":[0.845,2.174,0.743,6.068,8.786,21.014,35.43,10.399,28.641,1.814,0.977,2.074,1.13,8.738,10.232,0.224,0.591,0.097,1.354,0.222,1.631,7.934,1.486,3.792,0.226,1.128,12.171,1.923,7.373,0.719,0.533,13.199,1.586,6.891,0.654,3.649,9.107,2.182,6.131,5.436,0.236,0.684,0.178,2.292,0.12,0.081,0.161,0.046,0.21,0.024,2.048,21.408,8.445,3.296,1.594,0.762,1.737,0.729,15.524,10.04,1.701,3.65,3.54,7.8,7.403,2.413,5.156,2.269,6.313,6.079],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.0866} get_data got {"pow":[1.058,2.521,0.91,6.102,8.92,23.967,36.661,9.568,27.955,1.839,1.287,2.201,1.258,8.779,9.745,0.211,0.651,0.123,1.328,0.327,1.37,8.863,1.685,3.875,0.257,1.041,12.546,2.13,7.64,0.677,0.487,14.244,1.657,7.156,0.629,5.138,10.69,2.285,5.897,5.131,0.269,0.675,0.159,2.24,0.15,0.089,0.191,0.051,0.187,0.032,1.741,20.277,8.067,2.875,1.522,0.781,1.51,0.71,16.331,10.15,2.003,4.473,4.388,7.912,7.488,2.777,4.918,2.892,6.302,6.253],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.2117} get_data got {"pow":[1.248,2.746,1.062,6.124,8.891,26.986,36.861,8.794,28.213,1.838,1.534,2.149,1.329,8.963,9.392,0.197,0.734,0.155,1.343,0.446,0.996,9.798,1.869,3.682,0.292,0.878,13.259,2.419,7.425,0.647,0.445,15.401,1.7,6.856,0.603,6.546,12.435,2.45,5.598,4.71,0.32,0.673,0.158,2.181,0.181,0.093,0.217,0.059,0.17,0.04,1.436,19.032,7.186,2.744,1.482,0.945,1.333,0.839,16.778,10.259,2.209,5.222,4.928,7.847,7.41,2.955,4.645,3.419,6.233,6.454],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.337} get_data got {"pow":[1.356,2.771,1.168,6.095,8.716,29.937,35.811,8.248,29.169,1.849,1.652,1.949,1.327,9.19,9.254,0.186,0.813,0.179,1.41,0.543,0.617,10.406,1.941,3.296,0.33,0.709,13.884,2.615,6.827,0.633,0.42,16.397,1.713,6.042,0.579,7.424,13.907,2.624,5.316,4.278,0.379,0.683,0.174,2.107,0.205,0.092,0.231,0.067,0.157,0.046,1.223,17.789,6.082,2.884,1.476,1.271,1.244,1.082,16.874,10.35,2.282,5.846,5,7.695,7.2,2.901,4.427,3.724,6.149,6.591],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.4623} get_data got {"pow":[1.339,2.579,1.196,5.972,8.443,32.64,33.495,7.701,30.554,1.922,1.628,1.7,1.274,9.33,9.355,0.176,0.87,0.188,1.521,0.582,0.331,10.481,1.867,2.863,0.368,0.584,14.181,2.6,6.098,0.636,0.44,17.138,1.704,4.957,0.558,7.481,14.623,2.792,5.149,3.924,0.428,0.708,0.195,2.019,0.213,0.087,0.229,0.071,0.148,0.049,1.16,16.721,5.001,3.209,1.492,1.783,1.278,1.38,16.736,10.452,2.223,6.311,4.595,7.538,6.941,2.626,4.285,3.723,6.132,6.626],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.5875} get_data got {"pow":[1.189,2.204,1.126,5.752,8.11,34.609,30.252,6.909,32.139,2.088,1.496,1.524,1.212,9.304,9.663,0.169,0.905,0.182,1.652,0.549,0.199,10.031,1.684,2.516,0.406,0.553,14.238,2.407,5.518,0.651,0.535,17.69,1.698,3.927,0.542,6.725,14.35,3.021,5.178,3.698,0.449,0.744,0.209,1.936,0.202,0.079,0.212,0.069,0.144,0.049,1.276,16.024,4.094,3.591,1.508,2.432,1.452,1.676,16.514,10.6,2.062,6.581,3.866,7.412,6.744,2.197,4.153,3.417,6.262,6.597],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.7128} get_data got {"pow":[0.952,1.731,0.964,5.488,7.738,35.563,26.868,5.985,33.798,2.336,1.319,1.489,1.173,9.128,10.087,0.164,0.927,0.168,1.767,0.453,0.23,9.211,1.496,2.322,0.44,0.637,14.214,2.239,5.266,0.666,0.741,18.11,1.743,3.225,0.537,5.486,13.204,3.394,5.411,3.636,0.433,0.781,0.206,1.884,0.175,0.07,0.185,0.062,0.145,0.046,1.54,15.734,3.41,3.902,1.51,3.12,1.752,1.953,16.299,10.789,1.849,6.618,3.019,7.267,6.708,1.707,3.931,2.881,6.548,6.581],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.838} get_data got {"pow":[0.701,1.265,0.757,5.269,7.345,35.502,24.459,5.252,35.556,2.612,1.162,1.585,1.163,8.905,10.509,0.16,0.941,0.157,1.83,0.326,0.38,8.262,1.431,2.27,0.467,0.812,14.233,2.327,5.382,0.67,1.069,18.332,1.89,2.976,0.551,4.22,11.591,3.935,5.766,3.752,0.385,0.808,0.194,1.882,0.14,0.062,0.158,0.052,0.15,0.042,1.861,15.895,3.007,4.046,1.494,3.709,2.153,2.206,16.071,10.963,1.632,6.416,2.273,7.021,6.874,1.254,3.569,2.249,6.915,6.634],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.9632} get_data got {"pow":[0.506,0.901,0.573,5.179,6.963,34.66,23.859,5.149,37.513,2.834,1.063,1.732,1.155,8.767,10.832,0.152,0.948,0.157,1.824,0.208,0.577,7.427,1.569,2.314,0.48,1.024,14.38,2.763,5.8,0.655,1.474,18.206,2.147,3.146,0.594,3.276,10,4.529,6.092,4.027,0.32,0.829,0.187,1.927,0.107,0.058,0.14,0.043,0.157,0.039,2.142,16.575,3.028,3.995,1.463,4.071,2.61,2.408,15.767,11.05,1.443,6.007,1.743,6.624,7.204,0.904,3.121,1.659,7.231,6.755],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625098.0885} Sending request: {"jsonrpc": "2.0", "method": "updateSession", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg=", "session": "e90157b0-6333-4d09-8b4f-df1ac6d6381a", "status": "close"}, "id": 12} sent; awaiting response lib.cortex resp: {'id': 12, 'jsonrpc': '2.0', 'result': {'appId': 'com.2259b2ef9eeebb5.jackcao_2019830', 'headset': {'connectedBy': 'dongle', 'customName': '', 'dongle': '6ff', 'firmware': '625', 'id': 'EPOCPLUS-3B9AEBCD', 'motionSensors': ['GYROX', 'GYROY', 'GYROZ', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 256, 'eegRes': 16, 'memsRate': 0, 'memsRes': 16, 'mode': 'EPOCPLUS'}, 'status': 'connected'}, 'id': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a', 'license': 'afb3594c-5469-4a1f-a727-4499166584a2', 'owner': '2259b2ef9eeebb5', 'recordIds': ['1f40e380-845c-4051-aca6-a2aed85c3596'], 'recording': False, 'started': '2019-09-16T17:11:35.765+08:00', 'status': 'closed', 'stopped': '2019-09-16T17:11:38.171+08:00', 'streams': []}} E:\myTFileschx\EmotivTesting\cortex-v2-example-master\python\lib\cortex.py:173: RuntimeWarning: coroutine 'WebSocketCommonProtocol.close' was never awaited self.websocket.close() RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Process finished with exit code 0
At 2019-09-16 14:08:11, "Cuong Trinh Manh" notifications@github.com wrote:
by the default python example does not set debit number in "authorize" request. You should set it with a big number enough (may be 100) take a look in function async def authorize(self, license_id=None, debit=None) of file cortex.py
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Dear Cuong Trinh Manh,
We have run the example.py with the value (debit = 500) and obtained the below information. (1) Is the number of get_data got {"pow":[.......]} the EEG data (red color)? How to define the corresponding items for the different EEG channels? (2) The example.py can not run continuously,and broken as shown with the blue information after several cycles. what is problem with it? async def authorize(self, license_id=None, debit=500): D:\Python\Python37\python.exe E:/myTFileschx/EmotivTesting/cortex-v2-example-master/python/example.py USER LOGIN Sending request: {"jsonrpc": "2.0", "method": "getUserLogin", "params": {}, "id": 1} sent; awaiting response GET CORTEX INFO HAS ACCESS RIGHT lib.cortex resp: {'currentOSUId': '1001', 'currentOSUsername': 'lenovo', 'loggedInOSUId': '1001', 'loggedInOSUsername': 'lenovo', 'username': '2259b2ef9eeebb5'} Sending request: {"jsonrpc": "2.0", "method": "getCortexInfo", "params": {}, "id": 2} sent; awaiting response lib.cortex resp: {'id': 2, 'jsonrpc': '2.0', 'result': {'buildDate': '2019-09-03T09:40:00', 'buildNumber': 'v2.0.2-417-g3845976', 'version': '2.2.0'}} Sending request: {"jsonrpc": "2.0", "method": "requestAccess", "params": {"clientId": "JwoNlMmZ7LqXAafsbr3ldnGIoF2F0W5DdUQ27mN9", "clientSecret": "D9LHZtzlgYvBEJegWLCMNXhyXCEIimga0W3PSTLJNaOMJDjCXzC8ULmZQ1bXOqaCCrsVbBTOec1bbPhXXCskfk2DbqMrRiDFgA8Ia2pAQhDXjnsAkJZPqcmeRo5bNkE8"}, "id": 3} sent; awaiting response REQUEST ACCESS lib.cortex resp: {'id': 3, 'jsonrpc': '2.0', 'result': {'accessGranted': True, 'message': 'The User has access right to this application.'}} Sending request: {"jsonrpc": "2.0", "method": "requestAccess", "params": {"clientId": "JwoNlMmZ7LqXAafsbr3ldnGIoF2F0W5DdUQ27mN9", "clientSecret": "D9LHZtzlgYvBEJegWLCMNXhyXCEIimga0W3PSTLJNaOMJDjCXzC8ULmZQ1bXOqaCCrsVbBTOec1bbPhXXCskfk2DbqMrRiDFgA8Ia2pAQhDXjnsAkJZPqcmeRo5bNkE8"}, "id": 4} sent; awaiting response lib.cortex resp: AUTHORIZE {'id': 4, 'jsonrpc': '2.0', 'result': {'accessGranted': True, 'message': 'The User has access right to this application.'}} Sending request: {"jsonrpc": "2.0", "method": "authorize", "params": {"clientId": "JwoNlMmZ7LqXAafsbr3ldnGIoF2F0W5DdUQ27mN9", "clientSecret": "D9LHZtzlgYvBEJegWLCMNXhyXCEIimga0W3PSTLJNaOMJDjCXzC8ULmZQ1bXOqaCCrsVbBTOec1bbPhXXCskfk2DbqMrRiDFgA8Ia2pAQhDXjnsAkJZPqcmeRo5bNkE8", "debit": 500}, "id": 5} sent; awaiting response lib.cortex resp: GET LICENSE INFO {'id': 5, 'jsonrpc': '2.0', 'result': {'cortexToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg='}} Sending request: {"jsonrpc": "2.0", "method": "getLicenseInfo", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg="}, "id": 6} sent; awaiting response QUERY HEADSETS lib.cortex resp: {'id': 6, 'jsonrpc': '2.0', 'result': {'isOnline': True, 'license': {'applications': ['com.emotiv.sdk.basic'], 'billingFrom': '2019-08-27T08:00:00.000+08:00', 'billingTo': '2029-08-24T08:00:00.000+08:00', 'deviceInfo': {'deviceLimit': 3, 'devicesPerSeat': 3, 'sessionLimit': {'day': None, 'month': None, 'year': None}}, 'expired': False, 'extenderLimit': 6, 'hardLimitTime': '2019-10-05T07:59:59.999+08:00', 'isCommercial': False, 'licenseId': 'afb3594c-5469-4a1f-a727-4499166584a2', 'licenseName': 'Basic License', 'localQuota': 1199, 'maxDebit': None, 'scopes': [''], 'seatCount': 1, 'sessionCount': 0, 'softLimitTime': '2019-09-28T07:59:59.999+08:00', 'totalDebit': 1200, 'totalRegisteredDevices': 1, 'validFrom': '2019-08-27T08:00:00.000+08:00', 'validTo': '2029-08-25T07:59:59.999+08:00'}}} Sending request: {"jsonrpc": "2.0", "method": "queryHeadsets", "params": {}, "id": 7} sent; awaiting response CREATE SESSION lib.cortex found headsets ['EPOCPLUS-3B9AEBCD'] lib.cortex resp: {'id': 7, 'jsonrpc': '2.0', 'result': [{'connectedBy': 'dongle', 'customName': '', 'dongle': '6ff', 'firmware': '625', 'id': 'EPOCPLUS-3B9AEBCD', 'motionSensors': ['GYROX', 'GYROY', 'GYROZ', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 256, 'eegRes': 16, 'memsRate': 0, 'memsRes': 16, 'mode': 'EPOCPLUS'}, 'status': 'connected'}]} Sending request: {"jsonrpc": "2.0", "method": "createSession", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg=", "headset": "EPOCPLUS-3B9AEBCD", "status": "active"}, "id": 8} sent; awaiting response CREATE RECORD lib.cortex resp: {'id': 8, 'jsonrpc': '2.0', 'result': {'appId': 'com.2259b2ef9eeebb5.jackcao_2019830', 'headset': {'connectedBy': 'dongle', 'customName': '', 'dongle': '6ff', 'firmware': '625', 'id': 'EPOCPLUS-3B9AEBCD', 'motionSensors': ['GYROX', 'GYROY', 'GYROZ', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 256, 'eegRes': 16, 'memsRate': 0, 'memsRes': 16, 'mode': 'EPOCPLUS'}, 'status': 'connected'}, 'id': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a', 'license': 'afb3594c-5469-4a1f-a727-4499166584a2', 'owner': '2259b2ef9eeebb5', 'recordIds': [], 'recording': False, 'started': '2019-09-16T17:11:35.765+08:00', 'status': 'activated', 'stopped': '', 'streams': []}} Sending request: {"jsonrpc": "2.0", "method": "createRecord", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg=", "session": "e90157b0-6333-4d09-8b4f-df1ac6d6381a", "title": "test record 1"}, "id": 9} sent; awaiting response SUBSCRIBE POW & MET lib.cortex resp: {'id': 9, 'jsonrpc': '2.0', 'result': {'record': {'applicationId': 'com.2259b2ef9eeebb5.jackcao_2019830', 'applicationVersion': '1.0', 'description': '', 'endDatetime': '', 'experimentId': 0, 'licenseId': 'afb3594c-5469-4a1f-a727-4499166584a2', 'licenseScope': [''], 'ownerId': '2990d9f7-c1f2-45ae-bcf3-3233811d3937', 'startDatetime': '2019-09-16T17:11:35.686570+08:00', 'tags': [], 'title': 'test record 1', 'uuid': '1f40e380-845c-4051-aca6-a2aed85c3596'}, 'sessionId': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a'}} Sending request: {"jsonrpc": "2.0", "method": "subscribe", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg=", "session": "e90157b0-6333-4d09-8b4f-df1ac6d6381a", "streams": ["pow", "met"]}, "id": 10} sent; awaiting response lib.cortex resp: {'id': 10, 'jsonrpc': '2.0', 'result': {'failure': [], 'success': [{'cols': ['AF3/theta', 'AF3/alpha', 'AF3/betaL', 'AF3/betaH', 'AF3/gamma', 'F7/theta', 'F7/alpha', 'F7/betaL', 'F7/betaH', 'F7/gamma', 'F3/theta', 'F3/alpha', 'F3/betaL', 'F3/betaH', 'F3/gamma', 'FC5/theta', 'FC5/alpha', 'FC5/betaL', 'FC5/betaH', 'FC5/gamma', 'T7/theta', 'T7/alpha', 'T7/betaL', 'T7/betaH', 'T7/gamma', 'P7/theta', 'P7/alpha', 'P7/betaL', 'P7/betaH', 'P7/gamma', 'O1/theta', 'O1/alpha', 'O1/betaL', 'O1/betaH', 'O1/gamma', 'O2/theta', 'O2/alpha', 'O2/betaL', 'O2/betaH', 'O2/gamma', 'P8/theta', 'P8/alpha', 'P8/betaL', 'P8/betaH', 'P8/gamma', 'T8/theta', 'T8/alpha', 'T8/betaL', 'T8/betaH', 'T8/gamma', 'FC6/theta', 'FC6/alpha', 'FC6/betaL', 'FC6/betaH', 'FC6/gamma', 'F4/theta', 'F4/alpha', 'F4/betaL', 'F4/betaH', 'F4/gamma', 'F8/theta', 'F8/alpha', 'F8/betaL', 'F8/betaH', 'F8/gamma', 'AF4/theta', 'AF4/alpha', 'AF4/betaL', 'AF4/betaH', 'AF4/gamma'], 'sid': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a', 'streamName': 'pow'}, {'cols': ['eng', 'exc', 'lex', 'str', 'rel', 'int', 'foc'], 'sid': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a', 'streamName': 'met'}]}} get_data got {"pow":[0.223,0.895,0.365,7.124,8.25,32.922,21.67,5.036,32.774,3.173,0.859,2.126,0.905,7.388,11.318,0.165,0.518,0.258,1.457,0.088,1.118,6.635,2.492,3.374,0.381,1.918,9.039,4.298,6.636,0.523,1.974,12.116,6.039,7.833,0.48,4.169,9.419,2.312,5.719,4.741,0.306,0.734,0.163,1.947,0.108,0.053,0.249,0.098,0.278,0.034,2.827,20.467,8.248,4.552,1.229,2.58,1.642,0.988,14.13,12.722,0.715,1.283,0.654,5.919,7.459,0.524,3.434,1.263,5.589,6.575],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625095.7024} get_data got {"pow":[0.212,0.973,0.327,7.208,8.529,31.895,22.454,4.205,33.158,2.922,0.713,2.325,0.865,7.242,11.609,0.159,0.495,0.229,1.538,0.096,1.103,6.606,1.96,3.317,0.362,1.871,8.635,3.591,6.49,0.527,2.098,12.044,4.888,7.657,0.529,3.65,8.834,2.172,5.755,4.983,0.298,0.821,0.108,1.984,0.11,0.054,0.249,0.086,0.258,0.029,2.335,23.032,7.195,5.02,1.179,2.504,1.72,1.041,14.92,13.244,0.68,1.207,0.698,5.57,7.496,0.543,3.422,1.115,5.683,6.654],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625095.8285} get_data got {"pow":[0.213,1.037,0.326,7.012,8.674,28.788,22.659,3.446,34.507,2.675,0.611,2.598,0.874,7.291,11.732,0.155,0.499,0.218,1.646,0.099,1.048,6.576,1.519,3.165,0.324,1.752,9.305,3.187,6.296,0.506,2.22,12.048,3.85,7.287,0.566,3.129,7.833,2.045,5.974,4.96,0.282,0.882,0.066,2.03,0.107,0.06,0.226,0.071,0.242,0.024,1.987,24.504,6.291,5.692,1.171,2.351,1.735,1.057,15.401,13.565,0.696,1.229,0.721,5.273,7.447,0.537,3.455,1.002,5.85,6.812],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625095.9548} get_data got {"pow":[0.231,1.1,0.368,6.633,8.603,24.373,22.866,3.148,36.41,2.446,0.559,2.851,0.942,7.539,11.748,0.159,0.523,0.222,1.747,0.097,1.012,6.553,1.233,2.944,0.278,1.636,10.821,3.098,6.057,0.488,2.351,12.124,3.097,6.755,0.58,2.644,6.508,1.871,6.248,4.786,0.26,0.899,0.045,2.097,0.1,0.068,0.186,0.058,0.236,0.02,1.871,24.797,5.625,6.348,1.216,2.178,1.687,1.072,15.404,13.569,0.719,1.284,0.729,5.073,7.291,0.511,3.536,0.918,6.059,7.001],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.0809} get_data got {"pow":[0.263,1.164,0.428,6.243,8.36,19.748,23.457,3.492,38.245,2.243,0.537,2.962,1.043,7.941,11.741,0.169,0.556,0.227,1.812,0.092,1.025,6.563,1.062,2.691,0.234,1.527,12.647,3.128,5.758,0.495,2.427,12.281,2.568,6.111,0.572,2.216,5.15,1.684,6.469,4.61,0.238,0.873,0.048,2.186,0.092,0.076,0.143,0.05,0.239,0.017,1.97,24.216,5.02,6.797,1.307,2.033,1.644,1.115,14.914,13.236,0.716,1.322,0.753,5.012,7.058,0.468,3.68,0.854,6.256,7.135],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.2069} get_data got {"pow":[0.307,1.217,0.467,5.981,8.07,16.097,24.525,4.558,39.374,2.062,0.527,2.847,1.117,8.396,11.757,0.182,0.589,0.218,1.824,0.088,1.085,6.618,0.973,2.466,0.201,1.399,14.187,3.099,5.421,0.538,2.346,12.464,2.152,5.451,0.558,1.879,4.207,1.57,6.578,4.549,0.218,0.822,0.072,2.285,0.084,0.08,0.107,0.045,0.251,0.014,2.177,23.28,4.469,6.924,1.43,1.922,1.676,1.182,14.088,12.625,0.694,1.329,0.819,5.122,6.822,0.45,3.897,0.805,6.382,7.138],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.3329} get_data got {"pow":[0.351,1.248,0.467,5.89,7.866,14.086,25.917,6.199,39.317,1.904,0.504,2.517,1.122,8.791,11.775,0.2,0.614,0.194,1.781,0.09,1.189,6.707,0.96,2.341,0.181,1.259,15.029,2.946,5.138,0.61,2.069,12.585,1.82,4.92,0.557,1.655,4.004,1.604,6.574,4.657,0.206,0.77,0.113,2.367,0.077,0.078,0.088,0.043,0.264,0.011,2.389,22.555,4.238,6.724,1.561,1.808,1.801,1.247,13.247,11.864,0.68,1.341,0.934,5.409,6.658,0.514,4.183,0.773,6.408,6.985],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.4593} get_data got {"pow":[0.394,1.28,0.45,5.921,7.829,13.669,27.574,8.136,37.964,1.785,0.466,2.106,1.06,9.039,11.731,0.219,0.621,0.159,1.696,0.096,1.34,6.79,1.009,2.381,0.174,1.136,15.013,2.69,5.065,0.687,1.653,12.554,1.576,4.68,0.579,1.526,4.557,1.797,6.509,4.907,0.204,0.734,0.16,2.414,0.075,0.074,0.086,0.042,0.272,0.01,2.536,22.292,4.624,6.24,1.67,1.64,1.968,1.264,12.745,11.113,0.714,1.433,1.112,5.855,6.612,0.697,4.523,0.797,6.356,6.712],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.5852} get_data got {"pow":[0.447,1.357,0.451,5.985,7.961,14.559,29.419,9.819,35.609,1.723,0.452,1.801,0.98,9.097,11.554,0.233,0.607,0.125,1.593,0.104,1.518,6.838,1.102,2.618,0.175,1.071,14.273,2.388,5.337,0.745,1.217,12.394,1.451,4.863,0.616,1.528,5.562,2.027,6.435,5.211,0.209,0.713,0.199,2.42,0.077,0.07,0.094,0.042,0.27,0.01,2.568,22.353,5.676,5.546,1.73,1.395,2.085,1.199,12.819,10.511,0.833,1.695,1.402,6.411,6.709,1.02,4.877,0.933,6.288,6.398],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.7108} get_data got {"pow":[0.528,1.526,0.499,6.025,8.215,16.334,31.436,10.784,32.847,1.721,0.518,1.723,0.952,8.995,11.218,0.238,0.581,0.098,1.494,0.118,1.669,6.94,1.212,3.019,0.185,1.077,13.225,2.097,5.949,0.767,0.86,12.297,1.444,5.443,0.65,1.797,6.678,2.158,6.371,5.456,0.213,0.701,0.214,2.391,0.084,0.069,0.11,0.042,0.256,0.012,2.481,22.422,7.027,4.744,1.728,1.111,2.083,1.055,13.471,10.139,1.057,2.17,1.897,6.987,6.927,1.451,5.151,1.226,6.26,6.142],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.8361} Sending request: {"jsonrpc": "2.0", "method": "injectMarker", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg=", "session": "e90157b0-6333-4d09-8b4f-df1ac6d6381a", "label": "halfway", "value": 1, "port": "", "time": 1568625096897}, "id": 11} sent; awaiting response lib.cortex resp: {'id': 11, 'jsonrpc': '2.0', 'result': {'marker': {'endDatetime': '2019-09-16T17:11:36.898728+08:00', 'extras': {}, 'label': 'halfway', 'port': 'Software', 'startDatetime': '2019-09-16T17:11:36.898728+08:00', 'type': 'instance', 'uuid': '8886192d-8039-42cb-9d35-b8c2bac30817', 'value': 1}, 'recordId': '1f40e380-845c-4051-aca6-a2aed85c3596', 'sessionId': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a'}} get_data got {"pow":[0.66,1.811,0.599,6.045,8.523,18.491,33.551,10.921,30.346,1.764,0.698,1.86,1.009,8.837,10.754,0.234,0.569,0.088,1.412,0.152,1.725,7.268,1.331,3.464,0.202,1.12,12.406,1.914,6.723,0.755,0.636,12.525,1.506,6.221,0.663,2.481,7.814,2.172,6.283,5.548,0.22,0.693,0.203,2.344,0.098,0.073,0.133,0.043,0.234,0.017,2.302,22.165,8.088,3.952,1.673,0.881,1.952,0.871,14.481,10.003,1.364,2.848,2.637,7.478,7.189,1.939,5.251,1.681,6.28,6.027],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625096.9613} get_data got {"pow":[0.845,2.174,0.743,6.068,8.786,21.014,35.43,10.399,28.641,1.814,0.977,2.074,1.13,8.738,10.232,0.224,0.591,0.097,1.354,0.222,1.631,7.934,1.486,3.792,0.226,1.128,12.171,1.923,7.373,0.719,0.533,13.199,1.586,6.891,0.654,3.649,9.107,2.182,6.131,5.436,0.236,0.684,0.178,2.292,0.12,0.081,0.161,0.046,0.21,0.024,2.048,21.408,8.445,3.296,1.594,0.762,1.737,0.729,15.524,10.04,1.701,3.65,3.54,7.8,7.403,2.413,5.156,2.269,6.313,6.079],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.0866} get_data got {"pow":[1.058,2.521,0.91,6.102,8.92,23.967,36.661,9.568,27.955,1.839,1.287,2.201,1.258,8.779,9.745,0.211,0.651,0.123,1.328,0.327,1.37,8.863,1.685,3.875,0.257,1.041,12.546,2.13,7.64,0.677,0.487,14.244,1.657,7.156,0.629,5.138,10.69,2.285,5.897,5.131,0.269,0.675,0.159,2.24,0.15,0.089,0.191,0.051,0.187,0.032,1.741,20.277,8.067,2.875,1.522,0.781,1.51,0.71,16.331,10.15,2.003,4.473,4.388,7.912,7.488,2.777,4.918,2.892,6.302,6.253],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.2117} get_data got {"pow":[1.248,2.746,1.062,6.124,8.891,26.986,36.861,8.794,28.213,1.838,1.534,2.149,1.329,8.963,9.392,0.197,0.734,0.155,1.343,0.446,0.996,9.798,1.869,3.682,0.292,0.878,13.259,2.419,7.425,0.647,0.445,15.401,1.7,6.856,0.603,6.546,12.435,2.45,5.598,4.71,0.32,0.673,0.158,2.181,0.181,0.093,0.217,0.059,0.17,0.04,1.436,19.032,7.186,2.744,1.482,0.945,1.333,0.839,16.778,10.259,2.209,5.222,4.928,7.847,7.41,2.955,4.645,3.419,6.233,6.454],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.337} get_data got {"pow":[1.356,2.771,1.168,6.095,8.716,29.937,35.811,8.248,29.169,1.849,1.652,1.949,1.327,9.19,9.254,0.186,0.813,0.179,1.41,0.543,0.617,10.406,1.941,3.296,0.33,0.709,13.884,2.615,6.827,0.633,0.42,16.397,1.713,6.042,0.579,7.424,13.907,2.624,5.316,4.278,0.379,0.683,0.174,2.107,0.205,0.092,0.231,0.067,0.157,0.046,1.223,17.789,6.082,2.884,1.476,1.271,1.244,1.082,16.874,10.35,2.282,5.846,5,7.695,7.2,2.901,4.427,3.724,6.149,6.591],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.4623} get_data got {"pow":[1.339,2.579,1.196,5.972,8.443,32.64,33.495,7.701,30.554,1.922,1.628,1.7,1.274,9.33,9.355,0.176,0.87,0.188,1.521,0.582,0.331,10.481,1.867,2.863,0.368,0.584,14.181,2.6,6.098,0.636,0.44,17.138,1.704,4.957,0.558,7.481,14.623,2.792,5.149,3.924,0.428,0.708,0.195,2.019,0.213,0.087,0.229,0.071,0.148,0.049,1.16,16.721,5.001,3.209,1.492,1.783,1.278,1.38,16.736,10.452,2.223,6.311,4.595,7.538,6.941,2.626,4.285,3.723,6.132,6.626],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.5875} get_data got {"pow":[1.189,2.204,1.126,5.752,8.11,34.609,30.252,6.909,32.139,2.088,1.496,1.524,1.212,9.304,9.663,0.169,0.905,0.182,1.652,0.549,0.199,10.031,1.684,2.516,0.406,0.553,14.238,2.407,5.518,0.651,0.535,17.69,1.698,3.927,0.542,6.725,14.35,3.021,5.178,3.698,0.449,0.744,0.209,1.936,0.202,0.079,0.212,0.069,0.144,0.049,1.276,16.024,4.094,3.591,1.508,2.432,1.452,1.676,16.514,10.6,2.062,6.581,3.866,7.412,6.744,2.197,4.153,3.417,6.262,6.597],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.7128} get_data got {"pow":[0.952,1.731,0.964,5.488,7.738,35.563,26.868,5.985,33.798,2.336,1.319,1.489,1.173,9.128,10.087,0.164,0.927,0.168,1.767,0.453,0.23,9.211,1.496,2.322,0.44,0.637,14.214,2.239,5.266,0.666,0.741,18.11,1.743,3.225,0.537,5.486,13.204,3.394,5.411,3.636,0.433,0.781,0.206,1.884,0.175,0.07,0.185,0.062,0.145,0.046,1.54,15.734,3.41,3.902,1.51,3.12,1.752,1.953,16.299,10.789,1.849,6.618,3.019,7.267,6.708,1.707,3.931,2.881,6.548,6.581],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.838} get_data got {"pow":[0.701,1.265,0.757,5.269,7.345,35.502,24.459,5.252,35.556,2.612,1.162,1.585,1.163,8.905,10.509,0.16,0.941,0.157,1.83,0.326,0.38,8.262,1.431,2.27,0.467,0.812,14.233,2.327,5.382,0.67,1.069,18.332,1.89,2.976,0.551,4.22,11.591,3.935,5.766,3.752,0.385,0.808,0.194,1.882,0.14,0.062,0.158,0.052,0.15,0.042,1.861,15.895,3.007,4.046,1.494,3.709,2.153,2.206,16.071,10.963,1.632,6.416,2.273,7.021,6.874,1.254,3.569,2.249,6.915,6.634],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625097.9632} get_data got {"pow":[0.506,0.901,0.573,5.179,6.963,34.66,23.859,5.149,37.513,2.834,1.063,1.732,1.155,8.767,10.832,0.152,0.948,0.157,1.824,0.208,0.577,7.427,1.569,2.314,0.48,1.024,14.38,2.763,5.8,0.655,1.474,18.206,2.147,3.146,0.594,3.276,10,4.529,6.092,4.027,0.32,0.829,0.187,1.927,0.107,0.058,0.14,0.043,0.157,0.039,2.142,16.575,3.028,3.995,1.463,4.071,2.61,2.408,15.767,11.05,1.443,6.007,1.743,6.624,7.204,0.904,3.121,1.659,7.231,6.755],"sid":"e90157b0-6333-4d09-8b4f-df1ac6d6381a","time":1568625098.0885} Sending request: {"jsonrpc": "2.0", "method": "updateSession", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc5Nzg5NSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTM4Njk1LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.Q345u0EiJbaC51zx++O47EhZI9Nw5Bm0jG+wYMa5FPg=", "session": "e90157b0-6333-4d09-8b4f-df1ac6d6381a", "status": "close"}, "id": 12} sent; awaiting response lib.cortex resp: {'id': 12, 'jsonrpc': '2.0', 'result': {'appId': 'com.2259b2ef9eeebb5.jackcao_2019830', 'headset': {'connectedBy': 'dongle', 'customName': '', 'dongle': '6ff', 'firmware': '625', 'id': 'EPOCPLUS-3B9AEBCD', 'motionSensors': ['GYROX', 'GYROY', 'GYROZ', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 256, 'eegRes': 16, 'memsRate': 0, 'memsRes': 16, 'mode': 'EPOCPLUS'}, 'status': 'connected'}, 'id': 'e90157b0-6333-4d09-8b4f-df1ac6d6381a', 'license': 'afb3594c-5469-4a1f-a727-4499166584a2', 'owner': '2259b2ef9eeebb5', 'recordIds': ['1f40e380-845c-4051-aca6-a2aed85c3596'], 'recording': False, 'started': '2019-09-16T17:11:35.765+08:00', 'status': 'closed', 'stopped': '2019-09-16T17:11:38.171+08:00', 'streams': []}} E:\myTFileschx\EmotivTesting\cortex-v2-example-master\python\lib\cortex.py:173: RuntimeWarning: coroutine 'WebSocketCommonProtocol.close' was never awaited self.websocket.close() RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Process finished with exit code 0
At 2019-09-16 14:08:11, "Cuong Trinh Manh" notifications@github.com wrote:
by the default python example does not set debit number in "authorize" request. You should set it with a big number enough (may be 100) take a look in function async def authorize(self, license_id=None, debit=None) of file cortex.py
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Dear Cuong Trinh Manh,
You can see the attached files. The EEG data are obtained from EmotivPRO V2.2.0 and example.py. There are 14 channels of data in EmotivPRO V2.20, However, there are only 10 channels of data from example.py.
Best regards Jack Cao
At 2019-09-16 14:08:11, "Cuong Trinh Manh" notifications@github.com wrote:
by the default python example does not set debit number in "authorize" request. You should set it with a big number enough (may be 100) take a look in function async def authorize(self, license_id=None, debit=None) of file cortex.py
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
the data you send above is not eeg data. it's band power data. and I see band power data have value for all 14 channels.
Thank you for your help!
At 2019-09-16 18:22:10, "Cuong Trinh Manh" notifications@github.com wrote:
the data you send above is not eeg data. it's band power data. and I see band power data have value for all 14 channels.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi @chx2017 Please note that you should never share the client secret of your application with anyone, and so you should never post it on a forum like this one. As the name implies, your client secret must remain a secret :)
I have set the debit value in cortex.py [async def authorize(self, license_id=None, debit=100)]. The example.py has been run and the obtained results are shown as below. I do not understand the problem clearly. Can you tell me clearly how to obtain the EEG data from the equipment using this python SDK?
SUBSCRIBE POW & MET lib.cortex resp: {'id': 9, 'jsonrpc': '2.0', 'result': {'record': {'applicationId': 'com.2259b2ef9eeebb5.jackcao_2019830', 'applicationVersion': '1.0', 'description': '', 'endDatetime': '', 'experimentId': 0, 'licenseId': 'afb3594c-5469-4a1f-a727-4499166584a2', 'licenseScope': [''], 'ownerId': '2990d9f7-c1f2-45ae-bcf3-3233811d3937', 'startDatetime': '2019-09-18T14:20:58.275678+08:00', 'tags': [], 'title': 'test record 1', 'uuid': '0e8325a3-8abd-4c89-a32e-29be8bb46334'}, 'sessionId': '2f814d65-38fe-40fe-b25c-1b3d12d3d057'}} Sending request: {"jsonrpc": "2.0", "method": "subscribe", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODk2MDQ1OCwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NzAxMjU4LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.dVxcV3pGJ4GWkgtBSGygoS8c0EapLsL8A/gmvk4u0ZE=", "session": "2f814d65-38fe-40fe-b25c-1b3d12d3d057", "streams": ["pow", "met"]}, "id": 10} sent; awaiting response lib.cortex resp: {'id': 10, 'jsonrpc': '2.0', 'result': {'failure': [], 'success': [{'cols': ['AF3/theta', 'AF3/alpha', 'AF3/betaL', 'AF3/betaH', 'AF3/gamma', 'F7/theta', 'F7/alpha', 'F7/betaL', 'F7/betaH', 'F7/gamma', 'F3/theta', 'F3/alpha', 'F3/betaL', 'F3/betaH', 'F3/gamma', 'FC5/theta', 'FC5/alpha', 'FC5/betaL', 'FC5/betaH', 'FC5/gamma', 'T7/theta', 'T7/alpha', 'T7/betaL', 'T7/betaH', 'T7/gamma', 'P7/theta', 'P7/alpha', 'P7/betaL', 'P7/betaH', 'P7/gamma', 'O1/theta', 'O1/alpha', 'O1/betaL', 'O1/betaH', 'O1/gamma', 'O2/theta', 'O2/alpha', 'O2/betaL', 'O2/betaH', 'O2/gamma', 'P8/theta', 'P8/alpha', 'P8/betaL', 'P8/betaH', 'P8/gamma', 'T8/theta', 'T8/alpha', 'T8/betaL', 'T8/betaH', 'T8/gamma', 'FC6/theta', 'FC6/alpha', 'FC6/betaL', 'FC6/betaH', 'FC6/gamma', 'F4/theta', 'F4/alpha', 'F4/betaL', 'F4/betaH', 'F4/gamma', 'F8/theta', 'F8/alpha', 'F8/betaL', 'F8/betaH', 'F8/gamma', 'AF4/theta', 'AF4/alpha', 'AF4/betaL', 'AF4/betaH', 'AF4/gamma'], 'sid': '2f814d65-38fe-40fe-b25c-1b3d12d3d057', 'streamName': 'pow'}, {'cols': ['eng', 'exc', 'lex', 'str', 'rel', 'int', 'foc'], 'sid': '2f814d65-38fe-40fe-b25c-1b3d12d3d057', 'streamName': 'met'}]}} get_data got {"pow":[0.036,0.02,0.026,0.032,0.024,0.059,0.016,0.035,0.153,0.053,0.117,0.05,0.09,0.297,0.047,0.08,0.027,0.097,0.166,0.025,0.819,0.937,4.692,7.552,5.018,0.133,0.061,0.159,0.266,0.046,0.086,0.058,0.162,0.213,0.042,0.076,0.085,0.233,1.996,0.098,0.163,0.056,0.1,0.329,0.022,0.027,0.034,0.019,0.011,0.025,0.21,0.059,0.289,0.924,0.809,0.325,0.066,1.704,8.527,12.445,0.035,0.037,0.041,0.043,0.018,0.605,0.58,2.4,3.446,4.739],"sid":"2f814d65-38fe-40fe-b25c-1b3d12d3d057","time":1568787658.3346}
get_data got {"pow":[0.019,0.038,0.023,0.032,0.012,0.067,0.044,0.03,0.267,0.044,0.08,0.043,0.063,0.921,0.049,0.073,0.015,0.063,0.429,0.04,0.95,0.651,3.776,7.29,3.961,0.145,0.043,0.104,0.493,0.032,0.145,0.047,0.096,0.564,0.046,0.065,0.027,0.124,1.689,0.084,0.207,0.027,0.2,0.793,0.029,0.038,0.041,0.037,0.028,0.013,0.147,0.067,0.36,0.902,0.921,0.286,0.079,1.285,8.802,11.663,0.03,0.029,0.095,0.062,0.027,0.849,0.591,1.43,3.447,3.968],"sid":"2f814d65-38fe-40fe-b25c-1b3d12d3d057","time":1568787660.7301} Sending request: {"jsonrpc": "2.0", "method": "updateSession", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODk2MDQ1OCwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NzAxMjU4LCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.dVxcV3pGJ4GWkgtBSGygoS8c0EapLsL8A/gmvk4u0ZE=", "session": "2f814d65-38fe-40fe-b25c-1b3d12d3d057", "status": "close"}, "id": 12} sent; awaiting response lib.cortex resp: {'id': 12, 'jsonrpc': '2.0', 'result': {'appId': 'com.2259b2ef9eeebb5.jackcao_2019830', 'headset': {'connectedBy': 'dongle', 'customName': '', 'dongle': '6ff', 'firmware': '625', 'id': 'EPOCPLUS-3B9AEBCD', 'motionSensors': ['GYROX', 'GYROY', 'GYROZ', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 256, 'eegRes': 16, 'memsRate': 0, 'memsRes': 16, 'mode': 'EPOCPLUS'}, 'status': 'connected'}, 'id': '2f814d65-38fe-40fe-b25c-1b3d12d3d057', 'license': 'afb3594c-5469-4a1f-a727-4499166584a2', 'owner': '2259b2ef9eeebb5', 'recordIds': ['0e8325a3-8abd-4c89-a32e-29be8bb46334'], 'recording': False, 'started': '2019-09-18T14:20:58.341+08:00', 'status': 'closed', 'stopped': '2019-09-18T14:21:00.830+08:00', 'streams': []}} E:\myTFileschx\EmotivTesting\cortex-v2-example-master\python\lib\cortex.py:173: RuntimeWarning: coroutine 'WebSocketCommonProtocol.close' was never awaited self.websocket.close() RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Process finished with exit code 0
just subscribe stream "eeg". if your license has the permission. You should able to get eeg data.
I shall keep it secretly. Thank you for your kindly reminder.
Our license has the permission till september 27. 2019. How to subscribe stream "eeg" in example.py?
I don't say about expire time. I mean, scope of your license should eeg access. to get eeg, just change stream name in example "pow" -> "eeg". you will get eeg instead band power.
Thank you for your help! Our license can access eeg. We have changed the stream name in example "pow" -> "eeg".
print("** SUBSCRIBE eeg & MET **")
await cortex.subscribe(['eeg', 'met'])
There are eighteen small contacting pads on the equipment(Emotiv EPOC+), and the data of fourteen channels(AF3,F7,F3,FC5,T7,P7 and etc) are shown on EMOTIVPRO. Please you check the below data obtained using example.py, Where are the EEG data corresponding to all the channels ?
sent; awaiting response
** SUBSCRIBE eeg & MET **
lib.cortex resp:
{'id': 10, 'jsonrpc': '2.0', 'result': {'failure': [{'code': -32016, 'message': 'The stream is unavailable or unsupported.', 'streamName': 'eeg'}], 'success': [{'cols': ['eng', 'exc', 'lex', 'str', 'rel', 'int', 'foc'], 'sid': 'c93688c4-9b76-4cb3-9d56-96f58948a9ec', 'streamName': 'met'}]}}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855650.5686}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855660.6544}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855670.7489}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855680.8357}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855690.9221}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855701.0092}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855711.0955}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855721.1822}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855731.2691}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855741.3554}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660543,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855751.4425}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855761.5291}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660543,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855771.6158}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855781.7147}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855791.8049}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855801.8715}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855811.9627}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855822.0491}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660544,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855832.1515}
get_data got {"met":[0.560504520614219,0,0,1.1399918530430564e-12,0.30294071603459233,0.6513548646660543,0.08689552951575855],"sid":"c93688c4-9b76-4cb3-9d56-96f58948a9ec","time":1568855842.2107}
Sending request:
{"jsonrpc": "2.0", "method": "injectMarker", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2OTAyODQ0MiwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NzY5MjQyLCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.NNf0Xc9BhERe6FsL1K8+aimOBdFj3p3YCJz5BCCYhgc=", "session": "c93688c4-9b76-4cb3-9d56-96f58948a9ec", "label": "halfway", "value": 1, "port": "", "time": 1568855842333}, "id": 11}
sent; awaiting response
lib.cortex resp:
{'id': 11, 'jsonrpc': '2.0', 'result': {'marker': {'endDatetime': '2019-09-19T09:17:22.332885+08:00', 'extras': {}, 'label': 'halfway', 'port': 'Software', 'startDatetime': '2019-09-19T09:17:22.332885+08:00', 'type': 'instance', 'uuid': 'b0c666d8-69ea-4fef-b666-051e814d6b17', 'value': 1}, 'recordId': '2ceba5c1-cf97-4bef-a858-4151d6a7933a', 'sessionId': 'c93688c4-9b76-4cb3-9d56-96f58948a9ec'}}
Sending request:
{"jsonrpc": "2.0", "method": "updateSession", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2OTAyODQ0MiwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NzY5MjQyLCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.NNf0Xc9BhERe6FsL1K8+aimOBdFj3p3YCJz5BCCYhgc=", "session": "c93688c4-9b76-4cb3-9d56-96f58948a9ec", "status": "close"}, "id": 12}
sent; awaiting response
lib.cortex resp:
{'id': 12, 'jsonrpc': '2.0', 'result': {'appId': 'com.2259b2ef9eeebb5.jackcao_2019830', 'headset': {'connectedBy': 'dongle', 'customName': '', 'dongle': '6ff', 'firmware': '625', 'id': 'EPOCPLUS-3B9AEBCD', 'motionSensors': ['GYROX', 'GYROY', 'GYROZ', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 256, 'eegRes': 16, 'memsRate': 0, 'memsRes': 16, 'mode': 'EPOCPLUS'}, 'status': 'connected'}, 'id': 'c93688c4-9b76-4cb3-9d56-96f58948a9ec', 'license': 'afb3594c-5469-4a1f-a727-4499166584a2', 'owner': '2259b2ef9eeebb5', 'recordIds': ['2ceba5c1-cf97-4bef-a858-4151d6a7933a'], 'recording': False, 'started': '2019-09-19T09:14:03.360+08:00', 'status': 'closed', 'stopped': '2019-09-19T09:17:22.433+08:00', 'streams': []}}
E:\myTFileschx\EmotivTesting\cortex-v2-example-master\python\lib\cortex.py:173: RuntimeWarning: coroutine 'WebSocketCommonProtocol.close' was never awaited
self.websocket.close()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Process finished with exit code 0
Can you send us the operating manual of the SDK(python or matlab)?
all the informations we write in the cortex docs. from your log above. i see that your license does not have permission to get eeg data.
@chx2017 , in API "authorize" you need to set param "license" to Cortex work with your license pro. Actually, you don't set this param, so our cloud system assign for you a basic license without permission with eeg. https://emotiv.gitbook.io/cortex-api/authentication/authorize
@chx2017 The Cortex API documentation is available at https://emotiv.gitbook.io/cortex-api/ Please note that there is no manual specific to Python or Matlab. You access the Cortex API via a web socket, and you can do that with any programming language.
We have tried it again. In the file(example.py), the 'pow' have been changed to ‘eeg’. Some data have been obtained as shown below(get_data got{"eeg":..........}) . _Do you confirm that those data in "getdata got{"eeg":..........}" are the raw eeg data? Thank you for your big help! —————————————————————
print(" SUBSCRIBE eeg & MET ") await cortex.subscribe(['eeg', 'met']) ————————————————————— SUBSCRIBE eeg & MET lib.cortex resp: {'id': 10, 'jsonrpc': '2.0', 'result': {'failure': [], 'success': [{'cols': ['COUNTER', 'INTERPOLATED', 'AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4', 'RAW_CQ', 'MARKER_HARDWARE', 'MARKERS'], 'sid': '3d8ddffc-1c35-465e-aed1-0e341c53c594', 'streamName': 'eeg'}, {'cols': ['eng', 'exc', 'lex', 'str', 'rel', 'int', 'foc'], 'sid': '3d8ddffc-1c35-465e-aed1-0e341c53c594', 'streamName': 'met'}]}} get_data got {"eeg":[219,0,4176.41,4223.462,4175.128,4182.692,4215.256,4214.872,4204.487,4216.41,4216.41,4223.462,4277.436,5023.333,4247.692,4241.667,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9613} get_data got {"eeg":[220,0,4177.308,4223.846,4163.59,4183.59,4212.436,4215,4206.667,4217.051,4216.923,4224.359,4280,5032.564,4247.308,4246.667,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9653} get_data got {"eeg":[221,0,4196.667,4224.103,4164.744,4195.385,4216.538,4218.205,4216.154,4220.385,4219.103,4225.128,4277.179,5031.923,4230.769,4229.872,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9692} get_data got {"eeg":[222,0,4219.231,4222.436,4166.282,4207.564,4220.513,4218.846,4221.026,4222.821,4220.513,4225.128,4275.256,5011.923,4217.949,4214.872,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9731} get_data got {"eeg":[223,0,4229.615,4218.59,4164.103,4212.564,4218.974,4213.846,4215.256,4221.923,4219.359,4224.231,4279.487,4972.308,4223.462,4223.077,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.977} get_data got {"eeg":[224,0,4228.462,4214.744,4171.154,4214.744,4214.872,4207.179,4206.41,4219.231,4217.436,4223.333,4286.026,4925.769,4238.462,4244.487,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9809} get_data got {"eeg":[225,0,4228.333,4213.077,4200.128,4222.692,4214.231,4205.256,4205.769,4218.205,4217.436,4223.077,4286.923,4890.641,4241.282,4250.769,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9849} get_data got {"eeg":[226,0,4235,4213.59,4240.641,4235.513,4217.692,4209.231,4213.462,4219.872,4220.641,4223.333,4280.897,4878.718,4225.769,4232.949,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9888} get_data got {"eeg":[227,0,4240.897,4214.744,4265.128,4242.564,4219.359,4213.333,4218.846,4221.923,4225.128,4223.846,4275.513,4888.205,4207.564,4213.333,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9926} get_data got {"eeg":[228,0,4236.923,4215.256,4258.462,4237.949,4215.641,4212.692,4215,4222.436,4228.462,4224.359,4277.821,4909.615,4204.615,4215.256,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9966} Sending request: {"jsonrpc": "2.0", "method": "injectMarker", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU3MDc1NjcwMywibGljZW5zZUlkIjoiMjIwMWM2NmYtMWM1My00N2JlLWJlNDAtYzliOTVjZDM0NjJkIiwibmJmIjoxNTcwNDk3NTAzLCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.vGdiBWbuk/foc1T3v/I30Qhp/5g8E6JGTAx+VdUmoVQ=", "session": "3d8ddffc-1c35-465e-aed1-0e341c53c594", "label": "halfway", "value": 1, "port": "", "time": 1570583904189}, "id": 11} sent; awaiting response lib.cortex resp: {'eeg': [229, 0, 4227.179, 4214.872, 4236.795, 4228.974, 4210.128, 4208.974, 4207.436, 4222.179, 4229.487, 4225, 4284.744, 4935, 4214.487, 4233.077, 0, 0, []], 'sid': '3d8ddffc-1c35-465e-aed1-0e341c53c594', 'time': 1570583904.0005} Sending request: {"jsonrpc": "2.0", "method": "updateSession", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU3MDc1NjcwMywibGljZW5zZUlkIjoiMjIwMWM2NmYtMWM1My00N2JlLWJlNDAtYzliOTVjZDM0NjJkIiwibmJmIjoxNTcwNDk3NTAzLCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.vGdiBWbuk/foc1T3v/I30Qhp/5g8E6JGTAx+VdUmoVQ=", "session": "3d8ddffc-1c35-465e-aed1-0e341c53c594", "status": "close"}, "id": 12} sent; awaiting response lib.cortex resp: {'id': 12, 'jsonrpc': '2.0', 'result': {'appId': 'com.2259b2ef9eeebb5.jackcao_2019830', 'headset': {'connectedBy': 'dongle', 'customName': '', 'dongle': '6ff', 'firmware': '625', 'id': 'EPOCPLUS-3B9AEBCD', 'motionSensors': ['GYROX', 'GYROY', 'GYROZ', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 256, 'eegRes': 16, 'memsRate': 0, 'memsRes': 16, 'mode': 'EPOCPLUS'}, 'status': 'connected'}, 'id': '3d8ddffc-1c35-465e-aed1-0e341c53c594', 'license': '2201c66f-1c53-47be-be40-c9b95cd3462d', 'owner': '2259b2ef9eeebb5', 'recordIds': ['1a525a4f-aec6-47bf-b493-e60ce1133536'], 'recording': False, 'started': '2019-10-09T09:18:24.134+08:00', 'status': 'closed', 'stopped': '2019-10-09T09:18:24.216+08:00', 'streams': []}} E:\myTFileschx\EmotivTesting\cortex-v2-example-master\python\lib\cortex.py:173: RuntimeWarning: coroutine 'WebSocketCommonProtocol.close' was never awaited self.websocket.close() RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Process finished with exit code 0
Hi @chx2017 Yes, it is the raw EEG data. You can check the doc to see how to interpret these values. https://emotiv.gitbook.io/cortex-api/data-subscription/data-sample-object
Thank you for your big help!
We have obtained the raw eeg data from the equipment. What is the unit of these values? Or how to get those values from the original eeg signal (μV value)? Please inform me, Thank you for your help!
get_data got {"eeg":[219,0,4176.41,4223.462,4175.128,4182.692,4215.256,4214.872,4204.487,4216.41,4216.41,4223.462,4277.436,5023.333,4247.692,4241.667,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9613} get_data got {"eeg":[220,0,4177.308,4223.846,4163.59,4183.59,4212.436,4215,4206.667,4217.051,4216.923,4224.359,4280,5032.564,4247.308,4246.667,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9653} get_data got {"eeg":[221,0,4196.667,4224.103,4164.744,4195.385,4216.538,4218.205,4216.154,4220.385,4219.103,4225.128,4277.179,5031.923,4230.769,4229.872,0,0,[]],"sid":"3d8ddffc-1c35-465e-aed1-0e341c53c594","time":1570583903.9692}
it's μV value, we call it raw eeg.
Thank you!
We have created the cortex_creds using Notepad, including the below information. And the EMOTIV App has been connected with the equipment. Then the example.py has been run and the obtained information is shown as below. We have tried many ways and can not solve it. Please you help us! client_id .................. client_secret .................. D:\Python\Python37\python.exe E:/myTFileschx/EmotivTesting/cortex-v2-example-master/python/example.py USER LOGIN Sending request: {"jsonrpc": "2.0", "method": "getUserLogin", "params": {}, "id": 1} sent; awaiting response lib.cortex resp: {'currentOSUId': '1001', 'currentOSUsername': 'lenovo', 'loggedInOSUId': '1001', 'loggedInOSUsername': 'lenovo', 'username': '2259b2ef9eeebb5'} Sending request: {"jsonrpc": "2.0", "method": "getCortexInfo", "params": {}, "id": 2} sent; awaiting response lib.cortex resp: {'id': 2, 'jsonrpc': '2.0', 'result': {'buildDate': '2019-09-03T09:40:00', 'buildNumber': 'v2.0.2-417-g3845976', 'version': '2.2.0'}} Sending request: {"jsonrpc": "2.0", "method": "requestAccess", "params": {"clientId": "JwoNlMmZ7LqXAafsbr3ldnGIoF2F0W5DdUQ27mN9", "clientSecret": "D9LHZtzlgYvBEJegWLCMNXhyXCEIimga0W3PSTLJNaOMJDjCXzC8ULmZQ1bXOqaCCrsVbBTOec1bbPhXXCskfk2DbqMrRiDFgA8Ia2pAQhDXjnsAkJZPqcmeRo5bNkE8"}, "id": 3} sent; awaiting response GET CORTEX INFO HAS ACCESS RIGHT lib.cortex resp: {'id': 3, 'jsonrpc': '2.0', 'result': {'accessGranted': True, 'message': 'The User has access right to this application.'}} Sending request: REQUEST ACCESS {"jsonrpc": "2.0", "method": "requestAccess", "params": {"clientId": "JwoNlMmZ7LqXAafsbr3ldnGIoF2F0W5DdUQ27mN9", "clientSecret": "D9LHZtzlgYvBEJegWLCMNXhyXCEIimga0W3PSTLJNaOMJDjCXzC8ULmZQ1bXOqaCCrsVbBTOec1bbPhXXCskfk2DbqMrRiDFgA8Ia2pAQhDXjnsAkJZPqcmeRo5bNkE8"}, "id": 4} sent; awaiting response AUTHORIZE lib.cortex resp: {'id': 4, 'jsonrpc': '2.0', 'result': {'accessGranted': True, 'message': 'The User has access right to this application.'}} Sending request: {"jsonrpc": "2.0", "method": "authorize", "params": {"clientId": "JwoNlMmZ7LqXAafsbr3ldnGIoF2F0W5DdUQ27mN9", "clientSecret": "D9LHZtzlgYvBEJegWLCMNXhyXCEIimga0W3PSTLJNaOMJDjCXzC8ULmZQ1bXOqaCCrsVbBTOec1bbPhXXCskfk2DbqMrRiDFgA8Ia2pAQhDXjnsAkJZPqcmeRo5bNkE8"}, "id": 5} sent; awaiting response lib.cortex resp: {'id': 5, 'jsonrpc': '2.0', 'result': {'cortexToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc2NjU1MSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTA3MzUxLCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.09oJ1w6mDPucPxlSFzHUp6A+o7GeigZxTzacHpbaSaE='}} Sending request: {"jsonrpc": "2.0", "method": "getLicenseInfo", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc2NjU1MSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTA3MzUxLCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.09oJ1w6mDPucPxlSFzHUp6A+o7GeigZxTzacHpbaSaE="}, "id": 6} sent; awaiting response GET LICENSE INFO QUERY HEADSETS CREATE SESSION lib.cortex resp: {'id': 6, 'jsonrpc': '2.0', 'result': {'isOnline': True, 'license': {'applications': ['com.emotiv.sdk.basic'], 'billingFrom': '2019-08-27T08:00:00.000+08:00', 'billingTo': '2029-08-24T08:00:00.000+08:00', 'deviceInfo': {'deviceLimit': 3, 'devicesPerSeat': 3, 'sessionLimit': {'day': None, 'month': None, 'year': None}}, 'expired': False, 'extenderLimit': 6, 'hardLimitTime': '2019-10-05T07:59:59.999+08:00', 'isCommercial': False, 'licenseId': 'afb3594c-5469-4a1f-a727-4499166584a2', 'licenseName': 'Basic License', 'localQuota': 0, 'maxDebit': None, 'scopes': [''], 'seatCount': 1, 'sessionCount': 0, 'softLimitTime': '2019-09-28T07:59:59.999+08:00', 'totalDebit': 0, 'totalRegisteredDevices': 1, 'validFrom': '2019-08-27T08:00:00.000+08:00', 'validTo': '2029-08-25T07:59:59.999+08:00'}}} Sending request: {"jsonrpc": "2.0", "method": "queryHeadsets", "params": {}, "id": 7} sent; awaiting response lib.cortex found headsets ['EPOCPLUS-3B9AEBCD'] lib.cortex resp: {'id': 7, 'jsonrpc': '2.0', 'result': [{'connectedBy': 'dongle', 'customName': '', 'dongle': '6ff', 'firmware': '625', 'id': 'EPOCPLUS-3B9AEBCD', 'motionSensors': ['GYROX', 'GYROY', 'GYROZ', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 256, 'eegRes': 16, 'memsRate': 0, 'memsRes': 16, 'mode': 'EPOCPLUS'}, 'status': 'connected'}]} Sending request: {"jsonrpc": "2.0", "method": "createSession", "params": {"cortexToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc2NjU1MSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTA3MzUxLCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.09oJ1w6mDPucPxlSFzHUp6A+o7GeigZxTzacHpbaSaE=", "headset": "EPOCPLUS-3B9AEBCD", "status": "active"}, "id": 8} sent; awaiting response Got error in createSession with params {'cortexToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS4yMjU5YjJlZjllZWViYjUuamFja2Nhb18yMDE5ODMwIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU2ODc2NjU1MSwibGljZW5zZUlkIjoiYWZiMzU5NGMtNTQ2OS00YTFmLWE3MjctNDQ5OTE2NjU4NGEyIiwibmJmIjoxNTY4NTA3MzUxLCJ1c2VySWQiOiIyOTkwZDlmNy1jMWYyLTQ1YWUtYmNmMy0zMjMzODExZDM5MzciLCJ1c2VybmFtZSI6IjIyNTliMmVmOWVlZWJiNSIsInZlcnNpb24iOiIyLjAifQ==.09oJ1w6mDPucPxlSFzHUp6A+o7GeigZxTzacHpbaSaE=', 'headset': 'EPOCPLUS-3B9AEBCD', 'status': 'active'}: {"error":{"code":-32019,"message":"Session limit on this device has been reached."},"id":8,"jsonrpc":"2.0"} Traceback (most recent call last): File "E:/myTFileschx/EmotivTesting/cortex-v2-example-master/python/example.py", line 44, in
test()
File "E:/myTFileschx/EmotivTesting/cortex-v2-example-master/python/example.py", line 39, in test
asyncio.run(do_stuff(cortex))
File "D:\Python\Python37\lib\asyncio\runners.py", line 43, in run
return loop.run_until_complete(main)
File "D:\Python\Python37\lib\asyncio\base_events.py", line 579, in run_until_complete
return future.result()
File "E:/myTFileschx/EmotivTesting/cortex-v2-example-master/python/example.py", line 23, in do_stuff
await cortex.create_session(activate=True, headset_id=cortex.headsets[0])
File "E:\myTFileschx\EmotivTesting\cortex-v2-example-master\python\lib\cortex.py", line 271, in create_session
resp = await self.send_command('createSession', **params)
File "E:\myTFileschx\EmotivTesting\cortex-v2-example-master\python\lib\cortex.py", line 154, in send_command
raise CortexApiException(resp)
lib.cortex.CortexApiException: {"error":{"code":-32019,"message":"Session limit on this device has been reached."},"id":8,"jsonrpc":"2.0"}
Process finished with exit code 1