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:
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!
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.
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?