I got to where you were.
That error, at least with me, the topic zoneminder/monitor_id gets info, an example with HiveMQTT from my addon.
2019-06-20 19:24:18
Topic: zoneminder/1
Qos: 0
{"monitor":"1","eventid":"686","state":"alarm","name":"Porta:(686) Forced Web "}
So check if the info is there or not on your case.
That error always is there, because after publishing the zmeventserver drops the connection, seamingly without calling a the proper disconnect method from NET::MQTT::Simple
I am trying some tinkering with the zmeventnotification.pl script to see if i can get the connection dropped properly.
Also there is a bug on one of the .pl scripts at this location (in my install ofcourse)
/usr/local/share/perl/5.22.1/Net/MQTT/Simple/Auth.pm
On the line 25, where the default stuff is:
package Net::MQTT::Simple::Auth;
use parent 'Net::MQTT::Simple';
our $VERSION = '0.001';
sub new {
my ($class, $server, $user, $password, $sockopts) = @_;
# @_ == 2 or @_ == 3 or _croak "Wrong number of arguments for $class->new";
my $self = $class->SUPER::new ($server, $sockopts);
$self->{mqtt_user} = $user;
$self->{mqtt_password} = $password;
return $self;
}
sub _send_connect {
my ($self) = @_;
$self->_send("\x10" . Net::MQTT::Simple::_prepend_variable_length( pack (
"x C/a* C C n n/a* n/a* n/a*",
$Net::MQTT::Simple::PROTOCOL_NAME,
#0x04,
$Net::MQTT::Simple::PROTOCOL_LEVEL,
0xC2,
$Net::MQTT::Simple::KEEPALIVE_INTERVAL,
$self->_client_identifier,
$self->{mqtt_user},
$self->{mqtt_password}
)));
Your file will have 0x03 that is MQTT 3.1 not 3.1.1, so that was also my error.
If you put, 0x04, it will use 3.1.1 protocol, but the best solution is to use the variable name that is on my code, since thtat value is set on another file of the Net::MQTT::Simple library.
At this point i could create a binary sensor for receiving alarms on initial movement, but have to reset the sensor on a time basis because zoneminder, nor zmninja send a alarm off when the movement stops, so it has to be time based.
I am trying to clear that error from the log, but since i dont know perl, it is basicaly a hack job
Hope it helped you with your problem.
Best regards