About
This is an addon for qToggleServer.
It pushes events to an MQTT broker.
Install
Install using pip:
pip install qtoggleserver-mqtt
Driver & Parameters
This is add-on provides an event handler that will connect to the MQTT broker and will push desired events in a specified format.
The message payload is constructed from a template, as indicated by Template Notifications. By default, no templates are specified and the payload will be the template context serialized as JSON.
driver: qtoggleserver.mqtt.MQTTEventHandler
server
- type:
string - default: required
- example:
"test.mosquitto.org"
port
- type:
integer - default:
1883
tls_enable
Controls TLS support.
- type:
boolean - default:
false
tls_verify
Whether to verify the server-supplied certificate. Disabling this will effectively disable server authentication, ensuring only data transmission encryption.
- type:
boolean - default:
true
tls_ca
Full path to CA file, for self-signed certificates.
- type:
string - default:
null
tls_cert
Full path to client certificate file, for client authentication.
- type:
string - default:
null
tls_key
Full path to client certificate key file, for client authentication.
- type:
string - default:
null
username
Indicates a username to supply for authentication. The value is in fact a template that can be customized following the
rules described in Template Notifications. The
available context is limited however to device_attrs.
- type:
string - default:
null
password
Indicates a password to supply for authentication. The value is in fact a template that can be customized following the
rules described in Template Notifications. The
available context is limited however to device_attrs.
- type:
string - default:
null
client_id
Indicates the MQTT client id to use. The value is in fact a template that can be customized following the rules
described in Template Notifications. The
available context is limited however to device_attrs.
- type:
string - default:
{{device_attrs.name}}
reconnect_interval
Represents the interval, in seconds, between two (re)connection attempts to the MQTT server.
- type:
integer - default:
5
topic
Indicates the MQTT topic to which to publish the message. The value is in fact a template that can be customized following the rules described in Template Notifications. The available context can be used to construct topics specific to each device, port, event type, etc.
- type:
string - default:
{{device_attrs.name}}
json_context_fields
Used only when template and templates are unset, when the payload consists of a JSON-dumped context. Indicates which
context fields to include in the payload. If null, will include all fields.
- type:
string[] - default:
null
qos
Sets the QoS MQTT level:
-
0- at most once -
1- at least once -
2- exactly once -
type:
integer -
default:
0
client_logging
Indicates whether the logs generated by the MQTT client will be added to the qToggleServer logging system or not.
- type:
boolean - default:
false
filter
See Event Handlers for details on filtering events.
- type:
dictionary - default:
null
template
See Template Notifications for details on
specifying templates. Keep in mind that default templates for this driver are null.
- type:
string - default:
null
templates
See Template Notifications for details on
specifying templates. Keep in mind that default templates for this driver are null.
- type:
dictionary - default:
null
Metadata
Release files for qtoggleserver-mqtt 1.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qtoggleserver_mqtt-1.3.4.tar.gz | 8.2 kB | Without provenance | Details for qtoggleserver_mqtt-1.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qtoggleserver_mqtt-1.3.4-py3-none-any.whl | Python 3 | none | any | Details for qtoggleserver_mqtt-1.3.4-py3-none-any.whl |
Total release size: 16.8 kB
Release files / qtoggleserver_mqtt-1.3.4.tar.gz
| Download URL | qtoggleserver_mqtt-1.3.4.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ea38a09edca6361a31573b3533b0a96205374fd840af2aab6a7811c1e2cd94d
|
|
BLAKE2b-256 checksum How to use checksums |
3ff4f6a3e47bf80247526d40a3cbf83063b5bd5bfb28daf7af06b99a813c6fdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / qtoggleserver_mqtt-1.3.4-py3-none-any.whl
| Download URL | qtoggleserver_mqtt-1.3.4-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bba23bcef04be4101d26d7afad1d7ffc41d5fedc0e577657b465edc73cd0ac59
|
|
BLAKE2b-256 checksum How to use checksums |
750d914873e61028f414b1a162a52aa73d9d30f52434fb9b027ad1129388dbd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for qtoggleserver-mqtt 1.3.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.