[ { "id": "90c2cf2d.ae437", "type": "debug", "z": "3a4e58f7.6f9718", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 490, "y": 520, "wires": [] }, { "id": "b1d850b1.7b1aa", "type": "json", "z": "3a4e58f7.6f9718", "name": "", "property": "payload", "action": "", "pretty": false, "x": 270, "y": 540, "wires": [ [ "90c2cf2d.ae437", "acd87f75.2aea2" ] ] }, { "id": "3fcb303e.63b2d", "type": "debug", "z": "3a4e58f7.6f9718", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 530, "y": 700, "wires": [] }, { "id": "acd87f75.2aea2", "type": "function", "z": "3a4e58f7.6f9718", "name": "Repartidor", "func": "var keys = Object.keys(msg.payload);\n\nvar msgs = keys.map(function(key) {\n return {topic: key, payload: msg.payload[key] };\n})\n\nreturn [msgs];", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 480, "y": 560, "wires": [ [ "f50204e1.503638" ] ] }, { "id": "f50204e1.503638", "type": "switch", "z": "3a4e58f7.6f9718", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "eq", "v": "hardware_serial", "vt": "str" }, { "t": "eq", "v": "port", "vt": "str" }, { "t": "eq", "v": "counter", "vt": "str" }, { "t": "eq", "v": "payload_raw", "vt": "str" }, { "t": "eq", "v": "metadata", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 5, "x": 130, "y": 700, "wires": [ [], [], [], [ "b00f7bd3.fa49a8", "676ea445.60850c" ], [] ] }, { "id": "b00f7bd3.fa49a8", "type": "function", "z": "3a4e58f7.6f9718", "name": "Base64 -> HEX", "func": "var b = new Buffer(msg.payload, 'base64')\nmsg.payload = b.toString('hex')\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 320, "y": 700, "wires": [ [ "3fcb303e.63b2d" ] ] }, { "id": "676ea445.60850c", "type": "debug", "z": "3a4e58f7.6f9718", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 310, "y": 740, "wires": [] }, { "id": "ae93a509.086688", "type": "mqtt in", "z": "3a4e58f7.6f9718", "name": "", "topic": "ad-telecom/devices/adtelecom-0001-abp-bme280/up", "qos": "2", "datatype": "auto", "broker": "1268def1.994291", "x": 210, "y": 460, "wires": [ [ "b1d850b1.7b1aa" ] ] }, { "id": "1268def1.994291", "type": "mqtt-broker", "z": "", "name": "", "broker": "eu.thethings.network", "port": "1883", "clientid": "", "usetls": false, "compatmode": false, "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "closeTopic": "", "closeQos": "0", "closePayload": "", "willTopic": "", "willQos": "0", "willPayload": "" } ]