Library to comunicate with MQTT following Sparkplug B estandard
Project description
Async Sparkplug B
Asyncronous implementation in python of the Sparkplug B standard for MQTT protocol
Test and Deploy
In the cicd directory you have scripts for helping the test of the library. It is necessary to have docker-compose and docker installed to run locally a Mqtt Broker and run integration and acceptance tests.
- run-all-tests.sh: Run all the tests
- setup-environment.sh: Open a mosquitto MQTT broker in a container to develop the test. It will clear all active containers.
- teardown-environment.sh: Close environment of testing (only the affected)
Architecture
The application runs asyncronously some tasks:
scanner: runs the scanning proccess of the metrics.commands: listen to commands and
Edge Node
The edge node has been implemented under a state machine pattern. These are the states and transitions of edge node objects:
Disconnected: Initial state, until the client has not established a session and it is not connected to mqtt server, the scanning process is not started. If the client establish a session but conneestablish_session: kj fskkk
Online: The edge node is scanning and sending messages tolost_mqtt_server_connection: transition toOfflinestate.
Offline: The edge node is scanning and trying to connect to Host mqtt server.connected_to_mqtt_server: transition toOnline- ``
4 bridge
The host bridge is not really a host application in the sense of Sparkplug B specification. It is a component to be used by a host application. It helps to the REAL application to comunicate to the edge nodes:
- Recieving the messages from all nodes conected to broker, following a Observer pattern.
- Send writing metric requests (lets call `` from now).
The interface with this reponsability is really easy:
observe_nodesend_command
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiospb-8.0.6.tar.gz.
File metadata
- Download URL: aiospb-8.0.6.tar.gz
- Upload date:
- Size: 33.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/5.15.154+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7119ba94a39321be11b8a0875d6a75ad880d79581a6afd46b1056c978b6ddab6
|
|
| MD5 |
8e0838ed4eec9d98faafd6b3cbd22d0f
|
|
| BLAKE2b-256 |
aee6f229095494a6f287139e62a0086df478f5f167d176f0d4f7c83cd0f9fa6a
|
File details
Details for the file aiospb-8.0.6-py3-none-any.whl.
File metadata
- Download URL: aiospb-8.0.6-py3-none-any.whl
- Upload date:
- Size: 44.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/5.15.154+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd1527a6ff31ad33a936fee0213476b891bd3bccf5d0d18e11fb739d46f1bc30
|
|
| MD5 |
f3e9c81c20a74f91e66b895e476addc6
|
|
| BLAKE2b-256 |
84e885bc657b582486e2ce61ba16db1a65bb679bcfc6498ec65e69713d4d192a
|