[SOLVED] Random publishing to Ubidots with Paho MQTT

Hello,

Since a few months, I’ve been working on sending variables to Ubidots for a project via a python script with Paho MQTT. Code was functioning properly but since last month, with the same code, I have a erratic behavior on Ubidots where I send variables. Nothing seems to be received by Ubidots, or one in 10 minutes, one in 2 hours, never receiving or receiving every packets sent.
By looking in wireshark, I can see packets sent to Ubidots and what seems to be response from Ubidots to this packets. And in the script when I enable logs, I can see PUBACK from my messages which gets me confused.
I thought that maybe a problem with my internet connexion could be responsible somehow but after I tried multiple sources (wifi, ethernet, 4G network), problem is still there.
I tried simpler codes like http://help.ubidots.com/developer-guides/connect-to-ubidots-mqtt-broker-with-tls-security (without ssl implementation), but it remains the same.
My biggest concern is that connexion to Ubidots seems to work, subscribing too (I’m receiving variables of subscribed topics) but when it tries to publish, it has this issue.
Is there anybody that have experienced this or could have an idea what can cause it?

Thank you

Greetings, are you using an educational account? If yes, how many devices do you have right now? You can have up to 20 devices with an educational license, so if you can subscribe properly I suspect that you have reached the max number of available devices as right now we do not report issues with our educational broker.

All the best.

Thanks for the quick answer.
Indeed, I am using an educational account. However I have 5 devices currently “active” and for my final and full system it will not exceeds 9 devices.
Is there a way to determine if all the subscriptions and publications have been done properly?

What is your username in the educational platform? Also, can you test your mqtt settings using MQTT Lens as is done here? in that way we can discard issues in your firmware.

All the best.

Hello,

My username in the platform is jpetit.
I tried as you suggested via MQTT Lens and I’m having a less erratic behavior (1 success out of 10) but still ongoing…
It that means that this problem would be on my side only?

Hi there, please gently check again and let me know how your test goes.

All the best

Hello,
After checking, I can say that it is now back to normal, Ubidots receives every packet I send to it.
However I’m getting some problem when I use QoS in MQTT. If I use a QoS of 2 (highest level with a couple acknowledgments between the client and Ubidots) I don’t get the PUBREC from Ubidots causing the client to keep publishing this packet after a certain interval.
The others levels of QoS are working fine.
Do you have any idea where it could be caused ?
Thank you

Greetings, I am glad to know that it works properly for you. Actually, our broker supports QoS 0 and 1, QoS 2 is supported under premium deployment so I advise you to use one or zero or to contact to sales@ubidots.com if you need higher QoS for your custom application.

All the best.