thingsboard_client 2.0.0 copy "thingsboard_client: ^2.0.0" to clipboard
thingsboard_client: ^2.0.0 copied to clipboard

Dart implementation of ThingsBoard API client. Provides model objects and services to communicate with ThingsBoard platform using RESTful APIs and WebSocket protocol.

ThingsBoard API client library for Dart developers. Provides model objects and services to communicate with ThingsBoard platform using RESTful APIs and WebSocket protocol. Current client version is compatible with ThingsBoard starting from version 3.6.3.

Usage #

A simple usage example:

import 'package:thingsboard_client/thingsboard_client.dart';

main() async {
    try {
      var tbClient = ThingsboardClient('https://demo.thingsboard.io');
      await tbClient.login(LoginRequest('tenant@thingsboard.org', 'tenant'));

      print('isAuthenticated=${tbClient.isAuthenticated()}');

      print('authUser: ${tbClient.getAuthUser()}');

      var currentUserDetails = await tbClient.getUserService().getUser();
      print('currentUserDetails: $currentUserDetails');

      await tbClient.logout();

    } catch (e, s) {
        print('Error: $e');
        print('Stack: $s');
    }
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

16
likes
130
pub points
91%
popularity

Publisher

verified publisherthingsboard.io

Dart implementation of ThingsBoard API client. Provides model objects and services to communicate with ThingsBoard platform using RESTful APIs and WebSocket protocol.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

collection, dio, jwt_decoder, pretty_dio_logger, web_socket_channel

More

Packages that depend on thingsboard_client