smort

nr051019

Oct 5th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 80.90 KB | None | 0 0
  1. [
  2. {
  3. "id": "b2ff4bbb.08e61",
  4. "type": "tab",
  5. "label": "Brucontrol interface",
  6. "disabled": false,
  7. "info": ""
  8. },
  9. {
  10. "id": "437615b9.a7c5f4",
  11. "type": "tab",
  12. "label": "Brewfather",
  13. "disabled": false,
  14. "info": ""
  15. },
  16. {
  17. "id": "b08b12c9.6b2f2",
  18. "type": "tab",
  19. "label": "Room temp",
  20. "disabled": false,
  21. "info": ""
  22. },
  23. {
  24. "id": "5fec9a11.37a164",
  25. "type": "ui_base",
  26. "theme": {
  27. "name": "theme-custom",
  28. "lightTheme": {
  29. "default": "#0094CE",
  30. "baseColor": "#0094CE",
  31. "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
  32. "edited": false,
  33. "reset": false
  34. },
  35. "darkTheme": {
  36. "default": "#097479",
  37. "baseColor": "#097479",
  38. "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
  39. "edited": true,
  40. "reset": false
  41. },
  42. "customTheme": {
  43. "name": "",
  44. "default": "#4B7930",
  45. "baseColor": "#666666",
  46. "baseFont": "Tahoma,Geneva,sans-serif",
  47. "reset": false
  48. },
  49. "themeState": {
  50. "base-color": {
  51. "default": "#4B7930",
  52. "value": "#4B7930",
  53. "edited": false
  54. },
  55. "page-titlebar-backgroundColor": {
  56. "value": "#666666",
  57. "edited": false
  58. },
  59. "page-backgroundColor": {
  60. "value": "#111111",
  61. "edited": false
  62. },
  63. "page-sidebar-backgroundColor": {
  64. "value": "#000000",
  65. "edited": false
  66. },
  67. "group-textColor": {
  68. "value": "#8c8c8c",
  69. "edited": false
  70. },
  71. "group-borderColor": {
  72. "value": "#555555",
  73. "edited": false
  74. },
  75. "group-backgroundColor": {
  76. "value": "#333333",
  77. "edited": false
  78. },
  79. "widget-textColor": {
  80. "value": "#eeeeee",
  81. "edited": false
  82. },
  83. "widget-backgroundColor": {
  84. "value": "#666666",
  85. "edited": false
  86. },
  87. "widget-borderColor": {
  88. "value": "#333333",
  89. "edited": false
  90. },
  91. "base-font": {
  92. "value": "Tahoma,Geneva,sans-serif"
  93. }
  94. },
  95. "angularTheme": {
  96. "primary": "indigo",
  97. "accents": "blue",
  98. "warn": "red",
  99. "background": "grey"
  100. }
  101. },
  102. "site": {
  103. "name": "Room",
  104. "hideToolbar": "false",
  105. "allowSwipe": "false",
  106. "dateFormat": "DD/MM/YYYY",
  107. "sizes": {
  108. "sx": 48,
  109. "sy": 53,
  110. "gx": 6,
  111. "gy": 6,
  112. "cx": 6,
  113. "cy": 6,
  114. "px": 0,
  115. "py": 0
  116. }
  117. }
  118. },
  119. {
  120. "id": "7473ae41.ca29a",
  121. "type": "mqtt-broker",
  122. "z": "",
  123. "name": "",
  124. "broker": "localhost",
  125. "port": "1883",
  126. "clientid": "",
  127. "usetls": false,
  128. "compatmode": true,
  129. "keepalive": "60",
  130. "cleansession": true,
  131. "birthTopic": "",
  132. "birthQos": "0",
  133. "birthPayload": "",
  134. "willTopic": "",
  135. "willQos": "0",
  136. "willPayload": ""
  137. },
  138. {
  139. "id": "2778b469.9fa82c",
  140. "type": "influxdb",
  141. "z": "",
  142. "hostname": "192.168.88.30",
  143. "port": "8086",
  144. "protocol": "http",
  145. "database": "brewery",
  146. "name": "",
  147. "usetls": false,
  148. "tls": ""
  149. },
  150. {
  151. "id": "366500a5.06556",
  152. "type": "ui_group",
  153. "z": "",
  154. "name": "ShellyHT",
  155. "tab": "",
  156. "order": 1,
  157. "disp": true,
  158. "width": "12",
  159. "collapse": false
  160. },
  161. {
  162. "id": "44e1a68b.8d3478",
  163. "type": "blynk-ws-client",
  164. "z": "",
  165. "name": "",
  166. "path": "ws://blynk-cloud.com/websockets",
  167. "key": "d-6jb2u_ohwit0qU0PxxwN0npAYwa0KT",
  168. "dbg_all": false,
  169. "dbg_read": false,
  170. "dbg_write": false,
  171. "dbg_notify": false,
  172. "dbg_mail": false,
  173. "dbg_prop": false,
  174. "dbg_sync": false,
  175. "dbg_bridge": false,
  176. "dbg_low": false,
  177. "dbg_pins": "",
  178. "multi_cmd": false,
  179. "proxy_type": "no",
  180. "proxy_url": "",
  181. "enabled": true
  182. },
  183. {
  184. "id": "1fcc17b.89250e8",
  185. "type": "tcp out",
  186. "z": "b2ff4bbb.08e61",
  187. "host": "",
  188. "port": "",
  189. "beserver": "reply",
  190. "base64": false,
  191. "end": false,
  192. "name": "To BC",
  193. "x": 1050,
  194. "y": 480,
  195. "wires": []
  196. },
  197. {
  198. "id": "98655d9a.2ea7c",
  199. "type": "tcp in",
  200. "z": "b2ff4bbb.08e61",
  201. "name": "From BC",
  202. "server": "server",
  203. "host": "",
  204. "port": "5000",
  205. "datamode": "stream",
  206. "datatype": "utf8",
  207. "newline": "",
  208. "topic": "",
  209. "base64": false,
  210. "x": 240,
  211. "y": 480,
  212. "wires": [
  213. [
  214. "468280c6.bbc74",
  215. "932a990f.7ce77",
  216. "25f3ce00.28bfea",
  217. "ca730e13.05b7c"
  218. ]
  219. ]
  220. },
  221. {
  222. "id": "641383d1.5866f4",
  223. "type": "change",
  224. "z": "b2ff4bbb.08e61",
  225. "name": "200",
  226. "rules": [
  227. {
  228. "t": "set",
  229. "p": "payload",
  230. "pt": "msg",
  231. "to": "$floor(msg.payload.DS18B20.Temperature*100)",
  232. "tot": "jsonata"
  233. },
  234. {
  235. "t": "set",
  236. "p": "200",
  237. "pt": "flow",
  238. "to": "payload",
  239. "tot": "msg"
  240. },
  241. {
  242. "t": "set",
  243. "p": "topic",
  244. "pt": "msg",
  245. "to": "200",
  246. "tot": "num"
  247. }
  248. ],
  249. "action": "",
  250. "property": "",
  251. "from": "",
  252. "to": "",
  253. "reg": false,
  254. "x": 530,
  255. "y": 300,
  256. "wires": [
  257. [
  258. "bb6f0304.c32328"
  259. ]
  260. ]
  261. },
  262. {
  263. "id": "7e4bbc0f.79f514",
  264. "type": "http in",
  265. "z": "437615b9.a7c5f4",
  266. "name": "",
  267. "url": "/brewfather",
  268. "method": "post",
  269. "upload": false,
  270. "swaggerDoc": "",
  271. "x": 80,
  272. "y": 20,
  273. "wires": [
  274. [
  275. "5cd71c5b.7c1fdc",
  276. "60395960.115e78",
  277. "23b476b5.08874a"
  278. ]
  279. ]
  280. },
  281. {
  282. "id": "5cd71c5b.7c1fdc",
  283. "type": "function",
  284. "z": "437615b9.a7c5f4",
  285. "name": "BF to BC",
  286. "func": "flow.set('recipe' , msg.payload.recipe.fermentation)\nflow.set('fbeername' , msg.payload.recipe.name)\n\n\nfunction time_convert(num)\n { \n var hours = Math.floor(num / 60); \n var minutes = num % 60;\n return + hours + \":\" + minutes + \":00\"; \n}\n\nvar hopstand\nvar hopstandtemp\nif (msg.payload.recipe.hopStandMinutes > 0) {\n hopstand = true\n hopstandtemp = msg.payload.recipe.avgWeightedHopstandTemp\n}\nelse {\n hopstandtemp = 0\n hopstand = false\n}\n\n\nvar firstwort\nif (msg.payload.recipe.hops[0].use == \"First Wort\") {\n firstwort = true\n} \nelse {\n firstwort = false\n}\n\n\nvar hoptime=[];\nfor(var x=0;x<msg.payload.recipe.hops.length;x++){\n if (msg.payload.recipe.hops[x].use == \"Boil\") {\n hoptime[x]= msg.payload.recipe.hops[x].time;\n }\n}\nhoptime.push(0,0,0,0,0,0,0,0,0,0);\nhoptime.length = 10\n\nvar mashtime=[];\nfor(var y=0;y<msg.payload.mashStepsCount;y++){\n mashtime[y]= msg.payload.recipe.mash.steps[y].stepTime;\n }\nmashtime.push(0,0,0,0,0);\nmashtime.length = 5\n\nvar mashsteps = msg.payload.mashStepsCount - 1;\nvar mashtemp=[];\nfor(var z=0;z<msg.payload.mashStepsCount;z++){\n mashtemp[z]= msg.payload.recipe.mash.steps[z].stepTemp;\n }\nmashtemp.push(mashtemp[mashsteps], mashtemp[mashsteps], mashtemp[mashsteps], mashtemp[mashsteps], mashtemp[mashsteps], mashtemp[mashsteps])\nmashtemp.length = 6\n\nmsg.payload = [ \n\n{ \"Name\": \"Preboil volume\", \"Value\": msg.payload.recipe.boilSize } , \n{ \"Name\": \"HLT fillvolume\" , \"Value\": msg.payload.recipe.data.hltWaterAmount } , \n{ \"Name\": \"Sparge volume\" , \"Value\": msg.payload.recipe.data.spargeWaterAmount } , \n{ \"Name\": \"Strike temp\" , \"Value\": msg.payload.recipe.data.strikeTemp } , \n{ \"Name\": \"Mash volume\" , \"Value\": msg.payload.recipe.data.mashWaterAmount } , \n{ \"Name\": \"Mash temp\" , \"Value\": mashtemp[0] } ,\n{ \"Name\": \"Mash temp1\" , \"Value\": mashtemp[1] } , \n{ \"Name\": \"Mash temp2\" , \"Value\": mashtemp[2] } ,\n{ \"Name\": \"Mash temp3\" , \"Value\": mashtemp[3] } ,\n{ \"Name\": \"Mash temp4\" , \"Value\": mashtemp[4] } ,\n{ \"Name\": \"Mash temp5\" , \"Value\": mashtemp[5] } ,\n{ \"Name\": \"Mash time1\" , \"Value\": time_convert(mashtime[0]) } ,\n{ \"Name\": \"Mash time2\" , \"Value\": time_convert(mashtime[1]) } ,\n{ \"Name\": \"Mash time3\" , \"Value\": time_convert(mashtime[2]) } ,\n{ \"Name\": \"Mash time4\" , \"Value\": time_convert(mashtime[3]) } ,\n{ \"Name\": \"Mash time5\" , \"Value\": time_convert(mashtime[4]) } ,\n{ \"Name\": \"Hop time0\" , \"Value\": time_convert(hoptime[0]) } ,\n{ \"Name\": \"Hop time1\" , \"Value\": time_convert(hoptime[1]) } ,\n{ \"Name\": \"Hop time2\" , \"Value\": time_convert(hoptime[2]) } ,\n{ \"Name\": \"Hop time3\" , \"Value\": time_convert(hoptime[3]) } ,\n{ \"Name\": \"Hop time4\" , \"Value\": time_convert(hoptime[4]) } ,\n{ \"Name\": \"Hop time5\" , \"Value\": time_convert(hoptime[5]) } ,\n{ \"Name\": \"Hop time6\" , \"Value\": time_convert(hoptime[7]) } ,\n{ \"Name\": \"Hop time8\" , \"Value\": time_convert(hoptime[8]) } ,\n{ \"Name\": \"Hop time9\" , \"Value\": time_convert(hoptime[9]) } ,\n{ \"Name\": \"Hopstand time\" , \"Value\": time_convert(msg.payload.recipe.hopStandMinutes) } ,\n{ \"Name\": \"Boil time\" , \"Value\": time_convert(msg. payload.recipe.boilTime) } ,\n{ \"Name\": \"Hopstand temp\" , \"Value\": hopstandtemp } ,\n{ \"Name\": \"First wort\" , \"Value\": firstwort } ,\n{ \"Name\": \"Recipe received\" , \"Value\": msg.payload._timestamp } ,\n{ \"Name\": \"Status\" , \"Value\": msg.payload.recipe.name }\n\n];\n\nreturn msg;",
  287. "outputs": 1,
  288. "noerr": 0,
  289. "x": 260,
  290. "y": 40,
  291. "wires": [
  292. [
  293. "5d22cbcd.3f80a4",
  294. "23b476b5.08874a"
  295. ]
  296. ]
  297. },
  298. {
  299. "id": "5d22cbcd.3f80a4",
  300. "type": "http request",
  301. "z": "437615b9.a7c5f4",
  302. "name": "",
  303. "method": "PUT",
  304. "ret": "txt",
  305. "paytoqs": false,
  306. "url": "http://192.168.77.246:8000/globals",
  307. "tls": "",
  308. "proxy": "",
  309. "authType": "basic",
  310. "x": 450,
  311. "y": 40,
  312. "wires": [
  313. [
  314. "23b476b5.08874a"
  315. ]
  316. ]
  317. },
  318. {
  319. "id": "b1c4ee20.c5caf8",
  320. "type": "http in",
  321. "z": "437615b9.a7c5f4",
  322. "name": "",
  323. "url": "/Fermenter",
  324. "method": "get",
  325. "upload": false,
  326. "swaggerDoc": "",
  327. "x": 80,
  328. "y": 60,
  329. "wires": [
  330. [
  331. "9da925a2.e6eb6",
  332. "b5cc90e0.ec9a2"
  333. ]
  334. ]
  335. },
  336. {
  337. "id": "60395960.115e78",
  338. "type": "http response",
  339. "z": "437615b9.a7c5f4",
  340. "name": "",
  341. "statusCode": "200",
  342. "headers": {},
  343. "x": 460,
  344. "y": 80,
  345. "wires": []
  346. },
  347. {
  348. "id": "9da925a2.e6eb6",
  349. "type": "function",
  350. "z": "437615b9.a7c5f4",
  351. "name": "Fermenter",
  352. "func": "msg.payload = [flow.get('recipe'),flow.get('fbeername')]\nreturn msg;",
  353. "outputs": 1,
  354. "noerr": 0,
  355. "x": 270,
  356. "y": 80,
  357. "wires": [
  358. [
  359. "60395960.115e78"
  360. ]
  361. ]
  362. },
  363. {
  364. "id": "e94284e7.2b2a68",
  365. "type": "switch",
  366. "z": "b2ff4bbb.08e61",
  367. "name": "Out",
  368. "property": "topic",
  369. "propertyType": "msg",
  370. "rules": [
  371. {
  372. "t": "eq",
  373. "v": "1",
  374. "vt": "str"
  375. },
  376. {
  377. "t": "eq",
  378. "v": "2",
  379. "vt": "str"
  380. },
  381. {
  382. "t": "eq",
  383. "v": "3",
  384. "vt": "str"
  385. },
  386. {
  387. "t": "eq",
  388. "v": "4",
  389. "vt": "str"
  390. },
  391. {
  392. "t": "eq",
  393. "v": "5",
  394. "vt": "str"
  395. },
  396. {
  397. "t": "eq",
  398. "v": "6",
  399. "vt": "str"
  400. },
  401. {
  402. "t": "eq",
  403. "v": "7",
  404. "vt": "str"
  405. },
  406. {
  407. "t": "eq",
  408. "v": "8",
  409. "vt": "str"
  410. },
  411. {
  412. "t": "eq",
  413. "v": "9",
  414. "vt": "str"
  415. },
  416. {
  417. "t": "eq",
  418. "v": "10",
  419. "vt": "str"
  420. },
  421. {
  422. "t": "eq",
  423. "v": "11",
  424. "vt": "str"
  425. },
  426. {
  427. "t": "eq",
  428. "v": "12",
  429. "vt": "str"
  430. },
  431. {
  432. "t": "eq",
  433. "v": "13",
  434. "vt": "str"
  435. },
  436. {
  437. "t": "eq",
  438. "v": "14",
  439. "vt": "str"
  440. },
  441. {
  442. "t": "eq",
  443. "v": "15",
  444. "vt": "str"
  445. },
  446. {
  447. "t": "eq",
  448. "v": "16",
  449. "vt": "str"
  450. },
  451. {
  452. "t": "eq",
  453. "v": "17",
  454. "vt": "str"
  455. },
  456. {
  457. "t": "eq",
  458. "v": "18",
  459. "vt": "str"
  460. },
  461. {
  462. "t": "eq",
  463. "v": "19",
  464. "vt": "str"
  465. },
  466. {
  467. "t": "eq",
  468. "v": "20",
  469. "vt": "str"
  470. },
  471. {
  472. "t": "eq",
  473. "v": "21",
  474. "vt": "str"
  475. },
  476. {
  477. "t": "eq",
  478. "v": "22",
  479. "vt": "str"
  480. },
  481. {
  482. "t": "eq",
  483. "v": "23",
  484. "vt": "str"
  485. }
  486. ],
  487. "checkall": "true",
  488. "repair": false,
  489. "outputs": 23,
  490. "x": 910,
  491. "y": 220,
  492. "wires": [
  493. [],
  494. [],
  495. [],
  496. [
  497. "c1da1e2e.05adb8"
  498. ],
  499. [],
  500. [],
  501. [],
  502. [
  503. "ab7bcdce.39a708"
  504. ],
  505. [],
  506. [],
  507. [
  508. "7637ddc9.888764",
  509. "e5da679f.8a98b"
  510. ],
  511. [],
  512. [],
  513. [],
  514. [],
  515. [
  516. "5b472365.0956ac",
  517. "a877fda0.40eca"
  518. ],
  519. [
  520. "80a02e0.5e3545",
  521. "a11594f1.f68e7"
  522. ],
  523. [],
  524. [],
  525. [],
  526. [],
  527. [],
  528. []
  529. ]
  530. },
  531. {
  532. "id": "f7da946c.6da088",
  533. "type": "mqtt out",
  534. "z": "b2ff4bbb.08e61",
  535. "name": "Cooler ctrl",
  536. "topic": "cmnd/cooler/POWER",
  537. "qos": "",
  538. "retain": "",
  539. "broker": "7473ae41.ca29a",
  540. "x": 1410,
  541. "y": 200,
  542. "wires": []
  543. },
  544. {
  545. "id": "c2a4beaa.41db48",
  546. "type": "mqtt out",
  547. "z": "b2ff4bbb.08e61",
  548. "name": "4ch L1",
  549. "topic": "cmnd/4ch/POWER1",
  550. "qos": "",
  551. "retain": "",
  552. "broker": "7473ae41.ca29a",
  553. "x": 1430,
  554. "y": 40,
  555. "wires": []
  556. },
  557. {
  558. "id": "e94488ac.b15ce",
  559. "type": "mqtt out",
  560. "z": "b2ff4bbb.08e61",
  561. "name": "Freezer ctrl",
  562. "topic": "cmnd/freezer/POWER",
  563. "qos": "",
  564. "retain": "",
  565. "broker": "7473ae41.ca29a",
  566. "x": 1410,
  567. "y": 140,
  568. "wires": []
  569. },
  570. {
  571. "id": "d3c526c2.432d18",
  572. "type": "mqtt in",
  573. "z": "b2ff4bbb.08e61",
  574. "name": "Result",
  575. "topic": "stat/+/RESULT",
  576. "qos": "2",
  577. "datatype": "json",
  578. "broker": "7473ae41.ca29a",
  579. "x": 250,
  580. "y": 80,
  581. "wires": [
  582. [
  583. "d0b4dd59.073448"
  584. ]
  585. ]
  586. },
  587. {
  588. "id": "88ec5d80.7bd8e8",
  589. "type": "change",
  590. "z": "b2ff4bbb.08e61",
  591. "name": "4",
  592. "rules": [
  593. {
  594. "t": "set",
  595. "p": "payload",
  596. "pt": "msg",
  597. "to": "payload.POWER1",
  598. "tot": "msg"
  599. },
  600. {
  601. "t": "change",
  602. "p": "payload",
  603. "pt": "msg",
  604. "from": "ON",
  605. "fromt": "str",
  606. "to": "1",
  607. "tot": "num"
  608. },
  609. {
  610. "t": "change",
  611. "p": "payload",
  612. "pt": "msg",
  613. "from": "OFF",
  614. "fromt": "str",
  615. "to": "0",
  616. "tot": "num"
  617. },
  618. {
  619. "t": "set",
  620. "p": "4",
  621. "pt": "flow",
  622. "to": "payload",
  623. "tot": "msg"
  624. }
  625. ],
  626. "action": "",
  627. "property": "",
  628. "from": "",
  629. "to": "",
  630. "reg": false,
  631. "x": 530,
  632. "y": 20,
  633. "wires": [
  634. []
  635. ]
  636. },
  637. {
  638. "id": "6253fcde.9433c4",
  639. "type": "rbe",
  640. "z": "b2ff4bbb.08e61",
  641. "name": "",
  642. "func": "rbe",
  643. "gap": "",
  644. "start": "",
  645. "inout": "out",
  646. "property": "payload",
  647. "x": 910,
  648. "y": 440,
  649. "wires": [
  650. [
  651. "e94284e7.2b2a68"
  652. ]
  653. ]
  654. },
  655. {
  656. "id": "a06f145a.14d9b8",
  657. "type": "change",
  658. "z": "b2ff4bbb.08e61",
  659. "name": "201",
  660. "rules": [
  661. {
  662. "t": "set",
  663. "p": "payload",
  664. "pt": "msg",
  665. "to": "$floor(msg.payload.DS18B20.Temperature*100)\t",
  666. "tot": "jsonata"
  667. },
  668. {
  669. "t": "set",
  670. "p": "201",
  671. "pt": "flow",
  672. "to": "payload",
  673. "tot": "msg"
  674. },
  675. {
  676. "t": "set",
  677. "p": "topic",
  678. "pt": "msg",
  679. "to": "201",
  680. "tot": "num"
  681. }
  682. ],
  683. "action": "",
  684. "property": "",
  685. "from": "",
  686. "to": "",
  687. "reg": false,
  688. "x": 530,
  689. "y": 220,
  690. "wires": [
  691. [
  692. "bb6f0304.c32328"
  693. ]
  694. ]
  695. },
  696. {
  697. "id": "bb6f0304.c32328",
  698. "type": "function",
  699. "z": "b2ff4bbb.08e61",
  700. "name": "Hysteresis",
  701. "func": "var port = msg.topic\nvar value = msg.payload\nvar delay;\nvar flush = {};\nvar coolmode;\nvar output;\nvar on;\nvar off;\nvar pin = flow.get(String(port)+\"pin\")\nvar target = flow.get(String(port)+\"target\")\nvar onoffset = flow.get(String(port)+\"onoffset\")\nvar cooling = flow.get(String(pin));\nvar activelow = flow.get(String(port)+\"activelow\")\nvar ondelay = flow.get(String(port)+\"ondelay\")\n\nif (activelow === 1) {\n on = 0\n off = 1\n}\nelse {\n on = 1\n off = 0\n}\n\nif (onoffset > target) {\n coolmode = true\n}\n\nif (value >= onoffset && coolmode === true){\noutput = on\n}\nif (value <= onoffset && value > target && cooling === 1 && coolmode === true) {\n output = on \n}\nif (value <= target && coolmode === true){\n output = off\nmsg.flush = flush\nnode.send(msg.flush)\n}\n\nif (flow.get(String(pin)+\"disabled\") === 1) {\noutput = off\nmsg.flush = flush\nnode.send(msg.flush)\n}\n\nmsg.topic = pin\nmsg.payload = output\nmsg.delay = ondelay\nreturn msg;",
  702. "outputs": 1,
  703. "noerr": 0,
  704. "x": 710,
  705. "y": 460,
  706. "wires": [
  707. [
  708. "6253fcde.9433c4"
  709. ]
  710. ]
  711. },
  712. {
  713. "id": "2b196c8.86dc794",
  714. "type": "mqtt out",
  715. "z": "b2ff4bbb.08e61",
  716. "name": "Steam ctrl",
  717. "topic": "cmnd/steam/POWER",
  718. "qos": "",
  719. "retain": "",
  720. "broker": "7473ae41.ca29a",
  721. "x": 1410,
  722. "y": 80,
  723. "wires": []
  724. },
  725. {
  726. "id": "5b472365.0956ac",
  727. "type": "falling-edge",
  728. "z": "b2ff4bbb.08e61",
  729. "name": "Stop",
  730. "threshold": "1",
  731. "x": 1110,
  732. "y": 240,
  733. "wires": [
  734. [
  735. "f7da946c.6da088"
  736. ]
  737. ]
  738. },
  739. {
  740. "id": "e5da679f.8a98b",
  741. "type": "falling-edge",
  742. "z": "b2ff4bbb.08e61",
  743. "name": "Stop",
  744. "threshold": "1",
  745. "x": 1110,
  746. "y": 160,
  747. "wires": [
  748. [
  749. "e94488ac.b15ce"
  750. ]
  751. ]
  752. },
  753. {
  754. "id": "7637ddc9.888764",
  755. "type": "delay",
  756. "z": "b2ff4bbb.08e61",
  757. "name": "ONdelay",
  758. "pauseType": "delayv",
  759. "timeout": "0",
  760. "timeoutUnits": "seconds",
  761. "rate": "1",
  762. "nbRateUnits": "1",
  763. "rateUnits": "second",
  764. "randomFirst": "1",
  765. "randomLast": "5",
  766. "randomUnits": "seconds",
  767. "drop": false,
  768. "x": 1120,
  769. "y": 120,
  770. "wires": [
  771. [
  772. "62674ccb.f8ed9c"
  773. ]
  774. ]
  775. },
  776. {
  777. "id": "468280c6.bbc74",
  778. "type": "string",
  779. "z": "b2ff4bbb.08e61",
  780. "name": "first",
  781. "methods": [
  782. {
  783. "name": "getLeftMost",
  784. "params": [
  785. {
  786. "type": "str",
  787. "value": "?"
  788. }
  789. ]
  790. }
  791. ],
  792. "prop": "payload",
  793. "propout": "payload",
  794. "object": "msg",
  795. "objectout": "msg",
  796. "x": 410,
  797. "y": 560,
  798. "wires": [
  799. [
  800. "ff1815eb.b334c",
  801. "df4cfda0.a7ad48"
  802. ]
  803. ]
  804. },
  805. {
  806. "id": "932a990f.7ce77",
  807. "type": "string",
  808. "z": "b2ff4bbb.08e61",
  809. "name": "last",
  810. "methods": [
  811. {
  812. "name": "delLeftMost",
  813. "params": [
  814. {
  815. "type": "str",
  816. "value": "?"
  817. }
  818. ]
  819. },
  820. {
  821. "name": "ensureLeft",
  822. "params": [
  823. {
  824. "type": "str",
  825. "value": "?"
  826. }
  827. ]
  828. },
  829. {
  830. "name": "delRightMost",
  831. "params": [
  832. {
  833. "type": "str",
  834. "value": "!"
  835. }
  836. ]
  837. },
  838. {
  839. "name": "delRightMost",
  840. "params": [
  841. {
  842. "type": "str",
  843. "value": "!"
  844. }
  845. ]
  846. },
  847. {
  848. "name": "delRightMost",
  849. "params": [
  850. {
  851. "type": "str",
  852. "value": "!"
  853. }
  854. ]
  855. },
  856. {
  857. "name": "delRightMost",
  858. "params": [
  859. {
  860. "type": "str",
  861. "value": ";"
  862. }
  863. ]
  864. }
  865. ],
  866. "prop": "payload",
  867. "propout": "payload",
  868. "object": "msg",
  869. "objectout": "msg",
  870. "x": 410,
  871. "y": 600,
  872. "wires": [
  873. [
  874. "597e2d94.262864"
  875. ]
  876. ]
  877. },
  878. {
  879. "id": "ff1815eb.b334c",
  880. "type": "split",
  881. "z": "b2ff4bbb.08e61",
  882. "name": "",
  883. "splt": "!",
  884. "spltType": "str",
  885. "arraySplt": 1,
  886. "arraySpltType": "len",
  887. "stream": false,
  888. "addname": "",
  889. "x": 550,
  890. "y": 520,
  891. "wires": [
  892. [
  893. "f8fbcb2.87d1b38"
  894. ]
  895. ]
  896. },
  897. {
  898. "id": "597e2d94.262864",
  899. "type": "split",
  900. "z": "b2ff4bbb.08e61",
  901. "name": "",
  902. "splt": "?",
  903. "spltType": "str",
  904. "arraySplt": 1,
  905. "arraySpltType": "len",
  906. "stream": false,
  907. "addname": "",
  908. "x": 550,
  909. "y": 600,
  910. "wires": [
  911. [
  912. "1edecc16.888c54"
  913. ]
  914. ]
  915. },
  916. {
  917. "id": "df4cfda0.a7ad48",
  918. "type": "join",
  919. "z": "b2ff4bbb.08e61",
  920. "name": "",
  921. "mode": "custom",
  922. "build": "string",
  923. "property": "payload",
  924. "propertyType": "msg",
  925. "key": "topic",
  926. "joiner": "",
  927. "joinerType": "str",
  928. "accumulate": false,
  929. "timeout": "0.1",
  930. "count": "",
  931. "reduceRight": false,
  932. "reduceExp": "",
  933. "reduceInit": "",
  934. "reduceInitType": "",
  935. "reduceFixup": "",
  936. "x": 910,
  937. "y": 560,
  938. "wires": [
  939. [
  940. "56887ab.9376c04"
  941. ]
  942. ]
  943. },
  944. {
  945. "id": "1edecc16.888c54",
  946. "type": "function",
  947. "z": "b2ff4bbb.08e61",
  948. "name": "feedback",
  949. "func": "if (msg.payload.length > 0) {\n var pin = msg.payload\n\n msg.payload = \"?\"+String(pin)+\"=\"+String(flow.get(pin));\n \nreturn msg;\n}",
  950. "outputs": 1,
  951. "noerr": 0,
  952. "x": 700,
  953. "y": 600,
  954. "wires": [
  955. [
  956. "df4cfda0.a7ad48"
  957. ]
  958. ]
  959. },
  960. {
  961. "id": "f8fbcb2.87d1b38",
  962. "type": "function",
  963. "z": "b2ff4bbb.08e61",
  964. "name": "pin config",
  965. "func": "if (msg.payload.length > 0) {\nvar input = msg.payload.split(\",\");\nvar pin = parseInt(input[0])\nvar config = parseInt(input[1])\nvar state;\n\nflow.set(String(pin)+\"disabled\", 0);\n\nif (config == 1) {\n var one ={};\n one.topic = pin\n state = parseInt(input[2])\n one.payload = state \n return [one, null, null];\n}\nif (config == 5) {\n five = {};\n five.topic = \"newconfig\"\n pin = parseInt(input[0])\n config = parseInt(input[1])\n var port = parseInt(input[2])\n var target = parseInt(input[3])\n var onoffset = parseInt(input[4])\n var ondelay = parseInt(input[5]) * 1000\n var activelow = parseInt(input[6])\n var value = parseInt(flow.get(String(port)))\n flow.set(String(port)+\"pin\", pin);\n flow.set(String(port)+\"target\", target);\n flow.set(String(port)+\"onoffset\", onoffset);\n flow.set(String(port)+\"activelow\", activelow);\n flow.set(String(port)+\"ondelay\", ondelay);\n five.payload = [pin, config, port, target, onoffset, ondelay, activelow]\n return [null, five, null];\n}\nif (config == 7) {\n var seven = {};\n seven.topic = pin\n state = parseInt(input[2])\n seven.payload = state \n return [null, null, seven];\n}\n}",
  966. "outputs": 3,
  967. "noerr": 0,
  968. "x": 700,
  969. "y": 520,
  970. "wires": [
  971. [
  972. "6253fcde.9433c4"
  973. ],
  974. [],
  975. [
  976. "6253fcde.9433c4"
  977. ]
  978. ]
  979. },
  980. {
  981. "id": "f5cd4ad8.3e7d38",
  982. "type": "split",
  983. "z": "b2ff4bbb.08e61",
  984. "name": "",
  985. "splt": "/",
  986. "spltType": "str",
  987. "arraySplt": 1,
  988. "arraySpltType": "len",
  989. "stream": false,
  990. "addname": "",
  991. "x": 550,
  992. "y": 420,
  993. "wires": [
  994. [
  995. "8ec6fb61.8728b8"
  996. ]
  997. ]
  998. },
  999. {
  1000. "id": "8ec6fb61.8728b8",
  1001. "type": "function",
  1002. "z": "b2ff4bbb.08e61",
  1003. "name": "disable pins",
  1004. "func": "\nif (msg.payload.length > 0) {\nvar input = msg.payload;\nvar pin = input;\nflow.set(String(pin)+\"disabled\", 1);\nmsg.topic = pin;\nmsg.payload = 0;\nreturn msg;\n}\n\n",
  1005. "outputs": 1,
  1006. "noerr": 0,
  1007. "x": 710,
  1008. "y": 420,
  1009. "wires": [
  1010. [
  1011. "6253fcde.9433c4",
  1012. "e94284e7.2b2a68"
  1013. ]
  1014. ]
  1015. },
  1016. {
  1017. "id": "56887ab.9376c04",
  1018. "type": "string",
  1019. "z": "b2ff4bbb.08e61",
  1020. "name": "",
  1021. "methods": [
  1022. {
  1023. "name": "ensureRight",
  1024. "params": [
  1025. {
  1026. "type": "str",
  1027. "value": ";"
  1028. }
  1029. ]
  1030. }
  1031. ],
  1032. "prop": "payload",
  1033. "propout": "payload",
  1034. "object": "msg",
  1035. "objectout": "msg",
  1036. "x": 910,
  1037. "y": 480,
  1038. "wires": [
  1039. [
  1040. "1fcc17b.89250e8",
  1041. "3cac4b16.68df34"
  1042. ]
  1043. ]
  1044. },
  1045. {
  1046. "id": "25f3ce00.28bfea",
  1047. "type": "switch",
  1048. "z": "b2ff4bbb.08e61",
  1049. "name": "keepalive",
  1050. "property": "payload",
  1051. "propertyType": "msg",
  1052. "rules": [
  1053. {
  1054. "t": "cont",
  1055. "v": "*",
  1056. "vt": "str"
  1057. }
  1058. ],
  1059. "checkall": "true",
  1060. "repair": false,
  1061. "outputs": 1,
  1062. "x": 560,
  1063. "y": 480,
  1064. "wires": [
  1065. [
  1066. "56887ab.9376c04"
  1067. ]
  1068. ]
  1069. },
  1070. {
  1071. "id": "3cac4b16.68df34",
  1072. "type": "debug",
  1073. "z": "b2ff4bbb.08e61",
  1074. "name": "",
  1075. "active": false,
  1076. "tosidebar": true,
  1077. "console": false,
  1078. "tostatus": false,
  1079. "complete": "false",
  1080. "x": 1070,
  1081. "y": 520,
  1082. "wires": []
  1083. },
  1084. {
  1085. "id": "af53b13f.326b9",
  1086. "type": "change",
  1087. "z": "b2ff4bbb.08e61",
  1088. "name": "rbe reset",
  1089. "rules": [
  1090. {
  1091. "t": "set",
  1092. "p": "reset",
  1093. "pt": "msg",
  1094. "to": "on",
  1095. "tot": "str"
  1096. }
  1097. ],
  1098. "action": "",
  1099. "property": "",
  1100. "from": "",
  1101. "to": "",
  1102. "reg": false,
  1103. "x": 700,
  1104. "y": 380,
  1105. "wires": [
  1106. [
  1107. "6253fcde.9433c4"
  1108. ]
  1109. ]
  1110. },
  1111. {
  1112. "id": "edabda2a.6b2fe8",
  1113. "type": "inject",
  1114. "z": "b2ff4bbb.08e61",
  1115. "name": "",
  1116. "topic": "",
  1117. "payload": "",
  1118. "payloadType": "date",
  1119. "repeat": "600",
  1120. "crontab": "",
  1121. "once": true,
  1122. "onceDelay": "60",
  1123. "x": 430,
  1124. "y": 380,
  1125. "wires": [
  1126. [
  1127. "af53b13f.326b9"
  1128. ]
  1129. ]
  1130. },
  1131. {
  1132. "id": "a877fda0.40eca",
  1133. "type": "delay",
  1134. "z": "b2ff4bbb.08e61",
  1135. "name": "limit",
  1136. "pauseType": "rate",
  1137. "timeout": "0",
  1138. "timeoutUnits": "seconds",
  1139. "rate": "1",
  1140. "nbRateUnits": "60",
  1141. "rateUnits": "second",
  1142. "randomFirst": "1",
  1143. "randomLast": "5",
  1144. "randomUnits": "seconds",
  1145. "drop": true,
  1146. "x": 1250,
  1147. "y": 200,
  1148. "wires": [
  1149. [
  1150. "f7da946c.6da088"
  1151. ]
  1152. ]
  1153. },
  1154. {
  1155. "id": "62674ccb.f8ed9c",
  1156. "type": "delay",
  1157. "z": "b2ff4bbb.08e61",
  1158. "name": "limit",
  1159. "pauseType": "rate",
  1160. "timeout": "0",
  1161. "timeoutUnits": "seconds",
  1162. "rate": "1",
  1163. "nbRateUnits": "60",
  1164. "rateUnits": "second",
  1165. "randomFirst": "1",
  1166. "randomLast": "5",
  1167. "randomUnits": "seconds",
  1168. "drop": true,
  1169. "x": 1250,
  1170. "y": 120,
  1171. "wires": [
  1172. [
  1173. "e94488ac.b15ce"
  1174. ]
  1175. ]
  1176. },
  1177. {
  1178. "id": "ca730e13.05b7c",
  1179. "type": "function",
  1180. "z": "b2ff4bbb.08e61",
  1181. "name": "disable",
  1182. "func": "var str = msg.payload\nif (str.indexOf(\"/\") >= 0) {\n var firstq = str.indexOf(\"?\")\n var firstw = str.indexOf(\"!\")\n var slashpart\n if (firstq >= 0 || firstw >= 0) {\n if (firstw > firstq) {\n slashpart = str.slice(0, firstw)\n }\n if (firstq > firstw) {\n if (firstw > -1) { \n slashpart = str.slice(0, firstw)\n }\n if (firstw == -1) { \n slashpart = str.slice(0, firstq)\n }\n }\n msg.payload = slashpart\n return msg;\n }\n else {\n msg.payload = str\n }\n return msg;\n}\n",
  1183. "outputs": 1,
  1184. "noerr": 0,
  1185. "x": 420,
  1186. "y": 420,
  1187. "wires": [
  1188. [
  1189. "f5cd4ad8.3e7d38"
  1190. ]
  1191. ]
  1192. },
  1193. {
  1194. "id": "c1da1e2e.05adb8",
  1195. "type": "delay",
  1196. "z": "b2ff4bbb.08e61",
  1197. "name": "limit",
  1198. "pauseType": "rate",
  1199. "timeout": "0",
  1200. "timeoutUnits": "seconds",
  1201. "rate": "1",
  1202. "nbRateUnits": "2",
  1203. "rateUnits": "second",
  1204. "randomFirst": "1",
  1205. "randomLast": "5",
  1206. "randomUnits": "seconds",
  1207. "drop": false,
  1208. "x": 1250,
  1209. "y": 40,
  1210. "wires": [
  1211. [
  1212. "c2a4beaa.41db48"
  1213. ]
  1214. ]
  1215. },
  1216. {
  1217. "id": "ab7bcdce.39a708",
  1218. "type": "delay",
  1219. "z": "b2ff4bbb.08e61",
  1220. "name": "limit",
  1221. "pauseType": "rate",
  1222. "timeout": "0",
  1223. "timeoutUnits": "seconds",
  1224. "rate": "1",
  1225. "nbRateUnits": "2",
  1226. "rateUnits": "second",
  1227. "randomFirst": "1",
  1228. "randomLast": "5",
  1229. "randomUnits": "seconds",
  1230. "drop": false,
  1231. "x": 1250,
  1232. "y": 80,
  1233. "wires": [
  1234. [
  1235. "2b196c8.86dc794"
  1236. ]
  1237. ]
  1238. },
  1239. {
  1240. "id": "6df8d545.32ca6c",
  1241. "type": "split",
  1242. "z": "437615b9.a7c5f4",
  1243. "name": "",
  1244. "splt": "\\n",
  1245. "spltType": "str",
  1246. "arraySplt": 1,
  1247. "arraySpltType": "len",
  1248. "stream": false,
  1249. "addname": "topic",
  1250. "x": 350,
  1251. "y": 140,
  1252. "wires": [
  1253. [
  1254. "4fc0ff6.31fca8"
  1255. ]
  1256. ]
  1257. },
  1258. {
  1259. "id": "c3f453af.f00418",
  1260. "type": "inject",
  1261. "z": "437615b9.a7c5f4",
  1262. "name": "Fusion config",
  1263. "topic": "fusion-configuration",
  1264. "payload": "{\"outputTopic\":\"F1\",\"inputTopics\":[\"beer\",\"name\",\"temp\",\"ext_temp\",\"aux_temp\",\"temp_unit\",\"pressure\",\"pressure_unit\",\"gravity\",\"tilttemperature\",\"comment\"],\"allowUndefined\":true,\"onlyPayloads\":true}",
  1265. "payloadType": "json",
  1266. "repeat": "",
  1267. "crontab": "",
  1268. "once": true,
  1269. "onceDelay": "2",
  1270. "x": 100,
  1271. "y": 180,
  1272. "wires": [
  1273. [
  1274. "4fc0ff6.31fca8"
  1275. ]
  1276. ]
  1277. },
  1278. {
  1279. "id": "4fc0ff6.31fca8",
  1280. "type": "fusion",
  1281. "z": "437615b9.a7c5f4",
  1282. "name": "",
  1283. "x": 530,
  1284. "y": 140,
  1285. "wires": [
  1286. [
  1287. "73724099.d54698"
  1288. ]
  1289. ]
  1290. },
  1291. {
  1292. "id": "73724099.d54698",
  1293. "type": "delay",
  1294. "z": "437615b9.a7c5f4",
  1295. "name": "limit",
  1296. "pauseType": "rate",
  1297. "timeout": "5",
  1298. "timeoutUnits": "seconds",
  1299. "rate": "1",
  1300. "nbRateUnits": "8",
  1301. "rateUnits": "minute",
  1302. "randomFirst": "1",
  1303. "randomLast": "5",
  1304. "randomUnits": "seconds",
  1305. "drop": true,
  1306. "x": 670,
  1307. "y": 140,
  1308. "wires": [
  1309. [
  1310. "3fe91b0d.3e4c44"
  1311. ]
  1312. ]
  1313. },
  1314. {
  1315. "id": "339200ea.862f38",
  1316. "type": "debug",
  1317. "z": "437615b9.a7c5f4",
  1318. "name": "",
  1319. "active": false,
  1320. "tosidebar": true,
  1321. "console": false,
  1322. "tostatus": false,
  1323. "complete": "false",
  1324. "x": 990,
  1325. "y": 340,
  1326. "wires": []
  1327. },
  1328. {
  1329. "id": "23b476b5.08874a",
  1330. "type": "debug",
  1331. "z": "437615b9.a7c5f4",
  1332. "name": "",
  1333. "active": true,
  1334. "tosidebar": true,
  1335. "console": false,
  1336. "tostatus": false,
  1337. "complete": "payload",
  1338. "targetType": "msg",
  1339. "x": 650,
  1340. "y": 20,
  1341. "wires": []
  1342. },
  1343. {
  1344. "id": "811d834f.6d8518",
  1345. "type": "mqtt out",
  1346. "z": "b2ff4bbb.08e61",
  1347. "name": "Fridge1 ctrl",
  1348. "topic": "cmnd/Fridge1/POWER",
  1349. "qos": "",
  1350. "retain": "",
  1351. "broker": "7473ae41.ca29a",
  1352. "x": 1410,
  1353. "y": 280,
  1354. "wires": []
  1355. },
  1356. {
  1357. "id": "80a02e0.5e3545",
  1358. "type": "falling-edge",
  1359. "z": "b2ff4bbb.08e61",
  1360. "name": "Stop",
  1361. "threshold": "1",
  1362. "x": 1110,
  1363. "y": 320,
  1364. "wires": [
  1365. [
  1366. "811d834f.6d8518"
  1367. ]
  1368. ]
  1369. },
  1370. {
  1371. "id": "a11594f1.f68e7",
  1372. "type": "delay",
  1373. "z": "b2ff4bbb.08e61",
  1374. "name": "limit",
  1375. "pauseType": "rate",
  1376. "timeout": "0",
  1377. "timeoutUnits": "seconds",
  1378. "rate": "1",
  1379. "nbRateUnits": "60",
  1380. "rateUnits": "second",
  1381. "randomFirst": "1",
  1382. "randomLast": "5",
  1383. "randomUnits": "seconds",
  1384. "drop": true,
  1385. "x": 1250,
  1386. "y": 280,
  1387. "wires": [
  1388. [
  1389. "811d834f.6d8518"
  1390. ]
  1391. ]
  1392. },
  1393. {
  1394. "id": "5165e4c1.86cd8c",
  1395. "type": "change",
  1396. "z": "b2ff4bbb.08e61",
  1397. "name": "202",
  1398. "rules": [
  1399. {
  1400. "t": "set",
  1401. "p": "payload",
  1402. "pt": "msg",
  1403. "to": "$floor(msg.payload.DS18B20.Temperature*100)\t",
  1404. "tot": "jsonata"
  1405. },
  1406. {
  1407. "t": "set",
  1408. "p": "202",
  1409. "pt": "flow",
  1410. "to": "payload",
  1411. "tot": "msg"
  1412. },
  1413. {
  1414. "t": "set",
  1415. "p": "topic",
  1416. "pt": "msg",
  1417. "to": "202",
  1418. "tot": "num"
  1419. }
  1420. ],
  1421. "action": "",
  1422. "property": "",
  1423. "from": "",
  1424. "to": "",
  1425. "reg": false,
  1426. "x": 530,
  1427. "y": 260,
  1428. "wires": [
  1429. [
  1430. "bb6f0304.c32328"
  1431. ]
  1432. ]
  1433. },
  1434. {
  1435. "id": "fc6bd9e3.8d9",
  1436. "type": "mqtt in",
  1437. "z": "b2ff4bbb.08e61",
  1438. "name": "State",
  1439. "topic": "tele/+/STATE",
  1440. "qos": "2",
  1441. "datatype": "json",
  1442. "broker": "7473ae41.ca29a",
  1443. "x": 250,
  1444. "y": 120,
  1445. "wires": [
  1446. [
  1447. "d0b4dd59.073448"
  1448. ]
  1449. ]
  1450. },
  1451. {
  1452. "id": "d0b4dd59.073448",
  1453. "type": "switch",
  1454. "z": "b2ff4bbb.08e61",
  1455. "name": "topic",
  1456. "property": "topic",
  1457. "propertyType": "msg",
  1458. "rules": [
  1459. {
  1460. "t": "regex",
  1461. "v": "4ch",
  1462. "vt": "str",
  1463. "case": false
  1464. },
  1465. {
  1466. "t": "regex",
  1467. "v": "steam",
  1468. "vt": "str",
  1469. "case": false
  1470. },
  1471. {
  1472. "t": "regex",
  1473. "v": "freezer",
  1474. "vt": "str",
  1475. "case": false
  1476. },
  1477. {
  1478. "t": "regex",
  1479. "v": "cooler",
  1480. "vt": "str",
  1481. "case": false
  1482. },
  1483. {
  1484. "t": "regex",
  1485. "v": "Fridge1",
  1486. "vt": "str",
  1487. "case": false
  1488. }
  1489. ],
  1490. "checkall": "true",
  1491. "repair": false,
  1492. "outputs": 5,
  1493. "x": 370,
  1494. "y": 100,
  1495. "wires": [
  1496. [
  1497. "88ec5d80.7bd8e8"
  1498. ],
  1499. [
  1500. "162a463f.2553c2"
  1501. ],
  1502. [
  1503. "dbf33360.e9f058"
  1504. ],
  1505. [
  1506. "ad30a13a.b3f3"
  1507. ],
  1508. [
  1509. "fa35dd61.a3dd08"
  1510. ]
  1511. ]
  1512. },
  1513. {
  1514. "id": "b5cc90e0.ec9a2",
  1515. "type": "debug",
  1516. "z": "437615b9.a7c5f4",
  1517. "name": "",
  1518. "active": true,
  1519. "tosidebar": true,
  1520. "console": false,
  1521. "tostatus": false,
  1522. "complete": "false",
  1523. "x": 650,
  1524. "y": 60,
  1525. "wires": []
  1526. },
  1527. {
  1528. "id": "162a463f.2553c2",
  1529. "type": "change",
  1530. "z": "b2ff4bbb.08e61",
  1531. "name": "8",
  1532. "rules": [
  1533. {
  1534. "t": "set",
  1535. "p": "payload",
  1536. "pt": "msg",
  1537. "to": "payload.POWER",
  1538. "tot": "msg"
  1539. },
  1540. {
  1541. "t": "change",
  1542. "p": "payload",
  1543. "pt": "msg",
  1544. "from": "ON",
  1545. "fromt": "str",
  1546. "to": "1",
  1547. "tot": "num"
  1548. },
  1549. {
  1550. "t": "change",
  1551. "p": "payload",
  1552. "pt": "msg",
  1553. "from": "OFF",
  1554. "fromt": "str",
  1555. "to": "0",
  1556. "tot": "num"
  1557. },
  1558. {
  1559. "t": "set",
  1560. "p": "8",
  1561. "pt": "flow",
  1562. "to": "payload",
  1563. "tot": "msg"
  1564. }
  1565. ],
  1566. "action": "",
  1567. "property": "",
  1568. "from": "",
  1569. "to": "",
  1570. "reg": false,
  1571. "x": 530,
  1572. "y": 60,
  1573. "wires": [
  1574. []
  1575. ]
  1576. },
  1577. {
  1578. "id": "dbf33360.e9f058",
  1579. "type": "change",
  1580. "z": "b2ff4bbb.08e61",
  1581. "name": "11",
  1582. "rules": [
  1583. {
  1584. "t": "set",
  1585. "p": "payload",
  1586. "pt": "msg",
  1587. "to": "payload.POWER",
  1588. "tot": "msg"
  1589. },
  1590. {
  1591. "t": "change",
  1592. "p": "payload",
  1593. "pt": "msg",
  1594. "from": "ON",
  1595. "fromt": "str",
  1596. "to": "1",
  1597. "tot": "num"
  1598. },
  1599. {
  1600. "t": "change",
  1601. "p": "payload",
  1602. "pt": "msg",
  1603. "from": "OFF",
  1604. "fromt": "str",
  1605. "to": "0",
  1606. "tot": "num"
  1607. },
  1608. {
  1609. "t": "set",
  1610. "p": "11",
  1611. "pt": "flow",
  1612. "to": "payload",
  1613. "tot": "msg"
  1614. }
  1615. ],
  1616. "action": "",
  1617. "property": "",
  1618. "from": "",
  1619. "to": "",
  1620. "reg": false,
  1621. "x": 530,
  1622. "y": 100,
  1623. "wires": [
  1624. []
  1625. ]
  1626. },
  1627. {
  1628. "id": "ad30a13a.b3f3",
  1629. "type": "change",
  1630. "z": "b2ff4bbb.08e61",
  1631. "name": "16",
  1632. "rules": [
  1633. {
  1634. "t": "set",
  1635. "p": "payload",
  1636. "pt": "msg",
  1637. "to": "payload.POWER",
  1638. "tot": "msg"
  1639. },
  1640. {
  1641. "t": "change",
  1642. "p": "payload",
  1643. "pt": "msg",
  1644. "from": "ON",
  1645. "fromt": "str",
  1646. "to": "1",
  1647. "tot": "num"
  1648. },
  1649. {
  1650. "t": "change",
  1651. "p": "payload",
  1652. "pt": "msg",
  1653. "from": "OFF",
  1654. "fromt": "str",
  1655. "to": "0",
  1656. "tot": "num"
  1657. },
  1658. {
  1659. "t": "set",
  1660. "p": "16",
  1661. "pt": "flow",
  1662. "to": "payload",
  1663. "tot": "msg"
  1664. }
  1665. ],
  1666. "action": "",
  1667. "property": "",
  1668. "from": "",
  1669. "to": "",
  1670. "reg": false,
  1671. "x": 530,
  1672. "y": 140,
  1673. "wires": [
  1674. []
  1675. ]
  1676. },
  1677. {
  1678. "id": "fa35dd61.a3dd08",
  1679. "type": "change",
  1680. "z": "b2ff4bbb.08e61",
  1681. "name": "17",
  1682. "rules": [
  1683. {
  1684. "t": "set",
  1685. "p": "payload",
  1686. "pt": "msg",
  1687. "to": "payload.POWER",
  1688. "tot": "msg"
  1689. },
  1690. {
  1691. "t": "change",
  1692. "p": "payload",
  1693. "pt": "msg",
  1694. "from": "ON",
  1695. "fromt": "str",
  1696. "to": "1",
  1697. "tot": "num"
  1698. },
  1699. {
  1700. "t": "change",
  1701. "p": "payload",
  1702. "pt": "msg",
  1703. "from": "OFF",
  1704. "fromt": "str",
  1705. "to": "0",
  1706. "tot": "num"
  1707. },
  1708. {
  1709. "t": "set",
  1710. "p": "17",
  1711. "pt": "flow",
  1712. "to": "payload",
  1713. "tot": "msg"
  1714. }
  1715. ],
  1716. "action": "",
  1717. "property": "",
  1718. "from": "",
  1719. "to": "",
  1720. "reg": false,
  1721. "x": 530,
  1722. "y": 180,
  1723. "wires": [
  1724. []
  1725. ]
  1726. },
  1727. {
  1728. "id": "a14148d.d672db8",
  1729. "type": "mqtt in",
  1730. "z": "b2ff4bbb.08e61",
  1731. "name": "Sensor",
  1732. "topic": "tele/+/SENSOR",
  1733. "qos": "2",
  1734. "datatype": "json",
  1735. "broker": "7473ae41.ca29a",
  1736. "x": 250,
  1737. "y": 260,
  1738. "wires": [
  1739. [
  1740. "bf9bcf48.5fee4",
  1741. "e3a459de.e3c5c"
  1742. ]
  1743. ]
  1744. },
  1745. {
  1746. "id": "bf9bcf48.5fee4",
  1747. "type": "switch",
  1748. "z": "b2ff4bbb.08e61",
  1749. "name": "topic",
  1750. "property": "topic",
  1751. "propertyType": "msg",
  1752. "rules": [
  1753. {
  1754. "t": "regex",
  1755. "v": "freezer",
  1756. "vt": "str",
  1757. "case": false
  1758. },
  1759. {
  1760. "t": "regex",
  1761. "v": "Fridge1",
  1762. "vt": "str",
  1763. "case": false
  1764. },
  1765. {
  1766. "t": "regex",
  1767. "v": "cooler",
  1768. "vt": "str",
  1769. "case": false
  1770. }
  1771. ],
  1772. "checkall": "true",
  1773. "repair": false,
  1774. "outputs": 3,
  1775. "x": 370,
  1776. "y": 260,
  1777. "wires": [
  1778. [
  1779. "a06f145a.14d9b8"
  1780. ],
  1781. [
  1782. "5165e4c1.86cd8c"
  1783. ],
  1784. [
  1785. "641383d1.5866f4"
  1786. ]
  1787. ]
  1788. },
  1789. {
  1790. "id": "364033c4.ba37ac",
  1791. "type": "split",
  1792. "z": "437615b9.a7c5f4",
  1793. "name": "",
  1794. "splt": "\\n",
  1795. "spltType": "str",
  1796. "arraySplt": 1,
  1797. "arraySpltType": "len",
  1798. "stream": false,
  1799. "addname": "topic",
  1800. "x": 350,
  1801. "y": 220,
  1802. "wires": [
  1803. [
  1804. "eaf89058.f04c8"
  1805. ]
  1806. ]
  1807. },
  1808. {
  1809. "id": "76b5b2a5.a3798c",
  1810. "type": "inject",
  1811. "z": "437615b9.a7c5f4",
  1812. "name": "Fusion config",
  1813. "topic": "fusion-configuration",
  1814. "payload": "{\"outputTopic\":\"F2\",\"inputTopics\":[\"beer\",\"name\",\"temp\",\"ext_temp\",\"aux_temp\",\"temp_unit\",\"pressure\",\"pressure_unit\",\"gravity\",\"tilttemperature\",\"comment\"],\"allowUndefined\":true,\"onlyPayloads\":true}",
  1815. "payloadType": "json",
  1816. "repeat": "",
  1817. "crontab": "",
  1818. "once": true,
  1819. "onceDelay": "2",
  1820. "x": 100,
  1821. "y": 260,
  1822. "wires": [
  1823. [
  1824. "eaf89058.f04c8"
  1825. ]
  1826. ]
  1827. },
  1828. {
  1829. "id": "eaf89058.f04c8",
  1830. "type": "fusion",
  1831. "z": "437615b9.a7c5f4",
  1832. "name": "",
  1833. "x": 530,
  1834. "y": 220,
  1835. "wires": [
  1836. [
  1837. "ef8c6f4f.c445"
  1838. ]
  1839. ]
  1840. },
  1841. {
  1842. "id": "ef8c6f4f.c445",
  1843. "type": "delay",
  1844. "z": "437615b9.a7c5f4",
  1845. "name": "limit",
  1846. "pauseType": "rate",
  1847. "timeout": "5",
  1848. "timeoutUnits": "seconds",
  1849. "rate": "1",
  1850. "nbRateUnits": "8",
  1851. "rateUnits": "minute",
  1852. "randomFirst": "1",
  1853. "randomLast": "5",
  1854. "randomUnits": "seconds",
  1855. "drop": true,
  1856. "x": 670,
  1857. "y": 220,
  1858. "wires": [
  1859. [
  1860. "3fe91b0d.3e4c44"
  1861. ]
  1862. ]
  1863. },
  1864. {
  1865. "id": "3fe91b0d.3e4c44",
  1866. "type": "http request",
  1867. "z": "437615b9.a7c5f4",
  1868. "name": "",
  1869. "method": "POST",
  1870. "ret": "txt",
  1871. "paytoqs": false,
  1872. "url": "http://log.brewfather.net/stream?id=MJCu9dsSiGKwJr",
  1873. "tls": "",
  1874. "proxy": "",
  1875. "authType": "basic",
  1876. "x": 990,
  1877. "y": 300,
  1878. "wires": [
  1879. [
  1880. "339200ea.862f38"
  1881. ]
  1882. ]
  1883. },
  1884. {
  1885. "id": "ac92d203.d8404",
  1886. "type": "http in",
  1887. "z": "437615b9.a7c5f4",
  1888. "name": "",
  1889. "url": "/tiltbridge",
  1890. "method": "post",
  1891. "upload": false,
  1892. "swaggerDoc": "",
  1893. "x": 80,
  1894. "y": 720,
  1895. "wires": [
  1896. [
  1897. "b9d54bf0.9b4498",
  1898. "78d5ce21.c413e"
  1899. ]
  1900. ]
  1901. },
  1902. {
  1903. "id": "b9d54bf0.9b4498",
  1904. "type": "http response",
  1905. "z": "437615b9.a7c5f4",
  1906. "name": "",
  1907. "statusCode": "",
  1908. "headers": {},
  1909. "x": 270,
  1910. "y": 680,
  1911. "wires": []
  1912. },
  1913. {
  1914. "id": "78d5ce21.c413e",
  1915. "type": "switch",
  1916. "z": "437615b9.a7c5f4",
  1917. "name": "Color",
  1918. "property": "payload.tilts",
  1919. "propertyType": "msg",
  1920. "rules": [
  1921. {
  1922. "t": "regex",
  1923. "v": "Yellow",
  1924. "vt": "str",
  1925. "case": true
  1926. },
  1927. {
  1928. "t": "regex",
  1929. "v": "Red",
  1930. "vt": "str",
  1931. "case": true
  1932. }
  1933. ],
  1934. "checkall": "true",
  1935. "repair": false,
  1936. "outputs": 2,
  1937. "x": 330,
  1938. "y": 720,
  1939. "wires": [
  1940. [
  1941. "c4fbb5bc.4c9068",
  1942. "339200ea.862f38"
  1943. ],
  1944. [
  1945. "d6539f6f.537c2"
  1946. ]
  1947. ]
  1948. },
  1949. {
  1950. "id": "c4fbb5bc.4c9068",
  1951. "type": "change",
  1952. "z": "437615b9.a7c5f4",
  1953. "name": "Yellow",
  1954. "rules": [
  1955. {
  1956. "t": "delete",
  1957. "p": "payload.mdns_id",
  1958. "pt": "msg"
  1959. },
  1960. {
  1961. "t": "set",
  1962. "p": "payload.tilts.Yellow.gravity",
  1963. "pt": "msg",
  1964. "to": "$number(payload.tilts.Yellow.gravity)",
  1965. "tot": "jsonata"
  1966. },
  1967. {
  1968. "t": "set",
  1969. "p": "payload.tilts.Yellow.gravity",
  1970. "pt": "msg",
  1971. "to": "msg.payload.tilts.Yellow.gravity - 0.000",
  1972. "tot": "jsonata"
  1973. },
  1974. {
  1975. "t": "set",
  1976. "p": "payload.tilts.Yellow.temp",
  1977. "pt": "msg",
  1978. "to": "(payload.tilts.Yellow.temp -32) * (5/9)",
  1979. "tot": "jsonata"
  1980. },
  1981. {
  1982. "t": "move",
  1983. "p": "payload.tilts.Yellow.temp",
  1984. "pt": "msg",
  1985. "to": "payload.tilttemperature",
  1986. "tot": "msg"
  1987. },
  1988. {
  1989. "t": "move",
  1990. "p": "payload.tilts.Yellow.gravity",
  1991. "pt": "msg",
  1992. "to": "payload.gravity",
  1993. "tot": "msg"
  1994. },
  1995. {
  1996. "t": "set",
  1997. "p": "payload.comment",
  1998. "pt": "msg",
  1999. "to": "$now()",
  2000. "tot": "jsonata"
  2001. }
  2002. ],
  2003. "action": "",
  2004. "property": "",
  2005. "from": "",
  2006. "to": "",
  2007. "reg": false,
  2008. "x": 550,
  2009. "y": 680,
  2010. "wires": [
  2011. [
  2012. "37e5173e.dbbc18",
  2013. "339200ea.862f38"
  2014. ]
  2015. ]
  2016. },
  2017. {
  2018. "id": "d6539f6f.537c2",
  2019. "type": "change",
  2020. "z": "437615b9.a7c5f4",
  2021. "name": "Red",
  2022. "rules": [
  2023. {
  2024. "t": "set",
  2025. "p": "payload.tilts.Red.gravity",
  2026. "pt": "msg",
  2027. "to": "$number(payload.tilts.Red.gravity)",
  2028. "tot": "jsonata"
  2029. },
  2030. {
  2031. "t": "set",
  2032. "p": "payload.tilts.Red.gravity",
  2033. "pt": "msg",
  2034. "to": "msg.payload.tilts.Red.gravity - 0.000",
  2035. "tot": "jsonata"
  2036. },
  2037. {
  2038. "t": "set",
  2039. "p": "payload.tilts.Red.temp",
  2040. "pt": "msg",
  2041. "to": "(payload.tilts.Red.temp -32) * (5/9)",
  2042. "tot": "jsonata"
  2043. }
  2044. ],
  2045. "action": "",
  2046. "property": "",
  2047. "from": "",
  2048. "to": "",
  2049. "reg": false,
  2050. "x": 550,
  2051. "y": 720,
  2052. "wires": [
  2053. [
  2054. "2f93d39c.917b3c"
  2055. ]
  2056. ]
  2057. },
  2058. {
  2059. "id": "37e5173e.dbbc18",
  2060. "type": "split",
  2061. "z": "437615b9.a7c5f4",
  2062. "name": "",
  2063. "splt": "\\n",
  2064. "spltType": "str",
  2065. "arraySplt": 1,
  2066. "arraySpltType": "len",
  2067. "stream": false,
  2068. "addname": "topic",
  2069. "x": 670,
  2070. "y": 680,
  2071. "wires": [
  2072. [
  2073. "eaf89058.f04c8"
  2074. ]
  2075. ]
  2076. },
  2077. {
  2078. "id": "2f93d39c.917b3c",
  2079. "type": "split",
  2080. "z": "437615b9.a7c5f4",
  2081. "name": "",
  2082. "splt": "\\n",
  2083. "spltType": "str",
  2084. "arraySplt": 1,
  2085. "arraySpltType": "len",
  2086. "stream": false,
  2087. "addname": "topic",
  2088. "x": 670,
  2089. "y": 720,
  2090. "wires": [
  2091. []
  2092. ]
  2093. },
  2094. {
  2095. "id": "912df86.3fb4088",
  2096. "type": "change",
  2097. "z": "437615b9.a7c5f4",
  2098. "name": "psi",
  2099. "rules": [
  2100. {
  2101. "t": "set",
  2102. "p": "payload.pressure",
  2103. "pt": "msg",
  2104. "to": "payload.pressure *14.5",
  2105. "tot": "jsonata"
  2106. }
  2107. ],
  2108. "action": "",
  2109. "property": "",
  2110. "from": "",
  2111. "to": "",
  2112. "reg": false,
  2113. "x": 210,
  2114. "y": 220,
  2115. "wires": [
  2116. [
  2117. "364033c4.ba37ac"
  2118. ]
  2119. ]
  2120. },
  2121. {
  2122. "id": "98cbba26.0c25e8",
  2123. "type": "mqtt in",
  2124. "z": "437615b9.a7c5f4",
  2125. "name": "",
  2126. "topic": "F1",
  2127. "qos": "2",
  2128. "datatype": "json",
  2129. "broker": "7473ae41.ca29a",
  2130. "x": 50,
  2131. "y": 140,
  2132. "wires": [
  2133. [
  2134. "6a8fc413.88c30c"
  2135. ]
  2136. ]
  2137. },
  2138. {
  2139. "id": "e618a1eb.aef28",
  2140. "type": "mqtt in",
  2141. "z": "437615b9.a7c5f4",
  2142. "name": "",
  2143. "topic": "F2",
  2144. "qos": "2",
  2145. "datatype": "json",
  2146. "broker": "7473ae41.ca29a",
  2147. "x": 50,
  2148. "y": 220,
  2149. "wires": [
  2150. [
  2151. "912df86.3fb4088"
  2152. ]
  2153. ]
  2154. },
  2155. {
  2156. "id": "6a8fc413.88c30c",
  2157. "type": "change",
  2158. "z": "437615b9.a7c5f4",
  2159. "name": "psi",
  2160. "rules": [
  2161. {
  2162. "t": "set",
  2163. "p": "payload.pressure",
  2164. "pt": "msg",
  2165. "to": "payload.pressure *14.5",
  2166. "tot": "jsonata"
  2167. }
  2168. ],
  2169. "action": "",
  2170. "property": "",
  2171. "from": "",
  2172. "to": "",
  2173. "reg": false,
  2174. "x": 210,
  2175. "y": 140,
  2176. "wires": [
  2177. [
  2178. "6df8d545.32ca6c"
  2179. ]
  2180. ]
  2181. },
  2182. {
  2183. "id": "80bbed54.3324",
  2184. "type": "mqtt in",
  2185. "z": "437615b9.a7c5f4",
  2186. "name": "",
  2187. "topic": "F4",
  2188. "qos": "2",
  2189. "datatype": "json",
  2190. "broker": "7473ae41.ca29a",
  2191. "x": 50,
  2192. "y": 380,
  2193. "wires": [
  2194. [
  2195. "e41ebed4.67993"
  2196. ]
  2197. ]
  2198. },
  2199. {
  2200. "id": "e41ebed4.67993",
  2201. "type": "change",
  2202. "z": "437615b9.a7c5f4",
  2203. "name": "psi",
  2204. "rules": [
  2205. {
  2206. "t": "set",
  2207. "p": "payload.pressure",
  2208. "pt": "msg",
  2209. "to": "payload.pressure *14.5",
  2210. "tot": "jsonata"
  2211. }
  2212. ],
  2213. "action": "",
  2214. "property": "",
  2215. "from": "",
  2216. "to": "",
  2217. "reg": false,
  2218. "x": 210,
  2219. "y": 380,
  2220. "wires": [
  2221. [
  2222. "e7ad6a09.027728"
  2223. ]
  2224. ]
  2225. },
  2226. {
  2227. "id": "e7ad6a09.027728",
  2228. "type": "split",
  2229. "z": "437615b9.a7c5f4",
  2230. "name": "",
  2231. "splt": "\\n",
  2232. "spltType": "str",
  2233. "arraySplt": 1,
  2234. "arraySpltType": "len",
  2235. "stream": false,
  2236. "addname": "topic",
  2237. "x": 350,
  2238. "y": 380,
  2239. "wires": [
  2240. [
  2241. "7115fee5.db41b"
  2242. ]
  2243. ]
  2244. },
  2245. {
  2246. "id": "7115fee5.db41b",
  2247. "type": "fusion",
  2248. "z": "437615b9.a7c5f4",
  2249. "name": "",
  2250. "x": 530,
  2251. "y": 380,
  2252. "wires": [
  2253. [
  2254. "d5c63287.28142"
  2255. ]
  2256. ]
  2257. },
  2258. {
  2259. "id": "d5c63287.28142",
  2260. "type": "delay",
  2261. "z": "437615b9.a7c5f4",
  2262. "name": "limit",
  2263. "pauseType": "rate",
  2264. "timeout": "5",
  2265. "timeoutUnits": "seconds",
  2266. "rate": "1",
  2267. "nbRateUnits": "8",
  2268. "rateUnits": "minute",
  2269. "randomFirst": "1",
  2270. "randomLast": "5",
  2271. "randomUnits": "seconds",
  2272. "drop": true,
  2273. "x": 670,
  2274. "y": 380,
  2275. "wires": [
  2276. [
  2277. "3fe91b0d.3e4c44"
  2278. ]
  2279. ]
  2280. },
  2281. {
  2282. "id": "b96915f.7e882e8",
  2283. "type": "inject",
  2284. "z": "437615b9.a7c5f4",
  2285. "name": "Fusion config",
  2286. "topic": "fusion-configuration",
  2287. "payload": "{\"outputTopic\":\"F4\",\"inputTopics\":[\"beer\",\"name\",\"temp\",\"ext_temp\",\"aux_temp\",\"temp_unit\",\"pressure\",\"pressure_unit\",\"gravity\",\"tilttemperature\",\"comment\"],\"allowUndefined\":true,\"onlyPayloads\":true}",
  2288. "payloadType": "json",
  2289. "repeat": "",
  2290. "crontab": "",
  2291. "once": true,
  2292. "onceDelay": "2",
  2293. "x": 80,
  2294. "y": 420,
  2295. "wires": [
  2296. [
  2297. "7115fee5.db41b"
  2298. ]
  2299. ]
  2300. },
  2301. {
  2302. "id": "e5e0b27a.139ec",
  2303. "type": "mqtt in",
  2304. "z": "437615b9.a7c5f4",
  2305. "name": "",
  2306. "topic": "F3",
  2307. "qos": "2",
  2308. "datatype": "json",
  2309. "broker": "7473ae41.ca29a",
  2310. "x": 50,
  2311. "y": 300,
  2312. "wires": [
  2313. [
  2314. "d3d6ae24.b2106"
  2315. ]
  2316. ]
  2317. },
  2318. {
  2319. "id": "d3d6ae24.b2106",
  2320. "type": "change",
  2321. "z": "437615b9.a7c5f4",
  2322. "name": "psi",
  2323. "rules": [
  2324. {
  2325. "t": "set",
  2326. "p": "payload.pressure",
  2327. "pt": "msg",
  2328. "to": "payload.pressure *14.5",
  2329. "tot": "jsonata"
  2330. }
  2331. ],
  2332. "action": "",
  2333. "property": "",
  2334. "from": "",
  2335. "to": "",
  2336. "reg": false,
  2337. "x": 210,
  2338. "y": 300,
  2339. "wires": [
  2340. [
  2341. "26fb8222.740f1e"
  2342. ]
  2343. ]
  2344. },
  2345. {
  2346. "id": "26fb8222.740f1e",
  2347. "type": "split",
  2348. "z": "437615b9.a7c5f4",
  2349. "name": "",
  2350. "splt": "\\n",
  2351. "spltType": "str",
  2352. "arraySplt": 1,
  2353. "arraySpltType": "len",
  2354. "stream": false,
  2355. "addname": "topic",
  2356. "x": 350,
  2357. "y": 300,
  2358. "wires": [
  2359. [
  2360. "b78a3685.9735f8"
  2361. ]
  2362. ]
  2363. },
  2364. {
  2365. "id": "b78a3685.9735f8",
  2366. "type": "fusion",
  2367. "z": "437615b9.a7c5f4",
  2368. "name": "",
  2369. "x": 530,
  2370. "y": 300,
  2371. "wires": [
  2372. [
  2373. "7ec053df.e49f7c"
  2374. ]
  2375. ]
  2376. },
  2377. {
  2378. "id": "7ec053df.e49f7c",
  2379. "type": "delay",
  2380. "z": "437615b9.a7c5f4",
  2381. "name": "limit",
  2382. "pauseType": "rate",
  2383. "timeout": "5",
  2384. "timeoutUnits": "seconds",
  2385. "rate": "1",
  2386. "nbRateUnits": "8",
  2387. "rateUnits": "minute",
  2388. "randomFirst": "1",
  2389. "randomLast": "5",
  2390. "randomUnits": "seconds",
  2391. "drop": true,
  2392. "x": 670,
  2393. "y": 300,
  2394. "wires": [
  2395. [
  2396. "339200ea.862f38",
  2397. "3fe91b0d.3e4c44"
  2398. ]
  2399. ]
  2400. },
  2401. {
  2402. "id": "1f6b7167.09b31f",
  2403. "type": "inject",
  2404. "z": "437615b9.a7c5f4",
  2405. "name": "Fusion config",
  2406. "topic": "fusion-configuration",
  2407. "payload": "{\"outputTopic\":\"F3\",\"inputTopics\":[\"beer\",\"name\",\"temp\",\"ext_temp\",\"aux_temp\",\"temp_unit\",\"pressure\",\"pressure_unit\",\"gravity\",\"tilttemperature\",\"comment\"],\"allowUndefined\":true,\"onlyPayloads\":true}",
  2408. "payloadType": "json",
  2409. "repeat": "",
  2410. "crontab": "",
  2411. "once": true,
  2412. "onceDelay": "2",
  2413. "x": 80,
  2414. "y": 340,
  2415. "wires": [
  2416. [
  2417. "b78a3685.9735f8"
  2418. ]
  2419. ]
  2420. },
  2421. {
  2422. "id": "733f3010.602cb",
  2423. "type": "mqtt in",
  2424. "z": "437615b9.a7c5f4",
  2425. "name": "RFbridge",
  2426. "topic": "tele/RFbridge/RESULT",
  2427. "qos": "2",
  2428. "datatype": "json",
  2429. "broker": "7473ae41.ca29a",
  2430. "x": 70,
  2431. "y": 520,
  2432. "wires": [
  2433. [
  2434. "56e704f3.3454fc"
  2435. ]
  2436. ]
  2437. },
  2438. {
  2439. "id": "56e704f3.3454fc",
  2440. "type": "debug",
  2441. "z": "437615b9.a7c5f4",
  2442. "name": "",
  2443. "active": true,
  2444. "tosidebar": true,
  2445. "console": false,
  2446. "tostatus": false,
  2447. "complete": "false",
  2448. "x": 300,
  2449. "y": 520,
  2450. "wires": []
  2451. },
  2452. {
  2453. "id": "47b59f9c.fe397",
  2454. "type": "http request",
  2455. "z": "437615b9.a7c5f4",
  2456. "name": "Red tilt",
  2457. "method": "GET",
  2458. "ret": "obj",
  2459. "paytoqs": false,
  2460. "url": "http://192.168.77.246:8000/global/Redtilt",
  2461. "tls": "",
  2462. "proxy": "",
  2463. "authType": "basic",
  2464. "x": 260,
  2465. "y": 820,
  2466. "wires": [
  2467. [
  2468. "8799eeb1.bd8f7"
  2469. ]
  2470. ]
  2471. },
  2472. {
  2473. "id": "375e0433.64890c",
  2474. "type": "inject",
  2475. "z": "437615b9.a7c5f4",
  2476. "name": "",
  2477. "topic": "",
  2478. "payload": "",
  2479. "payloadType": "date",
  2480. "repeat": "",
  2481. "crontab": "",
  2482. "once": false,
  2483. "onceDelay": 0.1,
  2484. "x": 100,
  2485. "y": 780,
  2486. "wires": [
  2487. [
  2488. "47b59f9c.fe397"
  2489. ]
  2490. ]
  2491. },
  2492. {
  2493. "id": "8799eeb1.bd8f7",
  2494. "type": "debug",
  2495. "z": "437615b9.a7c5f4",
  2496. "name": "",
  2497. "active": true,
  2498. "tosidebar": true,
  2499. "console": false,
  2500. "tostatus": false,
  2501. "complete": "false",
  2502. "x": 470,
  2503. "y": 820,
  2504. "wires": []
  2505. },
  2506. {
  2507. "id": "fbd70bf2.d1c66",
  2508. "type": "influxdb out",
  2509. "z": "b2ff4bbb.08e61",
  2510. "influxdb": "2778b469.9fa82c",
  2511. "name": "influxDB",
  2512. "measurement": "",
  2513. "precision": "",
  2514. "retentionPolicy": "",
  2515. "x": 720,
  2516. "y": 260,
  2517. "wires": []
  2518. },
  2519. {
  2520. "id": "e3a459de.e3c5c",
  2521. "type": "change",
  2522. "z": "b2ff4bbb.08e61",
  2523. "name": "",
  2524. "rules": [
  2525. {
  2526. "t": "set",
  2527. "p": "payload",
  2528. "pt": "msg",
  2529. "to": "payload.DS18B20.Temperature",
  2530. "tot": "msg"
  2531. },
  2532. {
  2533. "t": "set",
  2534. "p": "measurement",
  2535. "pt": "msg",
  2536. "to": "topic",
  2537. "tot": "msg"
  2538. }
  2539. ],
  2540. "action": "",
  2541. "property": "",
  2542. "from": "",
  2543. "to": "",
  2544. "reg": false,
  2545. "x": 400,
  2546. "y": 340,
  2547. "wires": [
  2548. [
  2549. "1f743b63.7803bd"
  2550. ]
  2551. ]
  2552. },
  2553. {
  2554. "id": "1f743b63.7803bd",
  2555. "type": "delay",
  2556. "z": "b2ff4bbb.08e61",
  2557. "name": "",
  2558. "pauseType": "queue",
  2559. "timeout": "5",
  2560. "timeoutUnits": "seconds",
  2561. "rate": "1",
  2562. "nbRateUnits": "1",
  2563. "rateUnits": "minute",
  2564. "randomFirst": "1",
  2565. "randomLast": "5",
  2566. "randomUnits": "seconds",
  2567. "drop": true,
  2568. "x": 590,
  2569. "y": 340,
  2570. "wires": [
  2571. [
  2572. "fbd70bf2.d1c66"
  2573. ]
  2574. ]
  2575. },
  2576. {
  2577. "id": "ff1bd7c2.595038",
  2578. "type": "mqtt in",
  2579. "z": "b08b12c9.6b2f2",
  2580. "name": "",
  2581. "topic": "shellies/#",
  2582. "qos": "2",
  2583. "datatype": "auto",
  2584. "broker": "7473ae41.ca29a",
  2585. "x": 80,
  2586. "y": 120,
  2587. "wires": [
  2588. [
  2589. "3fb20067.eaf49",
  2590. "19674d39.54aa43",
  2591. "9a48ff03.ffa42"
  2592. ]
  2593. ]
  2594. },
  2595. {
  2596. "id": "fe1ce417.786978",
  2597. "type": "mqtt out",
  2598. "z": "b08b12c9.6b2f2",
  2599. "name": "BadVK",
  2600. "topic": "shellies/shelly1pm-BA095A/relay/0/command",
  2601. "qos": "",
  2602. "retain": "",
  2603. "broker": "7473ae41.ca29a",
  2604. "x": 1100,
  2605. "y": 60,
  2606. "wires": []
  2607. },
  2608. {
  2609. "id": "84b8ddfa.4b478",
  2610. "type": "mqtt out",
  2611. "z": "b08b12c9.6b2f2",
  2612. "name": "Stueovn",
  2613. "topic": "shellies/shellyplug-s-0414A5/relay/0/command",
  2614. "qos": "",
  2615. "retain": "",
  2616. "broker": "7473ae41.ca29a",
  2617. "x": 1100,
  2618. "y": 100,
  2619. "wires": []
  2620. },
  2621. {
  2622. "id": "b068d094.e7aa5",
  2623. "type": "function",
  2624. "z": "b08b12c9.6b2f2",
  2625. "name": "thermostat",
  2626. "func": "var temp = flow.get('temp')\nvar hysteresis = 0.5\nvar offsetpoint = flow.get('setpoint')\nvar onsetpoint = offsetpoint - hysteresis\n\n if (temp < onsetpoint) {\n msg.payload = \"on\"\n return msg;\n }\n if (temp > offsetpoint) {\n msg.payload = \"off\"\n return msg;\n }\n\n",
  2627. "outputs": 1,
  2628. "noerr": 0,
  2629. "x": 830,
  2630. "y": 80,
  2631. "wires": [
  2632. [
  2633. "fe1ce417.786978",
  2634. "84b8ddfa.4b478"
  2635. ]
  2636. ]
  2637. },
  2638. {
  2639. "id": "aa8ef986.28e608",
  2640. "type": "switch",
  2641. "z": "b08b12c9.6b2f2",
  2642. "name": "temp",
  2643. "property": "topic",
  2644. "propertyType": "msg",
  2645. "rules": [
  2646. {
  2647. "t": "regex",
  2648. "v": "temperature",
  2649. "vt": "str",
  2650. "case": false
  2651. }
  2652. ],
  2653. "checkall": "true",
  2654. "repair": false,
  2655. "outputs": 1,
  2656. "x": 470,
  2657. "y": 120,
  2658. "wires": [
  2659. [
  2660. "5232542e.36539c",
  2661. "9c8e2655.c710a8"
  2662. ]
  2663. ]
  2664. },
  2665. {
  2666. "id": "fc7a24aa.ad4378",
  2667. "type": "switch",
  2668. "z": "b08b12c9.6b2f2",
  2669. "name": "overtemp",
  2670. "property": "topic",
  2671. "propertyType": "msg",
  2672. "rules": [
  2673. {
  2674. "t": "regex",
  2675. "v": "overtemperature",
  2676. "vt": "str",
  2677. "case": false
  2678. }
  2679. ],
  2680. "checkall": "true",
  2681. "repair": false,
  2682. "outputs": 1,
  2683. "x": 480,
  2684. "y": 240,
  2685. "wires": [
  2686. [
  2687. "67263cd3.005e14"
  2688. ]
  2689. ]
  2690. },
  2691. {
  2692. "id": "67263cd3.005e14",
  2693. "type": "switch",
  2694. "z": "b08b12c9.6b2f2",
  2695. "name": "overtemp",
  2696. "property": "payload",
  2697. "propertyType": "msg",
  2698. "rules": [
  2699. {
  2700. "t": "eq",
  2701. "v": "1",
  2702. "vt": "str"
  2703. }
  2704. ],
  2705. "checkall": "true",
  2706. "repair": false,
  2707. "outputs": 1,
  2708. "x": 640,
  2709. "y": 240,
  2710. "wires": [
  2711. [
  2712. "a709de12.ae7"
  2713. ]
  2714. ]
  2715. },
  2716. {
  2717. "id": "3fb20067.eaf49",
  2718. "type": "switch",
  2719. "z": "b08b12c9.6b2f2",
  2720. "name": "shellyht",
  2721. "property": "topic",
  2722. "propertyType": "msg",
  2723. "rules": [
  2724. {
  2725. "t": "regex",
  2726. "v": "shellyht",
  2727. "vt": "str",
  2728. "case": false
  2729. }
  2730. ],
  2731. "checkall": "true",
  2732. "repair": false,
  2733. "outputs": 1,
  2734. "x": 260,
  2735. "y": 120,
  2736. "wires": [
  2737. [
  2738. "aa8ef986.28e608",
  2739. "7611d9fe.4a4e98",
  2740. "94d85067.b6a2b"
  2741. ]
  2742. ]
  2743. },
  2744. {
  2745. "id": "5232542e.36539c",
  2746. "type": "ui_gauge",
  2747. "z": "b08b12c9.6b2f2",
  2748. "name": "",
  2749. "group": "366500a5.06556",
  2750. "order": 1,
  2751. "width": "0",
  2752. "height": "0",
  2753. "gtype": "gage",
  2754. "title": "Temperature",
  2755. "label": "C",
  2756. "format": "{{value | number:1}} C",
  2757. "min": 0,
  2758. "max": "30",
  2759. "colors": [
  2760. "#00b500",
  2761. "#e6e600",
  2762. "#ca3838"
  2763. ],
  2764. "seg1": "",
  2765. "seg2": "",
  2766. "x": 830,
  2767. "y": 320,
  2768. "wires": []
  2769. },
  2770. {
  2771. "id": "7611d9fe.4a4e98",
  2772. "type": "switch",
  2773. "z": "b08b12c9.6b2f2",
  2774. "name": "humid",
  2775. "property": "topic",
  2776. "propertyType": "msg",
  2777. "rules": [
  2778. {
  2779. "t": "regex",
  2780. "v": "humidity",
  2781. "vt": "str",
  2782. "case": false
  2783. }
  2784. ],
  2785. "checkall": "true",
  2786. "repair": false,
  2787. "outputs": 1,
  2788. "x": 470,
  2789. "y": 160,
  2790. "wires": [
  2791. [
  2792. "d9ad68fc.58e5d8",
  2793. "34cd86ad.75243a"
  2794. ]
  2795. ]
  2796. },
  2797. {
  2798. "id": "d9ad68fc.58e5d8",
  2799. "type": "ui_gauge",
  2800. "z": "b08b12c9.6b2f2",
  2801. "name": "",
  2802. "group": "366500a5.06556",
  2803. "order": 2,
  2804. "width": 0,
  2805. "height": 0,
  2806. "gtype": "gage",
  2807. "title": "Humidity",
  2808. "label": "%",
  2809. "format": "{{value | number:0}} %",
  2810. "min": 0,
  2811. "max": "100",
  2812. "colors": [
  2813. "#00b500",
  2814. "#e6e600",
  2815. "#ca3838"
  2816. ],
  2817. "seg1": "",
  2818. "seg2": "",
  2819. "x": 820,
  2820. "y": 360,
  2821. "wires": []
  2822. },
  2823. {
  2824. "id": "94d85067.b6a2b",
  2825. "type": "switch",
  2826. "z": "b08b12c9.6b2f2",
  2827. "name": "battery",
  2828. "property": "topic",
  2829. "propertyType": "msg",
  2830. "rules": [
  2831. {
  2832. "t": "regex",
  2833. "v": "battery",
  2834. "vt": "str",
  2835. "case": false
  2836. }
  2837. ],
  2838. "checkall": "true",
  2839. "repair": false,
  2840. "outputs": 1,
  2841. "x": 470,
  2842. "y": 200,
  2843. "wires": [
  2844. [
  2845. "e010c2a6.74982",
  2846. "4ada3d3b.ef84d4"
  2847. ]
  2848. ]
  2849. },
  2850. {
  2851. "id": "e010c2a6.74982",
  2852. "type": "ui_gauge",
  2853. "z": "b08b12c9.6b2f2",
  2854. "name": "",
  2855. "group": "366500a5.06556",
  2856. "order": 2,
  2857. "width": 0,
  2858. "height": 0,
  2859. "gtype": "gage",
  2860. "title": "Battery",
  2861. "label": "%",
  2862. "format": "{{value | number:0}} %",
  2863. "min": 0,
  2864. "max": "100",
  2865. "colors": [
  2866. "#ff0000",
  2867. "#e6e600",
  2868. "#00ff00"
  2869. ],
  2870. "seg1": "30",
  2871. "seg2": "60",
  2872. "x": 820,
  2873. "y": 400,
  2874. "wires": []
  2875. },
  2876. {
  2877. "id": "c8d66643.90c748",
  2878. "type": "blynk-ws-in-write",
  2879. "z": "b08b12c9.6b2f2",
  2880. "name": "Setpoint",
  2881. "pin": "2",
  2882. "pin_all": 0,
  2883. "client": "44e1a68b.8d3478",
  2884. "x": 480,
  2885. "y": 60,
  2886. "wires": [
  2887. [
  2888. "6e4a9d43.9725e4"
  2889. ]
  2890. ]
  2891. },
  2892. {
  2893. "id": "6e4a9d43.9725e4",
  2894. "type": "change",
  2895. "z": "b08b12c9.6b2f2",
  2896. "name": "store sp",
  2897. "rules": [
  2898. {
  2899. "t": "set",
  2900. "p": "setpoint",
  2901. "pt": "flow",
  2902. "to": "payload",
  2903. "tot": "msg"
  2904. }
  2905. ],
  2906. "action": "",
  2907. "property": "",
  2908. "from": "",
  2909. "to": "",
  2910. "reg": false,
  2911. "x": 640,
  2912. "y": 60,
  2913. "wires": [
  2914. [
  2915. "b068d094.e7aa5"
  2916. ]
  2917. ]
  2918. },
  2919. {
  2920. "id": "9c8e2655.c710a8",
  2921. "type": "change",
  2922. "z": "b08b12c9.6b2f2",
  2923. "name": "store temp",
  2924. "rules": [
  2925. {
  2926. "t": "set",
  2927. "p": "temp",
  2928. "pt": "flow",
  2929. "to": "payload",
  2930. "tot": "msg"
  2931. }
  2932. ],
  2933. "action": "",
  2934. "property": "",
  2935. "from": "",
  2936. "to": "",
  2937. "reg": false,
  2938. "x": 650,
  2939. "y": 100,
  2940. "wires": [
  2941. [
  2942. "b068d094.e7aa5",
  2943. "fb2e190a.8110d8"
  2944. ]
  2945. ]
  2946. },
  2947. {
  2948. "id": "fb2e190a.8110d8",
  2949. "type": "blynk-ws-out-write",
  2950. "z": "b08b12c9.6b2f2",
  2951. "name": "temp",
  2952. "pin": "3",
  2953. "pinmode": 0,
  2954. "client": "44e1a68b.8d3478",
  2955. "x": 810,
  2956. "y": 120,
  2957. "wires": []
  2958. },
  2959. {
  2960. "id": "34cd86ad.75243a",
  2961. "type": "blynk-ws-out-write",
  2962. "z": "b08b12c9.6b2f2",
  2963. "name": "humidity",
  2964. "pin": "4",
  2965. "pinmode": 0,
  2966. "client": "44e1a68b.8d3478",
  2967. "x": 820,
  2968. "y": 160,
  2969. "wires": []
  2970. },
  2971. {
  2972. "id": "4ada3d3b.ef84d4",
  2973. "type": "blynk-ws-out-write",
  2974. "z": "b08b12c9.6b2f2",
  2975. "name": "battery",
  2976. "pin": "5",
  2977. "pinmode": 0,
  2978. "client": "44e1a68b.8d3478",
  2979. "x": 810,
  2980. "y": 200,
  2981. "wires": []
  2982. },
  2983. {
  2984. "id": "a709de12.ae7",
  2985. "type": "change",
  2986. "z": "b08b12c9.6b2f2",
  2987. "name": "off",
  2988. "rules": [
  2989. {
  2990. "t": "set",
  2991. "p": "payload",
  2992. "pt": "msg",
  2993. "to": "off",
  2994. "tot": "str"
  2995. }
  2996. ],
  2997. "action": "",
  2998. "property": "",
  2999. "from": "",
  3000. "to": "",
  3001. "reg": false,
  3002. "x": 810,
  3003. "y": 240,
  3004. "wires": [
  3005. [
  3006. "fe1ce417.786978"
  3007. ]
  3008. ]
  3009. },
  3010. {
  3011. "id": "19674d39.54aa43",
  3012. "type": "switch",
  3013. "z": "b08b12c9.6b2f2",
  3014. "name": "shelly1pm",
  3015. "property": "topic",
  3016. "propertyType": "msg",
  3017. "rules": [
  3018. {
  3019. "t": "regex",
  3020. "v": "shelly1pm",
  3021. "vt": "str",
  3022. "case": false
  3023. }
  3024. ],
  3025. "checkall": "true",
  3026. "repair": false,
  3027. "outputs": 1,
  3028. "x": 260,
  3029. "y": 160,
  3030. "wires": [
  3031. [
  3032. "fc7a24aa.ad4378"
  3033. ]
  3034. ]
  3035. },
  3036. {
  3037. "id": "9a48ff03.ffa42",
  3038. "type": "switch",
  3039. "z": "b08b12c9.6b2f2",
  3040. "name": "shellyplug",
  3041. "property": "topic",
  3042. "propertyType": "msg",
  3043. "rules": [
  3044. {
  3045. "t": "regex",
  3046. "v": "shellyplug",
  3047. "vt": "str",
  3048. "case": false
  3049. }
  3050. ],
  3051. "checkall": "true",
  3052. "repair": false,
  3053. "outputs": 1,
  3054. "x": 260,
  3055. "y": 200,
  3056. "wires": [
  3057. [
  3058. "4930ed5c.458bf4"
  3059. ]
  3060. ]
  3061. },
  3062. {
  3063. "id": "4930ed5c.458bf4",
  3064. "type": "switch",
  3065. "z": "b08b12c9.6b2f2",
  3066. "name": "overtemp",
  3067. "property": "topic",
  3068. "propertyType": "msg",
  3069. "rules": [
  3070. {
  3071. "t": "regex",
  3072. "v": "overtemperature",
  3073. "vt": "str",
  3074. "case": false
  3075. }
  3076. ],
  3077. "checkall": "true",
  3078. "repair": false,
  3079. "outputs": 1,
  3080. "x": 480,
  3081. "y": 280,
  3082. "wires": [
  3083. [
  3084. "df14565.a4332a8"
  3085. ]
  3086. ]
  3087. },
  3088. {
  3089. "id": "df14565.a4332a8",
  3090. "type": "switch",
  3091. "z": "b08b12c9.6b2f2",
  3092. "name": "overtemp",
  3093. "property": "payload",
  3094. "propertyType": "msg",
  3095. "rules": [
  3096. {
  3097. "t": "eq",
  3098. "v": "1",
  3099. "vt": "str"
  3100. }
  3101. ],
  3102. "checkall": "true",
  3103. "repair": false,
  3104. "outputs": 1,
  3105. "x": 640,
  3106. "y": 280,
  3107. "wires": [
  3108. [
  3109. "8804f99a.02e288"
  3110. ]
  3111. ]
  3112. },
  3113. {
  3114. "id": "8804f99a.02e288",
  3115. "type": "change",
  3116. "z": "b08b12c9.6b2f2",
  3117. "name": "off",
  3118. "rules": [
  3119. {
  3120. "t": "set",
  3121. "p": "payload",
  3122. "pt": "msg",
  3123. "to": "off",
  3124. "tot": "str"
  3125. }
  3126. ],
  3127. "action": "",
  3128. "property": "",
  3129. "from": "",
  3130. "to": "",
  3131. "reg": false,
  3132. "x": 810,
  3133. "y": 280,
  3134. "wires": [
  3135. [
  3136. "84b8ddfa.4b478"
  3137. ]
  3138. ]
  3139. }
  3140. ]
Advertisement
Add Comment
Please, Sign In to add comment