QGIS Plugin to integrate QGIS with MQTT
Target platform QGIS 2.8
- Refactored code - seperate topic managers from brokers
- Examples of V2EditWidgets in topic managers provided
- Added Dock Views
- Multiple minor enhancements
- Broker manager to manage a list of brokers and connection parameters
- Topic Managers (extensible) to support different "types" of Topics and Layer Formats
- Integration with MQTT via Mosquitto/Paho client library
- Connections and updates within dedicated thread
- Enter Settings to start adding your brokers
- Create a New Telemetry (Point) Layer - selecting the Broker and Topic Type
- Add Features - enter name, topic
- Edit features (double click on Broker Group in legend then double click on feature (respects edit layer edit mode)
To install and use the Sample Plugin:
- Clone the git
- Copy the sampleplugin folder to your QGIS plugins folder (i.e. ~/.qgis2/python/plugins)
- Enable it via the Plugins menu
Right now I have only 3 types of topic manager/widget interfaces. And the logic for controlling the SVG gauge is not written.
However, as this release represents a major refactor with many fixes - and flags the shape of things to come - I release it now so that the Plugin can be reviewed and those interested to assist can come on board.
The architecture now is quite solid with much flexibility in determining the representation of a widget
Some architectural insights below:
- Topic managers are singleton stateless sub classes from the main tlTopicManager class
- They allow fine grained configuration of the layer's rules, symbols, addtional feature fields, widgets and formatters
- qgsfunctions are used extensively - feature['context'] field is used so that the formatting of the payload can be context sensitive. Custom qgsfunctions can also be used to flag an alert state.
- to view data within the dock view (see Feature List then double click a feature) FeatureDock is sub classed. Instead of subclassing the base class you can subclass the Text, Form, or SVG FeatureDocks. See examples under topicmanager folder.
Notes on version numbers: these have been handled badly. The code < 1 but we were forced to use 1 when moving to a.b.c version format. Please consider 1.x.x to be alpha. 2.x.x beta. And 3.x.x production when we get there.
This is very alpha software and still has many features not implemented. It is recommended for developers only and must NOT be used on production projects! We accept no liability
The code has been developed on a Mac using OSX 10.9.4.
Am looking for assistance to bring the plugin to an improved state of maturity.
The latest release fixes a lot of issues. See the commit change log in GIT
Constructive feedback is welcome
This is my top list. There's lots more of course!
- integrate with QGIS native help with splash screen showing new features
- document topic manager API
- Add support for 3rd party registration of topic managers
- Add additional FeatureDock/TopicManager types. Get SVG graphics for instruments working
- Change reading .qml files to python code when formatting a layer's Rulei based renderer
- Create / extend SVG Feature Dock functionality
- Improve memory usage and Add plugin reloader support for dynamicly created topicmanagers
If you want to help with any of this, please get in touch
Andrew McClure email@example.com