Subject: | $Net::MQTT::Simple::PROTOCOL_LEVEL is not respected causing issues with Mosquitto (v1.24) |
Date: | Sat, 28 Nov 2020 01:55:46 +0000 |
To: | bug-Net-MQTT-Simple [...] rt.cpan.org |
From: | Alan Pearson <alandpearson [...] gmail.com> |
Hi there,
I have had issues with MQTT::Simple not working with later versions of
Mosquitto, where Mosquitto throws the errors:
Invalid protocol version 3 in CONNECT from <IP of MQTT:Simple client>
Client <unknown> disconnected due to protocol error.
After a long time trawling the web, the solution was found here :
https://community.home-assistant.io/t/zoneminder-zone-specific-alarms/92227/5
Which boils down to the Protocol level being hardcoded in Auth.pm, line 25.
The solution was to use $Net::MQTT::Simple::PROTOCOL_LEVEL variable
instead of hardcoded 0x03 (MQTT v3.1) in the current 1.24 version of Auth.pm
Hope this helps someone.
Thanks
Alan