Closed wavesailor closed 3 months ago
The "on_publish" event callback is missing in the class IO_MQTT which is defined in the library module adafruit_io.py. This for the latest library version: adafruit-circuitpython-bundle-py-20240702.zip
class IO_MQTT: ... def __init__(self, mqtt_client): ... # User-defined MQTT callback methods must be init'd to None self.on_connect = None self.on_disconnect = None self.on_message = None self.on_subscribe = None self.on_unsubscribe = None # MQTT event callbacks self._client.on_connect = self._on_connect_mqtt self._client.on_disconnect = self._on_disconnect_mqtt self._client.on_message = self._on_message_mqtt self._client.on_subscribe = self._on_subscribe_mqtt self._client.on_unsubscribe = self._on_unsubscribe_mqtt self._connected = False ... ...
It is defined in the class MQTT in library module adafruit_minimqtt.py
class MQTT: ... def __init__( ... # Default topic callback methods self._on_message = None self.on_connect = None self.on_disconnect = None self.on_publish = None self.on_subscribe = None self.on_unsubscribe = None .... ...
@tyeth Want to take a look?
The "on_publish" event callback is missing in the class IO_MQTT which is defined in the library module adafruit_io.py. This for the latest library version: adafruit-circuitpython-bundle-py-20240702.zip
It is defined in the class MQTT in library module adafruit_minimqtt.py