Particle Notes field

electron
Tags: #<Tag:0x00007fe2202ddf70>

#21

the reference I have seen is from:

https://docs.particle.io/reference/device-cloud/api/#get-device-information

and it shows:

GET /v1/devices/0123456789abcdef01234567
HTTP/1.1 200 OK
{
“id”: “0123456789abcdef01234567”,
“name”: “gongbot”,
“variables”: {
“Gongs”: “int32”
},
“functions”: [
“gong”,
“goto”
],
“connected”: true,
“platform_id”: 6,
“product_id”: 6,
“system_firmware_version”: “0.7.0”
“cellular”: false,
“serial_number”: “AAAAAA111111111”
“last_ip_address”: “176.83.211.237”,
“last_heard”: “2015-07-17T22:28:40.907Z”,
“notes”: null,
“firmware_updates_enabled”: true,
“firmware_updates_forced”: false
}

So I would assume that I access the notes field the same way I access the name field.

however, notice in the example that it ALSO shows “null” for the notes field.

I would really like to get the notes from the console.


#22

I think the problem you could be seeing is that you are subscribing to topics and publishing the string before the webhook handler has had time to set the string.

I think you should try declaring all of your subscriptions early in setup(), and not publish any events until you have established a connection to the Particle cloud.

You need to give time for the webhook handlers to get the response from one webhook, save it to the string, and then publish the next event to call the next webhook. You could even have the handler for one webhook publish the event that triggers the next webhook.


#23

I will check that out and get back to the forum when I have a chance to try it.

Thanks for the information!