Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

How to subscribe to multiple feeds?
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.

How to subscribe to multiple feeds?

by jlbeck on Sat Oct 03, 2015 10:55 pm

I'm trying to get my device to subscribe to multiple feeds. The code looks like this:

...
const char ONOFF_FEED[] PROGMEM = AIO_USERNAME "/feeds/pidstatus";
Adafruit_MQTT_Subscribe onoffbutton = Adafruit_MQTT_Subscribe(&mqtt, ONOFF_FEED);

const char SETPOINT_FEED[] PROGMEM = AIO_USERNAME "/feeds/pitsetpoint";
Adafruit_MQTT_Subscribe setpoint = Adafruit_MQTT_Subscribe(&mqtt, SETPOINT_FEED);
...
mqtt.subscribe(&onoffbutton);
mqtt.subscribe(&setpoint);
connect();
...

This results in an error "Failed to subscribe".

What am I missing to make this work?

jlbeck
 
Posts: 26
Joined: Fri Aug 09, 2013 11:45 am

Re: How to subscribe to multiple feeds?

by adafruit2 on Sun Oct 04, 2015 1:59 pm

huh not sure, can you put an issue in with the github repository for the MQTT library? we'll try it out

adafruit2
Site Admin
 
Posts: 19225
Joined: Fri Mar 11, 2005 7:36 pm

Re: How to subscribe to multiple feeds?

by evilc66 on Tue Nov 24, 2015 1:38 pm

Has there been any progress on this? With the latest library release, I can subscribe to 3 feeds pretty reliably, but 4 just flat out doesn't work. All I get is "Connection Failed" when the ESP8266 Huzzah tries to connect to AIO.

evilc66
 
Posts: 9
Joined: Fri Sep 25, 2015 4:16 pm

Re: How to subscribe to multiple feeds?

by adafruit2 on Wed Nov 25, 2015 1:59 pm

nope no ETA at this time!

adafruit2
Site Admin
 
Posts: 19225
Joined: Fri Mar 11, 2005 7:36 pm

Re: How to subscribe to multiple feeds?

by usfwma on Mon Mar 14, 2016 3:59 pm

Has there been any progress on this? I too cannot get more than three subscriptions..
Thanks,
Kevin

usfwma
 
Posts: 1
Joined: Thu Dec 31, 2015 2:16 pm

Please be positive and constructive with your questions and comments.