Skip to content

Commit 18808a6

Browse files
authored
version 2.0
1 parent ec0397f commit 18808a6

File tree

1 file changed

+148
-19
lines changed

1 file changed

+148
-19
lines changed

FreeTAKHub VideoChecker.json

Lines changed: 148 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@
1414
"method": "POST",
1515
"ret": "txt",
1616
"paytoqs": "ignore",
17-
"url": "{{{addr}}}:{{{port}}}/ManageVideoStream/postVideoStream",
17+
"url": "http://127.0.0.1:19023/ManageVideoStream/postVideoStream",
1818
"tls": "",
1919
"persist": false,
2020
"proxy": "",
21+
"insecureHTTPParser": false,
2122
"authType": "bearer",
2223
"senderr": false,
24+
"headers": [],
2325
"x": 970,
2426
"y": 240,
2527
"wires": [
@@ -126,7 +128,7 @@
126128
"type": "function",
127129
"z": "e81402f5.f8254",
128130
"name": "CreateVideoStream",
129-
"func": "\n msg.addr = global.get('FTH_FTS_URL');\n msg.port = global.get('FTH_FTS_API_Port');\n msg.streamPort = global.get('FTH_FTS_STREAM_Port');\n msg.streamAddress = global.get('FTH_FTS_VIDEO_URL');\n let streamPath = msg.payload;\n let alias = msg.payload;\n let streamProtocol= \"rtsp\";\n let token = global.get('FTH_FTS_API_Auth') ;\n \n\nmsg.payload = [];\n\n msg.payload={\n alias: alias,\n streamProtocol: streamProtocol,\n streamAddress: msg.streamAddress,\n streamPort: msg.streamPort ,\n streamPath: streamPath,\n };\n \nmsg.headers = {};\nmsg.headers['Authorization'] = \"Bearer \"+ token;\n \nreturn msg;\n\n",
131+
"func": "\n msg.addr = global.get('FTH_FTS_URL');\n msg.port = global.get('FTH_FTS_API_Port');\n msg.streamPort = global.get('FTH_FTS_STREAM_Port');\n msg.streamAddress = global.get('FTH_FTS_VIDEO_URL');\n let streamPath = msg.payload;\n let alias = msg.payload;\n let streamProtocol= \"rtsp\";\n\n \n\nmsg.payload = [];\n\n msg.payload={\n alias: alias,\n streamProtocol: streamProtocol,\n streamAddress: msg.streamAddress,\n streamPort: msg.streamPort ,\n streamPath: streamPath,\n };\n \nreturn msg;\n\n",
130132
"outputs": 1,
131133
"noerr": 0,
132134
"initialize": "",
@@ -150,8 +152,8 @@
150152
"tosidebar": true,
151153
"console": false,
152154
"tostatus": false,
153-
"complete": "true",
154-
"targetType": "full",
155+
"complete": "payload",
156+
"targetType": "msg",
155157
"statusVal": "",
156158
"statusType": "auto",
157159
"x": 970,
@@ -162,7 +164,7 @@
162164
"id": "f8da2c2e.b2fb3",
163165
"type": "debug",
164166
"z": "e81402f5.f8254",
165-
"name": "Retunr Message",
167+
"name": "post",
166168
"active": false,
167169
"tosidebar": true,
168170
"console": false,
@@ -171,7 +173,7 @@
171173
"targetType": "full",
172174
"statusVal": "",
173175
"statusType": "auto",
174-
"x": 1180,
176+
"x": 1150,
175177
"y": 180,
176178
"wires": []
177179
},
@@ -183,12 +185,11 @@
183185
"method": "GET",
184186
"ret": "obj",
185187
"paytoqs": "ignore",
186-
"url": "http://147.182.128.123:9997/v1/paths/list",
188+
"url": "http://127.0.0.1:9997/v1/paths/list",
187189
"tls": "",
188190
"persist": false,
189191
"proxy": "",
190192
"authType": "",
191-
"senderr": false,
192193
"x": 490,
193194
"y": 160,
194195
"wires": [
@@ -202,16 +203,16 @@
202203
"id": "801fd65f.5be7d8",
203204
"type": "debug",
204205
"z": "e81402f5.f8254",
205-
"name": "received from JSON",
206-
"active": false,
206+
"name": "received from Video server JSON",
207+
"active": true,
207208
"tosidebar": true,
208209
"console": false,
209210
"tostatus": false,
210211
"complete": "true",
211212
"targetType": "full",
212213
"statusVal": "",
213214
"statusType": "auto",
214-
"x": 540,
215+
"x": 580,
215216
"y": 80,
216217
"wires": []
217218
},
@@ -241,6 +242,73 @@
241242
]
242243
]
243244
},
245+
{
246+
"id": "e7eb8030.427a4",
247+
"type": "switch",
248+
"z": "e81402f5.f8254",
249+
"name": "check streams",
250+
"property": "payload.source",
251+
"propertyType": "msg",
252+
"rules": [
253+
{
254+
"t": "nempty"
255+
},
256+
{
257+
"t": "null"
258+
},
259+
{
260+
"t": "eq",
261+
"v": "",
262+
"vt": "str"
263+
}
264+
],
265+
"checkall": "true",
266+
"repair": false,
267+
"outputs": 3,
268+
"x": 600,
269+
"y": 400,
270+
"wires": [
271+
[],
272+
[
273+
"7fc68a9f.e82fe4"
274+
],
275+
[]
276+
]
277+
},
278+
{
279+
"id": "7fc68a9f.e82fe4",
280+
"type": "debug",
281+
"z": "e81402f5.f8254",
282+
"name": "no stream!",
283+
"active": true,
284+
"tosidebar": true,
285+
"console": false,
286+
"tostatus": false,
287+
"complete": "true",
288+
"targetType": "full",
289+
"statusVal": "",
290+
"statusType": "auto",
291+
"x": 830,
292+
"y": 440,
293+
"wires": []
294+
},
295+
{
296+
"id": "b6661f0d.790e8",
297+
"type": "debug",
298+
"z": "e81402f5.f8254",
299+
"name": "after split",
300+
"active": true,
301+
"tosidebar": true,
302+
"console": false,
303+
"tostatus": false,
304+
"complete": "payload",
305+
"targetType": "msg",
306+
"statusVal": "",
307+
"statusType": "auto",
308+
"x": 620,
309+
"y": 460,
310+
"wires": []
311+
},
244312
{
245313
"id": "70339513.554ecc",
246314
"type": "split",
@@ -261,6 +329,26 @@
261329
]
262330
]
263331
},
332+
{
333+
"id": "90676aac.d49f98",
334+
"type": "split",
335+
"z": "e81402f5.f8254",
336+
"name": "",
337+
"splt": "\\n",
338+
"spltType": "str",
339+
"arraySplt": 1,
340+
"arraySpltType": "len",
341+
"stream": false,
342+
"addname": "",
343+
"x": 410,
344+
"y": 420,
345+
"wires": [
346+
[
347+
"b6661f0d.790e8",
348+
"e7eb8030.427a4"
349+
]
350+
]
351+
},
264352
{
265353
"id": "ab5e51e8.e29b5",
266354
"type": "function",
@@ -289,7 +377,7 @@
289377
{
290378
"p": "FTH_FTS_URL",
291379
"pt": "global",
292-
"to": "147.182.190.54",
380+
"to": "204.48.30.216",
293381
"tot": "str"
294382
},
295383
{
@@ -319,14 +407,20 @@
319407
{
320408
"p": "FTH_FTS_VIDEO_URL",
321409
"pt": "global",
322-
"to": "147.182.190.54",
410+
"to": "204.48.30.216",
323411
"tot": "str"
324412
},
325413
{
326414
"p": "FTH_FTS_VIDEO_API_PORT",
327415
"pt": "global",
328416
"to": "9997",
329417
"tot": "str"
418+
},
419+
{
420+
"p": "FTH_FTS_EndPoints_geoObject_POST",
421+
"pt": "global",
422+
"to": "/ManageGeoObject/postGeoObject",
423+
"tot": "str"
330424
}
331425
],
332426
"active": true,
@@ -376,7 +470,7 @@
376470
"type": "debug",
377471
"z": "e81402f5.f8254",
378472
"name": "after function",
379-
"active": true,
473+
"active": false,
380474
"tosidebar": true,
381475
"console": false,
382476
"tostatus": false,
@@ -389,10 +483,10 @@
389483
"wires": []
390484
},
391485
{
392-
"id": "052f9e0b7aac6ec0",
486+
"id": "bfadd2cc.7c368",
393487
"type": "inject",
394488
"z": "e81402f5.f8254",
395-
"name": "Check FTS",
489+
"name": "",
396490
"props": [
397491
{
398492
"p": "payload"
@@ -409,12 +503,47 @@
409503
"topic": "",
410504
"payload": "",
411505
"payloadType": "date",
412-
"x": 410,
413-
"y": 280,
506+
"x": 390,
507+
"y": 520,
414508
"wires": [
415509
[
416-
"41b82d8d.8266e4"
510+
"a4bc3376.a38dd"
417511
]
418512
]
513+
},
514+
{
515+
"id": "a4bc3376.a38dd",
516+
"type": "function",
517+
"z": "e81402f5.f8254",
518+
"name": "",
519+
"func": "var colors=[\"red\",\"blue\",\"green\"];\nfor (let i = 0; i < colors.length; i++) { \n msg.payload = colors[i]\n node.send(msg);\n}\nreturn;",
520+
"outputs": 1,
521+
"noerr": 0,
522+
"initialize": "",
523+
"finalize": "",
524+
"libs": [],
525+
"x": 580,
526+
"y": 520,
527+
"wires": [
528+
[
529+
"c290bbb3.401e98"
530+
]
531+
]
532+
},
533+
{
534+
"id": "c290bbb3.401e98",
535+
"type": "debug",
536+
"z": "e81402f5.f8254",
537+
"name": "",
538+
"active": true,
539+
"tosidebar": true,
540+
"console": false,
541+
"tostatus": false,
542+
"complete": "false",
543+
"statusVal": "",
544+
"statusType": "auto",
545+
"x": 790,
546+
"y": 520,
547+
"wires": []
419548
}
420549
]

0 commit comments

Comments
 (0)