[SOLVED] Is there a limit in the payload of MQT Packages?

Hello Community,

I hope you all readers are doing fine!

I am having troubles sending a MQTT-package with a payload bigger than 255 bytes.
I changed the limit of my PubSub.h library I am using (I tried 1024, and then 512), but I still have problems: I don’t receive anything on the Ubidots side.

I don’t know if the problem is on the device side or on the cloud side.

Any thoughts? Any experience?

Thanks a lot in advance and enjoy the rest of the day!

Francisco

Hello @fmir,

The maximum payload size supported by Ubidots is of 10000 bytes.

Just for testing purposes, I made a test using MQTT Lens sending a package of 300 bytes and the data was properly received in the Ubidots side.

My recommendation here is split the data which is going to be posted, sending them separately but with the same timestamp taking in count the maximum payload size supported by the library used.

To give you a better idea of how to build the payload reference below:

Payload #1:

{"temperature-1": {"value": 123, "timestamp": 1531335925000}, "temperature-2": {"value": 123, "timestamp": 1531335925000}, "temperature-3": {"value": 123, "timestamp": 1531335925000}}

Payload #2:

{"temperature-4": {"value": 123, "timestamp": 1531335925000}, "temperature-5": {"value": 123, "timestamp": 1531335925000}, "temperature-6": {"value": 123, "timestamp": 1531335925000}}

I hope this would help you!

All the best,
Maria C.

Thanks MC!
It looks like my problem is on the side of the library.
I separated the packages :wink:

Have a great week!

Francisco

You are welcome Francisco! :smiley:

Have a great week!

All the best,
Maria C.