lb_state_manager 1.0.2 copy "lb_state_manager: ^1.0.2" to clipboard
lb_state_manager: ^1.0.2 copied to clipboard

Logbot State Manager service to return the state of the devices and device services

Logbot State Manager SDK for Flutter #

This is a package to manage the state of the devices and device services

Requirements #

Dart 2.17 or later

Installation & Usage #

Getting Started #

Add the dependencies from pub.dev:

dependencies:
  lb_auth:
  lb_discovery:

lb_auth is always required to make authorized calls to the APIs.

To use the SDK on you application see the example below:

import 'package:lb_auth/lb_auth.dart';
import 'package:lb_state_manager/lb_state_manager.dart';

class Example {
  
  Future<void> run() async {
    /// Initialize Logbot SDK by logging in with Logbot Credentials
    await LogbotAuth.init(LogbotCredentials(
      username: username,
      password: password,
      clientId: clientId,
      clientSecret: clientSecret,
    ));
    /// Now you can use every API included on the SDK
    /// for example:
    await LogbotDiscovery.startDiscovery();
    List<StateManagerDevice>? response = await LogbotStateManager.status.listDeviceStatuses();
  }
}

Note that the user must be logged in with a Logbot account before using startDiscovery() otherwise it will throw an error. This is because the user can locally connect only to the IoTs that he actually owns.

Documentation for API Endpoints #

All URIs are relative to http://localhost

Class Method HTTP request Description
ConnectionApi deviceConnection GET /connection/{deviceId} Returns the device connection
HealthApi healthFirewall GET /health/firewall Check Logbot Firewall status
HealthApi healthSetup GET /health/setup Check Logbot Setup status
HealthApi healthWriter GET /health/writer Check Logbot Writer status
SetupApi deviceStatus GET /device Briefing about the device status
SetupApi supervisorHealth GET /service/supervisor/health Get Supervisor health
SetupApi supervisorStatus GET /service/supervisor Get Supervisor status
StatusApi getDeviceStatus GET /status/{deviceId} Get the status of a device
StatusApi getMultipleDevicesStatus POST /status List the status of many devices and their services
StatusApi listDeviceStatuses GET /status List all the devices and services status

Documentation For Models #

Author #

Logbot SRL info@logbot.cloud

0
likes
0
pub points
2%
popularity

Publisher

verified publisherlogbot.cloud

Logbot State Manager service to return the state of the devices and device services

Homepage

Documentation

Documentation

License

unknown (license)

Dependencies

http, intl, lb_auth, lb_commons, lb_core, lb_discovery, meta

More

Packages that depend on lb_state_manager