Created
May 8, 2017 18:20
-
-
Save jimwhitfield/70fa8b032d802b3895cbc3f7a4ef3c56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "d2eb373.3f50cc8", | |
"type": "tab", | |
"label": "Flow 2" | |
}, | |
{ | |
"id": "92070e99.486ef", | |
"type": "serial in", | |
"z": "d2eb373.3f50cc8", | |
"name": "COM3", | |
"serial": "66517bad.78aab4", | |
"x": 73, | |
"y": 107, | |
"wires": [ | |
[ | |
"9f289029.8b658" | |
] | |
] | |
}, | |
{ | |
"id": "ed569004.c7238", | |
"type": "serial out", | |
"z": "d2eb373.3f50cc8", | |
"name": "Send to OPS241", | |
"serial": "66517bad.78aab4", | |
"x": 407, | |
"y": 54, | |
"wires": [] | |
}, | |
{ | |
"id": "e020a720.aacc98", | |
"type": "inject", | |
"z": "d2eb373.3f50cc8", | |
"name": "send OJ to switch to JSON", | |
"topic": "", | |
"payload": "OJ", | |
"payloadType": "str", | |
"repeat": "", | |
"crontab": "", | |
"once": true, | |
"x": 163, | |
"y": 55, | |
"wires": [ | |
[ | |
"ed569004.c7238" | |
] | |
] | |
}, | |
{ | |
"id": "9f289029.8b658", | |
"type": "json", | |
"z": "d2eb373.3f50cc8", | |
"name": "", | |
"x": 189, | |
"y": 107, | |
"wires": [ | |
[ | |
"dacc4d5b.22668", | |
"a095ea9c.c6d2e8" | |
] | |
] | |
}, | |
{ | |
"id": "f3791966.fd6bf8", | |
"type": "rbe", | |
"z": "d2eb373.3f50cc8", | |
"name": "", | |
"func": "deadbandEq", | |
"gap": "4", | |
"start": "", | |
"inout": "in", | |
"x": 320, | |
"y": 262, | |
"wires": [ | |
[ | |
"b7a19b6d.1dd448" | |
] | |
] | |
}, | |
{ | |
"id": "fbb7b18c.d0978", | |
"type": "change", | |
"z": "d2eb373.3f50cc8", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "payload", | |
"pt": "msg", | |
"to": "payload.speed", | |
"tot": "msg" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 431, | |
"y": 186, | |
"wires": [ | |
[ | |
"f3791966.fd6bf8" | |
] | |
] | |
}, | |
{ | |
"id": "b7a19b6d.1dd448", | |
"type": "file in", | |
"z": "d2eb373.3f50cc8", | |
"name": "", | |
"filename": "\\users\\jim\\OneDrive\\Documents\\sound_recordings\\buzz-short.wav", | |
"format": "", | |
"x": 558, | |
"y": 321, | |
"wires": [ | |
[ | |
"2ad64033.56c9d" | |
] | |
] | |
}, | |
{ | |
"id": "2ad64033.56c9d", | |
"type": "play audio", | |
"z": "d2eb373.3f50cc8", | |
"name": "", | |
"voice": "", | |
"x": 897, | |
"y": 326, | |
"wires": [] | |
}, | |
{ | |
"id": "dacc4d5b.22668", | |
"type": "switch", | |
"z": "d2eb373.3f50cc8", | |
"name": "if speed contains number", | |
"property": "payload.speed", | |
"propertyType": "msg", | |
"rules": [ | |
{ | |
"t": "cont", | |
"v": "", | |
"vt": "num" | |
} | |
], | |
"checkall": "true", | |
"outputs": 1, | |
"x": 214, | |
"y": 185, | |
"wires": [ | |
[ | |
"fbb7b18c.d0978" | |
] | |
] | |
}, | |
{ | |
"id": "8ea5f5b6.3acda8", | |
"type": "comment", | |
"z": "d2eb373.3f50cc8", | |
"name": "multi-case switch on msg contents", | |
"info": "add a new flow for each if foo contains string for each type\nFor instance, \nif msg.error contains string, log it.\nif msg.Units contains string, show it as the unit label\nif msg.Product contains string, show it.", | |
"x": 208, | |
"y": 147, | |
"wires": [] | |
}, | |
{ | |
"id": "a095ea9c.c6d2e8", | |
"type": "switch", | |
"z": "d2eb373.3f50cc8", | |
"name": "if Product contains string", | |
"property": "payload.Product", | |
"propertyType": "msg", | |
"rules": [ | |
{ | |
"t": "nnull" | |
} | |
], | |
"checkall": "true", | |
"outputs": 1, | |
"x": 209, | |
"y": 401, | |
"wires": [ | |
[ | |
"81526218.2cfb3" | |
] | |
] | |
}, | |
{ | |
"id": "81526218.2cfb3", | |
"type": "debug", | |
"z": "d2eb373.3f50cc8", | |
"name": "Display Product", | |
"active": true, | |
"console": "true", | |
"complete": "payload.Product", | |
"x": 273, | |
"y": 454, | |
"wires": [] | |
}, | |
{ | |
"id": "2c5eddb3.488c12", | |
"type": "serial out", | |
"z": "d2eb373.3f50cc8", | |
"name": "Send to OPS241", | |
"serial": "66517bad.78aab4", | |
"x": 849, | |
"y": 118, | |
"wires": [] | |
}, | |
{ | |
"id": "2852689.ba51398", | |
"type": "inject", | |
"z": "d2eb373.3f50cc8", | |
"name": "send Product Query", | |
"topic": "", | |
"payload": "?P", | |
"payloadType": "str", | |
"repeat": "", | |
"crontab": "", | |
"once": false, | |
"x": 644, | |
"y": 117, | |
"wires": [ | |
[ | |
"2c5eddb3.488c12" | |
] | |
] | |
}, | |
{ | |
"id": "a6ead87c.d8ad18", | |
"type": "comment", | |
"z": "d2eb373.3f50cc8", | |
"name": "A trivial \"command\" to ask for the Product name", | |
"info": "This is a trivial \"command\" to ask for the Product name\nNotice that there is a switch node that recognizes the \"Product\" message and logs it", | |
"x": 713, | |
"y": 74, | |
"wires": [] | |
}, | |
{ | |
"id": "e8a027bd.80ae18", | |
"type": "comment", | |
"z": "d2eb373.3f50cc8", | |
"name": "A trivial flow node that will display the product information if it is received.", | |
"info": "", | |
"x": 360, | |
"y": 363, | |
"wires": [] | |
}, | |
{ | |
"id": "66517bad.78aab4", | |
"type": "serial-port", | |
"z": "", | |
"serialport": "COM3", | |
"serialbaud": "9600", | |
"databits": "8", | |
"parity": "none", | |
"stopbits": "1", | |
"newline": "\\n", | |
"bin": "false", | |
"out": "char", | |
"addchar": false | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment