Created
July 14, 2017 10:46
-
-
Save dexterlabora/de6381ca8e0d91fd05356b53d6dd070e to your computer and use it in GitHub Desktop.
A Node-RED flow to demonstrate the Meraki CMX/Scanning Node (updated version with BLE support)
This file contains hidden or 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":"8d0a63e4.7ff19","type":"debug","z":"9560177e.d80b58","name":"Data","active":true,"console":"false","complete":"payload","x":510,"y":120,"wires":[]},{"id":"e6a6b005.01677","type":"Meraki CMX","z":"9560177e.d80b58","name":"","url":"/scanning","settings":"","radioType":"BluetoothDevicesSeen","x":100,"y":140,"wires":[["8d0a63e4.7ff19","23f1e4d9.3149ec"],["a303ae76.9149d"]]},{"id":"6b254578.dfd17c","type":"debug","z":"9560177e.d80b58","name":"Status: Data","active":true,"console":"false","complete":"true","x":490,"y":200,"wires":[]},{"id":"aa97b7a4.7e4b18","type":"split","z":"9560177e.d80b58","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":330,"y":520,"wires":[["5700cec1.0367b"]]},{"id":"cb89fe11.4c4b5","type":"function","z":"9560177e.d80b58","name":"Extract Observations","func":"// Flatten JSON\nmsg.type = msg.payload.type;\nmsg.apMac = msg.payload.data.apMac;\nmsg.apFloors = msg.payload.data.apFloors\nmsg.apTags = msg.payload.data.apTags;\nmsg.payload = msg.payload.data.observations;\n\nreturn msg;","outputs":1,"noerr":0,"x":240,"y":480,"wires":[["aa97b7a4.7e4b18"]]},{"id":"5700cec1.0367b","type":"debug","z":"9560177e.d80b58","name":"Observation","active":true,"console":"false","complete":"true","x":490,"y":520,"wires":[]},{"id":"a303ae76.9149d","type":"switch","z":"9560177e.d80b58","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"data","vt":"str"},{"t":"eq","v":"version","vt":"str"},{"t":"eq","v":"validator","vt":"str"},{"t":"eq","v":"secret","vt":"str"},{"t":"eq","v":"type","vt":"str"},{"t":"eq","v":"error","vt":"str"},{"t":"else"}],"checkall":"true","outputs":7,"x":290,"y":300,"wires":[["6b254578.dfd17c"],["53f245f.0b2c2bc"],["5287b886.c827f8"],["4668f0fa.353d8"],["7946f407.72013c"],["adce6018.ce8af"],["4c7a8875.a90598"]]},{"id":"5287b886.c827f8","type":"debug","z":"9560177e.d80b58","name":"Status: Validator","active":true,"console":"false","complete":"true","x":480,"y":280,"wires":[]},{"id":"4668f0fa.353d8","type":"debug","z":"9560177e.d80b58","name":"Status: Secret","active":true,"console":"false","complete":"true","x":480,"y":320,"wires":[]},{"id":"7946f407.72013c","type":"debug","z":"9560177e.d80b58","name":"Status: Type","active":true,"console":"false","complete":"true","x":490,"y":360,"wires":[]},{"id":"adce6018.ce8af","type":"debug","z":"9560177e.d80b58","name":"Status: Error","active":true,"console":"false","complete":"true","x":490,"y":400,"wires":[]},{"id":"4c7a8875.a90598","type":"debug","z":"9560177e.d80b58","name":"Status: Otherwise","active":true,"console":"false","complete":"true","x":470,"y":440,"wires":[]},{"id":"23f1e4d9.3149ec","type":"link out","z":"9560177e.d80b58","name":"Meraki Scanning","links":["21b70a5e.6a00c6"],"x":275,"y":160,"wires":[]},{"id":"21b70a5e.6a00c6","type":"link in","z":"9560177e.d80b58","name":"Split Observations","links":["23f1e4d9.3149ec"],"x":60,"y":480,"wires":[["cb89fe11.4c4b5"]]},{"id":"ae4f659c.475398","type":"comment","z":"9560177e.d80b58","name":"Workflow Examples","info":"","x":120,"y":440,"wires":[]},{"id":"53f245f.0b2c2bc","type":"debug","z":"9560177e.d80b58","name":"Status: Version","active":true,"console":"false","complete":"true","x":480,"y":240,"wires":[]},{"id":"e7a18191.9674a","type":"comment","z":"9560177e.d80b58","name":"Meraki Scanning Node - README","info":"Update the Meraki node with your Meraki Network's\nvalidator and secret","x":410,"y":60,"wires":[]}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment