Skip to content

Conversation

@labutler
Copy link
Member

Sensor driver for Oura Ring. Supports multiple rings. Must add ring data to resources/Oura.csv.

Copy link
Collaborator

@nickgaray nickgaray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update copyright dates, make sure all classes are org.sensorhub, update class headers with proper info in noted annotations

// @DisplayInfo(desc = "User Oura Cloud Token")
// public String bearerToken;

// Mike: KOZ6PJWLHIFJLUHXYYT5FW5Z7D62N7VQ
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove secrets from file

/**
* The unique identifier for the configured sensor (or sensor platform).
*/
// @DisplayInfo.Required
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If serial number and bearer token are not needed, then they should be removed

osgi {
manifest {
attributes ('Bundle-Vendor': 'Botts Inc')
attributes ('Bundle-Activator': 'com.sample.impl.sensor.drivername.Activator')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package name should start with org.sensorhub if this is intended for open source. This comment applies to all .java files as well

WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the License.

Copyright (C) 2020-2021 Botts Innovative Research, Inc. All Rights Reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do copyrights need updating? Date?

/**
* Descriptor classes provide access to informative data on the OpenSensorHub driver
*
* @author your_name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit class headers with correct annotations

// TODO: Create data record description
dataStruct = sweFactory.createRecord()
.name(SENSOR_OUTPUT_NAME)
.definition("urn:osh:data:oura:spo2")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definition should be an ontological uri and not a unique identifier urn


private Thread worker;

private String bearerToken;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bearerToken is not used so remove it

System.out.println(record.get(0) + " | " + record.get(1) + " | " + record.get(2)); // ID | Name | Token
String sleep_response = makeRequest(requestString, record.get(2)); // record(2) = Token
JSONObject[] sleep_jsons = getDataRecord(sleep_response, record);
System.out.println("Number of Sleep Records for " + record.get(1) + " : " + sleep_jsons.length);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use logger

System.out.println("Number of Rings Monitored: " + records.size());
JSONObject[] sum_sleep_jsons = new JSONObject[0];
for (List<String> record : records) {
System.out.println(record.get(0) + " | " + record.get(1) + " | " + record.get(2)); // ID | Name | Token
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use logger

// TODO: Create data record description
dataStruct = sweFactory.createRecord()
.name(SENSOR_OUTPUT_NAME)
.definition("urn:osh:data:oura:sleep")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definition should be an ontological definition URI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants