All notable changes for pysparkplug
will be documented in this file.
This project adheres to Semantic Versioning and Keep a Changelog.
- Support for array datatypes, i.e. INT8_ARRAY, INT16_ARRAY, INT32_ARRAY, INT64_ARRAY, UINT8_ARRAY, UINT16_ARRAY, UINT32_ARRAY, UINT64_ARRAY, FLOAT_ARRAY, DOUBLE_ARRAY, STRING_ARRAY, BOOLEAN_ARRAY, and DATETIME_ARRAY.
- Payload
metrics
attribute is now type annotated and implemented as atuple
. DATETIME
datatypes are no longer all treated as UTC, instead properly converting them to the UTC timezone. Naive datetime objects are thus treated as the local timezone.- Unsupported datatypes now raise a
NotImplementedError
when attempting to encode/decode them instead of aValueError
.
- Pysparkplug now supports Python 3.13
EdgeNode.disconnect
now correctly sends an NDEATH payload.
- Pysparkplug no longer supports Python 3.8, which has reached its end of life.
- Fixed topic for DDATA payloads resulting from the
EdgeNode.update_device
method.
- Pysparkplug is not compatible with the new 2.0 releasee of Paho, the underlying Python MQTT client.
- Pysparkplug now supports Python 3.12
- Pysparkplug no longer supports Python 3.7, which has reached its end of life.
SINGLE_LEVEL_WILDCARD
andMULTI_LEVEL_WILDCARD
wildcards for subscribing to multiple MQTT topics, conveniently typed to pass type checking
- Refactored how dependencies are entered into the package's metadata, using
hatch-requirements-txt
referencingrequirements/requirements.txt
- Removed
Topic.to_string()
, since users should just usestr(topic)
.
- Explicitly making
MetricValue
available from the top-level package, resolving any type annotation issues. - Fixed bug with implementation of
StrEnum
that resulted in enums not converting correctly to string. This resulted in topics not rendering to string correctly, since themessage_type
attribute wasMessageType
, an instance ofStrEnum
. - Fixed bug with topic component validation, which was using the wrong wildcard constants
"#*"
instead of the correct"#+"
.
Client
low-level MQTT clientClientOptions
class of optional settings for an MQTT clientConnackCode
MQTT Connection Acknowledgement codesDBirth
class representing a DBirth payloadDCmd
class representing a DCmd payloadDData
class representing a DData payloadDDeath
class representing a DDeath payloadDataType
enumeration of Sparkplug B datatypesDevice
class representing a Device in Sparkplug BEdgeNode
class representing an EdgeNode in Sparkplug BErrorCode
MQTT error codesMQTTError
Error from MQTT clientMQTTProtocol
MQTT protocol enumMessage
class representing a Sparkplug B messageMessageType
Sparkplug B message type enumMetric
class representing a Sparkplug B metricMetricValue
type alias for the Python type of the value of a Sparkplug B metricNBirth
class representing a NBirth payloadNCmd
class representing a NCmd payloadNData
class representing a NData payloadNDeath
class representing a NDeath payloadQoS
MQTT quality of service enumState
class representing a State payloadTLSConfig
TLS configuration classTopic
class representing a Sparkplug B topicTransport
MQTT transort enumWSConfig
Websockets configuration classget_current_timestamp
returns current time in a Sparkplug B compliant format