Advertisement
Guest User

Untitled

a guest
Nov 16th, 2022
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.78 KB | None | 0 0
  1. [
  2. {
  3. "id": "2a8b02ca.5fe626",
  4. "type": "tab",
  5. "label": "My Observatory",
  6. "disabled": false,
  7. "info": ""
  8. },
  9. {
  10. "id": "229c1832.a883c8",
  11. "type": "inject",
  12. "z": "2a8b02ca.5fe626",
  13. "name": "5 secs",
  14. "props": [
  15. {
  16. "p": "payload"
  17. },
  18. {
  19. "p": "topic",
  20. "vt": "str"
  21. }
  22. ],
  23. "repeat": "120",
  24. "crontab": "",
  25. "once": true,
  26. "onceDelay": "5",
  27. "topic": "",
  28. "payload": "",
  29. "payloadType": "str",
  30. "x": 160,
  31. "y": 80,
  32. "wires": [
  33. [
  34. "d46fc348.cc279",
  35. "beacc2947ed75bd4"
  36. ]
  37. ]
  38. },
  39. {
  40. "id": "d46fc348.cc279",
  41. "type": "http request",
  42. "z": "2a8b02ca.5fe626",
  43. "name": "Solo last data",
  44. "method": "GET",
  45. "ret": "txt",
  46. "paytoqs": "ignore",
  47. "url": "http://192.168.1.215/cgi-bin/cgiLastData",
  48. "tls": "",
  49. "persist": false,
  50. "proxy": "",
  51. "insecureHTTPParser": false,
  52. "authType": "basic",
  53. "senderr": false,
  54. "headers": [],
  55. "x": 340,
  56. "y": 80,
  57. "wires": [
  58. [
  59. "d947db47.b47568"
  60. ]
  61. ]
  62. },
  63. {
  64. "id": "d947db47.b47568",
  65. "type": "split",
  66. "z": "2a8b02ca.5fe626",
  67. "name": "",
  68. "splt": "\\n",
  69. "spltType": "str",
  70. "arraySplt": 1,
  71. "arraySpltType": "len",
  72. "stream": false,
  73. "addname": "",
  74. "x": 510,
  75. "y": 80,
  76. "wires": [
  77. [
  78. "b249af28.d8cb98",
  79. "911943bf.375648",
  80. "57eedad6.3fcc7c",
  81. "3cfd061c.04627a",
  82. "16d5ea54.eb9b06",
  83. "eb0b42cd.95a43",
  84. "232c352c.97a3aa"
  85. ]
  86. ]
  87. },
  88. {
  89. "id": "b249af28.d8cb98",
  90. "type": "switch",
  91. "z": "2a8b02ca.5fe626",
  92. "name": "Sky temp",
  93. "property": "payload",
  94. "propertyType": "msg",
  95. "rules": [
  96. {
  97. "t": "cont",
  98. "v": "clouds=",
  99. "vt": "str"
  100. }
  101. ],
  102. "checkall": "true",
  103. "repair": false,
  104. "outputs": 1,
  105. "x": 680,
  106. "y": 80,
  107. "wires": [
  108. [
  109. "490dfc4b.3723e4"
  110. ]
  111. ]
  112. },
  113. {
  114. "id": "490dfc4b.3723e4",
  115. "type": "function",
  116. "z": "2a8b02ca.5fe626",
  117. "name": "Get the value",
  118. "func": "msg.splitted = msg.payload.split(\"=\");\nmsg.payload = msg.splitted[1] * 9 / 5 + 32;\nmsg.topic = \"Sky\";\nreturn msg;",
  119. "outputs": 1,
  120. "noerr": 0,
  121. "initialize": "",
  122. "finalize": "",
  123. "libs": [],
  124. "x": 860,
  125. "y": 80,
  126. "wires": [
  127. [
  128. "405c85dc.d9315c",
  129. "7c8fa3a5782168b2",
  130. "81a496cb18d389cb"
  131. ]
  132. ]
  133. },
  134. {
  135. "id": "11ad28c8.47b987",
  136. "type": "ui_chart",
  137. "z": "2a8b02ca.5fe626",
  138. "name": "Wind History",
  139. "group": "dc0984f6.cbae78",
  140. "order": 20,
  141. "width": 14,
  142. "height": 5,
  143. "label": "Wind History",
  144. "chartType": "line",
  145. "legend": "false",
  146. "xformat": "HH:mm:ss",
  147. "interpolate": "linear",
  148. "nodata": "",
  149. "dot": false,
  150. "ymin": "0",
  151. "ymax": "50",
  152. "removeOlder": "1",
  153. "removeOlderPoints": "",
  154. "removeOlderUnit": "86400",
  155. "cutout": 0,
  156. "useOneColor": false,
  157. "useUTC": false,
  158. "colors": [
  159. "#fafafa",
  160. "#ff0f0f",
  161. "#787878",
  162. "#fafafa",
  163. "#ff9896",
  164. "#787878",
  165. "#ff9896",
  166. "#9467bd",
  167. "#c5b0d5"
  168. ],
  169. "outputs": 1,
  170. "useDifferentColor": false,
  171. "className": "",
  172. "x": 1110,
  173. "y": 280,
  174. "wires": [
  175. []
  176. ],
  177. "info": "MPH"
  178. },
  179. {
  180. "id": "41bd3758.a1e248",
  181. "type": "function",
  182. "z": "2a8b02ca.5fe626",
  183. "name": "Get the value",
  184. "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1] * 0.621371;\nmsg.topic = \"Wind\";\nreturn msg;",
  185. "outputs": 1,
  186. "noerr": 0,
  187. "initialize": "",
  188. "finalize": "",
  189. "libs": [],
  190. "x": 870,
  191. "y": 220,
  192. "wires": [
  193. [
  194. "11ad28c8.47b987",
  195. "ab6551534cddcb92"
  196. ]
  197. ]
  198. },
  199. {
  200. "id": "911943bf.375648",
  201. "type": "switch",
  202. "z": "2a8b02ca.5fe626",
  203. "name": "Wind speed",
  204. "property": "payload",
  205. "propertyType": "msg",
  206. "rules": [
  207. {
  208. "t": "cont",
  209. "v": "wind",
  210. "vt": "str"
  211. }
  212. ],
  213. "checkall": "true",
  214. "repair": false,
  215. "outputs": 1,
  216. "x": 690,
  217. "y": 200,
  218. "wires": [
  219. [
  220. "41bd3758.a1e248",
  221. "2e60f98ae28c395d"
  222. ]
  223. ]
  224. },
  225. {
  226. "id": "57eedad6.3fcc7c",
  227. "type": "switch",
  228. "z": "2a8b02ca.5fe626",
  229. "name": "Ambient",
  230. "property": "payload",
  231. "propertyType": "msg",
  232. "rules": [
  233. {
  234. "t": "cont",
  235. "v": "temp=",
  236. "vt": "str"
  237. }
  238. ],
  239. "checkall": "true",
  240. "repair": false,
  241. "outputs": 1,
  242. "x": 680,
  243. "y": 120,
  244. "wires": [
  245. [
  246. "faeb7e0b.baa44"
  247. ]
  248. ]
  249. },
  250. {
  251. "id": "faeb7e0b.baa44",
  252. "type": "function",
  253. "z": "2a8b02ca.5fe626",
  254. "name": "Get the value",
  255. "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1]*9/5+32;\nmsg.topic = \"Ambient\";\nreturn msg;",
  256. "outputs": 1,
  257. "noerr": 0,
  258. "initialize": "",
  259. "finalize": "",
  260. "libs": [],
  261. "x": 870,
  262. "y": 120,
  263. "wires": [
  264. [
  265. "405c85dc.d9315c",
  266. "dd5da46eef95e760"
  267. ]
  268. ]
  269. },
  270. {
  271. "id": "405c85dc.d9315c",
  272. "type": "ui_chart",
  273. "z": "2a8b02ca.5fe626",
  274. "name": "Temperature History",
  275. "group": "dc0984f6.cbae78",
  276. "order": 22,
  277. "width": 14,
  278. "height": 5,
  279. "label": "Temperature History",
  280. "chartType": "line",
  281. "legend": "false",
  282. "xformat": "HH:mm:ss",
  283. "interpolate": "linear",
  284. "nodata": "",
  285. "dot": false,
  286. "ymin": "-50",
  287. "ymax": "115",
  288. "removeOlder": "1",
  289. "removeOlderPoints": "",
  290. "removeOlderUnit": "86400",
  291. "cutout": 0,
  292. "useOneColor": false,
  293. "useUTC": false,
  294. "colors": [
  295. "#00ffe1",
  296. "#2ac00c",
  297. "#919191",
  298. "#34ea10",
  299. "#98df8a",
  300. "#d62728",
  301. "#ff9896",
  302. "#9467bd",
  303. "#c5b0d5"
  304. ],
  305. "outputs": 1,
  306. "useDifferentColor": false,
  307. "className": "",
  308. "x": 1120,
  309. "y": 140,
  310. "wires": [
  311. []
  312. ]
  313. },
  314. {
  315. "id": "fd03b3c7.8e64b8",
  316. "type": "ui_gauge",
  317. "z": "2a8b02ca.5fe626",
  318. "name": "Wind Gust",
  319. "group": "dc0984f6.cbae78",
  320. "order": 9,
  321. "width": 3,
  322. "height": 3,
  323. "gtype": "gage",
  324. "title": "Gust",
  325. "label": "MPH",
  326. "format": "{{value|number:1}}",
  327. "min": "0",
  328. "max": "50",
  329. "colors": [
  330. "#2ce272",
  331. "#eeba58",
  332. "#ff0000"
  333. ],
  334. "seg1": "13",
  335. "seg2": "20",
  336. "className": "",
  337. "x": 1090,
  338. "y": 240,
  339. "wires": [],
  340. "inputLabels": [
  341. "msg.payload"
  342. ]
  343. },
  344. {
  345. "id": "3cfd061c.04627a",
  346. "type": "switch",
  347. "z": "2a8b02ca.5fe626",
  348. "name": "Wind gust",
  349. "property": "payload",
  350. "propertyType": "msg",
  351. "rules": [
  352. {
  353. "t": "cont",
  354. "v": "gust",
  355. "vt": "str"
  356. }
  357. ],
  358. "checkall": "true",
  359. "repair": false,
  360. "outputs": 1,
  361. "x": 680,
  362. "y": 240,
  363. "wires": [
  364. [
  365. "e45b502c.11e3a8"
  366. ]
  367. ]
  368. },
  369. {
  370. "id": "e45b502c.11e3a8",
  371. "type": "function",
  372. "z": "2a8b02ca.5fe626",
  373. "name": "Get the value",
  374. "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1]*0.621371;\nmsg.topic=\"Gust\";\nreturn msg;",
  375. "outputs": 1,
  376. "noerr": 0,
  377. "initialize": "",
  378. "finalize": "",
  379. "libs": [],
  380. "x": 870,
  381. "y": 260,
  382. "wires": [
  383. [
  384. "fd03b3c7.8e64b8",
  385. "11ad28c8.47b987"
  386. ]
  387. ]
  388. },
  389. {
  390. "id": "eb0b42cd.95a43",
  391. "type": "switch",
  392. "z": "2a8b02ca.5fe626",
  393. "name": "Light",
  394. "property": "payload",
  395. "propertyType": "msg",
  396. "rules": [
  397. {
  398. "t": "cont",
  399. "v": "light",
  400. "vt": "str"
  401. }
  402. ],
  403. "checkall": "true",
  404. "repair": false,
  405. "outputs": 1,
  406. "x": 670,
  407. "y": 460,
  408. "wires": [
  409. [
  410. "dc128149.203448"
  411. ]
  412. ]
  413. },
  414. {
  415. "id": "16d5ea54.eb9b06",
  416. "type": "switch",
  417. "z": "2a8b02ca.5fe626",
  418. "name": "Safe",
  419. "property": "payload",
  420. "propertyType": "msg",
  421. "rules": [
  422. {
  423. "t": "cont",
  424. "v": "safe",
  425. "vt": "str"
  426. }
  427. ],
  428. "checkall": "true",
  429. "repair": false,
  430. "outputs": 1,
  431. "x": 670,
  432. "y": 540,
  433. "wires": [
  434. [
  435. "a8df9c0f.e188a8"
  436. ]
  437. ]
  438. },
  439. {
  440. "id": "232c352c.97a3aa",
  441. "type": "switch",
  442. "z": "2a8b02ca.5fe626",
  443. "name": "Rain",
  444. "property": "payload",
  445. "propertyType": "msg",
  446. "rules": [
  447. {
  448. "t": "cont",
  449. "v": "rain",
  450. "vt": "str"
  451. }
  452. ],
  453. "checkall": "true",
  454. "repair": false,
  455. "outputs": 1,
  456. "x": 670,
  457. "y": 340,
  458. "wires": [
  459. [
  460. "623d83ba.b8d834"
  461. ]
  462. ]
  463. },
  464. {
  465. "id": "a8df9c0f.e188a8",
  466. "type": "function",
  467. "z": "2a8b02ca.5fe626",
  468. "name": "Get the value",
  469. "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nif ( parseInt( msg.payload) === 0) {\n msg.payload = \"Unsafe\";\n msg.color = \"red\" \n} else {\n msg.payload = \"Safe\";\n msg.color = \"#EFEFEF\"\n}\nreturn msg;",
  470. "outputs": 1,
  471. "noerr": 0,
  472. "initialize": "",
  473. "finalize": "",
  474. "libs": [],
  475. "x": 850,
  476. "y": 540,
  477. "wires": [
  478. [
  479. "995f122ac631455f"
  480. ]
  481. ]
  482. },
  483. {
  484. "id": "dc128149.203448",
  485. "type": "function",
  486. "z": "2a8b02ca.5fe626",
  487. "name": "Get the value",
  488. "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nmsg.topic = \"Light\";\nreturn msg;",
  489. "outputs": 1,
  490. "noerr": 0,
  491. "initialize": "",
  492. "finalize": "",
  493. "libs": [],
  494. "x": 850,
  495. "y": 460,
  496. "wires": [
  497. [
  498. "a052e7e1f59dbe80",
  499. "ef7e80efa50cfba6"
  500. ]
  501. ]
  502. },
  503. {
  504. "id": "623d83ba.b8d834",
  505. "type": "function",
  506. "z": "2a8b02ca.5fe626",
  507. "name": "Get the value",
  508. "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nreturn msg;",
  509. "outputs": 1,
  510. "noerr": 0,
  511. "initialize": "",
  512. "finalize": "",
  513. "libs": [],
  514. "x": 850,
  515. "y": 340,
  516. "wires": [
  517. [
  518. "d971640f73d07862",
  519. "d4c3cfac51dc218b"
  520. ]
  521. ]
  522. },
  523. {
  524. "id": "18ba1e16.c3d6c2",
  525. "type": "ui_text",
  526. "z": "2a8b02ca.5fe626",
  527. "group": "dc0984f6.cbae78",
  528. "order": 3,
  529. "width": 1,
  530. "height": 1,
  531. "name": "Light",
  532. "label": "",
  533. "format": "<font color={{msg.color}} size=\"+2\">{{msg.payload}}</font>",
  534. "layout": "col-center",
  535. "className": "",
  536. "x": 1250,
  537. "y": 420,
  538. "wires": []
  539. },
  540. {
  541. "id": "ecb5fcbf.781158",
  542. "type": "ui_text",
  543. "z": "2a8b02ca.5fe626",
  544. "group": "dc0984f6.cbae78",
  545. "order": 2,
  546. "width": 1,
  547. "height": 1,
  548. "name": "Precip",
  549. "label": "",
  550. "format": "<font color={{msg.color}} size=\"+2\">{{msg.payload}}</font>",
  551. "layout": "col-center",
  552. "className": "",
  553. "x": 1270,
  554. "y": 340,
  555. "wires": []
  556. },
  557. {
  558. "id": "ab6551534cddcb92",
  559. "type": "ui_gauge",
  560. "z": "2a8b02ca.5fe626",
  561. "name": "Wind Speed",
  562. "group": "dc0984f6.cbae78",
  563. "order": 8,
  564. "width": 3,
  565. "height": 3,
  566. "gtype": "gage",
  567. "title": "Wind Speed",
  568. "label": "MPH",
  569. "format": "{{value|number:1}}",
  570. "min": "0",
  571. "max": "50",
  572. "colors": [
  573. "#2ce272",
  574. "#eeba58",
  575. "#ff0000"
  576. ],
  577. "seg1": "9",
  578. "seg2": "14",
  579. "className": "",
  580. "x": 1090,
  581. "y": 200,
  582. "wires": [],
  583. "inputLabels": [
  584. "msg.payload"
  585. ]
  586. },
  587. {
  588. "id": "d971640f73d07862",
  589. "type": "ui_chart",
  590. "z": "2a8b02ca.5fe626",
  591. "name": "Precipitation History",
  592. "group": "dc0984f6.cbae78",
  593. "order": 21,
  594. "width": 14,
  595. "height": 5,
  596. "label": "Precipitation History",
  597. "chartType": "line",
  598. "legend": "false",
  599. "xformat": "HH:mm:ss",
  600. "interpolate": "linear",
  601. "nodata": "",
  602. "dot": false,
  603. "ymin": "0",
  604. "ymax": "5000",
  605. "removeOlder": 1,
  606. "removeOlderPoints": "",
  607. "removeOlderUnit": "86400",
  608. "cutout": 0,
  609. "useOneColor": false,
  610. "useUTC": false,
  611. "colors": [
  612. "#1f77b4",
  613. "#aec7e8",
  614. "#ff7f0e",
  615. "#2ca02c",
  616. "#98df8a",
  617. "#d62728",
  618. "#ff9896",
  619. "#9467bd",
  620. "#c5b0d5"
  621. ],
  622. "outputs": 1,
  623. "useDifferentColor": false,
  624. "className": "",
  625. "x": 1100,
  626. "y": 380,
  627. "wires": [
  628. []
  629. ]
  630. },
  631. {
  632. "id": "bc9abb7205fdc08d",
  633. "type": "function",
  634. "z": "2a8b02ca.5fe626",
  635. "name": "Get the value",
  636. "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nmsg.topic = \"Precipitation\";\nreturn msg;",
  637. "outputs": 1,
  638. "noerr": 0,
  639. "initialize": "",
  640. "finalize": "",
  641. "libs": [],
  642. "x": 850,
  643. "y": 340,
  644. "wires": [
  645. []
  646. ]
  647. },
  648. {
  649. "id": "d4c3cfac51dc218b",
  650. "type": "function",
  651. "z": "2a8b02ca.5fe626",
  652. "name": "Make status",
  653. "func": "if (msg.payload > 3199) {\n msg.payload = \"Dry\";\n msg.color = \"#EFEFEF\";\n}\nelse if (msg.payload > 2799) {\n msg.payload = \"Dew\";\n msg.color = \"#EFEFEF\"\n}\nelse {\n msg.payload = \"Rain\";\n msg.color = \"red\";\n}\nreturn msg;",
  654. "outputs": 1,
  655. "noerr": 0,
  656. "initialize": "",
  657. "finalize": "",
  658. "libs": [],
  659. "x": 1070,
  660. "y": 340,
  661. "wires": [
  662. [
  663. "ecb5fcbf.781158"
  664. ]
  665. ]
  666. },
  667. {
  668. "id": "dd5da46eef95e760",
  669. "type": "ui_gauge",
  670. "z": "2a8b02ca.5fe626",
  671. "name": "Temp",
  672. "group": "dc0984f6.cbae78",
  673. "order": 10,
  674. "width": 3,
  675. "height": 3,
  676. "gtype": "gage",
  677. "title": "Temp",
  678. "label": "F",
  679. "format": "{{value|number:1}}",
  680. "min": "-40",
  681. "max": "120",
  682. "colors": [
  683. "#94dfff",
  684. "#e6b400",
  685. "#ca3838"
  686. ],
  687. "seg1": "50",
  688. "seg2": "80",
  689. "className": "",
  690. "x": 1070,
  691. "y": 100,
  692. "wires": [],
  693. "inputLabels": [
  694. "msg.payload"
  695. ]
  696. },
  697. {
  698. "id": "a052e7e1f59dbe80",
  699. "type": "ui_chart",
  700. "z": "2a8b02ca.5fe626",
  701. "name": "Light History",
  702. "group": "dc0984f6.cbae78",
  703. "order": 23,
  704. "width": 14,
  705. "height": 5,
  706. "label": "Light History",
  707. "chartType": "line",
  708. "legend": "false",
  709. "xformat": "HH:mm:ss",
  710. "interpolate": "linear",
  711. "nodata": "",
  712. "dot": false,
  713. "ymin": "0",
  714. "ymax": "60000",
  715. "removeOlder": 1,
  716. "removeOlderPoints": "",
  717. "removeOlderUnit": "86400",
  718. "cutout": 0,
  719. "useOneColor": false,
  720. "useUTC": false,
  721. "colors": [
  722. "#ffea00",
  723. "#aec7e8",
  724. "#ff7f0e",
  725. "#2ca02c",
  726. "#98df8a",
  727. "#d62728",
  728. "#ff9896",
  729. "#9467bd",
  730. "#c5b0d5"
  731. ],
  732. "outputs": 1,
  733. "useDifferentColor": false,
  734. "className": "",
  735. "x": 1090,
  736. "y": 460,
  737. "wires": [
  738. []
  739. ]
  740. },
  741. {
  742. "id": "c6409890b9f89df6",
  743. "type": "ui_text",
  744. "z": "2a8b02ca.5fe626",
  745. "group": "dc0984f6.cbae78",
  746. "order": 4,
  747. "width": 1,
  748. "height": 1,
  749. "name": "Clouds",
  750. "label": "",
  751. "format": "<font color={{msg.color}} size=\"+2\">{{msg.payload}}</font>",
  752. "layout": "col-center",
  753. "className": "",
  754. "x": 1280,
  755. "y": 20,
  756. "wires": []
  757. },
  758. {
  759. "id": "995f122ac631455f",
  760. "type": "ui_text",
  761. "z": "2a8b02ca.5fe626",
  762. "group": "dc0984f6.cbae78",
  763. "order": 5,
  764. "width": 1,
  765. "height": 1,
  766. "name": "Safe",
  767. "label": "",
  768. "format": "<font color={{msg.color}} size=\"+2\">{{msg.payload}}</font>",
  769. "layout": "col-center",
  770. "className": "",
  771. "x": 1270,
  772. "y": 540,
  773. "wires": []
  774. },
  775. {
  776. "id": "ef7e80efa50cfba6",
  777. "type": "function",
  778. "z": "2a8b02ca.5fe626",
  779. "name": "Make status",
  780. "func": "if (msg.payload > 3199) {\n msg.payload = \"Dark\";\n msg.color = \"#EFEFEF\";\n}\nelse {\n msg.payload = \"Light\";\n msg.color = \"yellow\";\n}\nreturn msg;",
  781. "outputs": 1,
  782. "noerr": 0,
  783. "initialize": "",
  784. "finalize": "",
  785. "libs": [],
  786. "x": 1090,
  787. "y": 420,
  788. "wires": [
  789. [
  790. "18ba1e16.c3d6c2"
  791. ]
  792. ]
  793. },
  794. {
  795. "id": "7c8fa3a5782168b2",
  796. "type": "function",
  797. "z": "2a8b02ca.5fe626",
  798. "name": "Make status",
  799. "func": "if (msg.payload > 0) {\n msg.payload = \"Clear\";\n msg.color = \"#EFEFEF\";\n} \nelse {\n msg.payload = \"Cloudy\";\n msg.color = \"red\"\n}\nreturn msg;",
  800. "outputs": 1,
  801. "noerr": 0,
  802. "initialize": "",
  803. "finalize": "",
  804. "libs": [],
  805. "x": 1150,
  806. "y": 20,
  807. "wires": [
  808. [
  809. "c6409890b9f89df6"
  810. ]
  811. ]
  812. },
  813. {
  814. "id": "84d5f8cd91983c52",
  815. "type": "ui_template",
  816. "z": "2a8b02ca.5fe626",
  817. "group": "dc0984f6.cbae78",
  818. "name": "moon",
  819. "order": 12,
  820. "width": 3,
  821. "height": 4,
  822. "format": "<div style=\"font-size: 144px; text-align: center; vertical-align: center\">\n <i class=\"wi {{msg.payload}}\"></i>\n</div>",
  823. "storeOutMessages": true,
  824. "fwdInMessages": false,
  825. "resendOnRefresh": true,
  826. "templateScope": "local",
  827. "className": "",
  828. "x": 450,
  829. "y": 380,
  830. "wires": [
  831. []
  832. ]
  833. },
  834. {
  835. "id": "beacc2947ed75bd4",
  836. "type": "function",
  837. "z": "2a8b02ca.5fe626",
  838. "name": "calc phase",
  839. "func": "msg.now = new Date;\nmsg.unixnow = Math.round(msg.now.getTime() / 1000);\n\n// The duration in days of a lunar cycle\nmsg.lunardays = 29.53058770576;\n\n// Seconds in lunar cycle\nmsg.lunarsecs = msg.lunardays * (24 * 60 * 60);\n\n// Date time of first new moon in year 2000\nmsg.then = new Date(2000, 1, 6, 12, 14, 0, 0);\nmsg.unixthen = Math.round(msg.then.getTime() / 1000);\n\n\n// Calculate seconds between date and new moon 2000\nmsg.totalsecs = msg.unixnow - msg.unixthen;\n\n// Calculate modulus to drop completed cycles\n// Note: for real numbers use fmod() instead of % operator\nmsg.currentsecs = msg.totalsecs % msg.lunarsecs;\n\n// If negative number (date before new moon 2000) add $lunarsecs\nif (msg.currentsecs < 0) {\n msg.currentsecs += msg.lunarsecs;\n}\n\n// Calculate the fraction of the moon cycle\nmsg.currentfrac = msg.currentsecs / msg.lunarsecs;\n\n// Calculate days in current cycle (moon age)\nmsg.currentdays = msg.currentfrac * msg.lunardays;\n//msg.payload=msg.currentdays;\n//return msg;\n\nif (msg.currentdays <= 1) {\n msg.payload = \"wi-moon-new-dark\";\n msg.phase = \"New Moon\";\n} else if (msg.currentdays <= 1.638264692644) {\n msg.payload = \"wi-wax-cres-dark\";\n msg.phase = \"Waxing Crescent\";\n} else if (msg.currentdays <= 8.38264692644) { \n msg.payload = \"wi-moon-first-quart-dark\";\n msg.phase = \"First Quarter\";\n} else if (msg.currentdays <= 13.76529385288) {\n msg.payload = \"wi-moon-wax-gibb-dark\";\n msg.phase = \"Waxing Gibbous\";\n} else if (msg.currentdays <=15.76529385288) {\n msg.payload = \"wi-moon-full-dark\";\n msg.phase = \"Full Moon\";\n} else if (msg.currentdays <= 21.14784077932) {\n msg.payload = \"wi-moon-wan-gibb-dark\";\n msg.phase = \"Waning Gibbous\";\n} else if (msg.currentdays <= 23.14794077932) {\n msg.payload = \"wi-moon-third-quart-dark\";\n msg.phase = \"Third Quarter\";\n} else if (msg.currentdays <= 28.53058770576) {\n msg.payload = \"wi-moon-wan-cres-dark\";\n msg.phase = \"Waning Cresent\";\n} else {\n msg.payload = \"wi-moon-new-dark\";\n}\n /*\n\n\n \n (\n array(\"new\", 0, 1),\n array(\"waxing crescent\", 1, 6.38264692644),\n array(\"first quarter\", 6.38264692644, 8.38264692644),\n array(\"waxing gibbous\", 8.38264692644, 13.76529385288),\n array(\"full\", 13.76529385288, 15.76529385288),\n array(\"waning gibbous\", 15.76529385288, 21.14794077932),\n array(\"last quarter\", 21.14794077932, 23.14794077932),\n array(\"waning crescent\", 23.14794077932, 28.53058770576),\n array(\"new\", 28.53058770576, 29.53058770576),\n );\n\n// Find current phase in the array\nfor ($i = 0; $i < 9; $i++) {\n if (($currentdays >= $phases[$i][1]) && ($currentdays <= $phases[$i][2])) {\n $thephase = $phases[$i][0];\n break;\n }\n}*/\n\n\nreturn msg;\n",
  840. "outputs": 1,
  841. "noerr": 0,
  842. "initialize": "",
  843. "finalize": "",
  844. "libs": [],
  845. "x": 190,
  846. "y": 380,
  847. "wires": [
  848. [
  849. "84d5f8cd91983c52",
  850. "afcfbf2bc4831528"
  851. ]
  852. ]
  853. },
  854. {
  855. "id": "68d4b086dd06e122",
  856. "type": "http request",
  857. "z": "2a8b02ca.5fe626",
  858. "name": "config.pl",
  859. "method": "GET",
  860. "ret": "txt",
  861. "paytoqs": "ignore",
  862. "url": "http://192.168.1.215/cgi-bin/config.pl",
  863. "tls": "",
  864. "persist": false,
  865. "proxy": "",
  866. "insecureHTTPParser": false,
  867. "authType": "basic",
  868. "senderr": false,
  869. "headers": [],
  870. "x": 320,
  871. "y": 140,
  872. "wires": [
  873. [
  874. "51a55a599ccac9e8",
  875. "b0118a046bdab59b"
  876. ]
  877. ]
  878. },
  879. {
  880. "id": "51a55a599ccac9e8",
  881. "type": "split",
  882. "z": "2a8b02ca.5fe626",
  883. "name": "",
  884. "splt": "\\n",
  885. "spltType": "str",
  886. "arraySplt": 1,
  887. "arraySpltType": "len",
  888. "stream": false,
  889. "addname": "",
  890. "x": 470,
  891. "y": 140,
  892. "wires": [
  893. [
  894. "686ba038e60c5103",
  895. "6eec1904c749b1bb"
  896. ]
  897. ]
  898. },
  899. {
  900. "id": "ca50cb5bcea88b4f",
  901. "type": "inject",
  902. "z": "2a8b02ca.5fe626",
  903. "name": "5 minutes",
  904. "props": [
  905. {
  906. "p": "payload"
  907. },
  908. {
  909. "p": "topic",
  910. "vt": "str"
  911. }
  912. ],
  913. "repeat": "300",
  914. "crontab": "",
  915. "once": true,
  916. "onceDelay": "5",
  917. "topic": "",
  918. "payload": "",
  919. "payloadType": "str",
  920. "x": 150,
  921. "y": 460,
  922. "wires": [
  923. [
  924. "68d4b086dd06e122",
  925. "a4436576abb33f7c",
  926. "c67724ea8afa3192",
  927. "8b0450750ecafb6a",
  928. "c3beb69378b75b9b",
  929. "aee27c2a931e7560",
  930. "073acc5fce15b99b",
  931. "48d2ed481c3805ce"
  932. ]
  933. ]
  934. },
  935. {
  936. "id": "686ba038e60c5103",
  937. "type": "switch",
  938. "z": "2a8b02ca.5fe626",
  939. "name": "Wind limit",
  940. "property": "payload",
  941. "propertyType": "msg",
  942. "rules": [
  943. {
  944. "t": "cont",
  945. "v": "Sw_Wind=",
  946. "vt": "str"
  947. }
  948. ],
  949. "checkall": "true",
  950. "repair": false,
  951. "outputs": 1,
  952. "x": 680,
  953. "y": 160,
  954. "wires": [
  955. [
  956. "14033dd4fdd4753b"
  957. ]
  958. ]
  959. },
  960. {
  961. "id": "14033dd4fdd4753b",
  962. "type": "function",
  963. "z": "2a8b02ca.5fe626",
  964. "name": "Get the value",
  965. "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1] * 0.621371;\nmsg.topic = \"Limit\";\nreturn msg;",
  966. "outputs": 1,
  967. "noerr": 0,
  968. "initialize": "",
  969. "finalize": "",
  970. "libs": [],
  971. "x": 870,
  972. "y": 180,
  973. "wires": [
  974. [
  975. "11ad28c8.47b987"
  976. ]
  977. ]
  978. },
  979. {
  980. "id": "6eec1904c749b1bb",
  981. "type": "switch",
  982. "z": "2a8b02ca.5fe626",
  983. "name": "Cloud limit",
  984. "property": "payload",
  985. "propertyType": "msg",
  986. "rules": [
  987. {
  988. "t": "cont",
  989. "v": "Sw_Clouds=",
  990. "vt": "str"
  991. }
  992. ],
  993. "checkall": "true",
  994. "repair": false,
  995. "outputs": 1,
  996. "x": 450,
  997. "y": 200,
  998. "wires": [
  999. [
  1000. "5a1ae7a4e274001d"
  1001. ]
  1002. ]
  1003. },
  1004. {
  1005. "id": "5a1ae7a4e274001d",
  1006. "type": "function",
  1007. "z": "2a8b02ca.5fe626",
  1008. "name": "Get the value",
  1009. "func": "msg.splitted = msg.payload.split(\"=\");\nmsg.payload = msg.splitted[1] * 9 / 5 + 32;\nmsg.topic = \"Limit\";\nreturn msg;",
  1010. "outputs": 1,
  1011. "noerr": 0,
  1012. "initialize": "",
  1013. "finalize": "",
  1014. "libs": [],
  1015. "x": 610,
  1016. "y": 280,
  1017. "wires": [
  1018. [
  1019. "405c85dc.d9315c"
  1020. ]
  1021. ]
  1022. },
  1023. {
  1024. "id": "a4436576abb33f7c",
  1025. "type": "ui_template",
  1026. "z": "2a8b02ca.5fe626",
  1027. "group": "dc0984f6.cbae78",
  1028. "name": "script",
  1029. "order": 24,
  1030. "width": 0,
  1031. "height": 0,
  1032. "format": "<script type=\"text/javascript\"\n src=\"https://astrosphericcloudstorage.blob.core.windows.net/embed/astrosphericembed.js\" />",
  1033. "storeOutMessages": true,
  1034. "fwdInMessages": true,
  1035. "resendOnRefresh": true,
  1036. "templateScope": "global",
  1037. "className": "",
  1038. "x": 390,
  1039. "y": 460,
  1040. "wires": [
  1041. []
  1042. ]
  1043. },
  1044. {
  1045. "id": "c67724ea8afa3192",
  1046. "type": "ui_template",
  1047. "z": "2a8b02ca.5fe626",
  1048. "group": "dc0984f6.cbae78",
  1049. "name": "astrospheric",
  1050. "order": 6,
  1051. "width": 8,
  1052. "height": 14,
  1053. "format": "<!--Create a div for the Astrospheric Control to live in -->\n<div id=\"AstrosphericEmbedContainer\">\n</div>\n\n<!--Now setup the control with the Javascript API -->\n<script type=\"text/javascript\">\n // Initialize the control\n\t\t\tm_AstrosphericEmbed.Create(\"AstrosphericEmbedContainer\", {{payload}}, {{long}});\n\n</script>",
  1054. "storeOutMessages": true,
  1055. "fwdInMessages": false,
  1056. "resendOnRefresh": true,
  1057. "templateScope": "local",
  1058. "className": "",
  1059. "x": 370,
  1060. "y": 540,
  1061. "wires": [
  1062. []
  1063. ]
  1064. },
  1065. {
  1066. "id": "81a496cb18d389cb",
  1067. "type": "ui_gauge",
  1068. "z": "2a8b02ca.5fe626",
  1069. "name": "Sky Temp",
  1070. "group": "dc0984f6.cbae78",
  1071. "order": 11,
  1072. "width": 3,
  1073. "height": 3,
  1074. "gtype": "gage",
  1075. "title": "Sky Temp",
  1076. "label": "F",
  1077. "format": "{{value|number:1}}",
  1078. "min": "-40",
  1079. "max": "120",
  1080. "colors": [
  1081. "#94dfff",
  1082. "#e6b400",
  1083. "#ca3838"
  1084. ],
  1085. "seg1": "50",
  1086. "seg2": "80",
  1087. "className": "",
  1088. "x": 1240,
  1089. "y": 100,
  1090. "wires": [],
  1091. "inputLabels": [
  1092. "msg.payload"
  1093. ]
  1094. },
  1095. {
  1096. "id": "2e60f98ae28c395d",
  1097. "type": "function",
  1098. "z": "2a8b02ca.5fe626",
  1099. "name": "Make status",
  1100. "func": "if (msg.payload > 14) {\n msg.payload = \"Very Windy\";\n msg.color = \"red\";\n}\nelse if (msg.payload > 9) {\n msg.payload = \"Windy\";\n msg.color = \"yellow\"\n}\nelse {\n msg.payload = \"Calm\";\n msg.color = \"#EFEFEF\";\n}\nreturn msg;",
  1101. "outputs": 1,
  1102. "noerr": 0,
  1103. "initialize": "",
  1104. "finalize": "",
  1105. "libs": [],
  1106. "x": 1250,
  1107. "y": 220,
  1108. "wires": [
  1109. [
  1110. "fabd3a86aba31870"
  1111. ]
  1112. ]
  1113. },
  1114. {
  1115. "id": "fabd3a86aba31870",
  1116. "type": "ui_text",
  1117. "z": "2a8b02ca.5fe626",
  1118. "group": "dc0984f6.cbae78",
  1119. "order": 1,
  1120. "width": 2,
  1121. "height": 1,
  1122. "name": "Wind",
  1123. "label": "",
  1124. "format": "<font color={{msg.color}} size=\"+2\">{{msg.payload}}</font>",
  1125. "layout": "col-center",
  1126. "className": "",
  1127. "x": 1330,
  1128. "y": 280,
  1129. "wires": []
  1130. },
  1131. {
  1132. "id": "afcfbf2bc4831528",
  1133. "type": "ui_text",
  1134. "z": "2a8b02ca.5fe626",
  1135. "group": "dc0984f6.cbae78",
  1136. "order": 17,
  1137. "width": 3,
  1138. "height": 1,
  1139. "name": "Phase",
  1140. "label": "",
  1141. "format": "<font size=\"+2\">{{msg.phase}}</font>",
  1142. "layout": "col-center",
  1143. "className": "",
  1144. "x": 510,
  1145. "y": 420,
  1146. "wires": []
  1147. },
  1148. {
  1149. "id": "fcdd5d492edb480d",
  1150. "type": "debug",
  1151. "z": "2a8b02ca.5fe626",
  1152. "name": "debug 1",
  1153. "active": true,
  1154. "tosidebar": true,
  1155. "console": false,
  1156. "tostatus": false,
  1157. "complete": "true",
  1158. "targetType": "full",
  1159. "statusVal": "",
  1160. "statusType": "auto",
  1161. "x": 440,
  1162. "y": 640,
  1163. "wires": []
  1164. },
  1165. {
  1166. "id": "b0118a046bdab59b",
  1167. "type": "function",
  1168. "z": "2a8b02ca.5fe626",
  1169. "name": "Lat/Long",
  1170. "func": "msg.lines = msg.payload.split(\"\\n\");\nfor (msg.i=0; msg.i<msg.lines.length; msg.i++) {\n msg.pair = msg.lines[msg.i].split(\"=\");\n if (msg.pair[0] == \"Latitude\") {\n msg.lat = Number(msg.pair[1]);\n } \n if (msg.pair[0] == \"Longitude\") {\n msg.long = Number(msg.pair[1]);\n }\n}\nmsg.payload = msg.lat;\nreturn msg;",
  1171. "outputs": 1,
  1172. "noerr": 0,
  1173. "initialize": "",
  1174. "finalize": "",
  1175. "libs": [],
  1176. "x": 160,
  1177. "y": 680,
  1178. "wires": [
  1179. [
  1180. "c67724ea8afa3192",
  1181. "fcdd5d492edb480d"
  1182. ]
  1183. ]
  1184. },
  1185. {
  1186. "id": "e19f826d4076368e",
  1187. "type": "ui_text",
  1188. "z": "2a8b02ca.5fe626",
  1189. "group": "dc0984f6.cbae78",
  1190. "order": 15,
  1191. "width": 3,
  1192. "height": 1,
  1193. "name": "Moonrise",
  1194. "label": "<font size=\"+2\">Moonrise:</font>",
  1195. "format": "<font size=\"+2\">{{msg.payload}}</font>",
  1196. "layout": "row-spread",
  1197. "className": "",
  1198. "x": 240,
  1199. "y": 780,
  1200. "wires": []
  1201. },
  1202. {
  1203. "id": "4cdd62346387b047",
  1204. "type": "ui_text",
  1205. "z": "2a8b02ca.5fe626",
  1206. "group": "dc0984f6.cbae78",
  1207. "order": 16,
  1208. "width": 3,
  1209. "height": 1,
  1210. "name": "Moonset",
  1211. "label": "<font size=\"+2\">Moonset:</font>",
  1212. "format": "<font size=\"+2\">{{msg.payload}}</font>",
  1213. "layout": "row-spread",
  1214. "className": "",
  1215. "x": 240,
  1216. "y": 820,
  1217. "wires": []
  1218. },
  1219. {
  1220. "id": "2ed1fc9fc3b18be0",
  1221. "type": "ui_text",
  1222. "z": "2a8b02ca.5fe626",
  1223. "group": "dc0984f6.cbae78",
  1224. "order": 13,
  1225. "width": 3,
  1226. "height": 1,
  1227. "name": "Sunset",
  1228. "label": "<font size=\"+2\">Sunset:</font>",
  1229. "format": "<font size=\"+2\">{{msg.payload}}</font>",
  1230. "layout": "row-spread",
  1231. "className": "",
  1232. "x": 240,
  1233. "y": 860,
  1234. "wires": []
  1235. },
  1236. {
  1237. "id": "fb58c01a301caf78",
  1238. "type": "ui_text",
  1239. "z": "2a8b02ca.5fe626",
  1240. "group": "dc0984f6.cbae78",
  1241. "order": 14,
  1242. "width": 3,
  1243. "height": 1,
  1244. "name": "Sunset",
  1245. "label": "<font size=\"+2\">Sunrise:</font>",
  1246. "format": "<font size=\"+2\">{{msg.payload}}</font>",
  1247. "layout": "row-spread",
  1248. "className": "",
  1249. "x": 240,
  1250. "y": 900,
  1251. "wires": []
  1252. },
  1253. {
  1254. "id": "fa9468f5551f22f4",
  1255. "type": "ui_text",
  1256. "z": "2a8b02ca.5fe626",
  1257. "group": "dc0984f6.cbae78",
  1258. "order": 18,
  1259. "width": 3,
  1260. "height": 1,
  1261. "name": "Illumination",
  1262. "label": "<font size=\"+2\">Illumination:</font>",
  1263. "format": "<font size=\"+2\">{{msg.payload}}</font>",
  1264. "layout": "row-spread",
  1265. "className": "",
  1266. "x": 250,
  1267. "y": 940,
  1268. "wires": []
  1269. },
  1270. {
  1271. "id": "48d2ed481c3805ce",
  1272. "type": "function",
  1273. "z": "2a8b02ca.5fe626",
  1274. "name": "function 1",
  1275. "func": "msg.payload = \"50%\"\nreturn msg;",
  1276. "outputs": 1,
  1277. "noerr": 0,
  1278. "initialize": "",
  1279. "finalize": "",
  1280. "libs": [],
  1281. "x": 80,
  1282. "y": 940,
  1283. "wires": [
  1284. [
  1285. "fa9468f5551f22f4"
  1286. ]
  1287. ]
  1288. },
  1289. {
  1290. "id": "8b0450750ecafb6a",
  1291. "type": "function",
  1292. "z": "2a8b02ca.5fe626",
  1293. "name": "function 2",
  1294. "func": "msg.payload = \"HH:MM\"\nreturn msg;",
  1295. "outputs": 1,
  1296. "noerr": 0,
  1297. "initialize": "",
  1298. "finalize": "",
  1299. "libs": [],
  1300. "x": 80,
  1301. "y": 780,
  1302. "wires": [
  1303. [
  1304. "e19f826d4076368e"
  1305. ]
  1306. ]
  1307. },
  1308. {
  1309. "id": "c3beb69378b75b9b",
  1310. "type": "function",
  1311. "z": "2a8b02ca.5fe626",
  1312. "name": "function 3",
  1313. "func": "msg.payload = \"HH:MM\"\nreturn msg;",
  1314. "outputs": 1,
  1315. "noerr": 0,
  1316. "initialize": "",
  1317. "finalize": "",
  1318. "libs": [],
  1319. "x": 80,
  1320. "y": 820,
  1321. "wires": [
  1322. [
  1323. "4cdd62346387b047"
  1324. ]
  1325. ]
  1326. },
  1327. {
  1328. "id": "aee27c2a931e7560",
  1329. "type": "function",
  1330. "z": "2a8b02ca.5fe626",
  1331. "name": "function 4",
  1332. "func": "msg.payload = \"HH:MM\"\nreturn msg;",
  1333. "outputs": 1,
  1334. "noerr": 0,
  1335. "initialize": "",
  1336. "finalize": "",
  1337. "libs": [],
  1338. "x": 80,
  1339. "y": 860,
  1340. "wires": [
  1341. [
  1342. "2ed1fc9fc3b18be0"
  1343. ]
  1344. ]
  1345. },
  1346. {
  1347. "id": "073acc5fce15b99b",
  1348. "type": "function",
  1349. "z": "2a8b02ca.5fe626",
  1350. "name": "function 5",
  1351. "func": "msg.payload = \"HH:MM\"\nreturn msg;",
  1352. "outputs": 1,
  1353. "noerr": 0,
  1354. "initialize": "",
  1355. "finalize": "",
  1356. "libs": [],
  1357. "x": 80,
  1358. "y": 900,
  1359. "wires": [
  1360. [
  1361. "fb58c01a301caf78"
  1362. ]
  1363. ]
  1364. },
  1365. {
  1366. "id": "f8964443d5522abd",
  1367. "type": "ui_spacer",
  1368. "z": "2a8b02ca.5fe626",
  1369. "name": "spacer",
  1370. "group": "dc0984f6.cbae78",
  1371. "order": 7,
  1372. "width": 6,
  1373. "height": 1
  1374. },
  1375. {
  1376. "id": "d77b7d4d57b4fd65",
  1377. "type": "ui_spacer",
  1378. "z": "2a8b02ca.5fe626",
  1379. "name": "spacer",
  1380. "group": "dc0984f6.cbae78",
  1381. "order": 19,
  1382. "width": 6,
  1383. "height": 1
  1384. },
  1385. {
  1386. "id": "dc0984f6.cbae78",
  1387. "type": "ui_group",
  1388. "name": "CloudWatcher Weather data",
  1389. "tab": "91f4bb8c.094048",
  1390. "order": 1,
  1391. "disp": true,
  1392. "width": "14",
  1393. "collapse": false
  1394. },
  1395. {
  1396. "id": "91f4bb8c.094048",
  1397. "type": "ui_tab",
  1398. "name": "My observatory",
  1399. "icon": "mi-home",
  1400. "order": 1,
  1401. "disabled": false,
  1402. "hidden": false
  1403. }
  1404. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement