├── .gitignore ├── README.md ├── flows.json ├── flows_cred.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.backup -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | cookbook-flows 2 | ============== 3 | 4 | This is a Node-RED Project that contains all of the recipes from the 5 | [Node-RED Cookbook](https://cookbook.nodered.org). 6 | 7 | 8 | This project can be imported by enabling the Projects feature of Node-RED and then 9 | cloning this repository in the editor. -------------------------------------------------------------------------------- /flows.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "535331d8.55c1f", 4 | "type": "tab", 5 | "label": "Basics - Messages", 6 | "disabled": false, 7 | "info": "" 8 | }, 9 | { 10 | "id": "ac14500e.2c57d", 11 | "type": "tab", 12 | "label": "Basics - Flow control", 13 | "disabled": false, 14 | "info": "" 15 | }, 16 | { 17 | "id": "fc046f99.4be08", 18 | "type": "tab", 19 | "label": "Basics - Error handling", 20 | "disabled": false, 21 | "info": "" 22 | }, 23 | { 24 | "id": "64133d39.bb0394", 25 | "type": "tab", 26 | "label": "Basic - Working with data formats", 27 | "disabled": false, 28 | "info": "" 29 | }, 30 | { 31 | "id": "3045204d.cfbae", 32 | "type": "tab", 33 | "label": "HTTP endpoints", 34 | "disabled": false, 35 | "info": "" 36 | }, 37 | { 38 | "id": "55635136.aa9cb", 39 | "type": "tab", 40 | "label": "HTTP requests", 41 | "disabled": false, 42 | "info": "" 43 | }, 44 | { 45 | "id": "b571704d.6c591", 46 | "type": "tab", 47 | "label": "MQTT", 48 | "disabled": true, 49 | "info": "" 50 | }, 51 | { 52 | "id": "b439d8b0.991988", 53 | "type": "mqtt-broker", 54 | "z": "", 55 | "name": "", 56 | "broker": "localhost", 57 | "port": "1883", 58 | "clientid": "", 59 | "usetls": false, 60 | "compatmode": true, 61 | "keepalive": "60", 62 | "cleansession": true, 63 | "birthTopic": "", 64 | "birthQos": "0", 65 | "birthPayload": "", 66 | "closeTopic": "", 67 | "closePayload": "", 68 | "willTopic": "", 69 | "willQos": "0", 70 | "willPayload": "" 71 | }, 72 | { 73 | "id": "59ff2a1.fa600d4", 74 | "type": "http in", 75 | "z": "3045204d.cfbae", 76 | "name": "", 77 | "url": "/hello", 78 | "method": "get", 79 | "swaggerDoc": "", 80 | "x": 100, 81 | "y": 80, 82 | "wires": [ 83 | [ 84 | "54c1e70d.ab3e18" 85 | ] 86 | ] 87 | }, 88 | { 89 | "id": "266c286f.d993d8", 90 | "type": "http response", 91 | "z": "3045204d.cfbae", 92 | "name": "", 93 | "x": 390, 94 | "y": 80, 95 | "wires": [] 96 | }, 97 | { 98 | "id": "54c1e70d.ab3e18", 99 | "type": "template", 100 | "z": "3045204d.cfbae", 101 | "name": "page", 102 | "field": "payload", 103 | "fieldType": "msg", 104 | "format": "handlebars", 105 | "syntax": "mustache", 106 | "template": "\n
\n \n{{ payload }}\n \n", 1263 | "x": 530, 1264 | "y": 1020, 1265 | "wires": [ 1266 | [ 1267 | "f52e2880.180968" 1268 | ] 1269 | ] 1270 | }, 1271 | { 1272 | "id": "f52e2880.180968", 1273 | "type": "http response", 1274 | "z": "3045204d.cfbae", 1275 | "name": "", 1276 | "x": 750, 1277 | "y": 1020, 1278 | "wires": [] 1279 | }, 1280 | { 1281 | "id": "64ff5340.82cb0c", 1282 | "type": "comment", 1283 | "z": "3045204d.cfbae", 1284 | "name": "Work with cookies", 1285 | "info": "", 1286 | "x": 110, 1287 | "y": 980, 1288 | "wires": [] 1289 | }, 1290 | { 1291 | "id": "fda60c66.04975", 1292 | "type": "http in", 1293 | "z": "3045204d.cfbae", 1294 | "name": "", 1295 | "url": "/hello-cookie/add", 1296 | "method": "get", 1297 | "swaggerDoc": "", 1298 | "x": 140, 1299 | "y": 1060, 1300 | "wires": [ 1301 | [ 1302 | "afefb90.53dcf48" 1303 | ] 1304 | ] 1305 | }, 1306 | { 1307 | "id": "afefb90.53dcf48", 1308 | "type": "function", 1309 | "z": "3045204d.cfbae", 1310 | "name": "Add a cookie", 1311 | "func": "msg.cookies = { };\nmsg.cookies[\"demo-\"+(Math.floor(Math.random()*1000))] = Date.now();\nreturn msg;", 1312 | "outputs": 1, 1313 | "noerr": 0, 1314 | "x": 330, 1315 | "y": 1060, 1316 | "wires": [ 1317 | [ 1318 | "9a2a9a4.0fc0768" 1319 | ] 1320 | ] 1321 | }, 1322 | { 1323 | "id": "35285a76.1f8636", 1324 | "type": "http in", 1325 | "z": "3045204d.cfbae", 1326 | "name": "", 1327 | "url": "/hello-cookie/clear", 1328 | "method": "get", 1329 | "swaggerDoc": "", 1330 | "x": 140, 1331 | "y": 1100, 1332 | "wires": [ 1333 | [ 1334 | "d5205a2c.db9018" 1335 | ] 1336 | ] 1337 | }, 1338 | { 1339 | "id": "d5205a2c.db9018", 1340 | "type": "function", 1341 | "z": "3045204d.cfbae", 1342 | "name": "Clear cookies", 1343 | "func": "// Find demo cookies and clear them\nvar cookieNames = Object.keys(msg.req.cookies).filter(function(cookieName) { return /^demo-/.test(cookieName);});\nmsg.cookies = {};\n\ncookieNames.forEach(function(cookieName) {\n msg.cookies[cookieName] = null;\n});\n\nreturn msg;", 1344 | "outputs": 1, 1345 | "noerr": 0, 1346 | "x": 340, 1347 | "y": 1100, 1348 | "wires": [ 1349 | [ 1350 | "9a2a9a4.0fc0768" 1351 | ] 1352 | ] 1353 | }, 1354 | { 1355 | "id": "9a2a9a4.0fc0768", 1356 | "type": "change", 1357 | "z": "3045204d.cfbae", 1358 | "name": "Redirect to /hello-cookie", 1359 | "rules": [ 1360 | { 1361 | "t": "set", 1362 | "p": "statusCode", 1363 | "pt": "msg", 1364 | "to": "302", 1365 | "tot": "num" 1366 | }, 1367 | { 1368 | "t": "set", 1369 | "p": "headers", 1370 | "pt": "msg", 1371 | "to": "{}", 1372 | "tot": "json" 1373 | }, 1374 | { 1375 | "t": "set", 1376 | "p": "headers.location", 1377 | "pt": "msg", 1378 | "to": "/hello-cookie", 1379 | "tot": "str" 1380 | } 1381 | ], 1382 | "action": "", 1383 | "property": "", 1384 | "from": "", 1385 | "to": "", 1386 | "reg": false, 1387 | "x": 550, 1388 | "y": 1080, 1389 | "wires": [ 1390 | [ 1391 | "f52e2880.180968" 1392 | ] 1393 | ] 1394 | }, 1395 | { 1396 | "id": "21ddf71f.d00518", 1397 | "type": "function", 1398 | "z": "3045204d.cfbae", 1399 | "name": "Format cookies", 1400 | "func": "msg.payload = JSON.stringify(msg.req.cookies,null,4);\nreturn msg;", 1401 | "outputs": 1, 1402 | "noerr": 0, 1403 | "x": 340, 1404 | "y": 1020, 1405 | "wires": [ 1406 | [ 1407 | "f3aa98c1.befc18" 1408 | ] 1409 | ] 1410 | }, 1411 | { 1412 | "id": "d72dc4ce.89b368", 1413 | "type": "inject", 1414 | "z": "535331d8.55c1f", 1415 | "name": "", 1416 | "topic": "", 1417 | "payload": "", 1418 | "payloadType": "date", 1419 | "repeat": "", 1420 | "crontab": "", 1421 | "once": false, 1422 | "x": 140, 1423 | "y": 80, 1424 | "wires": [ 1425 | [ 1426 | "78075f19.e0174" 1427 | ] 1428 | ] 1429 | }, 1430 | { 1431 | "id": "78075f19.e0174", 1432 | "type": "change", 1433 | "z": "535331d8.55c1f", 1434 | "name": "", 1435 | "rules": [ 1436 | { 1437 | "t": "set", 1438 | "p": "payload", 1439 | "pt": "msg", 1440 | "to": "Hello World!", 1441 | "tot": "str" 1442 | } 1443 | ], 1444 | "action": "", 1445 | "property": "", 1446 | "from": "", 1447 | "to": "", 1448 | "reg": false, 1449 | "x": 340, 1450 | "y": 80, 1451 | "wires": [ 1452 | [ 1453 | "78dc7c25.b90d54" 1454 | ] 1455 | ] 1456 | }, 1457 | { 1458 | "id": "78dc7c25.b90d54", 1459 | "type": "debug", 1460 | "z": "535331d8.55c1f", 1461 | "name": "", 1462 | "active": true, 1463 | "console": "false", 1464 | "complete": "false", 1465 | "x": 550, 1466 | "y": 80, 1467 | "wires": [] 1468 | }, 1469 | { 1470 | "id": "852f98f5.6f3b48", 1471 | "type": "comment", 1472 | "z": "535331d8.55c1f", 1473 | "name": "Set a message property to a fixed value", 1474 | "info": "", 1475 | "x": 170, 1476 | "y": 40, 1477 | "wires": [] 1478 | }, 1479 | { 1480 | "id": "91cd2fa9.e0a96", 1481 | "type": "inject", 1482 | "z": "535331d8.55c1f", 1483 | "name": "", 1484 | "topic": "", 1485 | "payload": "", 1486 | "payloadType": "date", 1487 | "repeat": "", 1488 | "crontab": "", 1489 | "once": false, 1490 | "x": 140, 1491 | "y": 180, 1492 | "wires": [ 1493 | [ 1494 | "54ec03e4.5714bc" 1495 | ] 1496 | ] 1497 | }, 1498 | { 1499 | "id": "54ec03e4.5714bc", 1500 | "type": "change", 1501 | "z": "535331d8.55c1f", 1502 | "name": "", 1503 | "rules": [ 1504 | { 1505 | "t": "delete", 1506 | "p": "payload", 1507 | "pt": "msg" 1508 | } 1509 | ], 1510 | "action": "", 1511 | "property": "", 1512 | "from": "", 1513 | "to": "", 1514 | "reg": false, 1515 | "x": 350, 1516 | "y": 180, 1517 | "wires": [ 1518 | [ 1519 | "321900de.3cbea" 1520 | ] 1521 | ] 1522 | }, 1523 | { 1524 | "id": "321900de.3cbea", 1525 | "type": "debug", 1526 | "z": "535331d8.55c1f", 1527 | "name": "", 1528 | "active": true, 1529 | "console": "false", 1530 | "complete": "false", 1531 | "x": 550, 1532 | "y": 180, 1533 | "wires": [] 1534 | }, 1535 | { 1536 | "id": "f491148d.d35fc8", 1537 | "type": "comment", 1538 | "z": "535331d8.55c1f", 1539 | "name": "Delete message property", 1540 | "info": "", 1541 | "x": 130, 1542 | "y": 140, 1543 | "wires": [] 1544 | }, 1545 | { 1546 | "id": "d11f7311.77c15", 1547 | "type": "inject", 1548 | "z": "535331d8.55c1f", 1549 | "name": "", 1550 | "topic": "Hello", 1551 | "payload": "", 1552 | "payloadType": "date", 1553 | "repeat": "", 1554 | "crontab": "", 1555 | "once": false, 1556 | "x": 160, 1557 | "y": 280, 1558 | "wires": [ 1559 | [ 1560 | "13c01487.eb13cb" 1561 | ] 1562 | ] 1563 | }, 1564 | { 1565 | "id": "13c01487.eb13cb", 1566 | "type": "change", 1567 | "z": "535331d8.55c1f", 1568 | "name": "", 1569 | "rules": [ 1570 | { 1571 | "t": "move", 1572 | "p": "topic", 1573 | "pt": "msg", 1574 | "to": "payload", 1575 | "tot": "msg" 1576 | } 1577 | ], 1578 | "action": "", 1579 | "property": "", 1580 | "from": "", 1581 | "to": "", 1582 | "reg": false, 1583 | "x": 360, 1584 | "y": 280, 1585 | "wires": [ 1586 | [ 1587 | "89cc4fb1.9b208" 1588 | ] 1589 | ] 1590 | }, 1591 | { 1592 | "id": "89cc4fb1.9b208", 1593 | "type": "debug", 1594 | "z": "535331d8.55c1f", 1595 | "name": "", 1596 | "active": true, 1597 | "console": "false", 1598 | "complete": "false", 1599 | "x": 550, 1600 | "y": 280, 1601 | "wires": [] 1602 | }, 1603 | { 1604 | "id": "dca48356.d3261", 1605 | "type": "comment", 1606 | "z": "535331d8.55c1f", 1607 | "name": "Move message property", 1608 | "info": "", 1609 | "x": 130, 1610 | "y": 240, 1611 | "wires": [] 1612 | }, 1613 | { 1614 | "id": "80dae67d.b4d8f8", 1615 | "type": "inject", 1616 | "z": "535331d8.55c1f", 1617 | "name": "", 1618 | "topic": "", 1619 | "payload": "0", 1620 | "payloadType": "num", 1621 | "repeat": "", 1622 | "crontab": "", 1623 | "once": false, 1624 | "x": 130, 1625 | "y": 380, 1626 | "wires": [ 1627 | [ 1628 | "81f13534.456348" 1629 | ] 1630 | ] 1631 | }, 1632 | { 1633 | "id": "e80b61d7.4b399", 1634 | "type": "debug", 1635 | "z": "535331d8.55c1f", 1636 | "name": "", 1637 | "active": true, 1638 | "console": "false", 1639 | "complete": "false", 1640 | "x": 550, 1641 | "y": 420, 1642 | "wires": [] 1643 | }, 1644 | { 1645 | "id": "deb8d8cc.47a748", 1646 | "type": "comment", 1647 | "z": "535331d8.55c1f", 1648 | "name": "Map numeric range", 1649 | "info": "", 1650 | "x": 110, 1651 | "y": 340, 1652 | "wires": [] 1653 | }, 1654 | { 1655 | "id": "cb21de23.75a2f", 1656 | "type": "inject", 1657 | "z": "535331d8.55c1f", 1658 | "name": "", 1659 | "topic": "", 1660 | "payload": "512", 1661 | "payloadType": "num", 1662 | "repeat": "", 1663 | "crontab": "", 1664 | "once": false, 1665 | "x": 130, 1666 | "y": 420, 1667 | "wires": [ 1668 | [ 1669 | "81f13534.456348" 1670 | ] 1671 | ] 1672 | }, 1673 | { 1674 | "id": "342552de.255a1e", 1675 | "type": "inject", 1676 | "z": "535331d8.55c1f", 1677 | "name": "", 1678 | "topic": "", 1679 | "payload": "1023", 1680 | "payloadType": "num", 1681 | "repeat": "", 1682 | "crontab": "", 1683 | "once": false, 1684 | "x": 130, 1685 | "y": 460, 1686 | "wires": [ 1687 | [ 1688 | "81f13534.456348" 1689 | ] 1690 | ] 1691 | }, 1692 | { 1693 | "id": "81f13534.456348", 1694 | "type": "range", 1695 | "z": "535331d8.55c1f", 1696 | "minin": "0", 1697 | "maxin": "1023", 1698 | "minout": "0", 1699 | "maxout": "5", 1700 | "action": "clamp", 1701 | "round": false, 1702 | "name": "", 1703 | "x": 350, 1704 | "y": 420, 1705 | "wires": [ 1706 | [ 1707 | "e80b61d7.4b399" 1708 | ] 1709 | ] 1710 | }, 1711 | { 1712 | "id": "80da1f72.7a01e", 1713 | "type": "comment", 1714 | "z": "b571704d.6c591", 1715 | "name": "Connect to an MQTT Broker", 1716 | "info": "", 1717 | "x": 140, 1718 | "y": 40, 1719 | "wires": [] 1720 | }, 1721 | { 1722 | "id": "5d3fc91.775a038", 1723 | "type": "mqtt out", 1724 | "z": "b571704d.6c591", 1725 | "name": "", 1726 | "topic": "sensors/livingroom/temp", 1727 | "qos": "", 1728 | "retain": "", 1729 | "broker": "b439d8b0.991988", 1730 | "x": 290, 1731 | "y": 80, 1732 | "wires": [] 1733 | }, 1734 | { 1735 | "id": "c548c8e9.801fa8", 1736 | "type": "inject", 1737 | "z": "b571704d.6c591", 1738 | "name": "", 1739 | "topic": "", 1740 | "payload": "22", 1741 | "payloadType": "num", 1742 | "repeat": "", 1743 | "crontab": "", 1744 | "once": false, 1745 | "x": 110, 1746 | "y": 80, 1747 | "wires": [ 1748 | [ 1749 | "5d3fc91.775a038" 1750 | ] 1751 | ] 1752 | }, 1753 | { 1754 | "id": "6ae5ef55.9290b", 1755 | "type": "mqtt in", 1756 | "z": "b571704d.6c591", 1757 | "name": "", 1758 | "topic": "sensors/livingroom/temp", 1759 | "qos": "2", 1760 | "broker": "b439d8b0.991988", 1761 | "x": 150, 1762 | "y": 120, 1763 | "wires": [ 1764 | [ 1765 | "e314de99.9048f" 1766 | ] 1767 | ] 1768 | }, 1769 | { 1770 | "id": "e314de99.9048f", 1771 | "type": "debug", 1772 | "z": "b571704d.6c591", 1773 | "name": "", 1774 | "active": true, 1775 | "console": "false", 1776 | "complete": "false", 1777 | "x": 350, 1778 | "y": 120, 1779 | "wires": [] 1780 | }, 1781 | { 1782 | "id": "eb2fc778.d4a378", 1783 | "type": "comment", 1784 | "z": "b571704d.6c591", 1785 | "name": "Publish to a Topic", 1786 | "info": "", 1787 | "x": 110, 1788 | "y": 180, 1789 | "wires": [] 1790 | }, 1791 | { 1792 | "id": "3dfed8ec.e91a78", 1793 | "type": "mqtt out", 1794 | "z": "b571704d.6c591", 1795 | "name": "", 1796 | "topic": "sensors/livingroom/temp", 1797 | "qos": "", 1798 | "retain": "", 1799 | "broker": "b439d8b0.991988", 1800 | "x": 330, 1801 | "y": 220, 1802 | "wires": [] 1803 | }, 1804 | { 1805 | "id": "73a82491.feb28c", 1806 | "type": "inject", 1807 | "z": "b571704d.6c591", 1808 | "name": "temperature", 1809 | "topic": "", 1810 | "payload": "22", 1811 | "payloadType": "num", 1812 | "repeat": "", 1813 | "crontab": "", 1814 | "once": false, 1815 | "x": 110, 1816 | "y": 220, 1817 | "wires": [ 1818 | [ 1819 | "3dfed8ec.e91a78" 1820 | ] 1821 | ] 1822 | }, 1823 | { 1824 | "id": "7bea6336.0d6cdc", 1825 | "type": "comment", 1826 | "z": "b571704d.6c591", 1827 | "name": "Set the topic of a published message", 1828 | "info": "", 1829 | "x": 170, 1830 | "y": 280, 1831 | "wires": [] 1832 | }, 1833 | { 1834 | "id": "d554d542.0cf108", 1835 | "type": "mqtt out", 1836 | "z": "b571704d.6c591", 1837 | "name": "", 1838 | "topic": "", 1839 | "qos": "", 1840 | "retain": "", 1841 | "broker": "b439d8b0.991988", 1842 | "x": 310, 1843 | "y": 320, 1844 | "wires": [] 1845 | }, 1846 | { 1847 | "id": "c5efd98e.9ad2f8", 1848 | "type": "inject", 1849 | "z": "b571704d.6c591", 1850 | "name": "kitchen temperature", 1851 | "topic": "sensors/kitchen/temperature", 1852 | "payload": "22", 1853 | "payloadType": "num", 1854 | "repeat": "", 1855 | "crontab": "", 1856 | "once": false, 1857 | "x": 130, 1858 | "y": 320, 1859 | "wires": [ 1860 | [ 1861 | "d554d542.0cf108" 1862 | ] 1863 | ] 1864 | }, 1865 | { 1866 | "id": "58c99d82.dbfd54", 1867 | "type": "comment", 1868 | "z": "b571704d.6c591", 1869 | "name": "Subscribe to a Topic", 1870 | "info": "", 1871 | "x": 110, 1872 | "y": 480, 1873 | "wires": [] 1874 | }, 1875 | { 1876 | "id": "5c92c689.b67458", 1877 | "type": "mqtt in", 1878 | "z": "b571704d.6c591", 1879 | "name": "", 1880 | "topic": "sensors/#", 1881 | "qos": "2", 1882 | "datatype": "auto", 1883 | "broker": "b439d8b0.991988", 1884 | "x": 80, 1885 | "y": 520, 1886 | "wires": [ 1887 | [ 1888 | "a26e21e1.de075" 1889 | ] 1890 | ] 1891 | }, 1892 | { 1893 | "id": "a26e21e1.de075", 1894 | "type": "debug", 1895 | "z": "b571704d.6c591", 1896 | "name": "", 1897 | "active": true, 1898 | "console": "false", 1899 | "complete": "false", 1900 | "x": 230, 1901 | "y": 520, 1902 | "wires": [] 1903 | }, 1904 | { 1905 | "id": "a172eabf.7b7218", 1906 | "type": "comment", 1907 | "z": "b571704d.6c591", 1908 | "name": "Publish a retained message to a topic", 1909 | "info": "", 1910 | "x": 170, 1911 | "y": 380, 1912 | "wires": [] 1913 | }, 1914 | { 1915 | "id": "9f9556a3.c298d8", 1916 | "type": "mqtt out", 1917 | "z": "b571704d.6c591", 1918 | "name": "", 1919 | "topic": "sensors/livingroom/temp", 1920 | "qos": "", 1921 | "retain": "true", 1922 | "broker": "b439d8b0.991988", 1923 | "x": 310, 1924 | "y": 420, 1925 | "wires": [] 1926 | }, 1927 | { 1928 | "id": "a55dd0e1.a02ae", 1929 | "type": "inject", 1930 | "z": "b571704d.6c591", 1931 | "name": "temperature", 1932 | "topic": "", 1933 | "payload": "22", 1934 | "payloadType": "num", 1935 | "repeat": "", 1936 | "crontab": "", 1937 | "once": false, 1938 | "x": 110, 1939 | "y": 420, 1940 | "wires": [ 1941 | [ 1942 | "9f9556a3.c298d8" 1943 | ] 1944 | ] 1945 | }, 1946 | { 1947 | "id": "12526f79.5dc901", 1948 | "type": "comment", 1949 | "z": "b571704d.6c591", 1950 | "name": "Receive a Parsed JSON Message", 1951 | "info": "", 1952 | "x": 160, 1953 | "y": 580, 1954 | "wires": [] 1955 | }, 1956 | { 1957 | "id": "12f4b1f9.ef698e", 1958 | "type": "mqtt in", 1959 | "z": "b571704d.6c591", 1960 | "name": "", 1961 | "topic": "sensors/#", 1962 | "qos": "2", 1963 | "datatype": "auto", 1964 | "broker": "b439d8b0.991988", 1965 | "x": 240, 1966 | "y": 680, 1967 | "wires": [ 1968 | [ 1969 | "177dcc5c.4fc9e4" 1970 | ] 1971 | ] 1972 | }, 1973 | { 1974 | "id": "c755b9fb.a6e4b8", 1975 | "type": "debug", 1976 | "z": "b571704d.6c591", 1977 | "name": "", 1978 | "active": true, 1979 | "console": "false", 1980 | "complete": "false", 1981 | "x": 510, 1982 | "y": 680, 1983 | "wires": [] 1984 | }, 1985 | { 1986 | "id": "54039f03.f1f82", 1987 | "type": "mqtt out", 1988 | "z": "b571704d.6c591", 1989 | "name": "", 1990 | "topic": "sensors/livingroom/temp", 1991 | "qos": "", 1992 | "retain": "false", 1993 | "broker": "b439d8b0.991988", 1994 | "x": 290, 1995 | "y": 620, 1996 | "wires": [] 1997 | }, 1998 | { 1999 | "id": "6ecdedfb.c83784", 2000 | "type": "inject", 2001 | "z": "b571704d.6c591", 2002 | "name": "temp json", 2003 | "topic": "", 2004 | "payload": "{\"sensor_id\":1234,\"temperature\":13}", 2005 | "payloadType": "json", 2006 | "repeat": "", 2007 | "crontab": "", 2008 | "once": false, 2009 | "x": 100, 2010 | "y": 620, 2011 | "wires": [ 2012 | [ 2013 | "54039f03.f1f82" 2014 | ] 2015 | ] 2016 | }, 2017 | { 2018 | "id": "177dcc5c.4fc9e4", 2019 | "type": "json", 2020 | "z": "b571704d.6c591", 2021 | "name": "", 2022 | "pretty": false, 2023 | "x": 370, 2024 | "y": 680, 2025 | "wires": [ 2026 | [ 2027 | "c755b9fb.a6e4b8" 2028 | ] 2029 | ] 2030 | }, 2031 | { 2032 | "id": "265b1392.ee67ec", 2033 | "type": "inject", 2034 | "z": "ac14500e.2c57d", 2035 | "name": "", 2036 | "topic": "", 2037 | "payload": "Started!", 2038 | "payloadType": "str", 2039 | "repeat": "", 2040 | "crontab": "", 2041 | "once": true, 2042 | "x": 140, 2043 | "y": 80, 2044 | "wires": [ 2045 | [ 2046 | "2443ea4e.859c46" 2047 | ] 2048 | ] 2049 | }, 2050 | { 2051 | "id": "2443ea4e.859c46", 2052 | "type": "debug", 2053 | "z": "ac14500e.2c57d", 2054 | "name": "", 2055 | "active": true, 2056 | "console": "false", 2057 | "complete": "false", 2058 | "x": 410, 2059 | "y": 80, 2060 | "wires": [] 2061 | }, 2062 | { 2063 | "id": "5d96e2bf.be9ddc", 2064 | "type": "inject", 2065 | "z": "ac14500e.2c57d", 2066 | "name": "", 2067 | "topic": "", 2068 | "payload": "", 2069 | "payloadType": "date", 2070 | "repeat": "5", 2071 | "crontab": "", 2072 | "once": false, 2073 | "x": 150, 2074 | "y": 180, 2075 | "wires": [ 2076 | [ 2077 | "83bc41f5.4f2fb" 2078 | ] 2079 | ] 2080 | }, 2081 | { 2082 | "id": "83bc41f5.4f2fb", 2083 | "type": "debug", 2084 | "z": "ac14500e.2c57d", 2085 | "name": "", 2086 | "active": false, 2087 | "console": "false", 2088 | "complete": "false", 2089 | "x": 410, 2090 | "y": 180, 2091 | "wires": [] 2092 | }, 2093 | { 2094 | "id": "f990b44f.7b5fa8", 2095 | "type": "inject", 2096 | "z": "ac14500e.2c57d", 2097 | "name": "", 2098 | "topic": "", 2099 | "payload": "It is 4pm on a weekday!", 2100 | "payloadType": "str", 2101 | "repeat": "", 2102 | "crontab": "00 16 * * 1,2,3,4,5", 2103 | "once": false, 2104 | "x": 190, 2105 | "y": 280, 2106 | "wires": [ 2107 | [ 2108 | "e692b739.966c98" 2109 | ] 2110 | ] 2111 | }, 2112 | { 2113 | "id": "e692b739.966c98", 2114 | "type": "debug", 2115 | "z": "ac14500e.2c57d", 2116 | "name": "", 2117 | "active": true, 2118 | "console": "false", 2119 | "complete": "false", 2120 | "x": 410, 2121 | "y": 280, 2122 | "wires": [] 2123 | }, 2124 | { 2125 | "id": "136cee19.ca58b2", 2126 | "type": "comment", 2127 | "z": "ac14500e.2c57d", 2128 | "name": "Trigger a flow whenever Node-RED starts", 2129 | "info": "", 2130 | "x": 180, 2131 | "y": 40, 2132 | "wires": [] 2133 | }, 2134 | { 2135 | "id": "a6d5600.1c7eea", 2136 | "type": "comment", 2137 | "z": "ac14500e.2c57d", 2138 | "name": "Trigger a flow at regular intervals", 2139 | "info": "", 2140 | "x": 150, 2141 | "y": 140, 2142 | "wires": [] 2143 | }, 2144 | { 2145 | "id": "3acad048.5c037", 2146 | "type": "comment", 2147 | "z": "ac14500e.2c57d", 2148 | "name": "Trigger a flow at a specific time", 2149 | "info": "", 2150 | "x": 150, 2151 | "y": 240, 2152 | "wires": [] 2153 | }, 2154 | { 2155 | "id": "a7fce675.df3738", 2156 | "type": "comment", 2157 | "z": "ac14500e.2c57d", 2158 | "name": "Route a message based on one of its properties", 2159 | "info": "", 2160 | "x": 200, 2161 | "y": 340, 2162 | "wires": [] 2163 | }, 2164 | { 2165 | "id": "bbfb8d73.afa31", 2166 | "type": "comment", 2167 | "z": "ac14500e.2c57d", 2168 | "name": "Route a message based on a context property", 2169 | "info": "", 2170 | "x": 190, 2171 | "y": 520, 2172 | "wires": [] 2173 | }, 2174 | { 2175 | "id": "e5761a48.6ace18", 2176 | "type": "comment", 2177 | "z": "ac14500e.2c57d", 2178 | "name": "Perform an operation on each element in an array", 2179 | "info": "", 2180 | "x": 200, 2181 | "y": 880, 2182 | "wires": [] 2183 | }, 2184 | { 2185 | "id": "508c5fc0.cd11e", 2186 | "type": "comment", 2187 | "z": "ac14500e.2c57d", 2188 | "name": "Trigger a flow if a message isn’t received after a defined time", 2189 | "info": "", 2190 | "x": 240, 2191 | "y": 1100, 2192 | "wires": [] 2193 | }, 2194 | { 2195 | "id": "11644ecd.879951", 2196 | "type": "comment", 2197 | "z": "ac14500e.2c57d", 2198 | "name": "Drop messages that have not changed value", 2199 | "info": "", 2200 | "x": 190, 2201 | "y": 1460, 2202 | "wires": [] 2203 | }, 2204 | { 2205 | "id": "cd480112.39f77", 2206 | "type": "comment", 2207 | "z": "ac14500e.2c57d", 2208 | "name": "Send placeholder messages when a stream stops sending", 2209 | "info": "", 2210 | "x": 230, 2211 | "y": 1620, 2212 | "wires": [] 2213 | }, 2214 | { 2215 | "id": "db551bcf.2c92c8", 2216 | "type": "comment", 2217 | "z": "fc046f99.4be08", 2218 | "name": "Trigger a flow when a node throws an error", 2219 | "info": "", 2220 | "x": 180, 2221 | "y": 40, 2222 | "wires": [] 2223 | }, 2224 | { 2225 | "id": "847e1c97.0ea93", 2226 | "type": "comment", 2227 | "z": "64133d39.bb0394", 2228 | "name": "Convert to/from JSON", 2229 | "info": "", 2230 | "x": 120, 2231 | "y": 40, 2232 | "wires": [] 2233 | }, 2234 | { 2235 | "id": "8fa4a297.9f87d", 2236 | "type": "comment", 2237 | "z": "64133d39.bb0394", 2238 | "name": "Split text into one message per line", 2239 | "info": "", 2240 | "x": 160, 2241 | "y": 840, 2242 | "wires": [] 2243 | }, 2244 | { 2245 | "id": "3bc8e1d2.744abe", 2246 | "type": "switch", 2247 | "z": "ac14500e.2c57d", 2248 | "name": "Route ", 2249 | "property": "topic", 2250 | "propertyType": "msg", 2251 | "rules": [ 2252 | { 2253 | "t": "eq", 2254 | "v": "temperature", 2255 | "vt": "str" 2256 | }, 2257 | { 2258 | "t": "eq", 2259 | "v": "humidity", 2260 | "vt": "str" 2261 | }, 2262 | { 2263 | "t": "eq", 2264 | "v": "pressure", 2265 | "vt": "str" 2266 | } 2267 | ], 2268 | "checkall": "true", 2269 | "repair": false, 2270 | "outputs": 3, 2271 | "x": 330, 2272 | "y": 420, 2273 | "wires": [ 2274 | [ 2275 | "907bf3b8.def45" 2276 | ], 2277 | [ 2278 | "fe425938.926838" 2279 | ], 2280 | [ 2281 | "ec261304.52f73" 2282 | ] 2283 | ] 2284 | }, 2285 | { 2286 | "id": "be3da36c.1c142", 2287 | "type": "inject", 2288 | "z": "ac14500e.2c57d", 2289 | "name": "", 2290 | "topic": "temperature", 2291 | "payload": "27", 2292 | "payloadType": "num", 2293 | "repeat": "", 2294 | "crontab": "", 2295 | "once": false, 2296 | "onceDelay": 0.1, 2297 | "x": 140, 2298 | "y": 380, 2299 | "wires": [ 2300 | [ 2301 | "3bc8e1d2.744abe" 2302 | ] 2303 | ] 2304 | }, 2305 | { 2306 | "id": "f271ceef.172b3", 2307 | "type": "inject", 2308 | "z": "ac14500e.2c57d", 2309 | "name": "", 2310 | "topic": "humidity", 2311 | "payload": "45", 2312 | "payloadType": "num", 2313 | "repeat": "", 2314 | "crontab": "", 2315 | "once": false, 2316 | "onceDelay": 0.1, 2317 | "x": 130, 2318 | "y": 420, 2319 | "wires": [ 2320 | [ 2321 | "3bc8e1d2.744abe" 2322 | ] 2323 | ] 2324 | }, 2325 | { 2326 | "id": "907bf3b8.def45", 2327 | "type": "debug", 2328 | "z": "ac14500e.2c57d", 2329 | "name": "Temperature", 2330 | "active": true, 2331 | "tosidebar": true, 2332 | "console": false, 2333 | "tostatus": false, 2334 | "complete": "payload", 2335 | "targetType": "msg", 2336 | "x": 510, 2337 | "y": 380, 2338 | "wires": [] 2339 | }, 2340 | { 2341 | "id": "fe425938.926838", 2342 | "type": "debug", 2343 | "z": "ac14500e.2c57d", 2344 | "name": "Humidity", 2345 | "active": true, 2346 | "tosidebar": true, 2347 | "console": false, 2348 | "tostatus": false, 2349 | "complete": "payload", 2350 | "targetType": "msg", 2351 | "x": 500, 2352 | "y": 420, 2353 | "wires": [] 2354 | }, 2355 | { 2356 | "id": "ec261304.52f73", 2357 | "type": "debug", 2358 | "z": "ac14500e.2c57d", 2359 | "name": "Pressure", 2360 | "active": true, 2361 | "tosidebar": true, 2362 | "console": false, 2363 | "tostatus": false, 2364 | "complete": "payload", 2365 | "targetType": "msg", 2366 | "x": 500, 2367 | "y": 460, 2368 | "wires": [] 2369 | }, 2370 | { 2371 | "id": "fca957dd.9d8078", 2372 | "type": "inject", 2373 | "z": "ac14500e.2c57d", 2374 | "name": "", 2375 | "topic": "pressure", 2376 | "payload": "1001", 2377 | "payloadType": "num", 2378 | "repeat": "", 2379 | "crontab": "", 2380 | "once": false, 2381 | "onceDelay": 0.1, 2382 | "x": 130, 2383 | "y": 460, 2384 | "wires": [ 2385 | [ 2386 | "3bc8e1d2.744abe" 2387 | ] 2388 | ] 2389 | }, 2390 | { 2391 | "id": "b8bbbc41.f272", 2392 | "type": "switch", 2393 | "z": "ac14500e.2c57d", 2394 | "name": "Context based routing", 2395 | "property": "state", 2396 | "propertyType": "flow", 2397 | "rules": [ 2398 | { 2399 | "t": "eq", 2400 | "v": "1", 2401 | "vt": "num" 2402 | }, 2403 | { 2404 | "t": "eq", 2405 | "v": "2", 2406 | "vt": "num" 2407 | }, 2408 | { 2409 | "t": "eq", 2410 | "v": "3", 2411 | "vt": "num" 2412 | } 2413 | ], 2414 | "checkall": "true", 2415 | "repair": false, 2416 | "outputs": 3, 2417 | "x": 320, 2418 | "y": 600, 2419 | "wires": [ 2420 | [ 2421 | "9aa9c6b2.18a8e8" 2422 | ], 2423 | [ 2424 | "6ba4ec46.476794" 2425 | ], 2426 | [ 2427 | "a2e806c8.ffa168" 2428 | ] 2429 | ] 2430 | }, 2431 | { 2432 | "id": "9aa9c6b2.18a8e8", 2433 | "type": "debug", 2434 | "z": "ac14500e.2c57d", 2435 | "name": "Output 1", 2436 | "active": true, 2437 | "tosidebar": true, 2438 | "console": false, 2439 | "tostatus": true, 2440 | "complete": "payload", 2441 | "targetType": "msg", 2442 | "x": 560, 2443 | "y": 540, 2444 | "wires": [] 2445 | }, 2446 | { 2447 | "id": "8aabdb51.e8b538", 2448 | "type": "inject", 2449 | "z": "ac14500e.2c57d", 2450 | "name": "Set state 0", 2451 | "topic": "", 2452 | "payload": "0", 2453 | "payloadType": "num", 2454 | "repeat": "", 2455 | "crontab": "", 2456 | "once": false, 2457 | "onceDelay": 0.1, 2458 | "x": 120, 2459 | "y": 680, 2460 | "wires": [ 2461 | [ 2462 | "e46083e4.1f17b" 2463 | ] 2464 | ] 2465 | }, 2466 | { 2467 | "id": "e46083e4.1f17b", 2468 | "type": "change", 2469 | "z": "ac14500e.2c57d", 2470 | "name": "Set flow.state", 2471 | "rules": [ 2472 | { 2473 | "t": "set", 2474 | "p": "state", 2475 | "pt": "flow", 2476 | "to": "payload", 2477 | "tot": "msg" 2478 | } 2479 | ], 2480 | "action": "", 2481 | "property": "", 2482 | "from": "", 2483 | "to": "", 2484 | "reg": false, 2485 | "x": 340, 2486 | "y": 720, 2487 | "wires": [ 2488 | [] 2489 | ] 2490 | }, 2491 | { 2492 | "id": "6ba4ec46.476794", 2493 | "type": "debug", 2494 | "z": "ac14500e.2c57d", 2495 | "name": "Output 2", 2496 | "active": true, 2497 | "tosidebar": true, 2498 | "console": false, 2499 | "tostatus": true, 2500 | "complete": "payload", 2501 | "targetType": "msg", 2502 | "x": 560, 2503 | "y": 600, 2504 | "wires": [] 2505 | }, 2506 | { 2507 | "id": "a2e806c8.ffa168", 2508 | "type": "debug", 2509 | "z": "ac14500e.2c57d", 2510 | "name": "Output 3", 2511 | "active": true, 2512 | "tosidebar": true, 2513 | "console": false, 2514 | "tostatus": true, 2515 | "complete": "payload", 2516 | "targetType": "msg", 2517 | "x": 560, 2518 | "y": 660, 2519 | "wires": [] 2520 | }, 2521 | { 2522 | "id": "a62d8cdf.1bd82", 2523 | "type": "inject", 2524 | "z": "ac14500e.2c57d", 2525 | "name": "Inject", 2526 | "topic": "", 2527 | "payload": "", 2528 | "payloadType": "date", 2529 | "repeat": "", 2530 | "crontab": "", 2531 | "once": false, 2532 | "onceDelay": 0.1, 2533 | "x": 110, 2534 | "y": 600, 2535 | "wires": [ 2536 | [ 2537 | "b8bbbc41.f272" 2538 | ] 2539 | ] 2540 | }, 2541 | { 2542 | "id": "d1722dee.48db4", 2543 | "type": "inject", 2544 | "z": "ac14500e.2c57d", 2545 | "name": "Set state 1", 2546 | "topic": "", 2547 | "payload": "1", 2548 | "payloadType": "num", 2549 | "repeat": "", 2550 | "crontab": "", 2551 | "once": false, 2552 | "onceDelay": 0.1, 2553 | "x": 120, 2554 | "y": 720, 2555 | "wires": [ 2556 | [ 2557 | "e46083e4.1f17b" 2558 | ] 2559 | ] 2560 | }, 2561 | { 2562 | "id": "4bdb08de.706328", 2563 | "type": "inject", 2564 | "z": "ac14500e.2c57d", 2565 | "name": "Set state 2", 2566 | "topic": "", 2567 | "payload": "2", 2568 | "payloadType": "num", 2569 | "repeat": "", 2570 | "crontab": "", 2571 | "once": false, 2572 | "onceDelay": 0.1, 2573 | "x": 120, 2574 | "y": 760, 2575 | "wires": [ 2576 | [ 2577 | "e46083e4.1f17b" 2578 | ] 2579 | ] 2580 | }, 2581 | { 2582 | "id": "220ce0a6.cf81e", 2583 | "type": "inject", 2584 | "z": "ac14500e.2c57d", 2585 | "name": "Set state 3", 2586 | "topic": "", 2587 | "payload": "3", 2588 | "payloadType": "num", 2589 | "repeat": "", 2590 | "crontab": "", 2591 | "once": false, 2592 | "onceDelay": 0.1, 2593 | "x": 120, 2594 | "y": 800, 2595 | "wires": [ 2596 | [ 2597 | "e46083e4.1f17b" 2598 | ] 2599 | ] 2600 | }, 2601 | { 2602 | "id": "3149f240.c0e25e", 2603 | "type": "inject", 2604 | "z": "ac14500e.2c57d", 2605 | "name": "Array of decimals", 2606 | "topic": "", 2607 | "payload": "[1.67,2.98,3.12,4.99,5.50]", 2608 | "payloadType": "json", 2609 | "repeat": "", 2610 | "crontab": "", 2611 | "once": false, 2612 | "onceDelay": 0.1, 2613 | "x": 120, 2614 | "y": 920, 2615 | "wires": [ 2616 | [ 2617 | "bd57baa6.00f998" 2618 | ] 2619 | ] 2620 | }, 2621 | { 2622 | "id": "bd57baa6.00f998", 2623 | "type": "split", 2624 | "z": "ac14500e.2c57d", 2625 | "name": "Split array", 2626 | "splt": "\\n", 2627 | "spltType": "str", 2628 | "arraySplt": "1", 2629 | "arraySpltType": "len", 2630 | "stream": false, 2631 | "addname": "", 2632 | "x": 200, 2633 | "y": 980, 2634 | "wires": [ 2635 | [ 2636 | "7ab9e9ed.d514b8" 2637 | ] 2638 | ] 2639 | }, 2640 | { 2641 | "id": "7ab9e9ed.d514b8", 2642 | "type": "range", 2643 | "z": "ac14500e.2c57d", 2644 | "minin": "0", 2645 | "maxin": "10", 2646 | "minout": "0", 2647 | "maxout": "10", 2648 | "action": "scale", 2649 | "round": true, 2650 | "property": "payload", 2651 | "name": "Round value", 2652 | "x": 350, 2653 | "y": 980, 2654 | "wires": [ 2655 | [ 2656 | "f26660ab.007b3" 2657 | ] 2658 | ] 2659 | }, 2660 | { 2661 | "id": "f26660ab.007b3", 2662 | "type": "join", 2663 | "z": "ac14500e.2c57d", 2664 | "name": "", 2665 | "mode": "auto", 2666 | "build": "string", 2667 | "property": "payload", 2668 | "propertyType": "msg", 2669 | "key": "topic", 2670 | "joiner": "\\n", 2671 | "joinerType": "str", 2672 | "accumulate": "false", 2673 | "timeout": "", 2674 | "count": "", 2675 | "reduceRight": false, 2676 | "x": 490, 2677 | "y": 980, 2678 | "wires": [ 2679 | [ 2680 | "f9b5abac.f13828" 2681 | ] 2682 | ] 2683 | }, 2684 | { 2685 | "id": "f9b5abac.f13828", 2686 | "type": "debug", 2687 | "z": "ac14500e.2c57d", 2688 | "name": "", 2689 | "active": true, 2690 | "tosidebar": true, 2691 | "console": false, 2692 | "tostatus": false, 2693 | "complete": "false", 2694 | "x": 550, 2695 | "y": 1040, 2696 | "wires": [] 2697 | }, 2698 | { 2699 | "id": "38caaff4.03f6d", 2700 | "type": "trigger", 2701 | "z": "ac14500e.2c57d", 2702 | "op1": "", 2703 | "op2": "timeout", 2704 | "op1type": "nul", 2705 | "op2type": "str", 2706 | "duration": "5", 2707 | "extend": true, 2708 | "units": "s", 2709 | "reset": "", 2710 | "bytopic": "all", 2711 | "name": "Watchdog", 2712 | "x": 270, 2713 | "y": 1180, 2714 | "wires": [ 2715 | [ 2716 | "ae477709.016088" 2717 | ] 2718 | ] 2719 | }, 2720 | { 2721 | "id": "3da6946e.184a5c", 2722 | "type": "inject", 2723 | "z": "ac14500e.2c57d", 2724 | "name": "", 2725 | "topic": "", 2726 | "payload": "", 2727 | "payloadType": "date", 2728 | "repeat": "", 2729 | "crontab": "", 2730 | "once": false, 2731 | "onceDelay": 0.1, 2732 | "x": 100, 2733 | "y": 1140, 2734 | "wires": [ 2735 | [ 2736 | "38caaff4.03f6d", 2737 | "6ea53ad8.2362a4" 2738 | ] 2739 | ] 2740 | }, 2741 | { 2742 | "id": "6ea53ad8.2362a4", 2743 | "type": "debug", 2744 | "z": "ac14500e.2c57d", 2745 | "name": "", 2746 | "active": true, 2747 | "tosidebar": true, 2748 | "console": false, 2749 | "tostatus": false, 2750 | "complete": "payload", 2751 | "targetType": "msg", 2752 | "x": 450, 2753 | "y": 1140, 2754 | "wires": [] 2755 | }, 2756 | { 2757 | "id": "ae477709.016088", 2758 | "type": "debug", 2759 | "z": "ac14500e.2c57d", 2760 | "name": "", 2761 | "active": true, 2762 | "tosidebar": true, 2763 | "console": false, 2764 | "tostatus": false, 2765 | "complete": "false", 2766 | "x": 450, 2767 | "y": 1180, 2768 | "wires": [] 2769 | }, 2770 | { 2771 | "id": "b316b702.160fa8", 2772 | "type": "comment", 2773 | "z": "ac14500e.2c57d", 2774 | "name": "Limit the rate of messages passing through a flow", 2775 | "info": "", 2776 | "x": 210, 2777 | "y": 1240, 2778 | "wires": [] 2779 | }, 2780 | { 2781 | "id": "bd97c8ed.a5c8d8", 2782 | "type": "delay", 2783 | "z": "ac14500e.2c57d", 2784 | "name": "", 2785 | "pauseType": "rate", 2786 | "timeout": "5", 2787 | "timeoutUnits": "seconds", 2788 | "rate": "1", 2789 | "nbRateUnits": "1", 2790 | "rateUnits": "second", 2791 | "randomFirst": "1", 2792 | "randomLast": "5", 2793 | "randomUnits": "seconds", 2794 | "drop": false, 2795 | "x": 390, 2796 | "y": 1280, 2797 | "wires": [ 2798 | [ 2799 | "bd66f03e.bdf0c" 2800 | ] 2801 | ] 2802 | }, 2803 | { 2804 | "id": "1fccc223.7ba87e", 2805 | "type": "inject", 2806 | "z": "ac14500e.2c57d", 2807 | "name": "Inject Array", 2808 | "topic": "", 2809 | "payload": "[0,1,2,3,4,5,6,7,8,9]", 2810 | "payloadType": "json", 2811 | "repeat": "", 2812 | "crontab": "", 2813 | "once": false, 2814 | "onceDelay": 0.1, 2815 | "x": 110, 2816 | "y": 1280, 2817 | "wires": [ 2818 | [ 2819 | "b2837466.e02a38" 2820 | ] 2821 | ] 2822 | }, 2823 | { 2824 | "id": "bd66f03e.bdf0c", 2825 | "type": "debug", 2826 | "z": "ac14500e.2c57d", 2827 | "name": "", 2828 | "active": true, 2829 | "tosidebar": true, 2830 | "console": false, 2831 | "tostatus": false, 2832 | "complete": "payload", 2833 | "targetType": "msg", 2834 | "x": 550, 2835 | "y": 1280, 2836 | "wires": [] 2837 | }, 2838 | { 2839 | "id": "b2837466.e02a38", 2840 | "type": "split", 2841 | "z": "ac14500e.2c57d", 2842 | "name": "", 2843 | "splt": "\\n", 2844 | "spltType": "str", 2845 | "arraySplt": 1, 2846 | "arraySpltType": "len", 2847 | "stream": false, 2848 | "addname": "", 2849 | "x": 250, 2850 | "y": 1280, 2851 | "wires": [ 2852 | [ 2853 | "bd97c8ed.a5c8d8" 2854 | ] 2855 | ] 2856 | }, 2857 | { 2858 | "id": "8990635f.a45bb", 2859 | "type": "comment", 2860 | "z": "ac14500e.2c57d", 2861 | "name": "Handle messages at a regular rate", 2862 | "info": "", 2863 | "x": 160, 2864 | "y": 1340, 2865 | "wires": [] 2866 | }, 2867 | { 2868 | "id": "bd4bdd42.bd1b", 2869 | "type": "delay", 2870 | "z": "ac14500e.2c57d", 2871 | "name": "", 2872 | "pauseType": "rate", 2873 | "timeout": "5", 2874 | "timeoutUnits": "seconds", 2875 | "rate": "1", 2876 | "nbRateUnits": "5", 2877 | "rateUnits": "second", 2878 | "randomFirst": "1", 2879 | "randomLast": "5", 2880 | "randomUnits": "seconds", 2881 | "drop": true, 2882 | "x": 320, 2883 | "y": 1380, 2884 | "wires": [ 2885 | [ 2886 | "be20c513.237c78" 2887 | ] 2888 | ] 2889 | }, 2890 | { 2891 | "id": "8a1bcd7d.f6b67", 2892 | "type": "inject", 2893 | "z": "ac14500e.2c57d", 2894 | "name": "Inject Array", 2895 | "topic": "", 2896 | "payload": "[0,1,2,3,4,5,6,7,8,9]", 2897 | "payloadType": "json", 2898 | "repeat": "", 2899 | "crontab": "", 2900 | "once": false, 2901 | "onceDelay": 0.1, 2902 | "x": 110, 2903 | "y": 1380, 2904 | "wires": [ 2905 | [ 2906 | "bd4bdd42.bd1b" 2907 | ] 2908 | ] 2909 | }, 2910 | { 2911 | "id": "be20c513.237c78", 2912 | "type": "debug", 2913 | "z": "ac14500e.2c57d", 2914 | "name": "", 2915 | "active": true, 2916 | "tosidebar": true, 2917 | "console": false, 2918 | "tostatus": false, 2919 | "complete": "payload", 2920 | "targetType": "msg", 2921 | "x": 530, 2922 | "y": 1380, 2923 | "wires": [] 2924 | }, 2925 | { 2926 | "id": "87129503.c7b358", 2927 | "type": "rbe", 2928 | "z": "ac14500e.2c57d", 2929 | "name": "report-by-exception", 2930 | "func": "deadband", 2931 | "gap": "", 2932 | "start": "", 2933 | "inout": "out", 2934 | "property": "payload", 2935 | "x": 300, 2936 | "y": 1520, 2937 | "wires": [ 2938 | [ 2939 | "5e2ffc27.c61dd4" 2940 | ] 2941 | ] 2942 | }, 2943 | { 2944 | "id": "6079638d.df403c", 2945 | "type": "inject", 2946 | "z": "ac14500e.2c57d", 2947 | "name": "", 2948 | "topic": "", 2949 | "payload": "0", 2950 | "payloadType": "num", 2951 | "repeat": "", 2952 | "crontab": "", 2953 | "once": false, 2954 | "onceDelay": 0.1, 2955 | "x": 90, 2956 | "y": 1500, 2957 | "wires": [ 2958 | [ 2959 | "87129503.c7b358" 2960 | ] 2961 | ] 2962 | }, 2963 | { 2964 | "id": "2dc49f96.3070c", 2965 | "type": "inject", 2966 | "z": "ac14500e.2c57d", 2967 | "name": "", 2968 | "topic": "", 2969 | "payload": "1", 2970 | "payloadType": "num", 2971 | "repeat": "", 2972 | "crontab": "", 2973 | "once": false, 2974 | "onceDelay": 0.1, 2975 | "x": 90, 2976 | "y": 1540, 2977 | "wires": [ 2978 | [ 2979 | "87129503.c7b358" 2980 | ] 2981 | ] 2982 | }, 2983 | { 2984 | "id": "5e2ffc27.c61dd4", 2985 | "type": "debug", 2986 | "z": "ac14500e.2c57d", 2987 | "name": "", 2988 | "active": true, 2989 | "tosidebar": true, 2990 | "console": false, 2991 | "tostatus": false, 2992 | "complete": "payload", 2993 | "targetType": "msg", 2994 | "x": 510, 2995 | "y": 1520, 2996 | "wires": [] 2997 | }, 2998 | { 2999 | "id": "2bd6810d.e22ece", 3000 | "type": "catch", 3001 | "z": "fc046f99.4be08", 3002 | "name": "", 3003 | "scope": [ 3004 | "2c94a22c.91012e" 3005 | ], 3006 | "uncaught": false, 3007 | "x": 130, 3008 | "y": 160, 3009 | "wires": [ 3010 | [ 3011 | "d16b9fac.8212a" 3012 | ] 3013 | ] 3014 | }, 3015 | { 3016 | "id": "2c94a22c.91012e", 3017 | "type": "function", 3018 | "z": "fc046f99.4be08", 3019 | "name": "Throw Error", 3020 | "func": "node.error(\"an example error\", msg); ", 3021 | "outputs": 1, 3022 | "noerr": 0, 3023 | "x": 310, 3024 | "y": 100, 3025 | "wires": [ 3026 | [] 3027 | ] 3028 | }, 3029 | { 3030 | "id": "d16b9fac.8212a", 3031 | "type": "debug", 3032 | "z": "fc046f99.4be08", 3033 | "name": "", 3034 | "active": true, 3035 | "tosidebar": true, 3036 | "console": false, 3037 | "tostatus": false, 3038 | "complete": "error", 3039 | "targetType": "msg", 3040 | "x": 300, 3041 | "y": 160, 3042 | "wires": [] 3043 | }, 3044 | { 3045 | "id": "c5ee9670.5dbbd8", 3046 | "type": "inject", 3047 | "z": "fc046f99.4be08", 3048 | "name": "Trigger error", 3049 | "topic": "", 3050 | "payload": "", 3051 | "payloadType": "date", 3052 | "repeat": "", 3053 | "crontab": "", 3054 | "once": false, 3055 | "onceDelay": 0.1, 3056 | "x": 110, 3057 | "y": 100, 3058 | "wires": [ 3059 | [ 3060 | "2c94a22c.91012e" 3061 | ] 3062 | ] 3063 | }, 3064 | { 3065 | "id": "58f7476a.005d18", 3066 | "type": "comment", 3067 | "z": "fc046f99.4be08", 3068 | "name": "Automatically retry an action after an error", 3069 | "info": "", 3070 | "x": 180, 3071 | "y": 260, 3072 | "wires": [] 3073 | }, 3074 | { 3075 | "id": "139b836e.7950ed", 3076 | "type": "catch", 3077 | "z": "fc046f99.4be08", 3078 | "name": "", 3079 | "scope": [ 3080 | "d7d08440.31b678" 3081 | ], 3082 | "uncaught": false, 3083 | "x": 90, 3084 | "y": 380, 3085 | "wires": [ 3086 | [ 3087 | "2166290d.98d736", 3088 | "9c8ab214.0ecaa" 3089 | ] 3090 | ] 3091 | }, 3092 | { 3093 | "id": "d7d08440.31b678", 3094 | "type": "function", 3095 | "z": "fc046f99.4be08", 3096 | "name": "Random error", 3097 | "func": "// Randomly throw an error rather than\n// pass on message.\nif (Math.random() < 0.5) {\n node.error(\"a random error\", msg);\n} else {\n return msg;\n}", 3098 | "outputs": 1, 3099 | "noerr": 0, 3100 | "x": 320, 3101 | "y": 320, 3102 | "wires": [ 3103 | [ 3104 | "f22b1e9a.5d89b" 3105 | ] 3106 | ] 3107 | }, 3108 | { 3109 | "id": "27e61f12.c1a15", 3110 | "type": "inject", 3111 | "z": "fc046f99.4be08", 3112 | "name": "", 3113 | "topic": "", 3114 | "payload": "", 3115 | "payloadType": "date", 3116 | "repeat": "", 3117 | "crontab": "", 3118 | "once": false, 3119 | "onceDelay": 0.1, 3120 | "x": 100, 3121 | "y": 320, 3122 | "wires": [ 3123 | [ 3124 | "d7d08440.31b678" 3125 | ] 3126 | ] 3127 | }, 3128 | { 3129 | "id": "f22b1e9a.5d89b", 3130 | "type": "debug", 3131 | "z": "fc046f99.4be08", 3132 | "name": "", 3133 | "active": true, 3134 | "tosidebar": true, 3135 | "console": false, 3136 | "tostatus": false, 3137 | "complete": "false", 3138 | "x": 510, 3139 | "y": 320, 3140 | "wires": [] 3141 | }, 3142 | { 3143 | "id": "2166290d.98d736", 3144 | "type": "delay", 3145 | "z": "fc046f99.4be08", 3146 | "name": "", 3147 | "pauseType": "delay", 3148 | "timeout": "2", 3149 | "timeoutUnits": "seconds", 3150 | "rate": "1", 3151 | "nbRateUnits": "1", 3152 | "rateUnits": "second", 3153 | "randomFirst": "1", 3154 | "randomLast": "5", 3155 | "randomUnits": "seconds", 3156 | "drop": false, 3157 | "x": 240, 3158 | "y": 380, 3159 | "wires": [ 3160 | [ 3161 | "d7d08440.31b678" 3162 | ] 3163 | ] 3164 | }, 3165 | { 3166 | "id": "9c8ab214.0ecaa", 3167 | "type": "debug", 3168 | "z": "fc046f99.4be08", 3169 | "name": "", 3170 | "active": true, 3171 | "tosidebar": true, 3172 | "console": false, 3173 | "tostatus": false, 3174 | "complete": "error", 3175 | "targetType": "msg", 3176 | "x": 240, 3177 | "y": 440, 3178 | "wires": [] 3179 | }, 3180 | { 3181 | "id": "634256b7.2d6818", 3182 | "type": "inject", 3183 | "z": "64133d39.bb0394", 3184 | "name": "JSON String", 3185 | "topic": "", 3186 | "payload": "{\"a\":1}", 3187 | "payloadType": "str", 3188 | "repeat": "", 3189 | "crontab": "", 3190 | "once": false, 3191 | "onceDelay": 0.1, 3192 | "x": 110, 3193 | "y": 80, 3194 | "wires": [ 3195 | [ 3196 | "a2fe0fc8.095e1" 3197 | ] 3198 | ] 3199 | }, 3200 | { 3201 | "id": "a2fe0fc8.095e1", 3202 | "type": "json", 3203 | "z": "64133d39.bb0394", 3204 | "name": "", 3205 | "property": "payload", 3206 | "action": "", 3207 | "pretty": false, 3208 | "x": 270, 3209 | "y": 80, 3210 | "wires": [ 3211 | [ 3212 | "9a4ce2b8.47698" 3213 | ] 3214 | ] 3215 | }, 3216 | { 3217 | "id": "9a4ce2b8.47698", 3218 | "type": "debug", 3219 | "z": "64133d39.bb0394", 3220 | "name": "", 3221 | "active": true, 3222 | "tosidebar": true, 3223 | "console": false, 3224 | "tostatus": false, 3225 | "complete": "false", 3226 | "x": 430, 3227 | "y": 80, 3228 | "wires": [] 3229 | }, 3230 | { 3231 | "id": "80032e2.7c92cd", 3232 | "type": "inject", 3233 | "z": "64133d39.bb0394", 3234 | "name": "Object", 3235 | "topic": "", 3236 | "payload": "{\"a\":1}", 3237 | "payloadType": "json", 3238 | "repeat": "", 3239 | "crontab": "", 3240 | "once": false, 3241 | "onceDelay": 0.1, 3242 | "x": 90, 3243 | "y": 120, 3244 | "wires": [ 3245 | [ 3246 | "cd40a0f4.4f5ac" 3247 | ] 3248 | ] 3249 | }, 3250 | { 3251 | "id": "cd40a0f4.4f5ac", 3252 | "type": "json", 3253 | "z": "64133d39.bb0394", 3254 | "name": "", 3255 | "property": "payload", 3256 | "action": "", 3257 | "pretty": false, 3258 | "x": 270, 3259 | "y": 120, 3260 | "wires": [ 3261 | [ 3262 | "478b4106.4fd7c" 3263 | ] 3264 | ] 3265 | }, 3266 | { 3267 | "id": "478b4106.4fd7c", 3268 | "type": "debug", 3269 | "z": "64133d39.bb0394", 3270 | "name": "", 3271 | "active": true, 3272 | "tosidebar": true, 3273 | "console": false, 3274 | "tostatus": false, 3275 | "complete": "false", 3276 | "x": 430, 3277 | "y": 120, 3278 | "wires": [] 3279 | }, 3280 | { 3281 | "id": "aa69f344.f8d1f", 3282 | "type": "comment", 3283 | "z": "64133d39.bb0394", 3284 | "name": "Convert to/from YAML", 3285 | "info": "", 3286 | "x": 120, 3287 | "y": 360, 3288 | "wires": [] 3289 | }, 3290 | { 3291 | "id": "16750af7.81dec5", 3292 | "type": "inject", 3293 | "z": "64133d39.bb0394", 3294 | "name": "YAML String", 3295 | "topic": "", 3296 | "payload": "{\"a\":1}", 3297 | "payloadType": "str", 3298 | "repeat": "", 3299 | "crontab": "", 3300 | "once": false, 3301 | "onceDelay": 0.1, 3302 | "x": 110, 3303 | "y": 400, 3304 | "wires": [ 3305 | [ 3306 | "cf3ec6ca.341af8" 3307 | ] 3308 | ] 3309 | }, 3310 | { 3311 | "id": "ff2bdc86.6fca9", 3312 | "type": "debug", 3313 | "z": "64133d39.bb0394", 3314 | "name": "", 3315 | "active": true, 3316 | "tosidebar": true, 3317 | "console": false, 3318 | "tostatus": false, 3319 | "complete": "false", 3320 | "x": 590, 3321 | "y": 400, 3322 | "wires": [] 3323 | }, 3324 | { 3325 | "id": "3498b3bc.5789fc", 3326 | "type": "inject", 3327 | "z": "64133d39.bb0394", 3328 | "name": "Object", 3329 | "topic": "", 3330 | "payload": "{\"a\":1, \"b\":[1,2,3]}", 3331 | "payloadType": "json", 3332 | "repeat": "", 3333 | "crontab": "", 3334 | "once": false, 3335 | "onceDelay": 0.1, 3336 | "x": 90, 3337 | "y": 440, 3338 | "wires": [ 3339 | [ 3340 | "c86f7734.23bbd8" 3341 | ] 3342 | ] 3343 | }, 3344 | { 3345 | "id": "9ea78caa.8a64f", 3346 | "type": "debug", 3347 | "z": "64133d39.bb0394", 3348 | "name": "", 3349 | "active": true, 3350 | "tosidebar": true, 3351 | "console": false, 3352 | "tostatus": false, 3353 | "complete": "false", 3354 | "x": 430, 3355 | "y": 440, 3356 | "wires": [] 3357 | }, 3358 | { 3359 | "id": "cf3ec6ca.341af8", 3360 | "type": "template", 3361 | "z": "64133d39.bb0394", 3362 | "name": "", 3363 | "field": "payload", 3364 | "fieldType": "msg", 3365 | "format": "yaml", 3366 | "syntax": "plain", 3367 | "template": "a: 1\nb:\n - 1\n - 2\n - 3", 3368 | "output": "str", 3369 | "x": 280, 3370 | "y": 400, 3371 | "wires": [ 3372 | [ 3373 | "87cb7d01.add34" 3374 | ] 3375 | ] 3376 | }, 3377 | { 3378 | "id": "c86f7734.23bbd8", 3379 | "type": "yaml", 3380 | "z": "64133d39.bb0394", 3381 | "property": "payload", 3382 | "name": "", 3383 | "x": 250, 3384 | "y": 440, 3385 | "wires": [ 3386 | [ 3387 | "9ea78caa.8a64f" 3388 | ] 3389 | ] 3390 | }, 3391 | { 3392 | "id": "87cb7d01.add34", 3393 | "type": "yaml", 3394 | "z": "64133d39.bb0394", 3395 | "property": "payload", 3396 | "name": "", 3397 | "x": 430, 3398 | "y": 400, 3399 | "wires": [ 3400 | [ 3401 | "ff2bdc86.6fca9" 3402 | ] 3403 | ] 3404 | }, 3405 | { 3406 | "id": "3fc8a8e1.994198", 3407 | "type": "comment", 3408 | "z": "64133d39.bb0394", 3409 | "name": "Convert to/from XML", 3410 | "info": "", 3411 | "x": 120, 3412 | "y": 200, 3413 | "wires": [] 3414 | }, 3415 | { 3416 | "id": "1b546d47.9474e3", 3417 | "type": "inject", 3418 | "z": "64133d39.bb0394", 3419 | "name": "XML String", 3420 | "topic": "", 3421 | "payload": "{\"a\":1}", 3422 | "payloadType": "str", 3423 | "repeat": "", 3424 | "crontab": "", 3425 | "once": false, 3426 | "onceDelay": 0.1, 3427 | "x": 100, 3428 | "y": 240, 3429 | "wires": [ 3430 | [ 3431 | "d72b2bfd.77d068" 3432 | ] 3433 | ] 3434 | }, 3435 | { 3436 | "id": "1adf407d.6c4fe", 3437 | "type": "debug", 3438 | "z": "64133d39.bb0394", 3439 | "name": "", 3440 | "active": true, 3441 | "tosidebar": true, 3442 | "console": false, 3443 | "tostatus": false, 3444 | "complete": "false", 3445 | "x": 590, 3446 | "y": 240, 3447 | "wires": [] 3448 | }, 3449 | { 3450 | "id": "46638890.8ae758", 3451 | "type": "inject", 3452 | "z": "64133d39.bb0394", 3453 | "name": "Object", 3454 | "topic": "", 3455 | "payload": "{\"note\":{\"$\":{\"priority\":\"high\"},\"to\":[\"Nick\"],\"from\":[\"Dave\"],\"heading\":[\"Reminder\"],\"body\":[\"Update the website\"]}}", 3456 | "payloadType": "json", 3457 | "repeat": "", 3458 | "crontab": "", 3459 | "once": false, 3460 | "onceDelay": 0.1, 3461 | "x": 90, 3462 | "y": 280, 3463 | "wires": [ 3464 | [ 3465 | "dae1d291.de0d2" 3466 | ] 3467 | ] 3468 | }, 3469 | { 3470 | "id": "6fefca67.3669e4", 3471 | "type": "debug", 3472 | "z": "64133d39.bb0394", 3473 | "name": "", 3474 | "active": true, 3475 | "tosidebar": true, 3476 | "console": false, 3477 | "tostatus": false, 3478 | "complete": "false", 3479 | "x": 430, 3480 | "y": 280, 3481 | "wires": [] 3482 | }, 3483 | { 3484 | "id": "d72b2bfd.77d068", 3485 | "type": "template", 3486 | "z": "64133d39.bb0394", 3487 | "name": "", 3488 | "field": "payload", 3489 | "fieldType": "msg", 3490 | "format": "text", 3491 | "syntax": "plain", 3492 | "template": "