I’m trying to follow along with the webhook example found at https://docs.particle.io/guide/tools-and-features/webhooks/
my code which is flashed to the electron is:
int led = D7; // The on-board LED
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH); // Turn ON the LED
String data = String(random(60, 80));
Particle.publish("temp", data, PRIVATE);
delay(30000); // Wait for 30 seconds
digitalWrite(led, LOW); // Turn OFF the LED
delay(30000); // Wait for 30 seconds
}
The webhook is sending an HTTP POST request to my server.
The event is named temp and it is receiving ‘data’ from the electron and that value is being uploaded to my form on the server.
In my database I can see the values but for each value (1 every minute) it has uploaded it 11 times.
Looking in the logs I see
the following 11 times
Event name: hook-response/temp/0
Data: 1 record added
Published at: July 20th at 12:53:32 pm
Device: particle-internal
**followed by this 11 times**
Event name: hook-sent/temp
Data: undefined
Published at: July 20th at 12:53:31 pm
Device: particle-internal
**Followed by this once**
Event name: temp
Data: 62
Published at: July 20th at 12:53:30 pm
Device: my-device-name
Could anybody guide me as to where I’m going wrong.
Thanks