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

Adding device solar data endpoint #192

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

psdupvi
Copy link
Contributor

@psdupvi psdupvi commented Mar 12, 2024

Issue #190

Adding endpoint for device solar data.

I limited the return values to just the specific solar data deviceSolarInput because it's already a lot of data, and I suspect we already return all the other data from the device settings endpoint

If the device has no solar data, it returns the following value (I tested with my non solar 945):

{'solarDailyDataDTOs': []}

With solar data, it returns something like the following

    {
      "solarDailyDataDTOs": 
          [ # List with one entry per day
              {
                  "localConnectDate": "2024-03-10",
                  "userProfilePk": 71328280,
                  "deviceId": 3424284515,
                  "solarInputReadings": [
                      {
                          "readingTimestampLocal": "2024-03-10T00:01:00.0",
                          "readingTimestampGmt": "2024-03-10T05:01:00.0",
                          "solarUtilization": 0.0,
                          "notChargingTooHot": false,
                          "notChargingTooCold": false,
                          "notChargingBatteryFull": false,
                          "notChargingExternalPower": false,
                          "notChargingUserDisabled": false,
                          "notChargingOther": true,
                          "activityTimeGainMs": 0,
                          "charging": false,
                          "interpolated": null
                      },             
                        # ... one reading per second? Possibly depends on device                             
                      {
                          "readingTimestampLocal": "2024-03-10T15:55:00.0",
                          "readingTimestampGmt": "2024-03-10T19:55:00.0",
                          "solarUtilization": 0.9900000095367432,
                          "notChargingTooHot": false,
                          "notChargingTooCold": false,
                          "notChargingBatteryFull": false,
                          "notChargingExternalPower": false,
                          "notChargingUserDisabled": false,
                          "notChargingOther": false,
                          "activityTimeGainMs": 34,
                          "charging": true,
                          "interpolated": null
                       }
              ], 
              "totalActivityTimeGainedMs": 429308
        }
        ... # Could be more entries
     ]
}
          

@psdupvi psdupvi closed this Mar 12, 2024
@psdupvi psdupvi deleted the feature/device-solar-data branch March 12, 2024 17:49
@psdupvi psdupvi restored the feature/device-solar-data branch March 12, 2024 17:50
@psdupvi psdupvi reopened this Mar 12, 2024
@psdupvi
Copy link
Contributor Author

psdupvi commented Mar 12, 2024

Sorry, accidentally closed PR while cleaning up my own branches

@cyberjunky cyberjunky merged commit f330dbc into cyberjunky:master Mar 15, 2024
@cyberjunky
Copy link
Owner

Thanks!

@psdupvi psdupvi deleted the feature/device-solar-data branch March 15, 2024 14:04
hirebusbrandon pushed a commit to hirebusbrandon/python-garminconnect that referenced this pull request Jul 10, 2024
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.

None yet

2 participants