GithubHelp home page GithubHelp logo

thingsboard / dart_thingsboard_pe_client Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 14.0 388 KB

ThingsBoard PE API client library for Dart developers.

License: BSD 3-Clause "New" or "Revised" License

Dart 100.00%

dart_thingsboard_pe_client's Introduction

dart_thingsboard_pe_client's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dart_thingsboard_pe_client's Issues

TimeseriesSubscriptionCmd field startTs doesn't work?

I want to implement real-time data acquisition using a time filter (5 minutes or 10 minutes earlier from the current one). I wrote this kind of code:

final telemetryService = thingsBoardClient.getTelemetryService();
    final currentTime = DateTime.now();
    final startTime = currentTime.subtract(
      const Duration(minutes: 5),
    );

    final subscription = TelemetrySubscriber(
      telemetryService,
      [
        TimeseriesSubscriptionCmd(
          entityId: DeviceId(deviceId).id!,
          entityType: DeviceId(deviceId).entityType,
          startTs: startTime.millisecondsSinceEpoch,
        ),
      ],
    );
    

I receive device data in real time, but the problem is that the startTs parameter is ignored and the data does not arrive as I mentioned - 5 minutes earlier. If I need to use a different method or approach to obtain data from a certain time to now, I will be glad to hear help. In case if everything alright please look through my issue. I tested both IOS simulator and Android device
Many thanks!

Proxy support isnt available

There is no way to configure a web proxy. this is a must in many professional environement running Thingsboard on premises .

Null issues in getDeviceService().getUserDevices(PageLink(1))

Hi,
I faced the following error, while try calling _tbClient.getDeviceService().getUserDevices(PageLink(1)):
E/flutter ( 5652): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' E/flutter ( 5652): #0 new Device.fromJson package:thingsboard_pe_client/…/model/device_models.dart:766 E/flutter ( 5652): #1 parseDevicePageData.<anonymous closure> package:thingsboard_pe_client/…/service/device_service.dart:8 E/flutter ( 5652): #2 dataFromJson.<anonymous closure> package:thingsboard_pe_client/…/page/page_data.dart:35 E/flutter ( 5652): #3 MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31) E/flutter ( 5652): #4 ListIterator.moveNext (dart:_internal/iterable.dart:342:26) E/flutter ( 5652): #5 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:206:27) E/flutter ( 5652): #6 new _GrowableList.of (dart:core-patch/growable_array.dart:153:28) E/flutter ( 5652): #7 new List.of (dart:core-patch/array_patch.dart:51:28)

While debugging, I recieved this:
in device_model.dart
deviceProfileIdIsNull

With the following runtime variables:
data

Most of the devices parameter are empty, because I created it just with the necessary params with the API.
How can I use the method _tbClient.getDeviceService().getUserDevices(PageLink(1)) with this kind of devices?

Best regards :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.