-
Notifications
You must be signed in to change notification settings - Fork 1
/
Scan.flow
109 lines (109 loc) · 2.43 KB
/
Scan.flow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
[
{
"id": "84039ba7.c8bb48",
"type": "tab",
"label": "BTLE Scan"
},
{
"id": "156473b5.fc0dcc",
"type": "scan ble",
"z": "84039ba7.c8bb48",
"uuids": "",
"duplicates": false,
"name": "",
"x": 951.5,
"y": 198,
"wires": [
[
"b47ce7a2.a8b5e8"
]
]
},
{
"id": "471fbcc1.b7c5c4",
"type": "inject",
"z": "84039ba7.c8bb48",
"name": "Scan Every 30 seconds",
"topic": "",
"payload": "on",
"payloadType": "str",
"repeat": "30",
"crontab": "",
"once": false,
"x": 223,
"y": 198,
"wires": [
[
"7bda4c53.c779c4"
]
]
},
{
"id": "7bda4c53.c779c4",
"type": "trigger",
"z": "84039ba7.c8bb48",
"op1": "on",
"op2": "off",
"op1type": "str",
"op2type": "str",
"duration": "28",
"extend": false,
"units": "s",
"reset": "",
"name": "stop after 28 seconds",
"x": 504,
"y": 198,
"wires": [
[
"1f3d8448.d197cc"
]
]
},
{
"id": "1f3d8448.d197cc",
"type": "function",
"z": "84039ba7.c8bb48",
"name": "Scan Command",
"func": "if (msg.payload === 'on') {\n msg.payload = { scan: true};\n} else {\n msg.payload = { scan: false};\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 740,
"y": 198,
"wires": [
[
"156473b5.fc0dcc"
]
]
},
{
"id": "b47ce7a2.a8b5e8",
"type": "mqtt out",
"z": "84039ba7.c8bb48",
"name": "Found Devices",
"topic": "BTLE/found",
"qos": "0",
"retain": "false",
"broker": "f12b3b93.96e338",
"x": 1191.5,
"y": 198,
"wires": []
},
{
"id": "f12b3b93.96e338",
"type": "mqtt-broker",
"z": "",
"broker": "localhost",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": false,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
}
]