mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-23 20:39:26 +00:00
bitwarden
This commit is contained in:
parent
524faaf09a
commit
99f052e8b1
@ -238,8 +238,11 @@ if _PUBLISH:
|
|||||||
print("Connected to MQTT Broker!")
|
print("Connected to MQTT Broker!")
|
||||||
else:
|
else:
|
||||||
print("Failed to connect, return code %d\n", rc)
|
print("Failed to connect, return code %d\n", rc)
|
||||||
|
if paho.mqtt.__version__[0] > '1':
|
||||||
|
client = mqttClient.Client(mqttClient.CallbackAPIVersion.VERSION1)
|
||||||
|
else:
|
||||||
client = mqttClient.Client(client_id)
|
client = mqttClient.Client(client_id)
|
||||||
|
|
||||||
client.username_pw_set(username, password)
|
client.username_pw_set(username, password)
|
||||||
client.on_connect = on_connect
|
client.on_connect = on_connect
|
||||||
client.connect(MQTT_HOST, MQTT_PORT)
|
client.connect(MQTT_HOST, MQTT_PORT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user