Upload issue (422 b'Unprocessable Entity')

I am using an Enviro indoor and have added a water depth sensor successfully. I am now trying to measure a voltage on a divider and upload that as well. The code in the Indoor.py file reads the voltage on ADC (pin28), can print it and saves it to a json file. However, the system will not upload the output in the file with the pin 28 data. It will upload the water depth reading from pin 27 in the file if I delete the pin 28 data. It objects to this string in the json file " “oven”: 0.708, ". If I delete it in the file it uploads successfully. Any idea why it won’t upload?

I usually see ‘Unprocessable Entity’ when I’m trying to send too much data into adafruit.io - any chance you’re hitting the data limit of whatever service you’re posting to?

Hi I don’t think so. I have deleted readings in the main.py file using del reading (“…”) and have also manually edited the json files to reduce the data. It still gives the same issue. Oddly if I swop the label in the “ucollections” section of the indoor.py file and remove the non functioning label I can upload the correct data but it has the incorrect name.
from ucollections import OrderedDict
return OrderedDict({
“temperature”: temperature,
“humidity”: humidity,
“pressure”: pressure,
“gas_resistance”: gas_resistance,
“aqi”: aqi,
“luminance”: lux_from_rgbc(r, g, b, c),
“color_temperature”: colour_temperature_from_rgbc(r, g, b, c),
#“battery_level”: battery_level, THIS DOES NOT UPLOAD w’out #
“water_level”: battery_level, " THIS UPLOADS
#“water_level”: water_level, “THIS UPLOADS” w/out #

Yes you were correct. I had reached the limit of feed names into adafruit.io. I misunderstood what you meant.

1 Like