Endless loop of disconnect and reconnect with error code 1 [RESOLVED]

I am getting stuck in a endless disconnect reconnect loop using Cayenne-MQTT-Python. The disconnect code is 1 which is ‘unacceptable protocol version.’ I am using the latest version having cloned the repository only a few days ago. I had it connected and working only yesterday.

Using Raspberry Pi 3 with Python MQTT library.

Using web interface (I don’t know why this would matter.)

My code is here

I have made a small modification to the library in order for it to connect at all. Before this it gave a not enough arguments error and refused to connect at all.

It appears all is working now, not that I’ve changed anything. Did someone change the server?

Not that I’m immediately aware of, and in fact I had another user via email who reported similar behavior. Please let me know if it returns or is an intermittent issue.

I think I have the same problem right now. I am using the Texas Instruments CC3200 Launchpad, and the associated library:

And I am running a simple example code that came with it. I am successfully connected to wifi but not MQTT.

Hi @david.malawey, can I ask if this is something that was previously connected to the Cayenne dashboard OK (in that it at least advanced beyond the screen with the MQTT Username/Password/Client ID and gave you a dashboard? Or is this something that has failed to connect since you started using it?

This is a device that previously gave me a dashboard and had sent values and received commands from a slider widget (about 2 weeks ago).

Thanks, could you share the code you’re using (you can blank out the MQTT Username/Password/Client ID) and any output from the Serial Monitor showing these disconnects?

Here’s the serial monitor:

[3468] Connected to WiFi
[3478] IP:
[3499] Connecting to mqtt.mydevices.com:1883
[34227] MQTT connect failed, error -1
[65967] MQTT connect failed, error -1

And the code is attached.

I don’t see the code attached (if you were emailing in reply, I don’t think the forum software is smart enough to attach it to a post).

However, just from that output I suspect the issue is that your IP address is – I’m guessing that DHCP on the wifi router it’s connected to is not assigning an IP properly to the device.

1 Like

I’ll look into this and get back to you. Thanks!

Confirmed the issue was my AT&T cellular wifi device. I have two. One is not working, and the other is working fine. Thanks!