From 62ec7f4d3756c6a214e1a21a5569cf47e9916dd3 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Sat, 2 May 2020 00:18:24 +0900 Subject: [PATCH 1/8] add examples of common category nodes --- .../@node-red/nodes/examples/common/catch/1 example.json | 1 + .../@node-red/nodes/examples/common/complete/1 example.json | 1 + .../@node-red/nodes/examples/common/debug/1 example.json | 1 + .../@node-red/nodes/examples/common/link/1 example.json | 1 + .../@node-red/nodes/examples/common/status/1 example.json | 1 + 5 files changed, 5 insertions(+) create mode 100644 packages/node_modules/@node-red/nodes/examples/common/catch/1 example.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/complete/1 example.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/link/1 example.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/status/1 example.json diff --git a/packages/node_modules/@node-red/nodes/examples/common/catch/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/catch/1 example.json new file mode 100644 index 000000000..a1c6611e3 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/catch/1 example.json @@ -0,0 +1 @@ +[{"id":"d1073c30.cb321","type":"inject","z":"f7ca1653.2d17b8","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":160,"wires":[["7bab9134.35ad"]]},{"id":"f96f0ba7.cfe008","type":"debug","z":"f7ca1653.2d17b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":550,"y":200,"wires":[]},{"id":"3ea03953.25a1a6","type":"comment","z":"f7ca1653.2d17b8","name":"Example: Catch Node","info":"Catch node can catch error caused by specified nodes or all nodes in a flow. It receives input of target node.","x":160,"y":60,"wires":[]},{"id":"d6a15623.056d18","type":"comment","z":"f7ca1653.2d17b8","name":"Catch error of a node","info":"","x":200,"y":120,"wires":[]},{"id":"7e1c072c.bc1cc8","type":"comment","z":"f7ca1653.2d17b8","name":"Catch error caused by function node","info":"","x":480,"y":240,"wires":[]},{"id":"b45ca54e.eca208","type":"catch","z":"f7ca1653.2d17b8","name":"","scope":["7bab9134.35ad"],"uncaught":false,"x":400,"y":200,"wires":[["f96f0ba7.cfe008"]]},{"id":"7bab9134.35ad","type":"function","z":"f7ca1653.2d17b8","name":"Error","func":"throw new Error(\"Error Occured!\")","outputs":0,"noerr":0,"x":390,"y":160,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/complete/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/complete/1 example.json new file mode 100644 index 000000000..ab3fb29f5 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/complete/1 example.json @@ -0,0 +1 @@ +[{"id":"9df3290f.c6d2e8","type":"inject","z":"238b1aa0.fa96f6","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":140,"wires":[["96f1096b.2f82a8"]]},{"id":"96f1096b.2f82a8","type":"debug","z":"238b1aa0.fa96f6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":390,"y":140,"wires":[]},{"id":"23811105.474c6e","type":"complete","z":"238b1aa0.fa96f6","name":"","scope":["96f1096b.2f82a8"],"uncaught":false,"x":390,"y":180,"wires":[["f06a3fc9.6bab7"]]},{"id":"f06a3fc9.6bab7","type":"debug","z":"238b1aa0.fa96f6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":580,"y":180,"wires":[]},{"id":"34d5ef47.79e72","type":"comment","z":"238b1aa0.fa96f6","name":"Example: Complete Node","info":"Complete node can catch completion of specified nodes. It receives input of target node.","x":150,"y":40,"wires":[]},{"id":"6ed443a1.a0c3cc","type":"comment","z":"238b1aa0.fa96f6","name":"Catch completion of a node","info":"","x":200,"y":100,"wires":[]},{"id":"70b28e37.84edd","type":"comment","z":"238b1aa0.fa96f6","name":"Catch completion of 1st debug node","info":"","x":460,"y":220,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json new file mode 100644 index 000000000..6746f8203 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json @@ -0,0 +1 @@ +[{"id":"7e57fe6.fa6f5","type":"comment","z":"3ae4b3d9.1f77bc","name":"Example: debug node","info":"Debug node can be used to output values to debug sidebar, console, or status below the node. It can output payload, complete object, or result of JSONata expression.","x":140,"y":60,"wires":[]},{"id":"87bd706a.aec93","type":"comment","z":"3ae4b3d9.1f77bc","name":"Simple output to debug sidebar","info":"","x":210,"y":120,"wires":[]},{"id":"8035b07f.7547e","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":160,"wires":[["20d1344f.931e3c"]]},{"id":"20d1344f.931e3c","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":160,"wires":[]},{"id":"e4b97778.b4b4b8","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output to debug sidebar & console","info":"","x":220,"y":220,"wires":[]},{"id":"41f7b1de.6de52","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":260,"wires":[["4aa37fe0.91341"]]},{"id":"4aa37fe0.91341","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":460,"y":260,"wires":[]},{"id":"268b2307.053f8c","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output to debug sidebar & status","info":"","x":210,"y":320,"wires":[]},{"id":"a7bf2e39.6738f","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":360,"wires":[["9fd6d23e.25689"]]},{"id":"9fd6d23e.25689","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":450,"y":360,"wires":[]},{"id":"2048c1f6.e72bee","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output complete object","info":"","x":180,"y":420,"wires":[]},{"id":"fe9b300e.bdb96","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"Sample","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":460,"wires":[["5b7d830c.00bdbc"]]},{"id":"5b7d830c.00bdbc","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":430,"y":460,"wires":[]},{"id":"d923a725.4ff058","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output complete object","info":"","x":180,"y":520,"wires":[]},{"id":"e97d46cb.65fdb8","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"Sample","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":560,"wires":[["9441873.2c7ef78"]]},{"id":"9441873.2c7ef78","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"\"[\" & topic & \"] \" & payload","targetType":"jsonata","x":440,"y":560,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/link/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/link/1 example.json new file mode 100644 index 000000000..e3304eb97 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/link/1 example.json @@ -0,0 +1 @@ +[{"id":"a30d20e6.ec6dc","type":"link in","z":"2f2d9fa4.be6fc","name":"","links":["70d6f012.8fe6d"],"x":235,"y":240,"wires":[["6bf52c5c.d301c4"]]},{"id":"70d6f012.8fe6d","type":"link out","z":"2f2d9fa4.be6fc","name":"","links":["a30d20e6.ec6dc"],"x":315,"y":180,"wires":[]},{"id":"353c85ce.993d0a","type":"inject","z":"2f2d9fa4.be6fc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":180,"wires":[["70d6f012.8fe6d"]]},{"id":"6bf52c5c.d301c4","type":"debug","z":"2f2d9fa4.be6fc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":370,"y":240,"wires":[]},{"id":"62ea32aa.d73aac","type":"comment","z":"2f2d9fa4.be6fc","name":"Example: Link Node","info":"Output of link out node can be connected to input of link in node. The connection between links in/out is not shown, so the flow representation can be simplified.","x":130,"y":40,"wires":[]},{"id":"85133fcc.e482","type":"comment","z":"2f2d9fa4.be6fc","name":"Link output of inject node to input of debug node","info":"","x":260,"y":100,"wires":[]},{"id":"c588bc36.87fec","type":"comment","z":"2f2d9fa4.be6fc","name":"↓ connect to link in node","info":"","x":410,"y":140,"wires":[]},{"id":"8abca900.6dfe78","type":"comment","z":"2f2d9fa4.be6fc","name":"↑ connect from link out node","info":"","x":340,"y":280,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/status/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/status/1 example.json new file mode 100644 index 000000000..7c991e050 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/status/1 example.json @@ -0,0 +1 @@ +[{"id":"cf27351f.392d88","type":"inject","z":"17d58bdd.2ab8c4","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":270,"y":160,"wires":[["75eaadfb.bed014"]]},{"id":"cd1ac74a.a149a8","type":"debug","z":"17d58bdd.2ab8c4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":220,"wires":[]},{"id":"fc2e6dfc.2b0e9","type":"comment","z":"17d58bdd.2ab8c4","name":"Example: Status Node","info":"Status node can catch change of status message of specified nodes or all nodes in a flow. It receives metadata of status message.","x":200,"y":60,"wires":[]},{"id":"d97b97d0.c4cfe8","type":"comment","z":"17d58bdd.2ab8c4","name":"Catch status message","info":"","x":240,"y":120,"wires":[]},{"id":"a1914d09.e7ba2","type":"comment","z":"17d58bdd.2ab8c4","name":"Catch status message of 1st debug node","info":"","x":540,"y":260,"wires":[]},{"id":"75fefe32.3e47d","type":"status","z":"17d58bdd.2ab8c4","name":"","scope":["cf27351f.392d88","75eaadfb.bed014"],"x":440,"y":220,"wires":[["cd1ac74a.a149a8"]]},{"id":"75eaadfb.bed014","type":"debug","z":"17d58bdd.2ab8c4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":450,"y":160,"wires":[]}] \ No newline at end of file From ae5a7176ba07420b2dca1c4effa0a9abee52296e Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Wed, 6 May 2020 12:36:05 +0900 Subject: [PATCH 2/8] change comment of debug node example --- .../@node-red/nodes/examples/common/debug/1 example.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json index 6746f8203..b891189ff 100644 --- a/packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json +++ b/packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json @@ -1 +1 @@ -[{"id":"7e57fe6.fa6f5","type":"comment","z":"3ae4b3d9.1f77bc","name":"Example: debug node","info":"Debug node can be used to output values to debug sidebar, console, or status below the node. It can output payload, complete object, or result of JSONata expression.","x":140,"y":60,"wires":[]},{"id":"87bd706a.aec93","type":"comment","z":"3ae4b3d9.1f77bc","name":"Simple output to debug sidebar","info":"","x":210,"y":120,"wires":[]},{"id":"8035b07f.7547e","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":160,"wires":[["20d1344f.931e3c"]]},{"id":"20d1344f.931e3c","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":160,"wires":[]},{"id":"e4b97778.b4b4b8","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output to debug sidebar & console","info":"","x":220,"y":220,"wires":[]},{"id":"41f7b1de.6de52","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":260,"wires":[["4aa37fe0.91341"]]},{"id":"4aa37fe0.91341","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":460,"y":260,"wires":[]},{"id":"268b2307.053f8c","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output to debug sidebar & status","info":"","x":210,"y":320,"wires":[]},{"id":"a7bf2e39.6738f","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":360,"wires":[["9fd6d23e.25689"]]},{"id":"9fd6d23e.25689","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":450,"y":360,"wires":[]},{"id":"2048c1f6.e72bee","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output complete object","info":"","x":180,"y":420,"wires":[]},{"id":"fe9b300e.bdb96","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"Sample","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":460,"wires":[["5b7d830c.00bdbc"]]},{"id":"5b7d830c.00bdbc","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":430,"y":460,"wires":[]},{"id":"d923a725.4ff058","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output complete object","info":"","x":180,"y":520,"wires":[]},{"id":"e97d46cb.65fdb8","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"Sample","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":560,"wires":[["9441873.2c7ef78"]]},{"id":"9441873.2c7ef78","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"\"[\" & topic & \"] \" & payload","targetType":"jsonata","x":440,"y":560,"wires":[]}] \ No newline at end of file +[{"id":"7e57fe6.fa6f5","type":"comment","z":"3ae4b3d9.1f77bc","name":"Example: debug node","info":"Debug node can be used to output values to debug sidebar, console, or status below the node. It can output payload, complete object, or result of JSONata expression.","x":140,"y":60,"wires":[]},{"id":"87bd706a.aec93","type":"comment","z":"3ae4b3d9.1f77bc","name":"Simple output to debug sidebar","info":"","x":210,"y":120,"wires":[]},{"id":"8035b07f.7547e","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":160,"wires":[["20d1344f.931e3c"]]},{"id":"20d1344f.931e3c","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":160,"wires":[]},{"id":"e4b97778.b4b4b8","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output to debug sidebar & console","info":"","x":220,"y":220,"wires":[]},{"id":"41f7b1de.6de52","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":260,"wires":[["4aa37fe0.91341"]]},{"id":"4aa37fe0.91341","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":460,"y":260,"wires":[]},{"id":"268b2307.053f8c","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output to debug sidebar & status","info":"","x":210,"y":320,"wires":[]},{"id":"a7bf2e39.6738f","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":360,"wires":[["9fd6d23e.25689"]]},{"id":"9fd6d23e.25689","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":450,"y":360,"wires":[]},{"id":"2048c1f6.e72bee","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output complete object","info":"","x":180,"y":420,"wires":[]},{"id":"fe9b300e.bdb96","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"Sample","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":460,"wires":[["5b7d830c.00bdbc"]]},{"id":"5b7d830c.00bdbc","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":430,"y":460,"wires":[]},{"id":"d923a725.4ff058","type":"comment","z":"3ae4b3d9.1f77bc","name":"Formatting debug using JSONata","info":"","x":210,"y":520,"wires":[]},{"id":"e97d46cb.65fdb8","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"Sample","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":560,"wires":[["9441873.2c7ef78"]]},{"id":"9441873.2c7ef78","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"\"[\" & topic & \"] \" & payload","targetType":"jsonata","x":440,"y":560,"wires":[]}] \ No newline at end of file From c885f2edaa5c22baef899986b003bcfd400d9d26 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Wed, 6 May 2020 12:36:28 +0900 Subject: [PATCH 3/8] add example of link node across tabs --- .../common/link/{1 example.json => 1 link within a tab.json} | 0 .../@node-red/nodes/examples/common/link/2 link across tabs.json | 1 + 2 files changed, 1 insertion(+) rename packages/node_modules/@node-red/nodes/examples/common/link/{1 example.json => 1 link within a tab.json} (100%) create mode 100644 packages/node_modules/@node-red/nodes/examples/common/link/2 link across tabs.json diff --git a/packages/node_modules/@node-red/nodes/examples/common/link/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/link/1 link within a tab.json similarity index 100% rename from packages/node_modules/@node-red/nodes/examples/common/link/1 example.json rename to packages/node_modules/@node-red/nodes/examples/common/link/1 link within a tab.json diff --git a/packages/node_modules/@node-red/nodes/examples/common/link/2 link across tabs.json b/packages/node_modules/@node-red/nodes/examples/common/link/2 link across tabs.json new file mode 100644 index 000000000..7d7ca62d9 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/link/2 link across tabs.json @@ -0,0 +1 @@ +[{"id":"f51b8a1a.95b448","type":"tab","label":"TAB: 1st","disabled":false,"info":""},{"id":"ec5fae59.42a3b","type":"tab","label":"TAB: 2nd","disabled":false,"info":""},{"id":"fcd2b35a.6a7c4","type":"link out","z":"f51b8a1a.95b448","name":"","links":["f5fead9.12cdf5","cc961da1.25402"],"x":335,"y":200,"wires":[]},{"id":"41a35965.1b4ed8","type":"inject","z":"f51b8a1a.95b448","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":200,"wires":[["fcd2b35a.6a7c4"]]},{"id":"5b4e5338.81ce5c","type":"comment","z":"f51b8a1a.95b448","name":"Example: Link Node across tabs","info":"Output of link out node can be connected to input of link in node. The connection between links in/out is not shown, so the flow representation can be simplified.","x":190,"y":60,"wires":[]},{"id":"6cc2116d.b2d41","type":"comment","z":"f51b8a1a.95b448","name":"Link output of inject node to input of debug node in 2nd tab","info":"","x":320,"y":120,"wires":[]},{"id":"bdc2bf14.e00a6","type":"comment","z":"f51b8a1a.95b448","name":"↓ connect to link in node in 2nd tab","info":"","x":460,"y":160,"wires":[]},{"id":"cc961da1.25402","type":"link in","z":"ec5fae59.42a3b","name":"","links":["fcd2b35a.6a7c4"],"x":155,"y":180,"wires":[["ce8b8ea5.364cb"]]},{"id":"ce8b8ea5.364cb","type":"debug","z":"ec5fae59.42a3b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":290,"y":180,"wires":[]},{"id":"64752acd.6cfcb4","type":"comment","z":"ec5fae59.42a3b","name":"↑ connect from link out node in 1st tab","info":"","x":290,"y":220,"wires":[]},{"id":"299b832b.6db7dc","type":"comment","z":"ec5fae59.42a3b","name":"Example: Link Node across tabs","info":"Output of link out node can be connected to input of link in node. The connection between links in/out is not shown, so the flow representation can be simplified.","x":190,"y":60,"wires":[]},{"id":"aa11903.1daf77","type":"comment","z":"ec5fae59.42a3b","name":"Link output of inject node in 1st tab to input of debug node","info":"","x":310,"y":120,"wires":[]}] \ No newline at end of file From 9505f82d9bc4f29e5164913f73b37c6941db2002 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Tue, 12 May 2020 15:43:28 +0900 Subject: [PATCH 4/8] split debug node examples --- .../@node-red/nodes/examples/common/debug/1 example.json | 1 - .../nodes/examples/common/debug/1 output payload value.json | 1 + .../nodes/examples/common/debug/2 output complete object.json | 1 + .../nodes/examples/common/debug/3 output to console.json | 1 + .../examples/common/debug/4 output to node status area.json | 1 + .../examples/common/debug/5 formatting output using JSONata.json | 1 + 6 files changed, 5 insertions(+), 1 deletion(-) delete mode 100644 packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/debug/1 output payload value.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/debug/2 output complete object.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/debug/3 output to console.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/debug/4 output to node status area.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/debug/5 formatting output using JSONata.json diff --git a/packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json deleted file mode 100644 index b891189ff..000000000 --- a/packages/node_modules/@node-red/nodes/examples/common/debug/1 example.json +++ /dev/null @@ -1 +0,0 @@ -[{"id":"7e57fe6.fa6f5","type":"comment","z":"3ae4b3d9.1f77bc","name":"Example: debug node","info":"Debug node can be used to output values to debug sidebar, console, or status below the node. It can output payload, complete object, or result of JSONata expression.","x":140,"y":60,"wires":[]},{"id":"87bd706a.aec93","type":"comment","z":"3ae4b3d9.1f77bc","name":"Simple output to debug sidebar","info":"","x":210,"y":120,"wires":[]},{"id":"8035b07f.7547e","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":160,"wires":[["20d1344f.931e3c"]]},{"id":"20d1344f.931e3c","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":160,"wires":[]},{"id":"e4b97778.b4b4b8","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output to debug sidebar & console","info":"","x":220,"y":220,"wires":[]},{"id":"41f7b1de.6de52","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":260,"wires":[["4aa37fe0.91341"]]},{"id":"4aa37fe0.91341","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":460,"y":260,"wires":[]},{"id":"268b2307.053f8c","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output to debug sidebar & status","info":"","x":210,"y":320,"wires":[]},{"id":"a7bf2e39.6738f","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":360,"wires":[["9fd6d23e.25689"]]},{"id":"9fd6d23e.25689","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":450,"y":360,"wires":[]},{"id":"2048c1f6.e72bee","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output complete object","info":"","x":180,"y":420,"wires":[]},{"id":"fe9b300e.bdb96","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"Sample","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":460,"wires":[["5b7d830c.00bdbc"]]},{"id":"5b7d830c.00bdbc","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":430,"y":460,"wires":[]},{"id":"d923a725.4ff058","type":"comment","z":"3ae4b3d9.1f77bc","name":"Formatting debug using JSONata","info":"","x":210,"y":520,"wires":[]},{"id":"e97d46cb.65fdb8","type":"inject","z":"3ae4b3d9.1f77bc","name":"","topic":"Sample","payload":"Hello, World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":560,"wires":[["9441873.2c7ef78"]]},{"id":"9441873.2c7ef78","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"\"[\" & topic & \"] \" & payload","targetType":"jsonata","x":440,"y":560,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/debug/1 output payload value.json b/packages/node_modules/@node-red/nodes/examples/common/debug/1 output payload value.json new file mode 100644 index 000000000..85b334e68 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/debug/1 output payload value.json @@ -0,0 +1 @@ +[{"id":"87bd706a.aec93","type":"comment","z":"3ae4b3d9.1f77bc","name":"Output payload value to debug sidebar","info":"Debug node can be used to output payload value to debug sidebar.","x":230,"y":60,"wires":[]},{"id":"8035b07f.7547e","type":"inject","z":"3ae4b3d9.1f77bc","name":"","props":[{"p":"payload","v":"Hello, World!","vt":"str"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello, World!","payloadType":"str","x":210,"y":100,"wires":[["20d1344f.931e3c"]]},{"id":"20d1344f.931e3c","type":"debug","z":"3ae4b3d9.1f77bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":100,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/debug/2 output complete object.json b/packages/node_modules/@node-red/nodes/examples/common/debug/2 output complete object.json new file mode 100644 index 000000000..c8cb9c182 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/debug/2 output complete object.json @@ -0,0 +1 @@ +[{"id":"8c66d039.44465","type":"comment","z":"e6956267.5d174","name":"Output complete object","info":"Debug node can be used to output whole object value to debug sidebar.","x":160,"y":60,"wires":[]},{"id":"dac87e40.90376","type":"inject","z":"e6956267.5d174","name":"","props":[{"p":"payload","v":"Hello, World!","vt":"str"},{"p":"topic","v":"Sample","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Sample","payload":"Hello, World!","payloadType":"str","x":220,"y":100,"wires":[["a77fa5e3.fac248"]]},{"id":"a77fa5e3.fac248","type":"debug","z":"e6956267.5d174","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":410,"y":100,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/debug/3 output to console.json b/packages/node_modules/@node-red/nodes/examples/common/debug/3 output to console.json new file mode 100644 index 000000000..a5866a723 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/debug/3 output to console.json @@ -0,0 +1 @@ +[{"id":"fb1c3ce9.c29ee","type":"comment","z":"395f4b0d.8a8774","name":"Output to console","info":"Debug node can be used to output values to console.","x":130,"y":60,"wires":[]},{"id":"3c24e746.9ff6a8","type":"inject","z":"395f4b0d.8a8774","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello, World!","payloadType":"str","x":170,"y":100,"wires":[["66cc7b44.82ba74"]]},{"id":"66cc7b44.82ba74","type":"debug","z":"395f4b0d.8a8774","name":"","active":true,"tosidebar":false,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":420,"y":100,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/debug/4 output to node status area.json b/packages/node_modules/@node-red/nodes/examples/common/debug/4 output to node status area.json new file mode 100644 index 000000000..9f1fb8265 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/debug/4 output to node status area.json @@ -0,0 +1 @@ +[{"id":"33791e6a.973502","type":"comment","z":"55587092.1f2b4","name":"Output to node status area","info":"Debug node can be used to output values to status area below the node.","x":170,"y":60,"wires":[]},{"id":"a5d8e744.a034e8","type":"inject","z":"55587092.1f2b4","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello, World!","payloadType":"str","x":190,"y":100,"wires":[["b0646a4d.db4bc8"]]},{"id":"b0646a4d.db4bc8","type":"debug","z":"55587092.1f2b4","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":430,"y":100,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/debug/5 formatting output using JSONata.json b/packages/node_modules/@node-red/nodes/examples/common/debug/5 formatting output using JSONata.json new file mode 100644 index 000000000..1fa64e5af --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/debug/5 formatting output using JSONata.json @@ -0,0 +1 @@ +[{"id":"30ed0a73.fcef86","type":"comment","z":"61feb619.5e3d68","name":"Formatting output using JSONata","info":"Debug node can format output value using JSONata expression.","x":200,"y":60,"wires":[]},{"id":"6f477e7d.3a8da","type":"inject","z":"61feb619.5e3d68","name":"","props":[{"p":"payload","v":"Hello, World!","vt":"str"},{"p":"topic","v":"Sample","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Sample","payload":"Hello, World!","payloadType":"str","x":220,"y":100,"wires":[["19c9408d.ac6d4f"]]},{"id":"19c9408d.ac6d4f","type":"debug","z":"61feb619.5e3d68","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"\"[\" & topic & \"] \" & payload","targetType":"jsonata","x":420,"y":100,"wires":[]}] \ No newline at end of file From bc039bde81a20774c49191c897e4ca5055108fef Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Tue, 12 May 2020 15:52:01 +0900 Subject: [PATCH 5/8] rename example name of catch node --- .../examples/common/catch/{1 example.json => 1 catch error.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/node_modules/@node-red/nodes/examples/common/catch/{1 example.json => 1 catch error.json} (100%) diff --git a/packages/node_modules/@node-red/nodes/examples/common/catch/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/catch/1 catch error.json similarity index 100% rename from packages/node_modules/@node-red/nodes/examples/common/catch/1 example.json rename to packages/node_modules/@node-red/nodes/examples/common/catch/1 catch error.json From 964b7e0e23b5778b9555daf954d5f79c71d29448 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Tue, 12 May 2020 15:53:59 +0900 Subject: [PATCH 6/8] rename example name of status node --- .../status/{1 example.json => 1 catch status message output.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/node_modules/@node-red/nodes/examples/common/status/{1 example.json => 1 catch status message output.json} (100%) diff --git a/packages/node_modules/@node-red/nodes/examples/common/status/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/status/1 catch status message output.json similarity index 100% rename from packages/node_modules/@node-red/nodes/examples/common/status/1 example.json rename to packages/node_modules/@node-red/nodes/examples/common/status/1 catch status message output.json From 2dd004f6cde8e9b76313928f82c2f568ee169df7 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Tue, 12 May 2020 15:56:35 +0900 Subject: [PATCH 7/8] rename example name of complete node --- .../{1 example.json => 1 catch completion of node execution.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/node_modules/@node-red/nodes/examples/common/complete/{1 example.json => 1 catch completion of node execution.json} (100%) diff --git a/packages/node_modules/@node-red/nodes/examples/common/complete/1 example.json b/packages/node_modules/@node-red/nodes/examples/common/complete/1 catch completion of node execution.json similarity index 100% rename from packages/node_modules/@node-red/nodes/examples/common/complete/1 example.json rename to packages/node_modules/@node-red/nodes/examples/common/complete/1 catch completion of node execution.json From b4c033ca508d099e3fb7a156b0ef55f18246fc9b Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Mon, 1 Jun 2020 15:20:53 +0900 Subject: [PATCH 8/8] add missing inject node examples --- .../examples/common/inject/1 trigger a flow at startup.json | 1 + .../common/inject/2 trigger a flow at regular intervals.json | 1 + .../common/inject/3 trigger a flow at a specific time.json | 1 + 3 files changed, 3 insertions(+) create mode 100644 packages/node_modules/@node-red/nodes/examples/common/inject/1 trigger a flow at startup.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/inject/2 trigger a flow at regular intervals.json create mode 100644 packages/node_modules/@node-red/nodes/examples/common/inject/3 trigger a flow at a specific time.json diff --git a/packages/node_modules/@node-red/nodes/examples/common/inject/1 trigger a flow at startup.json b/packages/node_modules/@node-red/nodes/examples/common/inject/1 trigger a flow at startup.json new file mode 100644 index 000000000..597dd337a --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/inject/1 trigger a flow at startup.json @@ -0,0 +1 @@ +[{"id":"eca30de2.7f1b1","type":"comment","z":"6e4ff5ca.fbc3ec","name":"Trigger a flow whenever Node-RED starts","info":"Inject node can be used to trigger a flow whenever Node-RED starts.\n\n*This could be used to initialise context variables, or to send a notification that Node-RED has been restarted.*\n\nSee Node-RED cookbook [item](https://cookbook.nodered.org/basic/trigger-on-start).","x":220,"y":60,"wires":[]},{"id":"8189f250.ddfb2","type":"inject","z":"6e4ff5ca.fbc3ec","name":"","topic":"","payload":"Started!","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":"","x":200,"y":120,"wires":[["9a0150e8.6d0b3"]]},{"id":"9a0150e8.6d0b3","type":"debug","z":"6e4ff5ca.fbc3ec","name":"","active":true,"console":"false","complete":"false","x":470,"y":120,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/inject/2 trigger a flow at regular intervals.json b/packages/node_modules/@node-red/nodes/examples/common/inject/2 trigger a flow at regular intervals.json new file mode 100644 index 000000000..1d51ffeab --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/inject/2 trigger a flow at regular intervals.json @@ -0,0 +1 @@ +[{"id":"64c1d7b3.a65b38","type":"comment","z":"bfaec8ca.105278","name":"Trigger a flow at regular intervals","info":"Inject node can be used to trigger a flow at regular intervals. \n\nSee Node-RED cookbook [item](https://cookbook.nodered.org/basic/trigger-at-interval).","x":190,"y":60,"wires":[]},{"id":"7c820e88.2db33","type":"inject","z":"bfaec8ca.105278","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"x":190,"y":120,"wires":[["8f135212.6a9a9"]]},{"id":"8f135212.6a9a9","type":"debug","z":"bfaec8ca.105278","name":"","active":true,"console":"false","complete":"false","x":450,"y":120,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/common/inject/3 trigger a flow at a specific time.json b/packages/node_modules/@node-red/nodes/examples/common/inject/3 trigger a flow at a specific time.json new file mode 100644 index 000000000..03637a831 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/examples/common/inject/3 trigger a flow at a specific time.json @@ -0,0 +1 @@ +[{"id":"a4060d5d.a3c92","type":"comment","z":"568c3a2a.5efbf4","name":"Trigger a flow at a specific time","info":"Inject node can be used to trigger a flow at a specific time. \n\nSee Node-RED cookbook [item](https://cookbook.nodered.org/basic/trigger-at-time).","x":190,"y":60,"wires":[]},{"id":"468db06c.bafdd","type":"inject","z":"568c3a2a.5efbf4","name":"","topic":"","payload":"It is 4pm on a weekday!","payloadType":"str","repeat":"","crontab":"00 16 * * 1,2,3,4,5","once":false,"x":250,"y":120,"wires":[["1ccc3174.cb926f"]]},{"id":"1ccc3174.cb926f","type":"debug","z":"568c3a2a.5efbf4","name":"","active":true,"console":"false","complete":"false","x":470,"y":120,"wires":[]}] \ No newline at end of file