Advertisement
raddeee

ラズパイのFlow

Oct 14th, 2018
608
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 6.19 KB | None | 0 0
  1. [
  2.     {
  3.         "id": "cffbb72d.4ef0e8",
  4.         "type": "tab",
  5.         "label": "フロー 1",
  6.         "disabled": false,
  7.         "info": ""
  8.     },
  9.     {
  10.         "id": "a37c570d.f986e8",
  11.         "type": "rpi-dht22",
  12.         "z": "cffbb72d.4ef0e8",
  13.         "name": "",
  14.         "topic": "rpi-dht22",
  15.         "dht": "11",
  16.         "pintype": "0",
  17.         "pin": "25",
  18.         "x": 460,
  19.         "y": 480,
  20.         "wires": [
  21.             [
  22.                 "b710bde1.cdd0b"
  23.             ]
  24.         ]
  25.     },
  26.     {
  27.         "id": "cbf0f01d.cf3cd",
  28.         "type": "wiotp out",
  29.         "z": "cffbb72d.4ef0e8",
  30.         "authType": "d",
  31.         "qs": "false",
  32.         "qsDeviceId": "",
  33.         "deviceKey": "6a80010c.60957",
  34.         "deviceType": "",
  35.         "deviceId": "",
  36.         "event": "event",
  37.         "format": "json",
  38.         "qos": "",
  39.         "name": "",
  40.         "x": 770,
  41.         "y": 500,
  42.         "wires": []
  43.     },
  44.     {
  45.         "id": "b710bde1.cdd0b",
  46.         "type": "function",
  47.         "z": "cffbb72d.4ef0e8",
  48.         "name": "",
  49.         "func": "msg.payload = {\n    \"temp\" : msg.payload,\n    \"humi\" : msg.humidity,\n}\nreturn msg;",
  50.         "outputs": 1,
  51.         "noerr": 0,
  52.         "x": 610,
  53.         "y": 480,
  54.         "wires": [
  55.             [
  56.                 "cbf0f01d.cf3cd"
  57.             ]
  58.         ]
  59.     },
  60.     {
  61.         "id": "b1c3aa8a.608198",
  62.         "type": "wiotp in",
  63.         "z": "cffbb72d.4ef0e8",
  64.         "authType": "d",
  65.         "deviceKey": "////////./////",
  66.         "deviceType": "",
  67.         "deviceId": "",
  68.         "command": "+",
  69.         "commandType": "g",
  70.         "qos": 0,
  71.         "name": "",
  72.         "x": 130,
  73.         "y": 500,
  74.         "wires": [
  75.             [
  76.                 "1897a9cd.494e36",
  77.                 "69541771.4e9728"
  78.             ]
  79.         ]
  80.     },
  81.     {
  82.         "id": "1897a9cd.494e36",
  83.         "type": "switch",
  84.         "z": "cffbb72d.4ef0e8",
  85.         "name": "",
  86.         "property": "command",
  87.         "propertyType": "msg",
  88.         "rules": [
  89.             {
  90.                 "t": "eq",
  91.                 "v": "dht",
  92.                 "vt": "str"
  93.             },
  94.             {
  95.                 "t": "eq",
  96.                 "v": "soil",
  97.                 "vt": "str"
  98.             },
  99.             {
  100.                 "t": "eq",
  101.                 "v": "check",
  102.                 "vt": "str"
  103.             }
  104.         ],
  105.         "checkall": "true",
  106.         "repair": false,
  107.         "outputs": 3,
  108.         "x": 290,
  109.         "y": 500,
  110.         "wires": [
  111.             [
  112.                 "b5c42f81.c43ad"
  113.             ],
  114.             [
  115.                 "37a86949.4c6386"
  116.             ],
  117.             [
  118.                 "57ef7c8a.47b7d4",
  119.                 "a37c570d.f986e8"
  120.             ]
  121.         ]
  122.     },
  123.     {
  124.         "id": "b5c42f81.c43ad",
  125.         "type": "rpi-dht22",
  126.         "z": "cffbb72d.4ef0e8",
  127.         "name": "",
  128.         "topic": "rpi-dht22",
  129.         "dht": "11",
  130.         "pintype": "0",
  131.         "pin": "25",
  132.         "x": 460,
  133.         "y": 520,
  134.         "wires": [
  135.             [
  136.                 "255835cf.7e0fea"
  137.             ]
  138.         ]
  139.     },
  140.     {
  141.         "id": "69541771.4e9728",
  142.         "type": "debug",
  143.         "z": "cffbb72d.4ef0e8",
  144.         "name": "",
  145.         "active": true,
  146.         "tosidebar": true,
  147.         "console": false,
  148.         "tostatus": false,
  149.         "complete": "true",
  150.         "x": 310,
  151.         "y": 580,
  152.         "wires": []
  153.     },
  154.     {
  155.         "id": "57ef7c8a.47b7d4",
  156.         "type": "pimcp3008",
  157.         "z": "cffbb72d.4ef0e8",
  158.         "name": "",
  159.         "dev": "3002",
  160.         "pin": 0,
  161.         "dnum": 0,
  162.         "bus": 0,
  163.         "x": 470,
  164.         "y": 440,
  165.         "wires": [
  166.             [
  167.                 "228b518.4bb31ae"
  168.             ]
  169.         ]
  170.     },
  171.     {
  172.         "id": "228b518.4bb31ae",
  173.         "type": "function",
  174.         "z": "cffbb72d.4ef0e8",
  175.         "name": "",
  176.         "func": "if(msg.payload > 410){\n    var soil = \"dry\";\n}else if(nsg.payload < 330){\n    var soil = \"water\";\n}else var soil = \"wet\";\n\nmsg.payload = {\n    \"soil\" : soil,\n}\nreturn msg;",
  177.         "outputs": 1,
  178.         "noerr": 0,
  179.         "x": 610,
  180.         "y": 440,
  181.         "wires": [
  182.             [
  183.                 "cbf0f01d.cf3cd"
  184.             ]
  185.         ]
  186.     },
  187.     {
  188.         "id": "37a86949.4c6386",
  189.         "type": "pimcp3008",
  190.         "z": "cffbb72d.4ef0e8",
  191.         "name": "",
  192.         "dev": "3002",
  193.         "pin": 0,
  194.         "dnum": 0,
  195.         "bus": 0,
  196.         "x": 470,
  197.         "y": 560,
  198.         "wires": [
  199.             [
  200.                 "2ee439d0.2d72f6"
  201.             ]
  202.         ]
  203.     },
  204.     {
  205.         "id": "2ee439d0.2d72f6",
  206.         "type": "function",
  207.         "z": "cffbb72d.4ef0e8",
  208.         "name": "",
  209.         "func": "if(msg.payload > 410){\n    var soil = \"dry\";\n}else if(msg.payload < 300){\n    var soil = \"water\";\n}else var soil = \"wet\";\n\nmsg.payload = {\n    \"soilR\" : soil,\n}\nreturn msg;",
  210.         "outputs": 1,
  211.         "noerr": 0,
  212.         "x": 610,
  213.         "y": 560,
  214.         "wires": [
  215.             [
  216.                 "cbf0f01d.cf3cd"
  217.             ]
  218.         ]
  219.     },
  220.     {
  221.         "id": "c0728c08.e674b",
  222.         "type": "debug",
  223.         "z": "cffbb72d.4ef0e8",
  224.         "name": "",
  225.         "active": true,
  226.         "tosidebar": true,
  227.         "console": false,
  228.         "tostatus": false,
  229.         "complete": "false",
  230.         "x": 790,
  231.         "y": 560,
  232.         "wires": []
  233.     },
  234.     {
  235.         "id": "255835cf.7e0fea",
  236.         "type": "function",
  237.         "z": "cffbb72d.4ef0e8",
  238.         "name": "",
  239.         "func": "msg.payload = {\n    \"temp\" : msg.payload,\n    \"humi\" : msg.humidity,\n}\nreturn msg;",
  240.         "outputs": 1,
  241.         "noerr": 0,
  242.         "x": 610,
  243.         "y": 520,
  244.         "wires": [
  245.             [
  246.                 "cbf0f01d.cf3cd"
  247.             ]
  248.         ]
  249.     },
  250.     {
  251.         "id": "6a80010c.60957",
  252.         "type": "wiotp-credentials",
  253.         "z": "",
  254.         "name": "",
  255.         "org": "sxspno",
  256.         "serverName": "",
  257.         "devType": "RaspberryPi",
  258.         "devId": "cact",
  259.         "keepalive": "60",
  260.         "cleansession": true,
  261.         "tls": "",
  262.         "usetls": false
  263.     }
  264. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement