[ { "id": "example-particle-cloud-tab", "type": "tab", "label": "Particle Cloud manual tests", "disabled": false, "info": "Replace the product and device ID placeholders and configure Particle Cloud credentials before deploying.", "env": [] }, { "id": "example-particle-setup-comment", "type": "comment", "z": "example-particle-cloud-tab", "name": "Setup: configure credentials and device identifiers", "info": "Before deploying:\n\n1. Open the Particle Cloud credentials config node and add an access token or OAuth client credentials.\n2. Replace REPLACE_WITH_PRODUCT_ID_OR_SLUG and REPLACE_WITH_DEVICE_ID with values from your Particle account.\n3. Flash the bundled photon2-cloud-smoke firmware if you want to run the function and variable tests.\n4. Deploy the flow.\n5. Use the Inject nodes to run each test and inspect the connected Debug nodes. The subscription starts when the flow is deployed.", "x": 480, "y": 60, "wires": [] }, { "id": "example-particle-events-comment", "type": "comment", "z": "example-particle-cloud-tab", "name": "Events", "info": "", "x": 350, "y": 120, "wires": [] }, { "id": "example-particle-publish-inject", "type": "inject", "z": "example-particle-cloud-tab", "name": "Publish timestamp", "props": [ { "p": "data", "v": "", "vt": "date" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 350, "y": 180, "wires": [ [ "example-particle-publish" ] ] }, { "id": "example-particle-publish", "type": "particle-cloud-publish", "z": "example-particle-cloud-tab", "name": "Publish smoke event", "auth": "example-particle-cloud-config", "endpoint": "product", "productIdOrSlug": "REPLACE_WITH_PRODUCT_ID_OR_SLUG", "event": "nr_particle_cloud/command", "data": "", "x": 640, "y": 180, "wires": [] }, { "id": "example-particle-subscribe", "type": "particle-cloud-subscribe", "z": "example-particle-cloud-tab", "name": "Receive smoke events", "auth": "example-particle-cloud-config", "endpoint": "product", "productIdOrSlug": "REPLACE_WITH_PRODUCT_ID_OR_SLUG", "event": "nr_particle_cloud/", "device": "", "x": 400, "y": 240, "wires": [ [ "example-particle-event-debug" ] ] }, { "id": "example-particle-event-debug", "type": "debug", "z": "example-particle-cloud-tab", "name": "Particle event", "active": true, "complete": "true", "targetType": "full", "x": 640, "y": 240, "wires": [] }, { "id": "example-particle-functions-comment", "type": "comment", "z": "example-particle-cloud-tab", "name": "Functions and Variables", "info": "", "x": 400, "y": 360, "wires": [] }, { "id": "example-particle-function-inject", "type": "inject", "z": "example-particle-cloud-tab", "name": "Call function with timestamp", "props": [ { "p": "argument", "v": "", "vt": "date" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 350, "y": 420, "wires": [ [ "example-particle-function" ] ] }, { "id": "example-particle-function", "type": "particle-cloud-function", "z": "example-particle-cloud-tab", "name": "Call device function", "auth": "example-particle-cloud-config", "function": "nrSetState", "argument": "", "endpoint": "product", "device": "REPLACE_WITH_DEVICE_ID", "productIdOrSlug": "REPLACE_WITH_PRODUCT_ID_OR_SLUG", "x": 640, "y": 420, "wires": [ [ "example-particle-result-debug" ] ] }, { "id": "example-particle-variable-inject", "type": "inject", "z": "example-particle-cloud-tab", "name": "Read variable", "props": [], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 350, "y": 480, "wires": [ [ "example-particle-variable" ] ] }, { "id": "example-particle-variable", "type": "particle-cloud-variable", "z": "example-particle-cloud-tab", "name": "Read device variable", "auth": "example-particle-cloud-config", "variable": "nrState", "endpoint": "product", "device": "REPLACE_WITH_DEVICE_ID", "productIdOrSlug": "REPLACE_WITH_PRODUCT_ID_OR_SLUG", "x": 640, "y": 480, "wires": [ [ "example-particle-result-debug" ] ] }, { "id": "example-particle-api-comment", "type": "comment", "z": "example-particle-cloud-tab", "name": "Particle API", "info": "", "x": 370, "y": 600, "wires": [] }, { "id": "example-particle-list-devices-inject", "type": "inject", "z": "example-particle-cloud-tab", "name": "List product devices", "props": [], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 350, "y": 660, "wires": [ [ "example-particle-api-list-devices" ] ] }, { "id": "example-particle-api-list-devices", "type": "particle-cloud-api", "z": "example-particle-cloud-tab", "name": "List product devices", "auth": "example-particle-cloud-config", "method": "get", "url": "v1/products/REPLACE_WITH_PRODUCT_ID_OR_SLUG/devices", "x": 640, "y": 660, "wires": [ [ "example-particle-result-debug" ] ] }, { "id": "example-particle-token-details-inject", "type": "inject", "z": "example-particle-cloud-tab", "name": "Get token details", "props": [], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 350, "y": 720, "wires": [ [ "example-particle-api-token-details" ] ] }, { "id": "example-particle-api-token-details", "type": "particle-cloud-api", "z": "example-particle-cloud-tab", "name": "Token details", "auth": "example-particle-cloud-config", "method": "get", "url": "v1/access_tokens/current", "x": 640, "y": 720, "wires": [ [ "example-particle-result-debug" ] ] }, { "id": "example-particle-ping-inject", "type": "inject", "z": "example-particle-cloud-tab", "name": "Ping device", "props": [], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 350, "y": 780, "wires": [ [ "example-particle-api-ping" ] ] }, { "id": "example-particle-api-ping", "type": "particle-cloud-api", "z": "example-particle-cloud-tab", "name": "Ping device", "auth": "example-particle-cloud-config", "method": "put", "url": "v1/devices/REPLACE_WITH_DEVICE_ID/ping", "x": 640, "y": 780, "wires": [ [ "example-particle-result-debug" ] ] }, { "id": "example-particle-search-inject", "type": "inject", "z": "example-particle-cloud-tab", "name": "Search Sandbox devices", "props": [ { "p": "query", "v": "{\"text\":\"Photon\",\"type\":\"device\"}", "vt": "json" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 350, "y": 840, "wires": [ [ "example-particle-api-search" ] ] }, { "id": "example-particle-api-search", "type": "particle-cloud-api", "z": "example-particle-cloud-tab", "name": "Search Sandbox devices", "auth": "example-particle-cloud-config", "method": "get", "url": "v1/user/search", "x": 640, "y": 840, "wires": [ [ "example-particle-result-debug" ] ] }, { "id": "example-particle-result-debug", "type": "debug", "z": "example-particle-cloud-tab", "name": "Particle result", "active": true, "complete": "true", "targetType": "full", "x": 940, "y": 660, "wires": [] }, { "id": "example-particle-cloud-config", "type": "particle-cloud-config", "name": "Particle Cloud credentials", "authType": "accessToken", "clientId": "" } ]