Last active
August 29, 2015 14:19
-
-
Save msolli/21da3eb02637bc88e1a4 to your computer and use it in GitHub Desktop.
FINN oppdrag Sales Bell
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": "3a9c537c.c563ac", | |
"label": "FINN oppdrag Sales Bell" | |
}, | |
{ | |
"id": "7003d90b.8ffc28", | |
"type": "arduino-board", | |
"device": "/dev/cu.usbmodem1421" | |
}, | |
{ | |
"id": "183198d4.e7ce67", | |
"type": "inject", | |
"name": "Trigger bell", | |
"topic": "", | |
"payload": "", | |
"payloadType": "none", | |
"repeat": "", | |
"crontab": "", | |
"once": false, | |
"x": 571, | |
"y": 464, | |
"z": "3a9c537c.c563ac", | |
"wires": [["ffde01e1.0022"]] | |
}, | |
{ | |
"id": "c9f7846a.360878", | |
"type": "arduino out", | |
"name": "Servo", | |
"pin": "13", | |
"state": "SERVO", | |
"arduino": "7003d90b.8ffc28", | |
"x": 1034, | |
"y": 435, | |
"z": "3a9c537c.c563ac", | |
"wires": [] | |
}, | |
{ | |
"id": "bfc00681.403ff8", | |
"type": "http request", | |
"name": "Sales Bell API", | |
"method": "GET", | |
"ret": "txt", | |
"url": "http://www.finn.no/oppdrag/backstage/stats/ad-hoc-sales.json", | |
"x": 469, | |
"y": 171, | |
"z": "3a9c537c.c563ac", | |
"wires": [["d9585091.26a7b"]] | |
}, | |
{ | |
"id": "a6778419.598878", | |
"type": "debug", | |
"name": "Count debug", | |
"active": true, | |
"console": "false", | |
"complete": "true", | |
"x": 971, | |
"y": 168, | |
"z": "3a9c537c.c563ac", | |
"wires": [] | |
}, | |
{ | |
"id": "ca86eee9.35791", | |
"type": "inject", | |
"name": "Start", | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"repeat": "10", | |
"crontab": "", | |
"once": true, | |
"x": 117, | |
"y": 167, | |
"z": "3a9c537c.c563ac", | |
"wires": [["5ca0850a.a35f7c"]] | |
}, | |
{ | |
"id": "ffde01e1.0022", | |
"type": "trigger", | |
"op1": "130", | |
"op2": "175", | |
"op1type": "val", | |
"op2type": "val", | |
"duration": "250", | |
"extend": "false", | |
"units": "ms", | |
"name": "Hit bell", | |
"x": 800, | |
"y": 451, | |
"z": "3a9c537c.c563ac", | |
"wires": [["c9f7846a.360878"]] | |
}, | |
{ | |
"id": "5ca0850a.a35f7c", | |
"type": "function", | |
"name": "Cookies", | |
"func": "msg.headers = {\n \"Cookie\": \"__flt_ci=secret; __flt=secret; __flt_dev=secret\"\n};\n\nreturn msg;", | |
"outputs": 1, | |
"valid": true, | |
"x": 298, | |
"y": 167, | |
"z": "3a9c537c.c563ac", | |
"wires": [["bfc00681.403ff8"]] | |
}, | |
{ | |
"id": "d9585091.26a7b", | |
"type": "json", | |
"name": "", | |
"x": 666, | |
"y": 205, | |
"z": "3a9c537c.c563ac", | |
"wires": [["af427549.50bd88"]] | |
}, | |
{ | |
"id": "af427549.50bd88", | |
"type": "function", | |
"name": "Check count", | |
"func": "context.count = context.count || msg.payload.count;\n\nif (msg.payload.count > context.count) {\n context.count = msg.payload.count;\n return [null, msg];\n}\n\nreturn [msg, null];", | |
"outputs": "2", | |
"valid": true, | |
"x": 710, | |
"y": 282, | |
"z": "3a9c537c.c563ac", | |
"wires": [ | |
["a6778419.598878"], | |
["ffde01e1.0022"] | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment