In this topic I had endless connection/deconnection loop with your Paho-based plugin and my warkaround was... to stick to the old Mosquitto-based one.
I just found the issue with the Paho plugin when posting this post (this is why it has been edited): to create a 2nd subscription, I copy/paste the 1st one which results in the 2 subscription to have same MQTT-clientID. When changing the MQTT-clientID to different values, I no longer get the problem.
Below is a the Eg config that subscribes 2 topics on test.mosquitto.org broker and produces the looping behavior. I let you tell if this is normal behavior as per MQTT spec or if it a bug.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1722" Guid="{40F7E6BE-17C0-44C6-9B54-954ECA0AB06A}" Time="1508530026.72">
<Autostart Name="Autostart" Expanded="True">
<Plugin Identifier="MQTTthreads" Guid="{D5CCABA6-8E20-4B59-A7A7-9C197F91037F}" File="MQTT Client">
gAIpLg==
</Plugin>
</Autostart>
<Folder Name="<unnamed folder>" Expanded="True">
<Macro Name="MQTT Client: Start a new MQTT subscription " Expanded="True">
<Action Name="Subscribe topic1">
MQTTthreads.MQTTclient(u'topic1', u'test.mosquitto.org', 1883, u'eg_topic1', False, '979305467018', False, False, u'username', u'password', False, u'', u'', u'', u'TLSv1.2')
</Action>
<Action Name="Subscribe topic2">
MQTTthreads.MQTTclient(u'topic2', u'test.mosquitto.org', 1883, u'eg_topic2', False, '979305467018', False, False, u'username', u'password', False, u'', u'', u'', u'TLSv1.2')
</Action>
</Macro>
</Folder>
</EventGhost>

