Hello
I’m trying to perform a data ingestion from Particle platform publications, which are the data received by connected sensors.
In this case, an AS7341 sensor reflects 11 color bands, all in a JSON array.
I also see the data collected by the AmbiMate sensor and its various sensed data.
When I created the project, I followed these step-by-step instructions: Edge Impulse training data acquisition over LTE with Particle
Without getting any evidence from the Particle Webhook, the following error is displayed when sending events:
error status 422 from ingestion.edgeimpulse.com
And this is the event I sent.
[0.010921,0.015790,0.022148,0.027282,0.000000,0.000000,0.029577,0.028478,0.032318,0.036325,0.121745,0.049110]
louis
June 3, 2025, 6:07pm
#2
Hello @DavidC24 ,
Could you share how you configured the payload in the extra settings please?
Best,
Louis
Hi Louis.
That was the Payload cuntom:
{
“payload”: {
“device_name”: “test-som”,
“device_type”: “msom”,
“interval_ms”: 15000,
“sensors”: [
{
“name”: “Light_Spectrum”,
“units”: “nm”
}
],
“values”: [
{{{PARTICLE_EVENT_VALUE}}}
]
},
“protected”: {
“alg”: “none”,
“ver”: “v1”
},
“signature”: “00”
}
louis
June 4, 2025, 7:16am
#4
Thanks.
I think I understand the error, I believe you would need one sensor per value.
See the example of a raw requests here: Ingestion API | Edge Impulse API and SDKs Documentation
If you have 11 values you would need to do something like the following:
{
“payload”: {
“device_name”: “test-som”,
“device_type”: “msom”,
“interval_ms”: 15000,
“sensors”: [
{
“name”: “Light_Spectrum_1”,
“units”: “nm”
},
{
“name”: “Light_Spectrum_2”,
“units”: “nm”
},
...
{
“name”: “Light_Spectrum_11”,
“units”: “nm”
}
],
“values”: [
{{{PARTICLE_EVENT_VALUE}}}
]
},
“protected”: {
“alg”: “none”,
“ver”: “v1”
},
“signature”: “00”
}
Let me know if that helps.
Best,
Louis
1 Like
Eoin
June 4, 2025, 8:52am
#5
Passing values as separate sensors like Louis said or if you want to pass it as you had you need to format the Array properly (it was resolving as a String)
Wrong: This passes a String
“values”: [
{ {{PARTICLE_EVENT_VALUE}}}
]
Correct: To pass as an Array try:
“values”: [
[ {{PARTICLE_EVENT_VALUE}}]
]
Best
Eoin
Hi, I try different ways to configure JSON and Webhook, but the error persist. That’s the last JSON format to I used:
{
“payload”: {
“device_name”: “AS7341”,
“device_type”: “EDGE_IMPULSE_UPLOADER”,
“interval_ms”: 60000,
“sensors”: [
{“name”: “Light_Spectrum_0”, “units”: “nm”},
{“name”: “Light_Spectrum_1”, “units”: “nm”},
{“name”: “Light_Spectrum_2”, “units”: “nm”},
{“name”: “Light_Spectrum_3”, “units”: “nm”},
{“name”: “Light_Spectrum_6”, “units”: “nm”},
{“name”: “Light_Spectrum_7”, “units”: “nm”},
{“name”: “Light_Spectrum_8”, “units”: “nm”},
{“name”: “Light_Spectrum_9”, “units”: “nm”},
{“name”: “Light_Spectrum_10”, “units”: “nm”}
],
“values”: [
[{{PARTICLE_EVENT_VALUE}}]
]
},
“protected”: {
“ver”: “v1”,
“alg”: “none”
},
“signature”: “0”
}