[{ "id": "cd8a48d0.ca2e48", "type": "tab", "label": "Push via mqtt", "disabled": false, "info": "" }, { "id": "61195418.a7453c", "type": "inject", "z": "cd8a48d0.ca2e48", "name": "", "topic": "", "payload": "", "payloadType": "date", "repeat": "60", "crontab": "", "once": false, "onceDelay": 0.1, "x": 147, "y": 120.00000166893005, "wires": [ ["b99a5169.d89eb"] ] }, { "id": "b99a5169.d89eb", "type": "function", "z": "cd8a48d0.ca2e48", "name": "Random number generator", "func": "const randomValue = Math.round(Math.random() * 100);\n\nmsg.firstValue = randomValue;\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 420.00000762939453, "y": 120.00000190734863, "wires": [ ["6d9bd76a.c3e108"] ] }, { "id": "6d9bd76a.c3e108", "type": "function", "z": "cd8a48d0.ca2e48", "name": "prepare-data-to-push", "func": "const now = new Date(), \nbody = () => {\n const signals = [];\n\n if (msg.firstValue) {\n\n signals.push({\n 'name': '0kk50nfody',\n 'value': msg.firstValue\n });\n }\n\n return {\n 'type': 'data',\n 'message': [{\n 'template': '0ay3at2v1i',\n signals \n }]\n };\n};\n\nmsg.payload = body();\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 740, "y": 120, "wires": [ ["153b9ad2.8e90a5"] ] }, { "id": "153b9ad2.8e90a5", "type": "mqtt out", "z": "cd8a48d0.ca2e48", "name": "mqtt-to-databoom", "topic": "MQTTTest/NodeRED/data", "qos": "2", "retain": "false", "broker": "6c4a1f41.c27cd", "x": 1010, "y": 120, "wires": [] }, { "id": "6c4a1f41.c27cd", "type": "mqtt-broker", "z": "", "name": "mqtt.databoom", "broker": "mqtt.databoom.com", "port": "8883", "tls": "", "clientid": "V9Gg-NodeRED", "usetls": true, "compatmode": true, "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "closeTopic": "", "closeQos": "0", "closePayload": "", "willTopic": "", "willQos": "0", "willPayload": "" }]