MQTT Forwarding to Adafruit

Hi,
Tried a JSON transform in a route to io.adafruit.com

{
“temp”: body.temp
}

This doesn’t seem to be valid, so I tried:
{
“feeds”: {
“bluestest.temperature”: body.temp,
“bluestest.pressure”: body.pressure,
“bluestest.voltage”: body.voltage
},
“location”: {
“lat”: 0,
“lon”: 0,
“ele”: 0
}
}

This works, kind of. The data goes through, but I get an error:
MQTT ERROR: no feeds present in payload, JSON should be in the format: { “feeds”: …, “location”: …

So, if I replace ‘body.temp’, ‘body.pressure’, and ‘body.voltage’ with hard-coded numbers (1.23), it works ok with no errors.

But, obviously, this is not a solution. I’ve tried contacting them and they don’t know and think it is a blues problem (naturally). It seems like it should work and I’ve tried A LOT of variations of the JSON expression with no luck. I just want to test pushing data to their MQTT service. I’ll note the example for MQTT Json data they give is:

{
“feeds”: {
“key-1”: “value 1”,
“key-2”: “value 2”,
“key-3”: “value 3”
},
“location”: {
“lat”: 0.0,
“lon”: 0.0,
“ele”: 0.0
}
}

Thanks,
Brecky

Hi @brecky - can you please post the full JSON from the “JSON” tab for a relevant event in Notehub? If it contains any sensitive data you can either remove it or send me a PM. Thanks!

{
“event”: “905c24de-b460-465a-afea-82f766950372”,
“session”: “c85e91a2-cea0-42b6-940b-17aadcbb6592”,
“best_id”: “dev:867730051704249”,
“device”: “dev:867730051704249”,
“product”: “product:”,
“received”: 1646339754.59652,
“routed”: 1646339758,
“req”: “note.add”,
“when”: 1646339741,
“file”: “sensor.qo”,
“updates”: 1,
“body”: {
“temp”: 24.421875
},
“best_location_type”: “tower”,
“best_lat”:,
“best_lon”: ,
“best_location”: “”,
“best_country”: “US”,
“best_timezone”: “America/Los_Angeles”,
“tower_when”: 1646339754,
“tower_lat”: ,
“tower_lon”:
“tower_country”: “US”,
“tower_location”: “”,
“tower_timezone”: “America/Los_Angeles”,
“tower_id”: “”,
“log”: {
“app:f3c48ceb-76aa-44e5-b207-d82491db1185/route:581fecaa75c988a5d7f3e68cb301a004”: {}
}
}

I’ll note that I’ve changed it since the original post to just try and route temperature, which is why you’re only seeing that. Trying the simplest thing first.

Thanks!
Brecky

One thing I noticed is you don’t have pressure or voltage available to route in this event at least. However, your JSONata expression looks correct for temp. Might that be the problem?