Setting Up Particle Webhook for Edge Impulse Ingestion
This guide supplements the tutorial on OTA Model Updates with Edge Impulse on Particle Workbench, focusing on configuring a Particle webhook for sending data to the Edge Impulse ingestion API.Steps for Webhook Configuration:
- 
Access Particle Console:
- Visit Particle Console.
 - Log in with your Particle account credentials.
 
 - 
Navigate to Integrations:
- Click on the “Integrations” tab in the left-hand menu.
 - Select “Webhooks” from the available options.
 
 - 
Create a New Webhook:
- Click “New Integration”.
 - Choose “Webhook”.
 
 - 
Webhook Configuration:
- Name: Assign a descriptive name to your webhook.
 - Event Name: Specify the event name that triggers the webhook (e.g., “edge/ingest”).
 - URL: Set this to the Edge Impulse ingestion API URL, typically something like 
https://ingestion.edgeimpulse.com/api/training/data. - Request Type: Choose “POST”.
 - Request Format: Select “Custom”.
 
 - 
Custom Request Body:
- Input the JSON structure required by Edge Impulse. This will vary based on your project’s data schema.
 
 - 
HTTP Headers:
- Add necessary headers:
x-api-key: Your Edge Impulse API key.Content-Type: “application/json”.x-file-name: Use a dynamic data field like{{PARTICLE_EVENT_NAME}}.
 
 - Add necessary headers:
 - 
Advanced Settings:
- Response Topic: Create a custom topic for webhook responses, e.g., 
{{PARTICLE_DEVICE_ID}}/hook-response/{{PARTICLE_EVENT_NAME}}. - Enforce SSL: Choose “Yes” for secure transmission.
 
 - Response Topic: Create a custom topic for webhook responses, e.g., 
 - 
Save the Webhook:
- After entering all details, click “Save”.
 
 - 
Test the Webhook:
- Use example device firmware to trigger the webhook.
 - Observe the responses in the Particle Console.
 
 - Debugging:
 
- If errors occur, review the logs for detailed information.
 - Ensure payload format aligns with Edge Impulse requirements.
 - Verify the accuracy of your API key and other details.