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

Update intervals #367

Merged
merged 5 commits into from
Mar 6, 2024
Merged

Update intervals #367

merged 5 commits into from
Mar 6, 2024

Conversation

andreasbrett
Copy link
Contributor

@andreasbrett andreasbrett commented Mar 5, 2024

Once again changing intervals after having debugged the Weenect API and current app (Android and mobile web app). I can't tell though if there are different intervals for dog vs cat vs kid trackers. Furthermore I changed the default setting from 30M to 10M since that is the max. official interval and will show in the Android app' s UI.

Intervals that can be set through the apps:
0S/30S/1M/2M/3M/5M/10M

Intervals the API accepts:
0S-99S or 0M-99M.

It is not possible to set hours (e.g. 1H). I wasn't able to test if the tracker itself respects non official intervals (e.g. 13M, 60M, 99S) and would actually send the GPS signal at a non-official ("custom") interval. They are stored though server-side for the tracker and displayed in the mobile web app (since there is no slider to set the interval but rather a text display of the setting).

Furthermore I added battery life information from the mobile web app.

image
image
image
image
image
image

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.20%. Comparing base (d53802c) to head (1214548).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #367   +/-   ##
=======================================
  Coverage   98.20%   98.20%           
=======================================
  Files          20       20           
  Lines         668      668           
=======================================
  Hits          656      656           
  Misses         12       12           
Flag Coverage Δ
unittests 98.20% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@eifinger
Copy link
Owner

eifinger commented Mar 6, 2024

I developed this by looking at the requests the web app makes in chrome dev-tools and verified it with the app. By now I do not use the tracker anymore. Maybe they changed the app and the tracker firmware. I am in favor of aligning with the app.

If we send update intervals not supported by the app, but the backend accepts it, it could still confuse the firmware on the tracker if they forgot to properly clean the data.

Copy link
Owner

@eifinger eifinger left a comment

Choose a reason for hiding this comment

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

Thank you for the updates. As mentioned lets remove the unofficial values

README.md Outdated Show resolved Hide resolved
custom_components/weenect/select.py Outdated Show resolved Hide resolved
custom_components/weenect/services.yaml Show resolved Hide resolved
custom_components/weenect/services.yaml Outdated Show resolved Hide resolved
info.md Outdated Show resolved Hide resolved
@eifinger eifinger merged commit ac1cf1a into eifinger:main Mar 6, 2024
8 checks passed
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