25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

1030 satır
32 KiB

  1. [
  2. {
  3. "id": "f2fa6dd5ecc6fee9",
  4. "type": "tab",
  5. "label": "Input",
  6. "disabled": false,
  7. "info": ""
  8. },
  9. {
  10. "id": "c5f6844437dd47a5",
  11. "type": "tab",
  12. "label": "UI Elements",
  13. "disabled": false,
  14. "info": ""
  15. },
  16. {
  17. "id": "d354ea3adc51a23c",
  18. "type": "tab",
  19. "label": "Output",
  20. "disabled": false,
  21. "info": ""
  22. },
  23. {
  24. "id": "750cc01832709457",
  25. "type": "ui_base",
  26. "theme": {
  27. "name": "theme-dark",
  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. },
  34. "darkTheme": {
  35. "default": "#097479",
  36. "baseColor": "#097479",
  37. "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
  38. "edited": true,
  39. "reset": false
  40. },
  41. "customTheme": {
  42. "name": "Untitled Theme 1",
  43. "default": "#4B7930",
  44. "baseColor": "#4B7930",
  45. "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
  46. "reset": false
  47. },
  48. "themeState": {
  49. "base-color": {
  50. "default": "#097479",
  51. "value": "#097479",
  52. "edited": false
  53. },
  54. "page-titlebar-backgroundColor": {
  55. "value": "#097479",
  56. "edited": false
  57. },
  58. "page-backgroundColor": {
  59. "value": "#111111",
  60. "edited": false
  61. },
  62. "page-sidebar-backgroundColor": {
  63. "value": "#333333",
  64. "edited": false
  65. },
  66. "group-textColor": {
  67. "value": "#0eb8c0",
  68. "edited": false
  69. },
  70. "group-borderColor": {
  71. "value": "#555555",
  72. "edited": false
  73. },
  74. "group-backgroundColor": {
  75. "value": "#333333",
  76. "edited": false
  77. },
  78. "widget-textColor": {
  79. "value": "#eeeeee",
  80. "edited": false
  81. },
  82. "widget-backgroundColor": {
  83. "value": "#097479",
  84. "edited": false
  85. },
  86. "widget-borderColor": {
  87. "value": "#333333",
  88. "edited": false
  89. },
  90. "base-font": {
  91. "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
  92. }
  93. },
  94. "angularTheme": {
  95. "primary": "indigo",
  96. "accents": "blue",
  97. "warn": "red",
  98. "background": "grey",
  99. "palette": "light"
  100. }
  101. },
  102. "site": {
  103. "name": "Siegfried Dorn",
  104. "hideToolbar": "false",
  105. "allowSwipe": "false",
  106. "lockMenu": "true",
  107. "allowTempTheme": "none",
  108. "dateFormat": "DD.MM.YYYY",
  109. "sizes": {
  110. "sx": 48,
  111. "sy": 48,
  112. "gx": 6,
  113. "gy": 6,
  114. "cx": 6,
  115. "cy": 6,
  116. "px": 0,
  117. "py": 0
  118. }
  119. }
  120. },
  121. {
  122. "id": "124aa983647c8074",
  123. "type": "ui_tab",
  124. "name": "Tab 1",
  125. "icon": "dashboard",
  126. "order": 1
  127. },
  128. {
  129. "id": "a756759c113266b5",
  130. "type": "ui_group",
  131. "name": "Group 1",
  132. "tab": "124aa983647c8074",
  133. "order": 1,
  134. "disp": true,
  135. "width": "4",
  136. "collapse": true,
  137. "className": ""
  138. },
  139. {
  140. "id": "8dba3ccfebb75b33",
  141. "type": "ui_group",
  142. "name": "Windrichtung",
  143. "tab": "124aa983647c8074",
  144. "order": 3,
  145. "disp": true,
  146. "width": "5",
  147. "collapse": false,
  148. "className": ""
  149. },
  150. {
  151. "id": "738d12f3ae8a61a3",
  152. "type": "mqtt-broker",
  153. "name": "MQ Broker SDOIT",
  154. "broker": "mqtt.sdoit.de",
  155. "port": "8883",
  156. "tls": "182ecf262e314f5c",
  157. "clientid": "",
  158. "usetls": true,
  159. "protocolVersion": "4",
  160. "keepalive": "60",
  161. "cleansession": true,
  162. "birthTopic": "",
  163. "birthQos": "0",
  164. "birthPayload": "",
  165. "birthMsg": {},
  166. "closeTopic": "",
  167. "closeQos": "0",
  168. "closePayload": "",
  169. "closeMsg": {},
  170. "willTopic": "",
  171. "willQos": "0",
  172. "willPayload": "",
  173. "willMsg": {},
  174. "sessionExpiry": ""
  175. },
  176. {
  177. "id": "182ecf262e314f5c",
  178. "type": "tls-config",
  179. "name": "sdoit",
  180. "cert": "",
  181. "key": "",
  182. "ca": "",
  183. "certname": "",
  184. "keyname": "",
  185. "caname": "",
  186. "servername": "mqtt.sdoit.de",
  187. "verifyservercert": true,
  188. "alpnprotocol": ""
  189. },
  190. {
  191. "id": "ba6fd973118b950c",
  192. "type": "ui_tab",
  193. "name": "Tab 3",
  194. "icon": "dashboard",
  195. "order": 3
  196. },
  197. {
  198. "id": "3710f59d209e7cc2",
  199. "type": "ui_group",
  200. "name": "Barometer",
  201. "tab": "124aa983647c8074",
  202. "order": 2,
  203. "disp": true,
  204. "width": "5",
  205. "collapse": false,
  206. "className": ""
  207. },
  208. {
  209. "id": "b7d12b8d.651c8",
  210. "type": "ui_group",
  211. "name": "Default",
  212. "tab": "fe5d396a.0d6d4",
  213. "order": 1,
  214. "disp": true,
  215. "width": "20",
  216. "collapse": false
  217. },
  218. {
  219. "id": "fe5d396a.0d6d4",
  220. "type": "ui_tab",
  221. "name": "Home",
  222. "icon": "dashboard",
  223. "disabled": false,
  224. "hidden": false
  225. },
  226. {
  227. "id": "1db5a64de6fc2d9e",
  228. "type": "MySQLdatabase",
  229. "name": "Weather DB",
  230. "host": "db",
  231. "port": "3306",
  232. "db": "node-red",
  233. "tz": "",
  234. "charset": "UTF8"
  235. },
  236. {
  237. "id": "6cb911a340dd0ff5",
  238. "type": "inject",
  239. "z": "f2fa6dd5ecc6fee9",
  240. "name": "",
  241. "props": [
  242. {
  243. "p": "payload"
  244. },
  245. {
  246. "p": "topic",
  247. "vt": "str"
  248. }
  249. ],
  250. "repeat": "300",
  251. "crontab": "",
  252. "once": true,
  253. "onceDelay": 0.1,
  254. "topic": "test",
  255. "payloadType": "date",
  256. "x": 140,
  257. "y": 300,
  258. "wires": [
  259. [
  260. "dceaa64cdf99920b",
  261. "e7fa67bc4dae509c"
  262. ]
  263. ]
  264. },
  265. {
  266. "id": "f770a584f4cb34b3",
  267. "type": "debug",
  268. "z": "f2fa6dd5ecc6fee9",
  269. "name": "Openweather",
  270. "active": false,
  271. "tosidebar": true,
  272. "console": false,
  273. "tostatus": false,
  274. "complete": "payload",
  275. "targetType": "msg",
  276. "statusVal": "",
  277. "statusType": "auto",
  278. "x": 780,
  279. "y": 240,
  280. "wires": []
  281. },
  282. {
  283. "id": "220fb7d74b77d77c",
  284. "type": "json",
  285. "z": "f2fa6dd5ecc6fee9",
  286. "name": "",
  287. "property": "payload",
  288. "action": "obj",
  289. "pretty": false,
  290. "x": 620,
  291. "y": 300,
  292. "wires": [
  293. [
  294. "f770a584f4cb34b3",
  295. "e41d26526985556b"
  296. ]
  297. ]
  298. },
  299. {
  300. "id": "dceaa64cdf99920b",
  301. "type": "openweathermap",
  302. "z": "f2fa6dd5ecc6fee9",
  303. "name": "Openweathermap",
  304. "wtype": "current",
  305. "lon": "",
  306. "lat": "",
  307. "city": "Frankfurt",
  308. "country": "Germany",
  309. "language": "de",
  310. "x": 350,
  311. "y": 300,
  312. "wires": [
  313. [
  314. "220fb7d74b77d77c"
  315. ]
  316. ]
  317. },
  318. {
  319. "id": "e41d26526985556b",
  320. "type": "link out",
  321. "z": "f2fa6dd5ecc6fee9",
  322. "name": "weather",
  323. "links": [
  324. "baeb6a5a161373bf",
  325. "7fbd6896a5bc5ed3",
  326. "73f47758e35544c8",
  327. "97822532c623d138",
  328. "5cc92a265ea6197c"
  329. ],
  330. "x": 1315,
  331. "y": 300,
  332. "wires": []
  333. },
  334. {
  335. "id": "73f47758e35544c8",
  336. "type": "link in",
  337. "z": "d354ea3adc51a23c",
  338. "name": "",
  339. "links": [
  340. "e41d26526985556b"
  341. ],
  342. "x": 195,
  343. "y": 100,
  344. "wires": [
  345. [
  346. "0d1d3701ba08c47f",
  347. "4ee5519b4ee22fbf"
  348. ]
  349. ]
  350. },
  351. {
  352. "id": "0d1d3701ba08c47f",
  353. "type": "mqtt out",
  354. "z": "d354ea3adc51a23c",
  355. "name": "raspi/weather",
  356. "topic": "raspi/weather",
  357. "qos": "0",
  358. "retain": "true",
  359. "respTopic": "",
  360. "contentType": "",
  361. "userProps": "",
  362. "correl": "",
  363. "expiry": "",
  364. "broker": "738d12f3ae8a61a3",
  365. "x": 430,
  366. "y": 100,
  367. "wires": []
  368. },
  369. {
  370. "id": "4ee5519b4ee22fbf",
  371. "type": "debug",
  372. "z": "d354ea3adc51a23c",
  373. "name": "To weather",
  374. "active": false,
  375. "tosidebar": true,
  376. "console": false,
  377. "tostatus": false,
  378. "complete": "payload",
  379. "targetType": "msg",
  380. "statusVal": "",
  381. "statusType": "auto",
  382. "x": 430,
  383. "y": 160,
  384. "wires": []
  385. },
  386. {
  387. "id": "ec902514be1514bb",
  388. "type": "status",
  389. "z": "f2fa6dd5ecc6fee9",
  390. "name": "Status",
  391. "scope": [
  392. "f770a584f4cb34b3",
  393. "e7fa67bc4dae509c",
  394. "50100e920347df93"
  395. ],
  396. "x": 170,
  397. "y": 60,
  398. "wires": [
  399. [
  400. "58bf8caa2d948bba"
  401. ]
  402. ]
  403. },
  404. {
  405. "id": "58bf8caa2d948bba",
  406. "type": "debug",
  407. "z": "f2fa6dd5ecc6fee9",
  408. "name": "dbg Status",
  409. "active": false,
  410. "tosidebar": true,
  411. "console": false,
  412. "tostatus": false,
  413. "complete": "payload",
  414. "targetType": "msg",
  415. "statusVal": "",
  416. "statusType": "auto",
  417. "x": 370,
  418. "y": 60,
  419. "wires": []
  420. },
  421. {
  422. "id": "b6c4bf611cacfb7e",
  423. "type": "catch",
  424. "z": "f2fa6dd5ecc6fee9",
  425. "name": "",
  426. "scope": [
  427. "41295103e3127e87",
  428. "5889653a74b5faef"
  429. ],
  430. "uncaught": false,
  431. "x": 180,
  432. "y": 680,
  433. "wires": [
  434. [
  435. "50100e920347df93"
  436. ]
  437. ]
  438. },
  439. {
  440. "id": "50100e920347df93",
  441. "type": "debug",
  442. "z": "f2fa6dd5ecc6fee9",
  443. "name": "",
  444. "active": false,
  445. "tosidebar": true,
  446. "console": true,
  447. "tostatus": true,
  448. "complete": "true",
  449. "targetType": "full",
  450. "statusVal": "payload",
  451. "statusType": "auto",
  452. "x": 410,
  453. "y": 680,
  454. "wires": []
  455. },
  456. {
  457. "id": "9f0d5da7b921bfc4",
  458. "type": "ui_template",
  459. "z": "c5f6844437dd47a5",
  460. "group": "3710f59d209e7cc2",
  461. "name": "Barometer",
  462. "order": 1,
  463. "width": "5",
  464. "height": "5",
  465. "format": "<script src=\"/tween-min.js\"></script>\n<script src=\"/steelseries-min.js\"></script>\n<script>\nvar radial4;\n\n\n (function(scope){ \n scope.$watch('msg', function(msg) {\n if (typeof(msg.payload.pressure) != \"undefined\") radial4.setValueAnimated(msg.payload.pressure);\n //if (typeof(msg.payload.temp_maxc) != \"undefined\") radial4.setMaxMeasuredValue(msg.payload.temp_maxc);\n //if (typeof(msg.payload.temp_minc) != \"undefined\") radial4.setMinMeasuredValue(msg.payload.temp_minc);\n //if (typeof(msg.threshold) != \"undefined\") radial4.setThreshold(msg.threshold);\n //if (typeof(msg.odo) != \"undefined\")radial4.setOdoValue(msg.odo); \n //if (typeof(msg.userLed) != \"undefined\") radial4.setUserLedOnOff(msg.userLed); \n //if (typeof(msg.trend) != \"undefined\")\n //{\n // if (msg.trend==1) radial4.setTrend(steelseries.TrendState.UP);\n // if (msg.trend==0) radial4.setTrend(steelseries.TrendState.STEADY);\n // if (msg.trend==-1) radial4.setTrend(steelseries.TrendState.DOWN);\n // if (msg.trend==-2) radial4.setTrend(steelseries.TrendState.OFF);\n //}\n });\n })(scope);\n\n var sections = [steelseries.Section(960, 990, 'rgba(0, 0, 220, 0.3)'),\n steelseries.Section(990, 1030, 'rgba(0, 220, 0, 0.3)'),\n steelseries.Section(1030, 1060, 'rgba(220, 220, 0, 0.3)') ],\n\n // Define one area\n //areas = [steelseries.Section(25, 50, 'rgba(220, 0, 0, 0.3)')],\n\n radial4 = new steelseries.Radial('canvasRadial4', {\n gaugeType: steelseries.GaugeType.TYPE4,\n minValue: 960,\n maxValue: 1060,\n size: 200,\n section: sections,\n // area: areas,\n titleString: \"Barometer\",\n unitString: \"h Pa\",\n //threshold: 25,\n //thresholdRising: false,\n //userLedVisible: false,\n useOdometer: false,\n lcdVisible: true,\n trendVisible: false,\n minMeasuredValueVisible: false,\n maxMeasuredValueVisible: false\n });\n \n radial4.setFrameDesign(steelseries.FrameDesign.BLACK_METAL);\n radial4.setValueAnimated(0);\n //radial4.setThreshold(50);\n //radial4.blinkUserLed(0);\n //radial4.setOdoValue(0);\n \n\n</script>\n\n<canvas id=\"canvasRadial4\" width=\"300\" height=\"300\"></canvas>\n\n",
  466. "storeOutMessages": true,
  467. "fwdInMessages": true,
  468. "resendOnRefresh": true,
  469. "templateScope": "local",
  470. "className": "",
  471. "x": 550,
  472. "y": 220,
  473. "wires": [
  474. []
  475. ]
  476. },
  477. {
  478. "id": "97822532c623d138",
  479. "type": "link in",
  480. "z": "c5f6844437dd47a5",
  481. "name": "",
  482. "links": [
  483. "e41d26526985556b"
  484. ],
  485. "x": 155,
  486. "y": 240,
  487. "wires": [
  488. [
  489. "9f0d5da7b921bfc4",
  490. "108158c72ae58d7d",
  491. "4eb9904b0bad1dd4",
  492. "b8b31f2d3c802145",
  493. "e178ebc7cdfb3341",
  494. "e7818ae4907668b2"
  495. ]
  496. ]
  497. },
  498. {
  499. "id": "108158c72ae58d7d",
  500. "type": "ui_text",
  501. "z": "c5f6844437dd47a5",
  502. "group": "a756759c113266b5",
  503. "order": 1,
  504. "width": 0,
  505. "height": 0,
  506. "name": "",
  507. "label": "Aktuelle Temperatur [°C] :",
  508. "format": "{{msg.payload.tempc}}",
  509. "layout": "col-center",
  510. "className": "",
  511. "x": 590,
  512. "y": 180,
  513. "wires": []
  514. },
  515. {
  516. "id": "4eb9904b0bad1dd4",
  517. "type": "ui_template",
  518. "z": "c5f6844437dd47a5",
  519. "group": "8dba3ccfebb75b33",
  520. "name": "Winddir",
  521. "order": 1,
  522. "width": "5",
  523. "height": "7",
  524. "format": "<script src=\"/tween-min.js\"></script>\n<script src=\"/steelseries-min.js\"></script>\n<script src=\"/steeldefaults.js\"></script>\n<script>\nvar windir;\nvar display;\n\n (function(scope){ \n scope.$watch('msg', function(msg) {\n if (typeof(msg.payload.winddirection) != \"undefined\") windir.setValueAnimatedLatest(msg.payload.winddirection);\n if (typeof(msg.payload.wind_avg) != \"undefined\") windir.setValueAnimatedAverage(msg.payload.wind_avg);\n if (typeof(msg.payload.windspeed) != \"undefined\") display.setValue(msg.payload.windspeed);\n });\n })(scope);\n\n windir = new steelseries.WindDirection('windir', {\n size: 200,\n //fractionalScaleDecimals : 2,\n\t //minValue: 1,\n //maxValue: 359,\n\t\tlcdVisible: true,\n\t\tgaugeType: steelseries.GaugeType.TYPE4,\n\t\tframeDesign: def_frame_design,\n\t\tpointerTypeLatest: steelseries.PointerType.TYPE3,\n\t\tpointerTypeAvarage: steelseries.PointerType.TYPE3\n });\n \n display = new steelseries.DisplaySingle('display', {\n width: 200,\n height: 50,\n unitString: \"m/s\",\n unitStringVisibe: true,\n headerString: \"Speed [m/s]\",\n headerStringVisible: true\n });\n \n \n</script>\n<canvas id=\"windir\" width=\"200\" height=\"200\"></canvas>\n<canvas id=\"display\" width=\"200\" height=\"100\"></canvas>\n",
  525. "storeOutMessages": true,
  526. "fwdInMessages": true,
  527. "resendOnRefresh": true,
  528. "templateScope": "local",
  529. "className": "",
  530. "x": 540,
  531. "y": 300,
  532. "wires": [
  533. []
  534. ]
  535. },
  536. {
  537. "id": "b8b31f2d3c802145",
  538. "type": "ui_template",
  539. "z": "c5f6844437dd47a5",
  540. "group": "a756759c113266b5",
  541. "name": "Temperatur",
  542. "order": 2,
  543. "width": "0",
  544. "height": "0",
  545. "format": "<script src=\"/tween-min.js\"></script>\n<script src=\"/steelseries-min.js\"></script>\n<script src=\"/steeldefaults.js\"></script>\n<script>\nvar linear;\n\n(function(scope){ \n scope.$watch('msg', function(msg) {\n if (typeof(msg.payload.tempc) != \"undefined\") linear.setValueAnimated(msg.payload.tempc);\n });\n })(scope);\n\nlinear = new steelseries.LinearBargraph('linear',{\n frameDesign: def_frame_design,\n valueGradient: valGrad,\n useValueGradient: true,\n minValue: -30,\n maxValue: 50,\n unitString: \"°C\"\n });\n\n</script>\n<canvas id=\"linear\" width=\"200\" height=\"500\"></canvas>\n",
  546. "storeOutMessages": true,
  547. "fwdInMessages": true,
  548. "resendOnRefresh": true,
  549. "templateScope": "local",
  550. "className": "",
  551. "x": 550,
  552. "y": 260,
  553. "wires": [
  554. []
  555. ]
  556. },
  557. {
  558. "id": "fe102a7155a33faa",
  559. "type": "link out",
  560. "z": "f2fa6dd5ecc6fee9",
  561. "name": "DateTime",
  562. "links": [
  563. "ae331f1eb19e7b81",
  564. "b68a9a843348e1bf"
  565. ],
  566. "x": 555,
  567. "y": 460,
  568. "wires": []
  569. },
  570. {
  571. "id": "df19e2819075fb1a",
  572. "type": "ui_text",
  573. "z": "c5f6844437dd47a5",
  574. "group": "a756759c113266b5",
  575. "order": 1,
  576. "width": 0,
  577. "height": 0,
  578. "name": "",
  579. "label": "",
  580. "format": "<p align=center> {{msg.payload.date}} <br> {{msg.payload.time}} <p>",
  581. "layout": "col-center",
  582. "className": "",
  583. "x": 530,
  584. "y": 140,
  585. "wires": []
  586. },
  587. {
  588. "id": "ae331f1eb19e7b81",
  589. "type": "link in",
  590. "z": "c5f6844437dd47a5",
  591. "name": "",
  592. "links": [
  593. "fe102a7155a33faa"
  594. ],
  595. "x": 155,
  596. "y": 140,
  597. "wires": [
  598. [
  599. "df19e2819075fb1a"
  600. ]
  601. ]
  602. },
  603. {
  604. "id": "396b940d734ab05a",
  605. "type": "inject",
  606. "z": "f2fa6dd5ecc6fee9",
  607. "name": "",
  608. "props": [
  609. {
  610. "p": "payload"
  611. }
  612. ],
  613. "repeat": "",
  614. "crontab": "",
  615. "once": false,
  616. "onceDelay": 0.1,
  617. "topic": "",
  618. "payload": "{\"id\":803,\"weather\":\"Clouds\",\"detail\":\"Überwiegend bewölkt\",\"icon\":\"04d\",\"tempk\":283.76,\"tempc\":25,\"temp_maxc\":11.8,\"temp_minc\":9.6,\"humidity\":87,\"pressure\":1020,\"maxtemp\":285.03,\"mintemp\":282.77,\"windspeed\":7.2,\"winddirection\":270,\"location\":\"Frankfurt am Main\",\"sunrise\":1676615606,\"sunset\":1676652328,\"clouds\":75,\"description\":\"The weather in Frankfurt am Main at coordinates: 50.1167, 8.6833 is Clouds (Überwiegend bewölkt).\"}",
  619. "payloadType": "json",
  620. "x": 910,
  621. "y": 60,
  622. "wires": [
  623. [
  624. "e41d26526985556b"
  625. ]
  626. ]
  627. },
  628. {
  629. "id": "ebdc01b5a4bcfa93",
  630. "type": "ui_button",
  631. "z": "f2fa6dd5ecc6fee9",
  632. "name": "",
  633. "group": "a756759c113266b5",
  634. "order": 3,
  635. "width": 0,
  636. "height": 0,
  637. "passthru": false,
  638. "label": "Test",
  639. "tooltip": "",
  640. "color": "",
  641. "bgcolor": "",
  642. "className": "",
  643. "icon": "",
  644. "payload": "{\"id\":803,\"weather\":\"Clouds\",\"detail\":\"Überwiegend bewölkt\",\"icon\":\"04d\",\"tempk\":283.76,\"tempc\":35,\"temp_maxc\":11.8,\"temp_minc\":9.6,\"humidity\":87,\"pressure\":1020,\"maxtemp\":285.03,\"mintemp\":282.77,\"windspeed\":7.2,\"winddirection\":270,\"location\":\"Frankfurt am Main\",\"sunrise\":1676615606,\"sunset\":1676652328,\"clouds\":75,\"description\":\"The weather in Frankfurt am Main at coordinates: 50.1167, 8.6833 is Clouds (Überwiegend bewölkt).\"}",
  645. "payloadType": "json",
  646. "topic": "topic",
  647. "topicType": "msg",
  648. "x": 910,
  649. "y": 100,
  650. "wires": [
  651. [
  652. "e41d26526985556b"
  653. ]
  654. ]
  655. },
  656. {
  657. "id": "e178ebc7cdfb3341",
  658. "type": "function",
  659. "z": "c5f6844437dd47a5",
  660. "name": "",
  661. "func": "var wind=global.get('wind') || {};\nvar wind_avg = global.get ('wind_avg') || 0;\n\nvar payload=msg.payload.winddirection;\nnode.log(payload);\n\n\nif (wind.message==undefined)\n {\n wind.message=[];\n }\nwind.message.push(payload);\n\nif (wind.message.length>20)\n{\n wind.message.shift();\n}\n\nglobal.set('wind',wind);\nvar s=\"\";\nfor (i=(wind.message.length-1);i>=0;i--)\n s=s+wind.message[i];\nvar c = 0;\nfor (i=(wind.message.length-1);i>=0;i--)\n{\n c=c+wind.message[i];\n}\n\nwind_avg = c/(wind.message.length);\nglobal.set('wind_avg', wind_avg)\nglobal.set('wind', wind)\nnode.log(msg);\nmsg.payload.wind_avg=wind_avg;\n\nreturn msg;",
  662. "outputs": 1,
  663. "noerr": 0,
  664. "initialize": "",
  665. "finalize": "",
  666. "libs": [],
  667. "x": 300,
  668. "y": 320,
  669. "wires": [
  670. [
  671. "722c05d553b5a3e0",
  672. "4eb9904b0bad1dd4"
  673. ]
  674. ]
  675. },
  676. {
  677. "id": "722c05d553b5a3e0",
  678. "type": "ui_template",
  679. "z": "c5f6844437dd47a5",
  680. "group": "b7d12b8d.651c8",
  681. "name": "",
  682. "order": 1,
  683. "width": 0,
  684. "height": 0,
  685. "format": "<style>\n.main\n{\nheight:500px;\n//background-color:lightblue;\n}\n</style>\n<div class=main ng-bind-html=\"msg.payload.wind_avg\"></div> \n<script>\n var msg = global.get(\"wind\");\n</script>\n <table>\n <tbody>\n <tr *ngFor=\"let p of msg\">\n <td>{{p.message}}</td>\n </tr>\n </tbody>\n </table>",
  686. "storeOutMessages": true,
  687. "fwdInMessages": true,
  688. "resendOnRefresh": true,
  689. "templateScope": "local",
  690. "className": "",
  691. "x": 540,
  692. "y": 340,
  693. "wires": [
  694. []
  695. ]
  696. },
  697. {
  698. "id": "5fc826242df12119",
  699. "type": "mysql",
  700. "z": "d354ea3adc51a23c",
  701. "mydb": "1db5a64de6fc2d9e",
  702. "name": "Database",
  703. "x": 420,
  704. "y": 240,
  705. "wires": [
  706. [
  707. "6f5ec86de53be60c"
  708. ]
  709. ]
  710. },
  711. {
  712. "id": "e7fa67bc4dae509c",
  713. "type": "function",
  714. "z": "f2fa6dd5ecc6fee9",
  715. "name": "F_Test",
  716. "func": "function formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n\n if (month.length < 2) \n month = '0' + month;\n if (day.length < 2) \n day = '0' + day;\n\n return [year, month, day].join('-');\n}\n\nvar mymsg = msg.payload;\n\nvar time = new Date(mymsg).toLocaleTimeString(\"de-DE\");\n\nvar date = new Date(mymsg);\nvar f_date = formatDate(date);\n\nnode.status({fill:\"green\",shape:\"ring\",text:f_date + \" \" + time});\nnode.log(f_date+\" \"+time);\nmsg.payload = {date:f_date,time:time};\nmsg.topic = \"DateTime\";\nreturn msg;",
  717. "outputs": 1,
  718. "noerr": 0,
  719. "initialize": "",
  720. "finalize": "",
  721. "libs": [],
  722. "x": 370,
  723. "y": 400,
  724. "wires": [
  725. [
  726. "0a80d66a213a9bd0",
  727. "fe102a7155a33faa"
  728. ]
  729. ]
  730. },
  731. {
  732. "id": "0a80d66a213a9bd0",
  733. "type": "debug",
  734. "z": "f2fa6dd5ecc6fee9",
  735. "name": "",
  736. "active": false,
  737. "tosidebar": true,
  738. "console": false,
  739. "tostatus": true,
  740. "complete": "payload",
  741. "targetType": "msg",
  742. "statusVal": "payload",
  743. "statusType": "auto",
  744. "x": 610,
  745. "y": 380,
  746. "wires": []
  747. },
  748. {
  749. "id": "d03c76cf92669797",
  750. "type": "join",
  751. "z": "f2fa6dd5ecc6fee9",
  752. "name": "",
  753. "mode": "custom",
  754. "build": "merged",
  755. "property": "payload",
  756. "propertyType": "msg",
  757. "key": "topic",
  758. "joiner": "\\n",
  759. "joinerType": "str",
  760. "accumulate": true,
  761. "timeout": "",
  762. "count": "2",
  763. "reduceRight": false,
  764. "reduceExp": "",
  765. "reduceInit": "",
  766. "reduceInitType": "",
  767. "reduceFixup": "",
  768. "x": 870,
  769. "y": 460,
  770. "wires": [
  771. [
  772. "143a633ae8d40b1e"
  773. ]
  774. ]
  775. },
  776. {
  777. "id": "b68a9a843348e1bf",
  778. "type": "link in",
  779. "z": "f2fa6dd5ecc6fee9",
  780. "name": "",
  781. "links": [
  782. "fe102a7155a33faa"
  783. ],
  784. "x": 715,
  785. "y": 500,
  786. "wires": [
  787. [
  788. "d03c76cf92669797"
  789. ]
  790. ]
  791. },
  792. {
  793. "id": "5cc92a265ea6197c",
  794. "type": "link in",
  795. "z": "f2fa6dd5ecc6fee9",
  796. "name": "",
  797. "links": [
  798. "e41d26526985556b"
  799. ],
  800. "x": 715,
  801. "y": 440,
  802. "wires": [
  803. [
  804. "d03c76cf92669797"
  805. ]
  806. ]
  807. },
  808. {
  809. "id": "143a633ae8d40b1e",
  810. "type": "function",
  811. "z": "f2fa6dd5ecc6fee9",
  812. "name": "Create Insert SQL",
  813. "func": "var topic = \"INSERT INTO `node-red`.`Weather` ( \\\n`date` \\\n,`time` \\\n,`weather` \\\n,`detail` \\\n,`icon` \\\n,`tempk` \\\n,`tempc` \\\n,`temp_maxc` \\\n,`temp_minc` \\\n,`humidity` \\\n,`pressure` \\\n,`maxtemp` \\\n,`mintemp` \\\n,`windspeed` \\\n,`winddirection` \\\n,`location` \\\n,`sunrise` \\\n,`sunset` \\\n,`clouds` \\\n,`description`) \\\nVALUES ( \\\n:date \\\n,:time \\\n,:weather \\\n,:detail \\\n,:icon \\\n,:tempk \\\n,:tempc \\\n,:temp_maxc \\\n,:temp_minc \\\n,:humidity \\\n,:pressure \\\n,:maxtemp \\\n,:mintemp \\\n,:windspeed \\\n,:winddirection \\\n,:location \\\n,:sunrise \\\n,:sunset \\\n,:clouds \\\n,:description);\"\nmsg.topic = topic\nreturn msg;",
  814. "outputs": 1,
  815. "noerr": 0,
  816. "initialize": "",
  817. "finalize": "",
  818. "libs": [],
  819. "x": 1080,
  820. "y": 460,
  821. "wires": [
  822. [
  823. "18ce04e729380a08",
  824. "d153c5b44a8efd0f"
  825. ]
  826. ]
  827. },
  828. {
  829. "id": "18ce04e729380a08",
  830. "type": "debug",
  831. "z": "f2fa6dd5ecc6fee9",
  832. "name": "",
  833. "active": false,
  834. "tosidebar": true,
  835. "console": false,
  836. "tostatus": false,
  837. "complete": "true",
  838. "targetType": "full",
  839. "statusVal": "",
  840. "statusType": "auto",
  841. "x": 1250,
  842. "y": 380,
  843. "wires": []
  844. },
  845. {
  846. "id": "d153c5b44a8efd0f",
  847. "type": "link out",
  848. "z": "f2fa6dd5ecc6fee9",
  849. "name": "Insert SQL",
  850. "links": [
  851. "3bb68b7aeccf8f51"
  852. ],
  853. "x": 1315,
  854. "y": 460,
  855. "wires": []
  856. },
  857. {
  858. "id": "3bb68b7aeccf8f51",
  859. "type": "link in",
  860. "z": "d354ea3adc51a23c",
  861. "name": "",
  862. "links": [
  863. "d153c5b44a8efd0f",
  864. "d2cda8c31ac9faa4"
  865. ],
  866. "x": 185,
  867. "y": 240,
  868. "wires": [
  869. [
  870. "5fc826242df12119",
  871. "b8cb5c9b2d285f45"
  872. ]
  873. ]
  874. },
  875. {
  876. "id": "6f5ec86de53be60c",
  877. "type": "debug",
  878. "z": "d354ea3adc51a23c",
  879. "name": "",
  880. "active": true,
  881. "tosidebar": true,
  882. "console": false,
  883. "tostatus": false,
  884. "complete": "false",
  885. "statusVal": "",
  886. "statusType": "auto",
  887. "x": 700,
  888. "y": 240,
  889. "wires": []
  890. },
  891. {
  892. "id": "934584fe81169855",
  893. "type": "function",
  894. "z": "f2fa6dd5ecc6fee9",
  895. "name": "Select From DB",
  896. "func": "/*var topic = \"SELECT JSON_UNQUOTE (JSON_OBJECT ('id',id, 'date',date,'time',time,'tempc',tempc,'humidity',humidity,'pressure',pressure,'maxtemp',maxtemp,'mintemp',mintemp,'windspeed',windspeed,'winddirection',winddirection )) \\\n FROM Weather ORDER BY id DESC LIMIT 50;\"\n*/\nvar topic = \"SELECT * from Weather ORDER BY id DESC LIMIT 50;\"\nmsg.topic=topic;\nreturn msg;",
  897. "outputs": 1,
  898. "noerr": 0,
  899. "initialize": "",
  900. "finalize": "",
  901. "libs": [],
  902. "x": 900,
  903. "y": 580,
  904. "wires": [
  905. [
  906. "d2cda8c31ac9faa4"
  907. ]
  908. ]
  909. },
  910. {
  911. "id": "3b0f0afc5c00b5eb",
  912. "type": "inject",
  913. "z": "f2fa6dd5ecc6fee9",
  914. "name": "",
  915. "props": [
  916. {
  917. "p": "payload"
  918. },
  919. {
  920. "p": "topic",
  921. "vt": "str"
  922. }
  923. ],
  924. "repeat": "",
  925. "crontab": "",
  926. "once": true,
  927. "onceDelay": "10",
  928. "topic": "",
  929. "payloadType": "date",
  930. "x": 680,
  931. "y": 580,
  932. "wires": [
  933. [
  934. "934584fe81169855"
  935. ]
  936. ]
  937. },
  938. {
  939. "id": "d2cda8c31ac9faa4",
  940. "type": "link out",
  941. "z": "f2fa6dd5ecc6fee9",
  942. "name": "SELECT",
  943. "links": [
  944. "3bb68b7aeccf8f51"
  945. ],
  946. "x": 1245,
  947. "y": 580,
  948. "wires": []
  949. },
  950. {
  951. "id": "b8cb5c9b2d285f45",
  952. "type": "debug",
  953. "z": "d354ea3adc51a23c",
  954. "name": "Select Request",
  955. "active": true,
  956. "tosidebar": true,
  957. "console": false,
  958. "tostatus": false,
  959. "complete": "true",
  960. "targetType": "full",
  961. "statusVal": "",
  962. "statusType": "auto",
  963. "x": 490,
  964. "y": 360,
  965. "wires": []
  966. },
  967. {
  968. "id": "491fa31d350138cd",
  969. "type": "ui_chart",
  970. "z": "c5f6844437dd47a5",
  971. "name": "",
  972. "group": "b7d12b8d.651c8",
  973. "order": 1,
  974. "width": "20",
  975. "height": "7",
  976. "label": "chart",
  977. "chartType": "line",
  978. "legend": "true",
  979. "xformat": "HH:mm:ss",
  980. "interpolate": "linear",
  981. "nodata": "",
  982. "dot": false,
  983. "ymin": "",
  984. "ymax": "",
  985. "removeOlder": 1,
  986. "removeOlderPoints": "",
  987. "removeOlderUnit": "86400",
  988. "cutout": 0,
  989. "useOneColor": false,
  990. "useUTC": false,
  991. "colors": [
  992. "#1f77b4",
  993. "#aec7e8",
  994. "#ff7f0e",
  995. "#2ca02c",
  996. "#98df8a",
  997. "#d62728",
  998. "#ff9896",
  999. "#9467bd",
  1000. "#c5b0d5"
  1001. ],
  1002. "outputs": 1,
  1003. "useDifferentColor": false,
  1004. "className": "",
  1005. "x": 530,
  1006. "y": 380,
  1007. "wires": [
  1008. []
  1009. ]
  1010. },
  1011. {
  1012. "id": "e7818ae4907668b2",
  1013. "type": "function",
  1014. "z": "c5f6844437dd47a5",
  1015. "name": "",
  1016. "func": "var payload = msg.payload.tempc;\nmsg.payload = payload;\nreturn msg;",
  1017. "outputs": 1,
  1018. "noerr": 0,
  1019. "initialize": "",
  1020. "finalize": "",
  1021. "libs": [],
  1022. "x": 300,
  1023. "y": 380,
  1024. "wires": [
  1025. [
  1026. "491fa31d350138cd"
  1027. ]
  1028. ]
  1029. }
  1030. ]