homie_dart_on_mqtt_client 1.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 60

homie_dart_on_mqtt_client #

This library uses the mqtt_client package to implement a BrokerConnection for homie_dart. Most users want to use this packge instead of homie_dart, since it comes with all necessary mqtt logic. Users only need a dependency on this package, since it exports the homie_dart api. The BrokerConnection class added by this packages is MqttBrokerConnection

[1.2.0] - 15.08.2019

  • Added new exports, since homie_dart 2.0.1 introduces new libraries
  • Support for homie_dart 2.0.1

[1.1.1] - 29.07.2019

  • Throw a StateError if connect is called a second time on the same MqttBrokerConnection instance

[1.1.0] - 26.07.2019

  • Added possibility to use credentials (username and password) when connecting a mqtt broker

[1.0.0] - 07.07.2019

  • Initial public release

example/example.dart

import 'package:homie_dart_on_mqtt_client/homie_dart_on_mqtt_client.dart';
import '../../homie_dart/example/example.dart';


Future<Null> main() async {
  BrokerConnection con=new MqttBrokerConnection(server: 'hpserver',port: 1883);
  await test(con);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  homie_dart_on_mqtt_client: ^1.2.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:homie_dart_on_mqtt_client/homie_dart_on_mqtt_client.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
19
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

Primary library: package:homie_dart_on_mqtt_client/homie_dart_on_mqtt_client.dart with components: io.

Health suggestions

Format lib/homie_dart_on_mqtt_client.dart.

Run dartfmt to format lib/homie_dart_on_mqtt_client.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
homie_dart ^2.0.1 2.0.2
meta ^1.1.7 1.1.7
mqtt_client ^5.5.3 5.5.4
typed_data ^1.1.6 1.1.6
Transitive dependencies
charcode 1.1.2
collection 1.14.12
convert 2.1.1
crypto 2.1.3
event_bus 1.1.0
path 1.6.4
pedantic 1.8.0+1