Skip to content

Feat/gps tracker - #246

Open
deaflynx wants to merge 33 commits into
thingsboard:develop/1.9.0from
deaflynx:feat/gps-tracker
Open

Feat/gps tracker#246
deaflynx wants to merge 33 commits into
thingsboard:develop/1.9.0from
deaflynx:feat/gps-tracker

Conversation

@deaflynx

Copy link
Copy Markdown
Contributor

No description provided.

@deaflynx deaflynx added the enhancement New feature or request label Jun 10, 2026
@deaflynx deaflynx added this to the 1.9.0 milestone Jun 10, 2026
deaflynx added 25 commits July 3, 2026 13:14
…pike page

- positionStream now accepts LocationStreamSettings (accuracy tier,
  distance filter, interval, optional background mode)
- background mode uses geolocator foreground service notification on
  Android and background location updates on iOS
- add FOREGROUND_SERVICE / FOREGROUND_SERVICE_LOCATION permissions and
  the iOS 'location' background mode
- add debug-only live tracking spike page (More menu) that streams
  fixes and saves latitude/longitude/gpsAccuracy telemetry to the
  current user entity
…cking

The ESP32 provisioning branch capped ACCESS_FINE_LOCATION at
maxSdkVersion=35, which strips the permission on API 36+ (Android 16).
Live GPS tracking then fell back to approximate location and delivered
only a single fix. Use tools:remove to drop any dependency-imposed
maxSdkVersion so fine location is granted on all API levels.
start() was awaiting the network entity-name lookup before persisting
the recoverable "interrupted" record and subscribing to GPS. A force
kill (or slow/offline network) in that window left nothing persisted
to recover from, and a concurrent stop()/logout could resume start()
afterwards and resurrect a subscription and record for a session that
had already ended.

Reorder start() so the record write, status attributes, GPS
subscription and max-duration timer all happen synchronously before
any network call, then resolve the name in the background and patch
it into the persisted record. The patch is guarded by the session's
startedAt so a stop, logout, or newer start() supersedes it and the
late name resolution becomes a no-op.

Also:
- remove the dead liveTrackingNoSession l10n key (its only consumer,
  the old session page, is gone) and regenerate l10n
- tighten two loose test matchers in the location tracking widget
  tests (findsOneWidget instead of findsWidgets; assert the exact
  primaryContainer color instead of just isNotNull)
deaflynx added 5 commits July 22, 2026 21:34
…ping

The dashboard now sends the keys to save rather than a fixed pair plus
flags: each entry names a location value, the entity key it is written
under and whether it lands in server attributes or time series. Replaces
latitudeKey, longitudeKey, includeMetadata, mirrorToAttributes and
writeStatusAttributes, drops the redundant gpsLastUpdateTime attribute,
and switches the maximum duration to seconds to match the wire config.
…oard

- carry the web-resolved target name and source dashboard in the tracking
  wire config and persist them with the last-session record
- return trackingInfo (target name, saved keys) from the stop action ack
  so the dashboard dialog can show what was tracked
- tracking page: target entity links to its details (device profile
  dashboard, asset or customer details), source dashboard opens on tap
- tracking page: "Save location to entity" label, play/pause status icon
  with green/amber color, start/end times without milliseconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant