=================
- Add support for wildcard certificates. Closes #440547.
+- Default connection behaviour has been reverted to MQTT v3.1 instead of
+ v3.1.1. There is as yet insufficient support for v3.1.1 to rely on, and
+ current v3.1 implementations do not return the correct CONNACK code to allow
+ detection of the fault. Closes #451735.
v1.0.2 - 2014-09-13
MQTT_LOG_ERR, and MQTT_LOG_DEBUG. The message itself is in buf.
"""
- def __init__(self, client_id="", clean_session=True, userdata=None, protocol=MQTTv311):
+ def __init__(self, client_id="", clean_session=True, userdata=None, protocol=MQTTv31):
"""client_id is the unique client id string used when connecting to the
broker. If client_id is zero length or None, then one will be randomly
generated. In this case, clean_session must be True. If this is not the
The protocol argument allows explicit setting of the MQTT version to
use for this client. Can be paho.mqtt.client.MQTTv311 (v3.1.1) or
- paho.mqtt.client.MQTTv31 (v3.1), with the default being v3.1.1. If the
+ paho.mqtt.client.MQTTv31 (v3.1), with the default being v3.1. If the
broker reports that the client connected with an invalid protocol
version, the client will automatically attempt to reconnect using v3.1
instead.
def multiple(msgs, hostname="localhost", port=1883, client_id="", keepalive=60,
- will=None, auth=None, tls=None, protocol=mqtt.MQTTv311):
+ will=None, auth=None, tls=None, protocol=mqtt.MQTTv31):
"""Publish multiple messages to a broker, then disconnect cleanly.
This function creates an MQTT client, connects to a broker and publishes a
def single(topic, payload=None, qos=0, retain=False, hostname="localhost",
port=1883, client_id="", keepalive=60, will=None, auth=None,
- tls=None, protocol=mqtt.MQTTv311):
+ tls=None, protocol=mqtt.MQTTv31):
"""Publish a single message to a broker, then disconnect cleanly.
This function creates an MQTT client, connects to a broker and publishes a