0

Data missing required value for JSON
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Data missing required value for JSON

by Jonnyg on Sat Jul 07, 2018 5:49 pm

I'm trying out adafruit.io for a replacement/addition to my MQTT broker I run on my raspberry Pi.
I get an error error saving data on Jonnyg/feeds/home-automation.aircon-slash-cmd, data missing required value when I try to publish a JSON string using mosquitto_pub.
Code: Select all | TOGGLE FULL SIZE
mosquitto_pub -t "Jonnyg/feeds/home-automation.aircon-slash-cmd/json" -m "{\"CMD\":\"TURN_OFF\"}" -h io.adafruit.com -u ... -P ...


Other strings work OK (e.g. if I just add an additional x at the end on my JSON string it's accepted OK), and I can add the same JSON string directly via the web Feed Add Data Action and it works fine and I see it in my MQTT subscription. It also works fine submitting the value via the API. I don't have this problem publishing to my Raspberry Pi mosquitto broker with mosquitto_pub.

Is this a bug in the system or am I doing something wrong?

Thanks,
Jonny

Jonnyg
 
Posts: 1
Joined: Sat Jul 07, 2018 5:21 pm

Please be positive and constructive with your questions and comments.