Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DBE_Hackathon_
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lukas Weiss
DBE_Hackathon_
Commits
98c3692e
Commit
98c3692e
authored
3 years ago
by
Elias Waschin-Scholvin
Browse files
Options
Downloads
Patches
Plain Diff
Added diagram & node red
parent
0b3747fd
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arduino/sketch_main/NodeRedWebhook.h
+0
-37
0 additions, 37 deletions
arduino/sketch_main/NodeRedWebhook.h
diagramme/network_diagram.drawio
+1
-0
1 addition, 0 deletions
diagramme/network_diagram.drawio
node-red/flows.json
+1
-0
1 addition, 0 deletions
node-red/flows.json
with
2 additions
and
37 deletions
arduino/sketch_main/NodeRedWebhook.h
+
0
−
37
View file @
98c3692e
// The MIT License
//
// Copyright (c) 2015 Neil Webber
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ====================================================================
// ====================================================================
// An adapted version of IFTTT Trigger by Neil Webber
// Original: https://gist.github.com/outofmbufs/d6ced37b49a484c495f0
//
// Adaptation from: https://www.siytek.com
//
// How to use:
// 1. Place AnotherIFTTTWebhook.h in the same directory as your project
// 2. Add #include "AnotherIFTTTWebhook.h" to your main project file
// 3. Send webhook using function in main file:
// send_webhook(EVENT, KEY, Value1, Value2, Value3);
// ====================================================================
// ====================================================================
WiFiClient
client
;
char
*
append_str
(
char
*
here
,
char
*
s
)
{
...
...
This diff is collapsed.
Click to expand it.
diagramme/network_diagram.drawio
0 → 100644
+
1
−
0
View file @
98c3692e
<mxfile host="app.diagrams.net" modified="2021-06-29T11:54:28.735Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36" etag="1rAi664gc0BYV9x9ljho" version="14.8.2" type="device"><diagram id="V3U77Vv5iqy_bTxaA5fd" name="Page-1">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</diagram></mxfile>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
node-red/flows.json
0 → 100644
+
1
−
0
View file @
98c3692e
[{
"id"
:
"d8215ebc.732dd8"
,
"type"
:
"tab"
,
"label"
:
"Main Flow"
,
"disabled"
:
false
,
"info"
:
""
},{
"id"
:
"5c602d83.889c54"
,
"type"
:
"http in"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"RFID EVENT"
,
"url"
:
"/api/event"
,
"method"
:
"post"
,
"upload"
:
false
,
"swaggerDoc"
:
""
,
"x"
:
110
,
"y"
:
80
,
"wires"
:[[
"4be70f18.9e47e"
,
"7d731639.06c01"
,
"c99cee3c.6f0e78"
,
"ad6e7d8.975c5"
]]},{
"id"
:
"4be70f18.9e47e"
,
"type"
:
"debug"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"active"
:
false
,
"tosidebar"
:
true
,
"console"
:
false
,
"tostatus"
:
false
,
"complete"
:
"true"
,
"targetType"
:
"full"
,
"statusVal"
:
""
,
"statusType"
:
"auto"
,
"x"
:
630
,
"y"
:
160
,
"wires"
:[]},{
"id"
:
"7d731639.06c01"
,
"type"
:
"http response"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"statusCode"
:
""
,
"headers"
:{},
"x"
:
410
,
"y"
:
60
,
"wires"
:[]},{
"id"
:
"264fa9f8.52d77e"
,
"type"
:
"GSheet"
,
"z"
:
"d8215ebc.732dd8"
,
"creds"
:
"976f5bd4.52fe4"
,
"method"
:
"update"
,
"action"
:
""
,
"sheet"
:
"1NXADNkKZ02HHQZlrX3o4HwtVl0UBU6lH8LqV5HMVGwM"
,
"cells"
:
"Sheet1"
,
"flatten"
:
false
,
"name"
:
"Update"
,
"x"
:
960
,
"y"
:
340
,
"wires"
:[[
"6cc479c5.998b9"
,
"aee028e6.84f5a"
]]},{
"id"
:
"c99cee3c.6f0e78"
,
"type"
:
"change"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"rules"
:[{
"t"
:
"set"
,
"p"
:
"payload.timestamp"
,
"pt"
:
"msg"
,
"to"
:
""
,
"tot"
:
"date"
}],
"action"
:
""
,
"property"
:
""
,
"from"
:
""
,
"to"
:
""
,
"reg"
:
false
,
"x"
:
240
,
"y"
:
160
,
"wires"
:[[
"20ed3865.16da"
]]},{
"id"
:
"20ed3865.16da"
,
"type"
:
"function"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"Make array"
,
"func"
:
"
\n
msg.payload = [Object.values(msg.payload)];
\n
return msg;"
,
"outputs"
:
1
,
"noerr"
:
0
,
"initialize"
:
""
,
"finalize"
:
""
,
"libs"
:[],
"x"
:
270
,
"y"
:
220
,
"wires"
:[[
"ea13a46a.281998"
]]},{
"id"
:
"ad6e7d8.975c5"
,
"type"
:
"GSheet"
,
"z"
:
"d8215ebc.732dd8"
,
"creds"
:
"976f5bd4.52fe4"
,
"method"
:
"get"
,
"action"
:
""
,
"sheet"
:
"1NXADNkKZ02HHQZlrX3o4HwtVl0UBU6lH8LqV5HMVGwM"
,
"cells"
:
"Sheet1"
,
"flatten"
:
false
,
"name"
:
"Read Sheets"
,
"x"
:
90
,
"y"
:
340
,
"wires"
:[[
"c9c26ade.438548"
]]},{
"id"
:
"ea13a46a.281998"
,
"type"
:
"join"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"mode"
:
"custom"
,
"build"
:
"array"
,
"property"
:
"payload"
,
"propertyType"
:
"msg"
,
"key"
:
"topic"
,
"joiner"
:
"
\\
n"
,
"joinerType"
:
"str"
,
"accumulate"
:
false
,
"timeout"
:
""
,
"count"
:
"2"
,
"reduceRight"
:
false
,
"reduceExp"
:
""
,
"reduceInit"
:
""
,
"reduceInitType"
:
"num"
,
"reduceFixup"
:
""
,
"x"
:
450
,
"y"
:
220
,
"wires"
:[[
"dbf05a83.43c6c8"
,
"679962ee.0e161c"
]]},{
"id"
:
"c9c26ade.438548"
,
"type"
:
"function"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"Get Current users"
,
"func"
:
"
\n
msg.payload = msg.payload ? msg.payload : [];
\n
if(msg.payload.length === 0){
\n
flow.set(
\"
state
\"
,
\"
create
\"
);
\n
}
\n
return msg;"
,
"outputs"
:
1
,
"noerr"
:
0
,
"initialize"
:
""
,
"finalize"
:
""
,
"libs"
:[],
"x"
:
290
,
"y"
:
340
,
"wires"
:[[
"ea13a46a.281998"
]]},{
"id"
:
"dbf05a83.43c6c8"
,
"type"
:
"function"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"Filter New/Old Participants"
,
"func"
:
"
\n
const dict = {};
\n\n
msg.payload.forEach(array => {
\n
if(array && array.length > 0){
\n
array.forEach(arr => {
\n
if(arr && arr.length > 0){
\n
const id = arr[0];
\n
const timestamp = arr[1];
\n
if(!dict[id]){
\n
dict[id] = timestamp;
\n
} else {
\n
if(id){
\n
delete dict[id]
\n
flow.set(
\"
event
\"
,
\"
left
\"
);
\n
}
\n
}
\n
}
\n
})
\n
}
\n
})
\n
msg.payload = dict;
\n\n
return msg;"
,
"outputs"
:
1
,
"noerr"
:
0
,
"initialize"
:
""
,
"finalize"
:
""
,
"libs"
:[],
"x"
:
540
,
"y"
:
380
,
"wires"
:[[
"f49ab08c.b135a"
,
"679962ee.0e161c"
]]},{
"id"
:
"f49ab08c.b135a"
,
"type"
:
"function"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"Set Data"
,
"func"
:
"
\n
msg.payload = Object.entries(msg.payload);
\n
flow.set(
\"
data
\"
, msg.payload);
\n
if(msg.payload.length === 0){
\n
flow.set(
\"
state
\"
,
\"
destroy
\"
);
\n
}
\n
return msg;"
,
"outputs"
:
1
,
"noerr"
:
0
,
"initialize"
:
""
,
"finalize"
:
""
,
"libs"
:[],
"x"
:
640
,
"y"
:
380
,
"wires"
:[[
"da1fac90.167a4"
]]},{
"id"
:
"da1fac90.167a4"
,
"type"
:
"GSheet"
,
"z"
:
"d8215ebc.732dd8"
,
"creds"
:
"976f5bd4.52fe4"
,
"method"
:
"clear"
,
"action"
:
""
,
"sheet"
:
"1NXADNkKZ02HHQZlrX3o4HwtVl0UBU6lH8LqV5HMVGwM"
,
"cells"
:
"Sheet1"
,
"flatten"
:
false
,
"name"
:
"Clear"
,
"x"
:
670
,
"y"
:
280
,
"wires"
:[[
"e9849de9.62bcc"
]]},{
"id"
:
"29859e9c.806562"
,
"type"
:
"exec"
,
"z"
:
"d8215ebc.732dd8"
,
"command"
:
"open
\"
zoommtg://zoom.us/join?confno=8120015069
\"
"
,
"addpay"
:
""
,
"append"
:
""
,
"useSpawn"
:
"false"
,
"timer"
:
""
,
"oldrc"
:
false
,
"name"
:
"Open Zoom Meeting"
,
"x"
:
860
,
"y"
:
580
,
"wires"
:[[
"971531a8.ecc3b8"
,
"c390946b.be103"
],[
"971531a8.ecc3b8"
],[
"971531a8.ecc3b8"
]]},{
"id"
:
"971531a8.ecc3b8"
,
"type"
:
"debug"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"active"
:
false
,
"tosidebar"
:
true
,
"console"
:
false
,
"tostatus"
:
false
,
"complete"
:
"true"
,
"targetType"
:
"full"
,
"statusVal"
:
""
,
"statusType"
:
"auto"
,
"x"
:
1630
,
"y"
:
500
,
"wires"
:[]},{
"id"
:
"4b447b43.638a1c"
,
"type"
:
"exec"
,
"z"
:
"d8215ebc.732dd8"
,
"command"
:
"osascript -e 'tell application
\"
System Events
\"
to keystroke
\"
v
\"
using {command down, shift down}'"
,
"addpay"
:
""
,
"append"
:
""
,
"useSpawn"
:
"false"
,
"timer"
:
""
,
"oldrc"
:
false
,
"name"
:
"Start Kamera"
,
"x"
:
830
,
"y"
:
720
,
"wires"
:[[
"971531a8.ecc3b8"
],[
"971531a8.ecc3b8"
],[
"971531a8.ecc3b8"
]]},{
"id"
:
"c390946b.be103"
,
"type"
:
"delay"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"pauseType"
:
"delay"
,
"timeout"
:
"5"
,
"timeoutUnits"
:
"seconds"
,
"rate"
:
"1"
,
"nbRateUnits"
:
"1"
,
"rateUnits"
:
"second"
,
"randomFirst"
:
"1"
,
"randomLast"
:
"5"
,
"randomUnits"
:
"seconds"
,
"drop"
:
false
,
"x"
:
860
,
"y"
:
660
,
"wires"
:[[
"4b447b43.638a1c"
]]},{
"id"
:
"6cc479c5.998b9"
,
"type"
:
"debug"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"active"
:
false
,
"tosidebar"
:
true
,
"console"
:
false
,
"tostatus"
:
false
,
"complete"
:
"true"
,
"targetType"
:
"full"
,
"statusVal"
:
""
,
"statusType"
:
"auto"
,
"x"
:
1010
,
"y"
:
180
,
"wires"
:[]},{
"id"
:
"e9849de9.62bcc"
,
"type"
:
"function"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"Get Data"
,
"func"
:
"msg.payload = flow.get(
\"
data
\"
) || [];
\n
return msg;"
,
"outputs"
:
1
,
"noerr"
:
0
,
"initialize"
:
""
,
"finalize"
:
""
,
"libs"
:[],
"x"
:
820
,
"y"
:
280
,
"wires"
:[[
"264fa9f8.52d77e"
]]},{
"id"
:
"ee5fdcdc.299128"
,
"type"
:
"switch"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"property"
:
"state"
,
"propertyType"
:
"flow"
,
"rules"
:[{
"t"
:
"eq"
,
"v"
:
"create"
,
"vt"
:
"str"
},{
"t"
:
"eq"
,
"v"
:
"destroy"
,
"vt"
:
"str"
},{
"t"
:
"empty"
}],
"checkall"
:
"true"
,
"repair"
:
false
,
"outputs"
:
3
,
"x"
:
550
,
"y"
:
580
,
"wires"
:[[
"29859e9c.806562"
],[
"f136bcb6.dbe3a"
],[
"9bdc3042.0a2c68"
]]},{
"id"
:
"f136bcb6.dbe3a"
,
"type"
:
"exec"
,
"z"
:
"d8215ebc.732dd8"
,
"command"
:
"osascript -e 'tell application
\"
System Events
\"
to keystroke
\"
w
\"
using {command down}'"
,
"addpay"
:
""
,
"append"
:
""
,
"useSpawn"
:
"false"
,
"timer"
:
""
,
"oldrc"
:
false
,
"name"
:
"Leave Meeting"
,
"x"
:
840
,
"y"
:
800
,
"wires"
:[[
"b143833e.79625"
],[],[]]},{
"id"
:
"b143833e.79625"
,
"type"
:
"exec"
,
"z"
:
"d8215ebc.732dd8"
,
"command"
:
"osascript -e 'tell application
\"
System Events
\"
to key code 36'"
,
"addpay"
:
""
,
"append"
:
""
,
"useSpawn"
:
"false"
,
"timer"
:
""
,
"oldrc"
:
false
,
"name"
:
"Confirm"
,
"x"
:
820
,
"y"
:
860
,
"wires"
:[[
"971531a8.ecc3b8"
],[
"971531a8.ecc3b8"
],[
"971531a8.ecc3b8"
]]},{
"id"
:
"44e1d73c.21c3f"
,
"type"
:
"http in"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"ZOOM EVENT"
,
"url"
:
"/api/zoom"
,
"method"
:
"post"
,
"upload"
:
false
,
"swaggerDoc"
:
""
,
"x"
:
90
,
"y"
:
640
,
"wires"
:[[
"24a50db0.c9c6a2"
,
"c97ab3a8.934f28"
]]},{
"id"
:
"c97ab3a8.934f28"
,
"type"
:
"switch"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"property"
:
"payload.event"
,
"propertyType"
:
"msg"
,
"rules"
:[{
"t"
:
"eq"
,
"v"
:
"meeting.participant_joined"
,
"vt"
:
"str"
},{
"t"
:
"eq"
,
"v"
:
"meeting.participant_left"
,
"vt"
:
"str"
}],
"checkall"
:
"true"
,
"repair"
:
false
,
"outputs"
:
2
,
"x"
:
230
,
"y"
:
640
,
"wires"
:[[
"e783f5bb.c5241"
],[
"930cfe57.261cf8"
]]},{
"id"
:
"9bdc3042.0a2c68"
,
"type"
:
"debug"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"Someone Left/Joined"
,
"active"
:
false
,
"tosidebar"
:
true
,
"console"
:
false
,
"tostatus"
:
false
,
"complete"
:
"payload"
,
"targetType"
:
"msg"
,
"statusVal"
:
""
,
"statusType"
:
"auto"
,
"x"
:
940
,
"y"
:
460
,
"wires"
:[]},{
"id"
:
"24a50db0.c9c6a2"
,
"type"
:
"http response"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"statusCode"
:
""
,
"headers"
:{},
"x"
:
210
,
"y"
:
560
,
"wires"
:[]},{
"id"
:
"3a06e922.048316"
,
"type"
:
"GSheet"
,
"z"
:
"d8215ebc.732dd8"
,
"creds"
:
"976f5bd4.52fe4"
,
"method"
:
"update"
,
"action"
:
""
,
"sheet"
:
"1NXADNkKZ02HHQZlrX3o4HwtVl0UBU6lH8LqV5HMVGwM"
,
"cells"
:
"Sheet2!A1"
,
"flatten"
:
false
,
"name"
:
"Update"
,
"x"
:
360
,
"y"
:
860
,
"wires"
:[[]]},{
"id"
:
"b91c0314.1bc468"
,
"type"
:
"GSheet"
,
"z"
:
"d8215ebc.732dd8"
,
"creds"
:
"976f5bd4.52fe4"
,
"method"
:
"get"
,
"action"
:
""
,
"sheet"
:
"1NXADNkKZ02HHQZlrX3o4HwtVl0UBU6lH8LqV5HMVGwM"
,
"cells"
:
"Sheet2!A1"
,
"flatten"
:
false
,
"name"
:
"Read Sheet user count"
,
"x"
:
140
,
"y"
:
780
,
"wires"
:[[
"20657284.7d0816"
]]},{
"id"
:
"e783f5bb.c5241"
,
"type"
:
"function"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"Joined"
,
"func"
:
"flow.set(
\"
event
\"
,
\"
joined
\"
);
\n
return msg;"
,
"outputs"
:
1
,
"noerr"
:
0
,
"initialize"
:
""
,
"finalize"
:
""
,
"libs"
:[],
"x"
:
370
,
"y"
:
600
,
"wires"
:[[
"b91c0314.1bc468"
]]},{
"id"
:
"930cfe57.261cf8"
,
"type"
:
"function"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"Left"
,
"func"
:
"flow.set(
\"
event
\"
,
\"
left
\"
);
\n
return msg;"
,
"outputs"
:
1
,
"noerr"
:
0
,
"initialize"
:
""
,
"finalize"
:
""
,
"libs"
:[],
"x"
:
370
,
"y"
:
680
,
"wires"
:[[
"b91c0314.1bc468"
]]},{
"id"
:
"20657284.7d0816"
,
"type"
:
"function"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"Update Participants"
,
"func"
:
"const event = flow.get(
\"
event
\"
);
\n
if(event ===
\"
left
\"
){
\n
msg.payload[0] = Number(msg.payload[0] || 0) - 1;
\n
}
\n
if(event ===
\"
joined
\"
){
\n
msg.payload[0] = Number(msg.payload[0] || 0) + 1;
\n
}
\n
return msg;"
,
"outputs"
:
1
,
"noerr"
:
0
,
"initialize"
:
""
,
"finalize"
:
""
,
"libs"
:[],
"x"
:
380
,
"y"
:
780
,
"wires"
:[[
"3a06e922.048316"
,
"224d9288.f2b70e"
]]},{
"id"
:
"224d9288.f2b70e"
,
"type"
:
"switch"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"property"
:
"payload[0]"
,
"propertyType"
:
"msg"
,
"rules"
:[{
"t"
:
"eq"
,
"v"
:
"0"
,
"vt"
:
"str"
}],
"checkall"
:
"true"
,
"repair"
:
false
,
"outputs"
:
1
,
"x"
:
610
,
"y"
:
780
,
"wires"
:[[]]},{
"id"
:
"aee028e6.84f5a"
,
"type"
:
"GSheet"
,
"z"
:
"d8215ebc.732dd8"
,
"creds"
:
"976f5bd4.52fe4"
,
"method"
:
"get"
,
"action"
:
""
,
"sheet"
:
"1NXADNkKZ02HHQZlrX3o4HwtVl0UBU6lH8LqV5HMVGwM"
,
"cells"
:
"Sheet2!A1"
,
"flatten"
:
false
,
"name"
:
"Read Sheet current users"
,
"x"
:
870
,
"y"
:
400
,
"wires"
:[[
"de7aaa73.afc3b"
]]},{
"id"
:
"de7aaa73.afc3b"
,
"type"
:
"function"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
"Should close?"
,
"func"
:
"
\n
if(flow.get(
\"
state
\"
) ===
\"
destroy
\"
){
\n
flow.set(
\"
state
\"
, Number(msg.payload[0]) - 1 === 0 ?
\"
destroy
\"
: undefined);
\n
}
\n
return msg;"
,
"outputs"
:
1
,
"noerr"
:
0
,
"initialize"
:
""
,
"finalize"
:
""
,
"libs"
:[],
"x"
:
640
,
"y"
:
460
,
"wires"
:[[
"ee5fdcdc.299128"
]]},{
"id"
:
"679962ee.0e161c"
,
"type"
:
"debug"
,
"z"
:
"d8215ebc.732dd8"
,
"name"
:
""
,
"active"
:
true
,
"tosidebar"
:
true
,
"console"
:
false
,
"tostatus"
:
false
,
"complete"
:
"true"
,
"targetType"
:
"full"
,
"statusVal"
:
""
,
"statusType"
:
"auto"
,
"x"
:
390
,
"y"
:
460
,
"wires"
:[]},{
"id"
:
"976f5bd4.52fe4"
,
"type"
:
"gauth"
}]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment