0

MQTT not seeing messages on feed
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MQTT not seeing messages on feed

by mephex on Wed May 10, 2017 9:59 pm

I've got a few devices that up until a couple of days ago were working fine. Three RPi0W with Blinkt led strips all subscribed to a "lights" feed. Several times a day new messages are read off the feed to control these lights. Then a day or so ago they stopped working, no longer seeing any new messages. I am using an IO dashboard to push new messages, I also used the devices to publish messages which works, but they don't see anything being written to the feed. I realize this seems like something on my end, however nothing had changed. Has anyone else seen behavior like this? I had been using this feed for about 19 days before this started happening. Just checking before I start rewriting. Thanks!

mephex
 
Posts: 5
Joined: Fri Jan 01, 2016 11:11 pm

Re: MQTT not seeing messages on feed

by garyvdg on Thu May 11, 2017 9:29 am

I am experiencing the same issue. Publishing feeds with MQTT keep working fine but subscription feeds stopped working a a few days ago. At best, they work sporadically (occasionally) for one of my devices.

Of particular concern in this regard is that there does not seem to be any Adafruit monitoring or response to postings on the IO forum for a number of weeks now, so it's not possible to know if there is any issue on their end.

garyvdg
 
Posts: 67
Joined: Thu Jul 25, 2013 12:37 pm

Re: MQTT not seeing messages on feed

by josephdpearson on Thu May 11, 2017 10:48 am

I too am having issues where my Raspberry Pi running node-red isn't 'seeing' anything written to my Adafruit feed. I've tested my flows by injecting information manually into the flow, the flows are still working fine and they're still able to write to the Adafruit feed. All my MQTT broker connections are showing up as green and connected.

So far as I can tell this appears to be an issue with Adafruit's systems, hopefully it'll be resolved sooner rather than later.

josephdpearson
 
Posts: 2
Joined: Wed May 10, 2017 5:09 pm

Re: MQTT not seeing messages on feed

by jwcooper on Thu May 11, 2017 1:50 pm

Do you have examples of subscription topics that are causing issues? Feel free to scrub the feed name. We're looking into this issue and could use the extra data to determine what the issue is.

jwcooper
 
Posts: 541
Joined: Tue May 01, 2012 9:08 pm

Re: MQTT not seeing messages on feed

by garyvdg on Thu May 11, 2017 3:15 pm

At present I am experiencing the following. I have a Dashboard with a Toggle Button with the button text as either ON or OFF tied to a subscription feed. When I toggle this button on the dashboard, no message comes through to my device after numerous attempts to toggle back and forth. However, when I go to the feeds list and select the relevant feed and then add date manually (either ON or OFF), then the subscription does come through (seemingly consistently) and my device acts accordingly. At the same time, the toggle button on the dashboard changes state as if it had been pressed.

If I turn my device ON with the the add data method, I am then not able to turn it OFF with the toggle button on the dashboard. Likewise, when I turn my device OFF with the the add data method, I am then not able to subsequently turn it OFF with the toggle button on the dashboard.

garyvdg
 
Posts: 67
Joined: Thu Jul 25, 2013 12:37 pm

Re: MQTT not seeing messages on feed

by mephex on Thu May 11, 2017 3:57 pm

I'm not experiencing any intermittent behavior. I deleted the feed/topic I'd been subscribed and publishing to last night and recreated it. The devices can publish, but are not able to see messages coming from this feed. I am verifying the data is being published by using a dashboard in IO. This isn't intermittent in my case, no devices subscribed to this topic are seeing any messages.

mephex
 
Posts: 5
Joined: Fri Jan 01, 2016 11:11 pm

Re: MQTT not seeing messages on feed

by mephex on Thu May 11, 2017 6:28 pm

I just gave this a go again and am now seeing messages. It seems to be working again! Thanks for your help!

mephex
 
Posts: 5
Joined: Fri Jan 01, 2016 11:11 pm

Re: MQTT not seeing messages on feed

by josephdpearson on Fri May 12, 2017 12:56 pm

Likewise, my feeds appear to be working properly once again. Thank you for the exceptionally quick fix.

josephdpearson
 
Posts: 2
Joined: Wed May 10, 2017 5:09 pm

Re: MQTT not seeing messages on feed

by abachman on Fri May 12, 2017 1:59 pm

Hi all!


Thank you for your patience, we're juggling a few, relatively major internal changes on io.adafruit.com and are stabilizing now. The downside is occasional hiccups, the upside is being able to push a lot more data through the system, storing it for longer, with fewer servers. Trying to plan for the future, y'know?

What you all were probably seeing in the last week is a shift in the way we communicate MQTT messages internally from the backend back out to subscribers. As part of the shift we deprecated some of the subscription topics that are produced when new data is received by a feed. The data was still being stored in the feed properly, and it was even being sent back out to some subscribers, but in cases where you were subscribed to a deprecated topic--for example, broadcast of "short type with feed name as key" topics like `username/f/Office Temperature` were turned off--it would appear as though data disappeared. That's probably what happened, anyways.

We restarted most of the topics for now (everything except location based topics) and will do better at announcing when we're going to make breaking changes. Just as a pre-pre-warning though, wherever you are able, use your feeds' "key" to refer to it in code and use the full "feeds" . You can find the proper key for a given feed on the Feeds page on Adafruit IO (screenshot below). So instead of `username/f/Office Temperature`, use `username/feeds/office-temperature`.

Image

When in doubt or if you ever want to check and if you have access to an MQTT client outside of an embedded device, try subscribing to `username/#` (your username + forward slash + the pound sign). That will show you everything that's broadcast when you push data to a feed. That can let you see both what topics we're broadcasting, and let you verify that data is coming through.

Just now on io.adafruit.com, publishing a single value to my feed named "Timing Check" produced MQTT messages on these topics:
Code: Select all | TOGGLE FULL SIZE
abachman/dashboard/stream/create/public
abachman/dashboard/stream/create
abachman/f/648056/csv
abachman/f/648056/json
abachman/f/648056
abachman/f/Timing Check/csv
abachman/f/Timing Check/json
abachman/f/Timing Check
abachman/f/timing-check/csv
abachman/f/timing-check/json
abachman/f/timing-check
abachman/feeds/648056/csv
abachman/feeds/648056/json
abachman/feeds/648056
abachman/feeds/Timing Check/csv
abachman/feeds/Timing Check/json
abachman/feeds/Timing Check
abachman/feeds/timing-check/csv
abachman/feeds/timing-check/json
abachman/feeds/timing-check
abachman/g/58139/csv
abachman/g/58139/json
abachman/g/58139
abachman/g/Default/csv
abachman/g/Default/json
abachman/g/Default
abachman/g/default/csv
abachman/g/default/json
abachman/g/default
abachman/groups/58139/csv
abachman/groups/58139/json
abachman/groups/58139
abachman/groups/Default/csv
abachman/groups/Default/json
abachman/groups/Default
abachman/groups/default/csv
abachman/groups/default/json
abachman/groups/default


They're all carrying the same information, basically, just in different formats with different details. You can probably tell both why using `username/#` as your primary MQTT subscription topic is a little heavy, and why we're trying to cut back a bit on how much we broadcast :D


Cheers,
Adam B

abachman
 
Posts: 21
Joined: Mon Feb 01, 2010 12:48 pm

Re: MQTT not seeing messages on feed

by mephex on Sat May 13, 2017 2:12 pm

This is fantastic. Thanks for for everyone taking the time to post, I thought I was going crazy. And such an informative summary to wrap up. I've refactored to use username/feeds/key which seems to be working well. I didn't realize there were so many topics for a feed, more to learn!

mephex
 
Posts: 5
Joined: Fri Jan 01, 2016 11:11 pm

Re: MQTT not seeing messages on feed

by abachman on Mon May 15, 2017 3:50 pm

There are a ton, yeah :D We're really pushing the limits of the MQTT spec.

BUT, they won't necessarily all be around forever. We're going to be phasing out the name and numerical ID topics in the next few months, but we'll always be keeping the key variation. When in doubt, subscribe to username/feeds/key, username/feeds/key/csv, or username/feeds/key/json. Or, if you're using groups, username/groups/key, username/groups/key/csv, or username/groups/key/json.

abachman
 
Posts: 21
Joined: Mon Feb 01, 2010 12:48 pm

Re: MQTT not seeing messages on feed

by tomhardbarger on Fri May 19, 2017 3:04 pm

I'm experiencing a similar issue if the feed is updated via IFTTT. My ESP8266 detects the toggle button change if I use the button but not if the change comes from IFTTT though I can see the update (ON/OFF) in the feed and watch the button change. Thanks - Tom

tomhardbarger
 
Posts: 7
Joined: Mon Jun 20, 2016 8:51 pm

Please be positive and constructive with your questions and comments.