From 3aad7e6b6d1918fb02426f6ec28abca178b1597e Mon Sep 17 00:00:00 2001 From: Peyman Mohtashami Date: Mon, 30 Oct 2023 11:24:51 +0100 Subject: [PATCH 1/6] Add Fitbit Skin Temperature & Breathing Rate specifications and avro schemas --- .../fitbit/fitbit_intraday_breathing_rate.avsc | 14 ++++++++++++++ .../connector/fitbit/fitbit_skin_temperature.avsc | 12 ++++++++++++ .../connector/radar-fitbit-connector.yml | 6 ++++++ 3 files changed, 32 insertions(+) create mode 100644 commons/connector/fitbit/fitbit_intraday_breathing_rate.avsc create mode 100644 commons/connector/fitbit/fitbit_skin_temperature.avsc diff --git a/commons/connector/fitbit/fitbit_intraday_breathing_rate.avsc b/commons/connector/fitbit/fitbit_intraday_breathing_rate.avsc new file mode 100644 index 00000000..126b3733 --- /dev/null +++ b/commons/connector/fitbit/fitbit_intraday_breathing_rate.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.connector.fitbit", + "type": "record", + "name": "FitbitIntradayBreathingRate", + "doc": "Intra day breathing rate (BR) data from fitbit device. BR measures the average breathing rate throughout the day and categories your breathing rate by sleep stage. Sleep stages vary between light sleep, deep sleep, REM sleep, and full sleep.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, + { "name": "lightSleepSummary", "type": "float", "doc": "Average number of breaths taken per minute when the user was in light sleep."}, + { "name": "deepSleepSummary", "type": "float", "doc": "Average number of breaths taken per minute when the user was in deep sleep."}, + { "name": "remSleepSummary", "type": "float", "doc": "Average number of breaths taken per minute when the user was in rem sleep."}, + { "name": "fullSleepSummary", "type": "float", "doc": "Average number of breaths taken per minute throughout the entire period of sleep which you can compare to the sleep stage-specific measurements."}, + ] +} diff --git a/commons/connector/fitbit/fitbit_skin_temperature.avsc b/commons/connector/fitbit/fitbit_skin_temperature.avsc new file mode 100644 index 00000000..e179ee71 --- /dev/null +++ b/commons/connector/fitbit/fitbit_skin_temperature.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "org.radarcns.connector.fitbit", + "type": "record", + "name": "FitbitSkinTemperature", + "doc": "Skin temperature (tempSkin) data from fitbit device. tempSkin measures skin temperature data for a date range. It only returns a value for dates on which the Fitbit device was able to record Temperature (skin) data and the maximum date range cannot exceed 30 days. Temperature (Skin) data applies specifically to a user’s “main sleep,” which is the longest single period of time asleep on a given date.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, + { "name": "nightlyRelative", "type": "float", "doc": "The user's average temperature during a period of sleep. It is displayed to the user as a delta from their baseline temperature in degrees Celsius or Fahrenheit depending on the country specified in the Accept-Language header."}, + { "name": "logType", "type": { "name": "FitbitSkinTemperatureLogType", "type": "enum", "symbols": ["DEDICATED_TEMP_SENSOR", "OTHER_SENSORS", "UNKNOWN"], "doc": "The type of skin temperature log created."}, "doc": "The type of skin temperature log created."}, + ] +} diff --git a/specifications/connector/radar-fitbit-connector.yml b/specifications/connector/radar-fitbit-connector.yml index 387322d1..d10453e7 100644 --- a/specifications/connector/radar-fitbit-connector.yml +++ b/specifications/connector/radar-fitbit-connector.yml @@ -31,3 +31,9 @@ data: - doc: Intraday heart rate variability topic: connect_fitbit_intraday_heart_rate_variability value_schema: .connector.fitbit.FitbitIntradayHeartRateVariability + - doc: Intraday breathing rate + topic: connect_fitbit_intraday_breathing_rate + value_schema: .connector.fitbit.FitbitIntradayBreathingRate + - doc: Skin temperature + topic: connect_fitbit_skin_temperature + value_schema: .connector.fitbit.FitbitSkinTemperature From f3e34c1ecf5abb02c9f4b63b5bdf452e4f077c40 Mon Sep 17 00:00:00 2001 From: Peyman Mohtashami Date: Mon, 30 Oct 2023 12:40:02 +0100 Subject: [PATCH 2/6] Add default for skin temperature logType --- commons/connector/fitbit/fitbit_skin_temperature.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/connector/fitbit/fitbit_skin_temperature.avsc b/commons/connector/fitbit/fitbit_skin_temperature.avsc index e179ee71..4af58866 100644 --- a/commons/connector/fitbit/fitbit_skin_temperature.avsc +++ b/commons/connector/fitbit/fitbit_skin_temperature.avsc @@ -7,6 +7,6 @@ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, { "name": "nightlyRelative", "type": "float", "doc": "The user's average temperature during a period of sleep. It is displayed to the user as a delta from their baseline temperature in degrees Celsius or Fahrenheit depending on the country specified in the Accept-Language header."}, - { "name": "logType", "type": { "name": "FitbitSkinTemperatureLogType", "type": "enum", "symbols": ["DEDICATED_TEMP_SENSOR", "OTHER_SENSORS", "UNKNOWN"], "doc": "The type of skin temperature log created."}, "doc": "The type of skin temperature log created."}, + { "name": "logType", "type": { "name": "FitbitSkinTemperatureLogType", "type": "enum", "symbols": ["DEDICATED_TEMP_SENSOR", "OTHER_SENSORS", "UNKNOWN"], "doc": "The type of skin temperature log created."}, "doc": "The type of skin temperature log created.", "default": "UNKNOWN"}, ] } From 8db92590bcf8c87498cda820c711b0b8dc5367f8 Mon Sep 17 00:00:00 2001 From: Peyman Mohtashami Date: Mon, 30 Oct 2023 14:48:31 +0100 Subject: [PATCH 3/6] Modify BR name and fields and SkinTemperature relativeTemperature --- .../connector/fitbit/fitbit_breathing_rate.avsc | 14 ++++++++++++++ .../fitbit/fitbit_intraday_breathing_rate.avsc | 14 -------------- .../connector/fitbit/fitbit_skin_temperature.avsc | 2 +- .../connector/radar-fitbit-connector.yml | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 commons/connector/fitbit/fitbit_breathing_rate.avsc delete mode 100644 commons/connector/fitbit/fitbit_intraday_breathing_rate.avsc diff --git a/commons/connector/fitbit/fitbit_breathing_rate.avsc b/commons/connector/fitbit/fitbit_breathing_rate.avsc new file mode 100644 index 00000000..4e37aeab --- /dev/null +++ b/commons/connector/fitbit/fitbit_breathing_rate.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.connector.fitbit", + "type": "record", + "name": "FitbitBreathingRate", + "doc": "Breathing rate (BR) data from fitbit device. BR measures the average breathing rate throughout the day and categories your breathing rate by sleep stage. Sleep stages vary between light sleep, deep sleep, REM sleep, and full sleep.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, + { "name": "lightSleep", "type": "float", "doc": "Average number of breaths taken per minute when the user was in light sleep."}, + { "name": "deepSleep", "type": "float", "doc": "Average number of breaths taken per minute when the user was in deep sleep."}, + { "name": "remSleep", "type": "float", "doc": "Average number of breaths taken per minute when the user was in rem sleep."}, + { "name": "fullSleep", "type": "float", "doc": "Average number of breaths taken per minute throughout the entire period of sleep which you can compare to the sleep stage-specific measurements."}, + ] +} diff --git a/commons/connector/fitbit/fitbit_intraday_breathing_rate.avsc b/commons/connector/fitbit/fitbit_intraday_breathing_rate.avsc deleted file mode 100644 index 126b3733..00000000 --- a/commons/connector/fitbit/fitbit_intraday_breathing_rate.avsc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "namespace": "org.radarcns.connector.fitbit", - "type": "record", - "name": "FitbitIntradayBreathingRate", - "doc": "Intra day breathing rate (BR) data from fitbit device. BR measures the average breathing rate throughout the day and categories your breathing rate by sleep stage. Sleep stages vary between light sleep, deep sleep, REM sleep, and full sleep.", - "fields": [ - { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, - { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, - { "name": "lightSleepSummary", "type": "float", "doc": "Average number of breaths taken per minute when the user was in light sleep."}, - { "name": "deepSleepSummary", "type": "float", "doc": "Average number of breaths taken per minute when the user was in deep sleep."}, - { "name": "remSleepSummary", "type": "float", "doc": "Average number of breaths taken per minute when the user was in rem sleep."}, - { "name": "fullSleepSummary", "type": "float", "doc": "Average number of breaths taken per minute throughout the entire period of sleep which you can compare to the sleep stage-specific measurements."}, - ] -} diff --git a/commons/connector/fitbit/fitbit_skin_temperature.avsc b/commons/connector/fitbit/fitbit_skin_temperature.avsc index 4af58866..f1ec7446 100644 --- a/commons/connector/fitbit/fitbit_skin_temperature.avsc +++ b/commons/connector/fitbit/fitbit_skin_temperature.avsc @@ -6,7 +6,7 @@ "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, - { "name": "nightlyRelative", "type": "float", "doc": "The user's average temperature during a period of sleep. It is displayed to the user as a delta from their baseline temperature in degrees Celsius or Fahrenheit depending on the country specified in the Accept-Language header."}, + { "name": "relativeTemperature", "type": "float", "doc": "The user's average temperature during a period of sleep. It is displayed to the user as a delta from their baseline temperature in degrees Celsius."}, { "name": "logType", "type": { "name": "FitbitSkinTemperatureLogType", "type": "enum", "symbols": ["DEDICATED_TEMP_SENSOR", "OTHER_SENSORS", "UNKNOWN"], "doc": "The type of skin temperature log created."}, "doc": "The type of skin temperature log created.", "default": "UNKNOWN"}, ] } diff --git a/specifications/connector/radar-fitbit-connector.yml b/specifications/connector/radar-fitbit-connector.yml index d10453e7..15328306 100644 --- a/specifications/connector/radar-fitbit-connector.yml +++ b/specifications/connector/radar-fitbit-connector.yml @@ -31,9 +31,9 @@ data: - doc: Intraday heart rate variability topic: connect_fitbit_intraday_heart_rate_variability value_schema: .connector.fitbit.FitbitIntradayHeartRateVariability - - doc: Intraday breathing rate - topic: connect_fitbit_intraday_breathing_rate - value_schema: .connector.fitbit.FitbitIntradayBreathingRate + - doc: Breathing rate + topic: connect_fitbit_breathing_rate + value_schema: .connector.fitbit.FitbitBreathingRate - doc: Skin temperature topic: connect_fitbit_skin_temperature value_schema: .connector.fitbit.FitbitSkinTemperature From 2949635072f7f571a4e042a010a7e6245d00ecc1 Mon Sep 17 00:00:00 2001 From: Peyman Mohtashami Date: Tue, 31 Oct 2023 11:45:18 +0100 Subject: [PATCH 4/6] Bump specification version --- specifications/connector/radar-fitbit-connector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/connector/radar-fitbit-connector.yml b/specifications/connector/radar-fitbit-connector.yml index 15328306..3825f4e0 100644 --- a/specifications/connector/radar-fitbit-connector.yml +++ b/specifications/connector/radar-fitbit-connector.yml @@ -1,7 +1,7 @@ name: RADAR-FITBIT-CONNECTOR vendor: RADAR-base model: radar-connect-fitbit-source -version: 0.2.2 +version: 0.2.3 doc: Spec for Radar fitbit connector. Schemas should be registered in the connector. data: - doc: The intraday time series for heart rate. From 9e9d46e12a0ab7911eb47c365ddd095a3588b8e1 Mon Sep 17 00:00:00 2001 From: Peyman Mohtashami Date: Tue, 31 Oct 2023 12:43:58 +0100 Subject: [PATCH 5/6] Fix json files - remove extra comma --- commons/connector/fitbit/fitbit_breathing_rate.avsc | 2 +- commons/connector/fitbit/fitbit_skin_temperature.avsc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/connector/fitbit/fitbit_breathing_rate.avsc b/commons/connector/fitbit/fitbit_breathing_rate.avsc index 4e37aeab..9fa0eac2 100644 --- a/commons/connector/fitbit/fitbit_breathing_rate.avsc +++ b/commons/connector/fitbit/fitbit_breathing_rate.avsc @@ -9,6 +9,6 @@ { "name": "lightSleep", "type": "float", "doc": "Average number of breaths taken per minute when the user was in light sleep."}, { "name": "deepSleep", "type": "float", "doc": "Average number of breaths taken per minute when the user was in deep sleep."}, { "name": "remSleep", "type": "float", "doc": "Average number of breaths taken per minute when the user was in rem sleep."}, - { "name": "fullSleep", "type": "float", "doc": "Average number of breaths taken per minute throughout the entire period of sleep which you can compare to the sleep stage-specific measurements."}, + { "name": "fullSleep", "type": "float", "doc": "Average number of breaths taken per minute throughout the entire period of sleep which you can compare to the sleep stage-specific measurements."} ] } diff --git a/commons/connector/fitbit/fitbit_skin_temperature.avsc b/commons/connector/fitbit/fitbit_skin_temperature.avsc index f1ec7446..859c7070 100644 --- a/commons/connector/fitbit/fitbit_skin_temperature.avsc +++ b/commons/connector/fitbit/fitbit_skin_temperature.avsc @@ -7,6 +7,6 @@ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, { "name": "relativeTemperature", "type": "float", "doc": "The user's average temperature during a period of sleep. It is displayed to the user as a delta from their baseline temperature in degrees Celsius."}, - { "name": "logType", "type": { "name": "FitbitSkinTemperatureLogType", "type": "enum", "symbols": ["DEDICATED_TEMP_SENSOR", "OTHER_SENSORS", "UNKNOWN"], "doc": "The type of skin temperature log created."}, "doc": "The type of skin temperature log created.", "default": "UNKNOWN"}, + { "name": "logType", "type": { "name": "FitbitSkinTemperatureLogType", "type": "enum", "symbols": ["DEDICATED_TEMP_SENSOR", "OTHER_SENSORS", "UNKNOWN"], "doc": "The type of skin temperature log created."}, "doc": "The type of skin temperature log created.", "default": "UNKNOWN"} ] } From 18cd038d586feed63b8b4f7fcc39d87513402aaf Mon Sep 17 00:00:00 2001 From: Peyman Mohtashami Date: Wed, 1 Nov 2023 11:25:41 +0100 Subject: [PATCH 6/6] Bump dev version --- java-sdk/buildSrc/src/main/kotlin/Versions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-sdk/buildSrc/src/main/kotlin/Versions.kt b/java-sdk/buildSrc/src/main/kotlin/Versions.kt index b43c3619..cae1e66a 100644 --- a/java-sdk/buildSrc/src/main/kotlin/Versions.kt +++ b/java-sdk/buildSrc/src/main/kotlin/Versions.kt @@ -1,5 +1,5 @@ object Versions { - const val project = "0.8.6-SNAPSHOT" + const val project = "0.8.7-SNAPSHOT" const val kotlin = "1.9.10" const val java = 17