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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qtoggleserver_mqtt-1.3.2.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qtoggleserver_mqtt-1.3.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file qtoggleserver_mqtt-1.3.2.tar.gz.

File metadata

  • Download URL: qtoggleserver_mqtt-1.3.2.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for qtoggleserver_mqtt-1.3.2.tar.gz
Algorithm Hash digest
SHA256 f840ee28dd82c5e3db34bbdbb7f93be64f4a430d6348645fe5e913b74ab38d98
MD5 cc953f2fae1d2d17fef36a6231f89db6
BLAKE2b-256 512d792cd357fb9fb61e97f08c061a1e415b1c6bdb5165073e3355016f22ead6

See more details on using hashes here.

File details

Details for the file qtoggleserver_mqtt-1.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for qtoggleserver_mqtt-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7e1fe61766fafabbdbfe904d733dd13238bfae10d01baa16e930aa888d2bf3e4
MD5 3f7e5adfc7555062eb3d44e500b85525
BLAKE2b-256 a996351d53223e4ef64d8d451e39d6aba233bcb81361527729f8c714472d6e8f

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.3

2 files

This release

1.3.2 This release

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page