thingsboard_pe_client 4.4.1
thingsboard_pe_client: ^4.4.1 copied to clipboard
ThingsBoard Professional Edition REST API client for Flutter. JWT auth, auto-refresh, WebSocket telemetry, typed error handling.
4.4.1 #
Palette.typeandPaletteSettings.primaryPalette/accentPaletteare nullable. The server returns{type: null}for a palette left on "Default", which madegetWhiteLabelParams()andgetLoginWhiteLabelParams()fail to deserialize (PROD-8931).- Telemetry WebSocket:
reset()also clears the reconnect state, so the first subscription after a logout is published when the socket opens. Unsubscribing during a reconnect backoff no longer sends stale commands to the new socket or lets the subscriber count go negative, which closed a socket that still had live subscribers after the idle timeout (PROD-8863). - A connect timeout or connection error is reported as
Unable to connect, like a refused connection, on both io and web. The best-effort server version check ininit()no longer reports its failures throughonError, so an offline start does not show a connection error.
4.4.0 #
- Initial release targeting ThingsBoard Professional Edition 4.4.0 server.
- Auto-generated from OpenAPI spec using openapi-generator-cli 7.20.0 (dart-dio template).
- Handwritten runtime facade: JWT authentication with auto-refresh, Completer-gated token refresh, WebSocket telemetry subscriptions, typed ThingsboardError with retry logic.
- 81 API service classes, 949+ model types.
- Supports Flutter mobile (iOS/Android) and Flutter Web. Requires Dart SDK >=3.2.0.
- Token refresh keeps the stored session on transport failures (no network, timeout, 5xx); only an HTTP 401 from the refresh endpoint clears it.
init()restores the stale session when the refresh cannot reach the server, so the next authenticated request retries the refresh instead of the user being logged out. The telemetry WebSocket likewise reconnects instead of logging out when its token refresh cannot reach the server.- Default 20s connect timeout on every request and a 15s send/receive timeout on the token-refresh call.
ThingsboardError.isUnauthorizedidentifies a rejected-credentials error regardless of how it was transported.