[SOLVED] MQTT slow response


#1

Dear all

I use MQTT for get value from Ubidots, but Ubidots very slow response to payload. Take a new data from 3 mins to 10 mins

Can any one help me

Thank all


#2

Greetings @Thuongnc, please make sure that you are subscribing to industrial.api.ubidots.com and your internet connection reliability. I have made a test at my side and the value is retrieved almost inmediately if you subscribe to two different topics:

All the best


#3

Dear Jotathebest
my code same:
client1.setServer(“industrial.api.ubidots.com”, 1883);
client1.setCallback(callback1);

but very slowly
My internet speed is 45.5 Mbps


#4

and subscribe
//------ Subscribe client 1----------

  char topicToSubscribe[200];
  sprintf(topicToSubscribe, "%s", ""); // Cleans the content of the char
  sprintf(topicToSubscribe, "%s%s", "/v1.6/devices/", DEVICE_LABEL);
  sprintf(topicToSubscribe, "%s/%s/lv", topicToSubscribe, VARIABLE_LABEL1);
  client1.subscribe(topicToSubscribe);

can you help me ! Thank


#5

Dear Jotabest
I found !
for me : ubidotsSetBroker (“business.api.ubidots.com”) is OK

like charm


#6

I try MQTT with ESP8266 by broker “business.api.ubidots.com” , It is run very fast

but try with Ethernet Card , response slowly


#7

Greetings @Thuongnc , based on your report, the issue may be with your Ethernet card rather than with Ubidots. My advise is to try to use a probed MQTT library like PubSubclient to retrieve values, you can find an example at our docs section.

All the best


#8

Please cek your speed connection