wotpy.protocols.mqtt.handlers.event

MQTT handler for Event subscriptions.

Classes

EventMQTTHandler(mqtt_server[, qos, callback_ms]) MQTT handler for Event subscriptions.
class wotpy.protocols.mqtt.handlers.event.EventMQTTHandler(mqtt_server, qos=0, callback_ms=None)

Bases: wotpy.protocols.mqtt.handlers.base.BaseMQTTHandler

MQTT handler for Event subscriptions.

DEFAULT_CALLBACK_MS = 2000
DEFAULT_JITTER = 0.2
build_event_topic(thing, event)

Returns the MQTT topic for Event emissions.

init()

Initializes the MQTT handler. Called when the MQTT runner starts.

teardown()

Destroys the MQTT handler. Called when the MQTT runner stops.