Product Webhook

I have successfully end to end test an electron based tracking device in the development environment - device through the track displayed in Goole Maps.

The position of the device is sent to my host every two minutes using the event / webhook / response features.

I am now attempting to move to the product environment so I can do multi tracker testing - 3 devices.

Did the following:
Create a product using the same integration as the development environment
Deleted the development environment integration
Changed the Particle.subscribe to:
Particle.subscribe(System.deviceID() +"hook-response/positionSA", Presponse, MY_DEVICES);
Add the device to the product
Set up the product firmware - changing the upload from 2 minutes to 15 seconds for testing.

From the device log, all appears to work AOK - event happens, web hook is sent, response come back but the the response handler never get to run. The responses are used to control the device at various time of day.

The response name appear to be correct:
"name":"510052000b5135343XXXXXX/hook-response/positionSA/0"
The data is correct

The piece of code involved is:

Particle.subscribe(System.deviceID() +"hook-response/positionSA", Presponse, MY_DEVICES);
}
// Process responses
void Presponse(const char *event, const char *data) 
{ 
    Serial.println(String(event)+" *** "+String(data));  // {added fro debug this problem}

In the development environment - all works as one would expect.

What am I missing?

there is a forward leaning slash between device id and "hook-response"

that seems missing in this concat:

Particle.subscribe(System.deviceID() +"hook-response/positionSA", ...
1 Like

Thank you - resolved

1 Like