Get function / mqtt retain flag

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.
Locked
User avatar
aidan_the_tinkerer
 
Posts: 50
Joined: Fri Nov 01, 2019 2:48 pm

Get function / mqtt retain flag

Post by aidan_the_tinkerer »

Does the get(); or /get function work with the Adafruit MQTT library or only with the Adafruit.IO library.

Thanks,

Aidan

User avatar
aidan_the_tinkerer
 
Posts: 50
Joined: Fri Nov 01, 2019 2:48 pm

Re: Get function / mqtt retain flag

Post by aidan_the_tinkerer »

Is the below an intended usage of the /get function?

Adafruit_MQTT_Subscribe stream = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME + "/feeds/stream/get");

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: Get function / mqtt retain flag

Post by brubell »

Is the below an intended usage of the /get function?

Correct, you'd want to subscribe to the following topic:

Code: Select all

username/f/stream/get
https://io.adafruit.com/api/docs/mqtt.html#mqtt-retain

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”