Page 1 of 1

Feeds and group name/structure confusion

Posted: Sat Mar 18, 2023 5:55 pm
by movsesk

This may be a silly question, but I can't seem to get this going correctly.

I have an ESP32 device manually publishing to the following, which works great:

But there are multiple of these devices and what I ultimately want is the following:

I can publish to a different MQTT server and all is well, but IO does not seem to like the nested names. I tried creating a "clock/neonixie/1234/" group and later a "clock/neonixie/1234/temperature_f" feed, and many variations of similar... but I could not get it to work. I'm likely not doing something correctly. Maybe I have to nest multiple groups? Like create a "clock" then a "neonixie" then a "1234" ? or ?

I guess the "groups" and "feeds" are a bit foreign to me. Can someone explain in simple terms what I would need to get IO to property store... "myusername/feeds/clock/neonixie/1234/temperature_f" ?

Thank you!


Re: Feeds and group name/structure confusion

Posted: Mon Mar 20, 2023 11:12 am
by brubell
Something like this is a standard MQTT topic. As you've realized, Adafruit IO is like an MQTT broker, but we've got some extra guidelines.

To highlight the difference a bit better,
The full MQTT topic used to describe a Feed in Adafruit IO is in the form, username/feeds/identifier where username should be replaced with the username of the account that owns the Feed and identifier should be replaced with the Name or Key that uniquely identifies the Feed you're talking about.

So, MQTT considers the whole topic test_username/feeds/identifier when validating names but for the purposes of describing Feeds, Adafruit IO is only considering the identifier portion.
(via ... gs-in-mqtt)

You'd want to:
1) Create a new Adafruit IO group named clock (or clock1, since you have multiple)
2) Add a feed, temperature_f, to the group.
3) Access that feed (in your new group) via the API. The API structure should look like this:
and the MQTT structure should look like this:

Re: Feeds and group name/structure confusion

Posted: Wed Mar 22, 2023 5:10 pm
by movsesk

Thank you for the info.

I got it working with all the topics published to the root username/feeds/, but topics, sub topics, groups and feeds.. got a little confusing. Not sure why it wants a "." in the topic, as that is new to me as well. Guess it's the way it was designed. The basic service is free and that is cool, can't complain too much :)

Thanks again!