Skip to main content

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.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qtoggleserver-mqtt 1.3.3
File Size Uploaded
qtoggleserver_mqtt-1.3.3.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qtoggleserver-mqtt 1.3.3
File Interpreter ABI Platform
qtoggleserver_mqtt-1.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / qtoggleserver_mqtt-1.3.3.tar.gz

Download URL qtoggleserver_mqtt-1.3.3.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6335cc407605adb547f7e36abf29926e68aceeca080d771b71ff8c81d204c47e
BLAKE2b-256 checksum
How to use checksums
92a37a0e052ddfde3b7beb68b23b9e7c46b7768c0ac354235527d7547ae38a43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / qtoggleserver_mqtt-1.3.3-py3-none-any.whl

Download URL qtoggleserver_mqtt-1.3.3-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd71bc5749be2971534741dd39ec52cb69e102c5106066f99b11725d5e34a6f1
BLAKE2b-256 checksum
How to use checksums
6428c1102cc903ec7e973e8c8eb1b0e64e0a04448e5cb079e7f5bf2a898f9286
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.3.3 This release

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page