Last active
August 29, 2015 14:23
-
-
Save impy88/b8b20e2b711d94426809 to your computer and use it in GitHub Desktop.
Node-red engine test-flow
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
[ | |
{ | |
"type":"tab", | |
"id":"4f89532b.b076ac", | |
"label":"Sheet 1" | |
}, | |
{ | |
"id":"cb4f96b0.34b068", | |
"type":"mqtt-broker", | |
"broker":"rabbitmq", | |
"port":"1883", | |
"clientid":"" | |
}, | |
{ | |
"id":"aecbbf35.51344", | |
"type":"mqtt in", | |
"name":"", | |
"topic":"+/detection", | |
"broker":"cb4f96b0.34b068", | |
"x":109, | |
"y":205, | |
"z":"4f89532b.b076ac", | |
"wires":[ | |
[ | |
"6028e4d3.9fd71c" | |
] | |
] | |
}, | |
{ | |
"id":"b31b6ba7.4ce498", | |
"type":"inject", | |
"name":"First action", | |
"topic":"", | |
"payload":"", | |
"payloadType":"date", | |
"repeat":"", | |
"crontab":"", | |
"once":false, | |
"x":131, | |
"y":346, | |
"z":"4f89532b.b076ac", | |
"wires":[ | |
[ | |
"8ce78c95.73187" | |
] | |
] | |
}, | |
{ | |
"id":"9ee64d0d.6119b", | |
"type":"http request", | |
"name":"Send to Engine with HTTP POST", | |
"method":"POST", | |
"ret":"txt", | |
"url":"http://web:3000/detections", | |
"x":653, | |
"y":206, | |
"z":"4f89532b.b076ac", | |
"wires":[ | |
[ | |
"5028346e.afd7cc" | |
] | |
] | |
}, | |
{ | |
"id":"5028346e.afd7cc", | |
"type":"debug", | |
"name":"", | |
"active":true, | |
"console":"false", | |
"complete":"true", | |
"x":872, | |
"y":206, | |
"z":"4f89532b.b076ac", | |
"wires":[ | |
] | |
}, | |
{ | |
"id":"8ce78c95.73187", | |
"type":"function", | |
"name":"Demo data (no offence)", | |
"func":"msg.payload = {\n \"detectionID\":\"732bdcb0-18c0-11e5-a270-f7a5f22ef254\",\n \"deviceID\":\"7f944f8b-2607-4286-a2f8-9c66f3d35d02\",\n \"operatorID\":\"bd47922f-9419-43a6-90d5-6d31f2a19a56\",\n \"detectionType\":\"ANPR\",\n \"detectionTime\":\"2015-06-25T15:55:14.971+0000\",\n \"plates\":[\n \"XY000XX\"\n ],\n \"images\":[\n\n ],\n \"assetPosition\":{\n \"type\":\"Point\",\n \"coordinates\":[\n 0,\n 0\n ]\n },\n \"detectionPosition\":{\n \"type\":\"Point\",\n \"coordinates\":[\n 1,\n 1\n ]\n },\n \"warnings\":[\n\n ]\n};\n\nreturn msg;", | |
"outputs":1, | |
"noerr":0, | |
"x":337, | |
"y":346, | |
"z":"4f89532b.b076ac", | |
"wires":[ | |
[ | |
"9ee64d0d.6119b" | |
] | |
] | |
}, | |
{ | |
"id":"6028e4d3.9fd71c", | |
"type":"json", | |
"name":"", | |
"x":252, | |
"y":205, | |
"z":"4f89532b.b076ac", | |
"wires":[ | |
[ | |
"9ee64d0d.6119b" | |
] | |
] | |
}, | |
{ | |
"id":"6b05c649.94fa38", | |
"type":"inject", | |
"name":"Second action", | |
"topic":"", | |
"payload":"", | |
"payloadType":"date", | |
"repeat":"", | |
"crontab":"", | |
"once":false, | |
"x":141, | |
"y":399, | |
"z":"4f89532b.b076ac", | |
"wires":[ | |
[ | |
"749ae505.8b651c" | |
] | |
] | |
}, | |
{ | |
"id":"749ae505.8b651c", | |
"type":"function", | |
"name":"Demo data (duration offence)", | |
"func":"msg.payload = {\n \"detectionID\":\"732bdcb0-18c0-11e5-a270-f7a5f22ef254\",\n \"deviceID\":\"7f944f8b-2607-4286-a2f8-9c66f3d35d02\",\n \"operatorID\":\"bd47922f-9419-43a6-90d5-6d31f2a19a56\",\n \"detectionType\":\"ANPR\",\n \"detectionTime\":\"2015-06-25T16:55:14.971+0000\",\n \"plates\":[\n \"XY000XX\"\n ],\n \"images\":[\n\n ],\n \"assetPosition\":{\n \"type\":\"Point\",\n \"coordinates\":[\n 0,\n 0\n ]\n },\n \"detectionPosition\":{\n \"type\":\"Point\",\n \"coordinates\":[\n 1,\n 1\n ]\n },\n \"warnings\":[\n\n ]\n};\n\nreturn msg;", | |
"outputs":1, | |
"noerr":0, | |
"x":352, | |
"y":399, | |
"z":"4f89532b.b076ac", | |
"wires":[ | |
[ | |
"9ee64d0d.6119b" | |
] | |
] | |
}, | |
{ | |
"id":"539d2ee7.ac62d", | |
"type":"comment", | |
"name":"Actions (click right square) ...", | |
"info":"You can click right square actions step-by-step.\n\n**First one** will create detection\n\n**Second one** will create also detection on the same position,\nbut not on the same time, that will cause duration offence. Ticket will be created", | |
"x":163, | |
"y":296, | |
"z":"4f89532b.b076ac", | |
"wires":[ | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment