This simple flow is used to set global variables on startup.
[
{
"id": "fcbf6cdd.df1e2",
"type": "inject",
"z": "2e4673e7.251b2c",
"name": "Trigger on Start",
"topic": "",
"payload": "true",
"payloadType": "bool",
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "",
"x": 160,
"y": 100,
"wires": [
[
"a33badfe.289c4"
]
]
},
{
"id": "a33badfe.289c4",
"type": "function",
"z": "2e4673e7.251b2c",
"name": "Set Global Variables",
"func": "global.set(\"assetId\", \"ANExample\")\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 420,
"y": 100,
"wires": [
[]
]
}
]