If I define a Google Maps integration within a Product, the callback will not fire after calling:
locator.withSubscribe(locationCallback).withLocatePeriodic(20);
Is there some extra step I need to perform to enable this feature for a product?
The GeoLocation callback works fine if the device is also owned by my user account. For example if I use the Web IDE and add the device then GeoLocation works fine. If the device is only added within the Product then the callback will not be called.
See the snapshot of my product console below. The items with an “owner” work and the others do not.
From the particle side I can see no reason for this. The logs show the expected exchanges with no errors:
Event
The source event that triggered the webhook
{
“name”: “deviceLocator”,
“data”: “{“w”:{“a”:[{“m”:“d8:b6:b7:9a:8a:2b”,“s”:-39,“c”:1},{“m”:“ac:9e:17:74:47:08”,“s”:-57,“c”:7},{“m”:“d8:8f:76:7b:67:2c”,“s”:-86,“c”:6},{“m”:“b4:75:0e:a6:27:7f”,“s”:-90,“c”:6},{“m”:“00:0d:67:94:19:b4”,“s”:-79,“c”:6},{“m”:“00:23:69:b2:51:9e”,“s”:-91,“c”:6}]}}”,
“ttl”: 60,
“published_at”: “2018-11-09T06:36:30.556Z”,
“coreid”: “XXXXXXXXXXXXXXXXXXX”,
“userid”: “”,
“version”: 26,
“public”: false,
“productID”: 6556
}
Request
The HTTP request sent to the webhook url
POST /geolocation/v1/geolocate?key=XXXXXXXXXXXXXXXXXXXXXXX HTTP/1.1
User-Agent: ParticleBot/1.1 (https://docs.particle.io/tutorials/integrations/google-maps/)
host: www.googleapis.com
accept: application/json
content-type: application/json
content-length: 449
Connection: keep-alive
Response
The HTTP response received from the webhook url
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Date: Fri, 09 Nov 2018 06:36:30 GMT
Vary: X-Origin
Content-Type: application/json; charset=UTF-8
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v=“44,43,39,35”
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Transfer-Encoding: chunked
{“location”:{“lat”:43.1336326,“lng”:-72.44440519999999},“accuracy”:43}