Advertisement
NittyGritty

Sunrise-down-duration

Nov 7th, 2019
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.18 KB | None | 0 0
  1. [
  2. {
  3. "id": "890ea8cb.4e8e78",
  4. "type": "inject",
  5. "z": "5a11cc5.689e934",
  6. "name": "Heute",
  7. "topic": "",
  8. "payload": "",
  9. "payloadType": "date",
  10. "repeat": "",
  11. "crontab": "",
  12. "once": false,
  13. "x": 130,
  14. "y": 140,
  15. "wires": [
  16. [
  17. "acff889d.7e7018"
  18. ]
  19. ]
  20. },
  21. {
  22. "id": "acff889d.7e7018",
  23. "type": "http request",
  24. "z": "5a11cc5.689e934",
  25. "name": "",
  26. "method": "GET",
  27. "ret": "txt",
  28. "paytoqs": false,
  29. "url": "http://api.sunrise-sunset.org/json?lat=48.8&lng=8.97&date=today&formatted=0",
  30. "tls": "",
  31. "proxy": "",
  32. "x": 330,
  33. "y": 140,
  34. "wires": [
  35. [
  36. "ae22c280.9564d"
  37. ]
  38. ]
  39. },
  40. {
  41. "id": "9f29b4fc.89b898",
  42. "type": "debug",
  43. "z": "5a11cc5.689e934",
  44. "name": "SunRise-SunSet",
  45. "active": true,
  46. "console": "false",
  47. "complete": "payload",
  48. "x": 1070,
  49. "y": 120,
  50. "wires": []
  51. },
  52. {
  53. "id": "ae22c280.9564d",
  54. "type": "function",
  55. "z": "5a11cc5.689e934",
  56. "name": "",
  57. "func": "var EspEasy=JSON.parse(msg.payload);\n\nSun_Rise = {payload:Date.parse(EspEasy.results.sunrise)};\nSun_Set = {payload:Date.parse(EspEasy.results.sunset)};\n\n// var seconds = msg.payload;\n// convert to microseconds\n// msg.payload = seconds * 1000;\n\nDuration = {payload:(EspEasy.results.day_length)*1000};\nreturn [Sun_Rise, Sun_Set, Duration];",
  58. "outputs": "3",
  59. "noerr": 0,
  60. "x": 510,
  61. "y": 160,
  62. "wires": [
  63. [
  64. "578b9378.c5734c",
  65. "aad2e005.32f7d"
  66. ],
  67. [
  68. "578b9378.c5734c",
  69. "aad2e005.32f7d"
  70. ],
  71. [
  72. "21390d1a.51ec02"
  73. ]
  74. ]
  75. },
  76. {
  77. "id": "578b9378.c5734c",
  78. "type": "moment",
  79. "z": "5a11cc5.689e934",
  80. "name": "",
  81. "topic": "",
  82. "input": "",
  83. "inputType": "msg",
  84. "inTz": "ETC/GMT",
  85. "adjAmount": 0,
  86. "adjType": "days",
  87. "adjDir": "add",
  88. "format": "dddd, DD. MMMM YYYY HH:mm:ss Z",
  89. "locale": "de_DE",
  90. "output": "",
  91. "outputType": "msg",
  92. "outTz": "Europe/Berlin",
  93. "x": 820,
  94. "y": 120,
  95. "wires": [
  96. [
  97. "9f29b4fc.89b898"
  98. ]
  99. ]
  100. },
  101. {
  102. "id": "aad2e005.32f7d",
  103. "type": "function",
  104. "z": "5a11cc5.689e934",
  105. "name": "",
  106. "func": "var d = new Date(msg.payload);\nmsg = {payload:new Date(msg.payload)};\nnode.status({fill:\"blue\",shape:\"ring\",text:\"var d: \" + d });\nreturn msg;",
  107. "outputs": 1,
  108. "noerr": 0,
  109. "x": 770,
  110. "y": 160,
  111. "wires": [
  112. [
  113. "b87080d3.390c8"
  114. ]
  115. ]
  116. },
  117. {
  118. "id": "b87080d3.390c8",
  119. "type": "debug",
  120. "z": "5a11cc5.689e934",
  121. "name": "NewDate",
  122. "active": true,
  123. "tosidebar": true,
  124. "console": false,
  125. "tostatus": false,
  126. "complete": "payload",
  127. "targetType": "msg",
  128. "x": 1040,
  129. "y": 160,
  130. "wires": []
  131. },
  132. {
  133. "id": "5c636ca4.9d6fd4",
  134. "type": "inject",
  135. "z": "5a11cc5.689e934",
  136. "name": "Morgen",
  137. "topic": "",
  138. "payload": "",
  139. "payloadType": "date",
  140. "repeat": "",
  141. "crontab": "",
  142. "once": false,
  143. "x": 130,
  144. "y": 200,
  145. "wires": [
  146. [
  147. "e0c9788b.8be288"
  148. ]
  149. ]
  150. },
  151. {
  152. "id": "e0c9788b.8be288",
  153. "type": "http request",
  154. "z": "5a11cc5.689e934",
  155. "name": "",
  156. "method": "GET",
  157. "ret": "txt",
  158. "paytoqs": false,
  159. "url": "http://api.sunrise-sunset.org/json?lat=48.8&lng=8.97&date=tomorrow&formatted=0",
  160. "tls": "",
  161. "proxy": "",
  162. "x": 330,
  163. "y": 200,
  164. "wires": [
  165. [
  166. "ae22c280.9564d"
  167. ]
  168. ]
  169. },
  170. {
  171. "id": "71347c15.a461b4",
  172. "type": "debug",
  173. "z": "5a11cc5.689e934",
  174. "name": "Tagesdauer",
  175. "active": true,
  176. "console": "false",
  177. "complete": "payload",
  178. "x": 1050,
  179. "y": 220,
  180. "wires": []
  181. },
  182. {
  183. "id": "21390d1a.51ec02",
  184. "type": "moment",
  185. "z": "5a11cc5.689e934",
  186. "name": "",
  187. "topic": "",
  188. "input": "",
  189. "inputType": "msg",
  190. "inTz": "ETC/GMT",
  191. "adjAmount": 0,
  192. "adjType": "days",
  193. "adjDir": "add",
  194. "format": "HH:mm:ss",
  195. "locale": "de_DE",
  196. "output": "",
  197. "outputType": "msg",
  198. "outTz": "ETC/GMT",
  199. "x": 820,
  200. "y": 220,
  201. "wires": [
  202. [
  203. "71347c15.a461b4"
  204. ]
  205. ]
  206. }
  207. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement