[ { "id": "71360afe.31e43c", "type": "mqtt out", "z": "52539565.f6a544", "name": "", "topic": "ordres/", "qos": "", "retain": "", "broker": "c353720c.770d3", "x": 440, "y": 360, "wires": [] }, { "id": "619bbe51.86d86", "type": "inject", "z": "52539565.f6a544", "name": "", "topic": "", "payload": "mac", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 170, "y": 320, "wires": [ [ "71360afe.31e43c" ] ] }, { "id": "7b542f45.617d1", "type": "mqtt in", "z": "52539565.f6a544", "name": "", "topic": "#", "qos": "2", "datatype": "auto", "broker": "c353720c.770d3", "x": 150, "y": 440, "wires": [ [ "f4a23991.3a9398" ] ] }, { "id": "95cef187.8335a", "type": "inject", "z": "52539565.f6a544", "name": "", "topic": "", "payload": "ip", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 170, "y": 360, "wires": [ [ "71360afe.31e43c" ] ] }, { "id": "f4a23991.3a9398", "type": "switch", "z": "52539565.f6a544", "name": "divert-topic [mac, ip, sensors]", "property": "topic", "propertyType": "msg", "rules": [ { "t": "eq", "v": "mac/", "vt": "str" }, { "t": "eq", "v": "ip/", "vt": "str" }, { "t": "cont", "v": "sensors", "vt": "str" }, { "t": "else" } ], "checkall": "true", "repair": false, "outputs": 4, "x": 390, "y": 440, "wires": [ [ "fb3231d3.0fb388" ], [ "fb3231d3.0fb388" ], [ "abd0cb81.a0d1c", "17e9c0e6.b9d57f" ], [] ] }, { "id": "73bcebe5.6780f4", "type": "inject", "z": "52539565.f6a544", "name": "", "topic": "", "payload": "sensors", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 170, "y": 400, "wires": [ [ "71360afe.31e43c" ] ] }, { "id": "fb3231d3.0fb388", "type": "debug", "z": "52539565.f6a544", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "x": 710, "y": 460, "wires": [] }, { "id": "abd0cb81.a0d1c", "type": "switch", "z": "52539565.f6a544", "name": "if MAC == b8:27:eb:e3:f0:52", "property": "topic", "propertyType": "msg", "rules": [ { "t": "cont", "v": "b8:27:eb:e3:f0:52", "vt": "str" }, { "t": "else" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 360, "y": 520, "wires": [ [ "42a2a28c.1b157c" ], [] ] }, { "id": "42a2a28c.1b157c", "type": "json", "z": "52539565.f6a544", "name": "", "property": "payload", "action": "", "pretty": false, "x": 570, "y": 500, "wires": [ [ "fb3231d3.0fb388" ] ] }, { "id": "af5f0aef.057d5", "type": "inject", "z": "52539565.f6a544", "name": "{\"left\":127,\"right\":-127}", "topic": "", "payload": "{\"left\":127,\"right\":-127}", "payloadType": "json", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 140, "y": 640, "wires": [ [ "b6ccfd8d.954a38" ] ] }, { "id": "6d5b9c74.4e7444", "type": "inject", "z": "52539565.f6a544", "name": "{\"left\":-127,\"right\":-127}", "topic": "", "payload": "{\"left\":-127,\"right\":-127}", "payloadType": "json", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 140, "y": 680, "wires": [ [ "b6ccfd8d.954a38" ] ] }, { "id": "acabd283.ef9be", "type": "inject", "z": "52539565.f6a544", "name": "{\"left\":127,\"right\":127}", "topic": "", "payload": "{\"left\":127,\"right\":127}", "payloadType": "json", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 140, "y": 560, "wires": [ [ "b6ccfd8d.954a38" ] ] }, { "id": "560bf6a.65e1d08", "type": "inject", "z": "52539565.f6a544", "name": "{\"left\":-127,\"right\":127}", "topic": "", "payload": "{\"left\":-127,\"right\":127}", "payloadType": "json", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 140, "y": 600, "wires": [ [ "b6ccfd8d.954a38" ] ] }, { "id": "fa1e8184.4ace78", "type": "inject", "z": "52539565.f6a544", "name": "{\"left\":0,\"right\":0}", "topic": "", "payload": "{\"left\":0,\"right\":0}", "payloadType": "json", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 160, "y": 720, "wires": [ [ "b6ccfd8d.954a38" ] ] }, { "id": "b6ccfd8d.954a38", "type": "function", "z": "52539565.f6a544", "name": "---->", "func": "return msg;", "outputs": 1, "noerr": 0, "x": 350, "y": 640, "wires": [ [ "c173113c.5ada28" ] ] }, { "id": "c173113c.5ada28", "type": "json", "z": "52539565.f6a544", "name": "", "property": "payload", "action": "", "pretty": false, "x": 510, "y": 640, "wires": [ [ "79cbaf16.99fda" ] ] }, { "id": "79cbaf16.99fda", "type": "mqtt out", "z": "52539565.f6a544", "name": "", "topic": "actuadors/", "qos": "", "retain": "", "broker": "c353720c.770d3", "x": 650, "y": 640, "wires": [] }, { "id": "17e9c0e6.b9d57f", "type": "switch", "z": "52539565.f6a544", "name": "if MAC (XPi) == b8:27:eb:c0:7c:33", "property": "topic", "propertyType": "msg", "rules": [ { "t": "cont", "v": "b8:27:eb:c0:7c:33", "vt": "str" }, { "t": "else" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 460, "y": 560, "wires": [ [ "42a2a28c.1b157c" ], [] ] }, { "id": "c353720c.770d3", "type": "mqtt-broker", "z": "", "name": "", "broker": "localhost", "port": "1883", "clientid": "", "usetls": false, "compatmode": true, "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "closeTopic": "", "closeQos": "0", "closePayload": "", "willTopic": "", "willQos": "0", "willPayload": "" } ]