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

Withings Service #1399

Closed
wants to merge 218 commits into from
Closed

Withings Service #1399

wants to merge 218 commits into from

Conversation

euguuu
Copy link
Contributor

@euguuu euguuu commented Dec 10, 2021

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

  • If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)
  • If you are adding a new features/services, did you run integration comparator? (npm run compare-translations on front)
  • Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community for testing before merging.
  • If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
  • If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website.
  • Did you add fake requests data for the demo mode (front/src/config/demo.js) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

This PR is an integration of withings devices.
Only measures are synchronize in gladys now (not activities, workout, sleep event).
It's possible to integrate only 1 withings user for the moment.

I test in real life with device named 'Body' but normaly works with all withings devices.

Video of integration step:
https://user-images.githubusercontent.com/9742965/145620064-274b1b89-2348-4cc3-a53d-536eb7f99958.mp4

example of results in chart:
withings-cgart-result

@codecov
Copy link

codecov bot commented Dec 10, 2021

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (bf8716f) 97.94% compared to head (48492a9) 97.99%.
Report is 61 commits behind head on master.

Files Patch % Lines
.../withings/lib/oauth2-client/oauth2.executeQuery.js 91.11% 4 Missing ⚠️
...ithings/lib/oauth2-client/oauth2.getAccessToken.js 85.71% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1399      +/-   ##
==========================================
+ Coverage   97.94%   97.99%   +0.04%     
==========================================
  Files         748      773      +25     
  Lines       11580    12066     +486     
==========================================
+ Hits        11342    11824     +482     
- Misses        238      242       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@euguuu euguuu changed the title Withings only Withings Service Dec 10, 2021
Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

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

Hello!

Thanks for your PR, and happy new year!

I just came back from holidays and did a first general review of this PR.

I would be interested to see a demo video of the integration?

Good job 👏

server/lib/device/device.destroyBySelectorPattern.js Outdated Show resolved Hide resolved
server/lib/device/device.destroyBySelectorPattern.js Outdated Show resolved Hide resolved
server/lib/device/device.saveHistoricalState.js Outdated Show resolved Hide resolved
server/lib/device/device.saveHistoricalState.js Outdated Show resolved Hide resolved
server/lib/device/device.saveHistoricalState.js Outdated Show resolved Hide resolved
server/services/withings/lib/withings.deleteDevices.js Outdated Show resolved Hide resolved
server/services/withings/lib/withings.init.js Outdated Show resolved Hide resolved
server/services/withings/lib/withings.poll.js Outdated Show resolved Hide resolved
server/services/withings/lib/withings.poll.js Outdated Show resolved Hide resolved
@relativeci
Copy link

relativeci bot commented Sep 4, 2023

Job #1919: Bundle Size — 9.26MiB (+4.95%).

48492a9(current) vs c87e90f master#1917(baseline)

Warning

Bundle contains 3 duplicate packages – View duplicate packages

Bundle metrics  Change 5 changes Regression 2 regressions
                 Current
Job #1919
     Baseline
Job #1917
Regression  Initial JS 4.82MiB(+1.12%) 4.77MiB
Regression  Initial CSS 301.39KiB(+0.03%) 301.31KiB
Change  Cache Invalidation 58.01% 0%
No change  Chunks 48 48
Change  Assets 174(+14.47%) 152
Change  Modules 1392(+1.09%) 1377
No change  Duplicate Modules 19 19
No change  Duplicate Code 0.69% 0.69%
No change  Packages 124 124
No change  Duplicate Packages 3 3
Bundle size by type  Change 4 changes Regression 4 regressions
                 Current
Job #1919
     Baseline
Job #1917
Regression  JS 6.44MiB (+0.9%) 6.39MiB
Regression  IMG 2.38MiB (+18.84%) 2MiB
Regression  CSS 317.05KiB (+0.03%) 316.97KiB
Not changed  Fonts 93.55KiB 93.55KiB
Regression  Other 17.44KiB (+12.63%) 15.48KiB
Not changed  HTML 13.58KiB 13.58KiB

View job #1919 reportView euguuu:withings-only branch activity

Copy link

stale bot commented Jan 26, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 26, 2024
@stale stale bot closed this Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants