Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health 10.2.0 #946

Open
AsifAliAzim opened this issue Apr 4, 2024 · 0 comments
Open

Health 10.2.0 #946

AsifAliAzim opened this issue Apr 4, 2024 · 0 comments
Labels
improvement an improvement

Comments

@AsifAliAzim
Copy link

{ "value": { "__type": "NumericHealthValue", "numeric_value": 141.0 }, "type": "STEPS", "unit": "COUNT", "date_from": "2024-04-03T10:06:57.736", "date_to": "2024-04-03T10:12:51.724", "source_platform": "appleHealth", "source_device_id": "F74938B9-C011-4DE4-AA5E-CF41B60B96E7", "source_id": "com.apple.health.81AE7156-EC05-47E3-AC93-2D6F65C717DF", "source_name": "Asif's iPhone", "is_manual_entry": false }

  1. "value" in the documentation is mentioned to be a map but in reality, it is of String type "NumericHealthValue
    numeric_value: 141.0".
  2. Adding a unique identifier, like iPhone or Apple Watch would be helpful if we want to filter out iPhones and Apple Watch data. Currently, it is a little bit confusing if users do not mention the name of their iPhones it shows "iPhone X pro max" etc, and in other cases "UserName's iPhone".
  3. Adding some device-related information to this object will help a lot. Let say I want to consider only the current device data not Apple Watch or any other iPhone I am using - consider this a generic case. And this is how "device_info_plus" package returns data to us.

{ 'systemName': 'iOS', 'isPhysicalDevice': true, 'utsname': { 'release': 22.6.0, 'sysname': 'Darwin', 'nodename': 'Asif's-iPhone', 'machine': 'iPhone10,6', 'version': 'Darwin Kernel Version 22.6.0: Mon Feb 19 19:46:23 PST 2024; root:xnu-8796.142.1.703.5~1/RELEASE_ARM64_T8015', }, 'model': 'iPhone', 'localizedModel': 'iPhone', 'systemVersion': 16.7.7, 'name': 'iPhone', 'identifierForVendor': 'FF976ADB-D838-4082-A489-43BE686E94F0', }

You could say I can use " 'nodename': 'Asif's-iPhone'" from "device_info_plus" and "source_name": "Asif's iPhone" from HealthDataPoint but it is not that much satisfying. First we can not compare these Strings second since it is a generic case we don't know where our logic breaks.

Conclusion: Adding device-related information will help to filter data if we want only to consider the current device data.

@AsifAliAzim AsifAliAzim added the improvement an improvement label Apr 4, 2024
@AsifAliAzim AsifAliAzim changed the title Health Health 10.2.0 Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement an improvement
Projects
None yet
Development

No branches or pull requests

1 participant