jerrod-lankford / GarageQTPi

An MQTT server for a raspberry pi garage door opener. Most commonly used as a HomeAssistant cover component.
MIT License
75 stars 36 forks source link

Change MQTT protocol value to 3 #24

Closed rkochman closed 6 years ago

rkochman commented 6 years ago

Protocol value 3 indicates MQTT version 3.1 Fixes #23

jerrod-lankford commented 6 years ago

Where did you get that protocol value 3 means mqtt 3.1? The only paho mqtt documentation I can find says that the protocol should be 'MQTTv3.1' or 'MQTTv3.11'. Im glad that this works for you but I'm a little hesitant to merge it until i can better understand why. I do appreciate the PR though.

https://www.eclipse.org/paho/clients/python/docs/

tagno25 commented 6 years ago

The source code for the client shows that MQTTv31 is 3 and MQTTv311 is 4.

The examples show using just MQTTv31 without quotes, because it is an environment variable in client.py.

jerrod-lankford commented 6 years ago

Fair enough, the documentation is a bit lacking.