Publish Google Maps [hook-response] to Azure IoT Hub

Scenario: Particle electron, with google maps sample project (google-maps-device-locator) using geolocation api to determine the location of the device based off the cell-tower. I need to send this location (as determined from the google maps integration) to an Azure IoT hub.

  1. The google maps webhook is triggered off the [deviceLocator] event from the device
  2. This then responds with a [hook-response/deviceLocator/deviceID/0] event which appears from a “particle-internal” device
  3. If I setup an Azure IoT Hub integration to trigger off this event [hook-response/deviceLocator/deviceID/0], it is not triggered

I’ve tried different different forms of the event name, e.g. [hook-response/deviceLocator], [hook-response/deviceLocator/api], without any success. Is it possible to do this without using the API to get the event steam?

2 Likes

Bumping this. How does one redirect/channel web hook responses to other web hooks?

Ping @rickkas7

To get around this I had to send the webhook response (from google api) back to the device. Once back in the device I was able to create a new event which was redirected to the other webhook (Azure IoT Hub). Not ideal, so I’m interested to see if Particle have a solution for us.

Yeah, that is less than ideal. I see that there is an open source visualization application that uses the data, I'll look around there and see if I find anything useful.

Is there a solution to this yet?

I am trying to send web-hook via custom web-hook with the coordinate information using deviceLocator library and web-hook setup using this guide. I know I can send the data back to the device, then trigger the web-hook via a non-"hook-response".

Topic from deviceLocator **hook-response/deviceLocator/deviceID

Topic: hook-response/deviceLocator to external website does not trigger the custom webhook.

You cannot trigger a webhook from a webhook response.

However, you can trigger a logic block from a webhook response. Note that the logic trigger is an exact match, so you can only match on the URL that ends with /0, for the first fragment of the response, for example.

1 Like