Black Lives Matter - Action and Equality.
0

Mqtt subscribe
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Mqtt subscribe

by PanosProject on Sat Apr 11, 2020 5:21 pm

Hello i need a little bit of help . I am publishing data and i want to be close at real time sending . I am also control a relay with subscribe..but while i m using this fuction (subscription = mqtt.readSubscription(5000))) i have much delay...is it there any suggestion about this? I know i can decrease this 5000 but dont know if its good or bad. Thanks for any response

PanosProject
 
Posts: 6
Joined: Fri Apr 03, 2020 8:13 am

Re: Mqtt subscribe

by brubell on Wed Apr 15, 2020 12:54 pm

This function checks the status of the subscription feed every 5000 milliseconds, keep in mind that you can send data at 30 data points per minute.

brubell
 
Posts: 891
Joined: Fri Jul 17, 2015 10:33 pm

Re: Mqtt subscribe

by PanosProject on Thu Apr 16, 2020 3:17 pm

i am io plus member, and i m using 1 data feed and button subcription what delay you suggest me to try on it?

PanosProject
 
Posts: 6
Joined: Fri Apr 03, 2020 8:13 am

Re: Mqtt subscribe

by Systembolaget on Fri Apr 17, 2020 1:41 am

1000 milliseconds x 60 seconds / 30 per minute = 2000 milliseconds

Systembolaget
 
Posts: 227
Joined: Wed Mar 08, 2017 1:01 pm

Please be positive and constructive with your questions and comments.