wotpy.protocols.mqtt.handlers.event
MQTT handler for Event subscriptions.
Classes
|
MQTT handler for Event subscriptions. |
- class wotpy.protocols.mqtt.handlers.event.EventMQTTHandler(mqtt_server, qos=0, callback_ms=None)
Bases:
BaseMQTTHandlerMQTT handler for Event subscriptions.
- DEFAULT_CALLBACK_MS = 2000
- DEFAULT_JITTER = 0.2
- build_event_topic(thing, event)
Returns the MQTT topic for Event emissions.
- async init()
Initializes the MQTT handler. Called when the MQTT runner starts.
- async teardown()
Destroys the MQTT handler. Called when the MQTT runner stops.