AdafruitIO Feed - MQTT ERROR: data missing required value

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
kevinOI
 
Posts: 5
Joined: Wed May 17, 2023 6:08 pm

AdafruitIO Feed - MQTT ERROR: data missing required value

Post by kevinOI »

I've been following the following guide regarding the RockBLOCK 9603 in an attempt to get telemetry from a flight controller to ground control software:
https://learn.adafruit.com/using-the-ro ... m?view=all
I'm able to do all of what's described, except the part involving AdafruitIO webhooks. I've entered the webhook URL as a delivery address in Rock7's admin page, but when data is sent, the feed page shows, as a red notification bar, the error:
MQTT ERROR: error saving data to kevinOI/feeds/rockblock, data missing required value
I have no idea what value it's referring to. Has anyone run into a similar issue?

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: AdafruitIO Feed - MQTT ERROR: data missing required value

Post by mikeysklar »

What type of controller are you using in your setup? It would be helfpul to get a better error message from the REPL console. Are you are using a CircuitPython based microcontroller (for example) or the command-line on a Raspberry Pi? Do you see a more detailed error message?

User avatar
kevinOI
 
Posts: 5
Joined: Wed May 17, 2023 6:08 pm

Re: AdafruitIO Feed - MQTT ERROR: data missing required value

Post by kevinOI »

The flight controller is a Cube Orange, and the error message is being displayed through the "Feeds" page on adafruit IO. There's no command line interface being used at this stage and therefore no CircuitPython or Raspberry Pi. Unless a lower-level interface is available somewhere on Adafruit IO, no more detail is available to me.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: AdafruitIO Feed - MQTT ERROR: data missing required value

Post by adafruit_support_carter »

Just to check - when setting up the Delivery Group, did you set the method to HTTP_JSON?
sensors_rb_webhook.jpg
sensors_rb_webhook.jpg (64.06 KiB) Viewed 311 times

User avatar
kevinOI
 
Posts: 5
Joined: Wed May 17, 2023 6:08 pm

Re: AdafruitIO Feed - MQTT ERROR: data missing required value

Post by kevinOI »

Apologies for the late response. Yes, I did set the method to HTTP_JSON.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: AdafruitIO Feed - MQTT ERROR: data missing required value

Post by adafruit_support_carter »

And to be clear here:
the feed page shows, as a red notification bar, the error:
That's on the Adafruit IO feeds pages?

Everything looks OK from the Rock7 server point of view? You can check message once logged into your Rock7 account via the "Messages" option in the left hand nav menu. Can select a search date range and then should see a list of messages like this:
rock7.png
rock7.png (29.91 KiB) Viewed 292 times
Any errors and/or useful info there?

EDIT - also double check the URL you pasted as the Delivery Address on the Rock7 server and make sure it ends with /raw.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: AdafruitIO Feed - MQTT ERROR: data missing required value

Post by adafruit_support_carter »

I'm pretty sure the missing /raw in the URL is the issue. The guide does not really mention that as required, and the default URL generated by AIO does not include it.

Try just manually editing the URL on the Rock7 server and append /raw to it.

This is the step the guide forgot to mention. There's an option to create the URL with /raw when setting up the webhook on AIO:
wh.png
wh.png (87.79 KiB) Viewed 284 times

User avatar
kevinOI
 
Posts: 5
Joined: Wed May 17, 2023 6:08 pm

Re: AdafruitIO Feed - MQTT ERROR: data missing required value

Post by kevinOI »

There are no errors on the Rock7 admin page. Everything appears to have been delivered, on that panel.

I did try appending /raw to the end of the URL and this did not appear to make any difference. I will test that again to confirm and let you know.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: AdafruitIO Feed - MQTT ERROR: data missing required value

Post by adafruit_support_carter »

Yep, please double check and test again.

The original error message:
MQTT ERROR: error saving data to kevinOI/feeds/rockblock, data missing required value
is because Adafruit IO is looking for and expecting there to be an actual "value" parameter in the incoming response. That *could* be done if Rock7 allowed for more customization of the actual response structure. But there is no such capability and the resulting Rock7 response does not have any "value" parameter. That is why adding /raw is needed. That maps (Adafruit IO does this internally) the entire response blob as being the "value" parameter. Without the /raw, the response is required to have a "value" parameter.

The guide did a poor job of making that known - i.e., needing to add /raw to the URL. I updated it yesterday to hopefully clarify that. Sorry for that confusion.

If it's behaving differently, not working in a new way, different error message, etc. please post updated info here.

User avatar
kevinOI
 
Posts: 5
Joined: Wed May 17, 2023 6:08 pm

Re: AdafruitIO Feed - MQTT ERROR: data missing required value

Post by kevinOI »

The issue has indeed been resolved. Which is strange, as I'm certain that I tried this the first time, and didn't see any positive change there. In any case, thank you for your assistance.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: AdafruitIO Feed - MQTT ERROR: data missing required value

Post by adafruit_support_carter »

Cool, glad that fixed it. Could be something got cached somewhere on Rock7 servers and it didn't actually use the updated URL right away, or something like that. But I think the missing /raw in the URL was the only issue here (hopefully).

If you run into anything else, let us know. Good luck with your project!

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”