Node-Red configuration
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

suncron.html 48KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281
  1. <script type="text/javascript">
  2. ;(function () {
  3. const calcDuration = (eventType) => {
  4. // eventType can be 'sunset', 'dusk' etc.
  5. let hours = Number($(`#node-input-${eventType}OffsetHours`).val())
  6. let minutes = Number($(`#node-input-${eventType}OffsetMinutes`).val())
  7. return hours * 3600 + minutes * 60
  8. }
  9. const eventTypes = [
  10. 'sunrise',
  11. 'sunriseEnd',
  12. 'goldenHourEnd',
  13. 'solarNoon',
  14. 'goldenHour',
  15. 'sunsetStart',
  16. 'sunset',
  17. 'dusk',
  18. 'nauticalDusk',
  19. 'night',
  20. 'nadir',
  21. 'nightEnd',
  22. 'nauticalDawn',
  23. 'dawn',
  24. ]
  25. let defaults = {
  26. name: { value: '' },
  27. lat: { value: '', required: true, validate: RED.validators.number() },
  28. lon: { value: '', required: true, validate: RED.validators.number() },
  29. replay: { value: false },
  30. ejectScheduleOnUpdate: { value: false },
  31. }
  32. eventTypes.forEach((eventType) => {
  33. defaults[`${eventType}Payload`] = {
  34. value: '',
  35. validate: RED.validators.typedInput('payloadType'),
  36. }
  37. defaults[`${eventType}PayloadType`] = { value: 'string' }
  38. defaults[`${eventType}Topic`] = { value: '', required: false }
  39. defaults[`${eventType}OffsetType`] = { value: 1, required: true }
  40. defaults[`${eventType}OffsetHours`] = { value: 0, required: true }
  41. defaults[`${eventType}OffsetMinutes`] = { value: 0, required: true }
  42. defaults[`${eventType}Offset`] = { value: 0 }
  43. })
  44. RED.nodes.registerType('suncron', {
  45. category: 'smart home',
  46. color: '#FFCC66',
  47. defaults: defaults,
  48. inputs: 1,
  49. outputs: 1,
  50. icon: 'font-awesome/fa-sun-o',
  51. label: function () {
  52. return this.name || 'suncron'
  53. },
  54. oneditprepare: function () {
  55. $('#geolocate').click(() => {
  56. if ('geolocation' in navigator) {
  57. $('#node-input-lat').val('???')
  58. $('#node-input-lon').val('???')
  59. $('#geolocate > i').removeClass('fa-location-arrow')
  60. $('#geolocate > i').addClass('fa-hourglass')
  61. navigator.geolocation.getCurrentPosition((position) => {
  62. $('#node-input-lat').val(position.coords.latitude)
  63. $('#node-input-lon').val(position.coords.longitude)
  64. $('#geolocate > i').removeClass('fa-hourglass')
  65. $('#geolocate > i').addClass('fa-location-arrow')
  66. })
  67. } else {
  68. alert('Sorry, your browser does not support geolocation')
  69. }
  70. })
  71. eventTypes.forEach((eventType) => {
  72. const payloadName = `${eventType}Payload`
  73. const payloadType = `${eventType}PayloadType`
  74. if (this[payloadType] == null) {
  75. if (this[payloadType] == '') {
  76. this[payloadType] = 'date'
  77. } else {
  78. this[payloadType] = 'str'
  79. }
  80. } else if (
  81. this[payloadType] === 'string' ||
  82. this[payloadType] === 'none'
  83. ) {
  84. this[payloadType] = 'str'
  85. }
  86. $(`#node-input-${payloadType}`).val(this[payloadType])
  87. $(`#node-input-${payloadName}`).typedInput({
  88. default: 'str',
  89. typeField: $(`#node-input-${payloadType}`),
  90. types: ['str', 'num', 'bool', 'json'],
  91. })
  92. $(`#node-input-${payloadName}`).typedInput('type', this[payloadType])
  93. })
  94. },
  95. oneditsave: function () {
  96. eventTypes.forEach((eventType) => {
  97. $(`#node-input-${eventType}Offset`).val(calcDuration(eventType))
  98. })
  99. },
  100. })
  101. })()
  102. </script>
  103. <style>
  104. .form-row label {
  105. width: 130px !important;
  106. }
  107. </style>
  108. <script type="text/x-red" data-template-name="suncron">
  109. <div class="form-row">
  110. <label for="node-input-name"><i class="icon-tag"></i> Name</label>
  111. <input type="text" id="node-input-name" placeholder="Name">
  112. </div>
  113. <div class="form-row">
  114. <label for="node-input-lat"><i class="fa fa-globe"></i> Location</label>
  115. lat: <input type="text" id="node-input-lat" placeholder="latitude" style="width:100px">
  116. lon: <input type="text" id="node-input-lon" placeholder="longitude" style="width:100px">
  117. <button id="geolocate"><i class="fa fa-location-arrow"></i></button>
  118. </div>
  119. <div class="form-row">
  120. <label for="node-input-replay"><i class="fa fa-rocket"></i> Startup</label>
  121. <input type="checkbox" id="node-input-replay" style="width:30px; margin:0px"> Emit preceding event on startup
  122. </div>
  123. <div class="form-row">
  124. <label for="node-input-ejectScheduleOnUpdate"><i class="fa fa-repeat"></i> Schedule</label>
  125. <input type="checkbox" id="node-input-ejectScheduleOnUpdate" style="width:30px; margin:0px"> Emit schedule when updated <i class="fa fa-info-circle" title="When enabled, this will emit a message with the topic &quot;suncron:schedule&quot; and the schedule object as payload"></i>
  126. </div>
  127. <hr />
  128. <!-- sunrise -->
  129. <div class="form-row">
  130. <label for="node-input-sunrise"><i class="fa fa-clock-o"></i> Sunrise</label>
  131. <span>Top edge of the sun appears over the horizon</span>
  132. </div>
  133. <div class="form-row">
  134. <label for="node-input-sunrisePayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  135. <input type="text" id="node-input-sunrisePayload" style="width:70%">
  136. <input type="hidden" id="node-input-sunrisePayloadType">
  137. </div>
  138. <div class="form-row">
  139. <label for="node-input-sunriseTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  140. <input type="text" id="node-input-sunriseTopic">
  141. </div>
  142. <div class="form-row">
  143. <label for="node-input-sunriseOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  144. <select style="width:50px; margin-left:0px;" id="node-input-sunriseOffsetType">
  145. <option value="1">+</option>
  146. <option value="-1">-</option>
  147. </select>&nbsp;
  148. <select style="width:50px; margin-left:0px;" id="node-input-sunriseOffsetHours">
  149. <option value="0">00</option>
  150. <option value="1">01</option>
  151. <option value="2">02</option>
  152. <option value="3">03</option>
  153. <option value="4">04</option>
  154. <option value="5">05</option>
  155. <option value="6">06</option>
  156. <option value="7">07</option>
  157. <option value="8">08</option>
  158. <option value="9">09</option>
  159. <option value="10">10</option>
  160. <option value="11">11</option>
  161. <option value="12">12</option>
  162. <option value="13">13</option>
  163. <option value="14">14</option>
  164. <option value="15">15</option>
  165. <option value="16">16</option>
  166. <option value="17">17</option>
  167. <option value="18">18</option>
  168. <option value="19">19</option>
  169. <option value="20">20</option>
  170. <option value="21">21</option>
  171. <option value="22">22</option>
  172. <option value="23">23</option>
  173. </select>&nbsp;hours
  174. <select style="width:50px; margin-left:0px;" id="node-input-sunriseOffsetMinutes">
  175. <option value="0">00</option>
  176. <option value="1">01</option>
  177. <option value="2">02</option>
  178. <option value="3">03</option>
  179. <option value="4">04</option>
  180. <option value="5">05</option>
  181. <option value="6">06</option>
  182. <option value="7">07</option>
  183. <option value="8">08</option>
  184. <option value="9">09</option>
  185. <option value="10">10</option>
  186. <option value="15">15</option>
  187. <option value="20">20</option>
  188. <option value="25">25</option>
  189. <option value="30">30</option>
  190. <option value="35">35</option>
  191. <option value="40">40</option>
  192. <option value="45">45</option>
  193. <option value="50">50</option>
  194. <option value="55">55</option>
  195. </select>&nbsp;minutes
  196. <input type="hidden" id="node-input-sunriseOffset">
  197. </div>
  198. <hr />
  199. <!-- sunriseEnd -->
  200. <div class="form-row">
  201. <label for="node-input-sunriseEnd"><i class="fa fa-clock-o"></i> Sunrise End</label>
  202. <span>Bottom edge of the sun touches the horizon</span>
  203. </div>
  204. <div class="form-row">
  205. <label for="node-input-sunriseEndPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  206. <input type="text" id="node-input-sunriseEndPayload" style="width:70%">
  207. <input type="hidden" id="node-input-sunriseEndPayloadType">
  208. </div>
  209. <div class="form-row">
  210. <label for="node-input-sunriseEndTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  211. <input type="text" id="node-input-sunriseEndTopic">
  212. </div>
  213. <div class="form-row">
  214. <label for="node-input-sunriseEndOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  215. <select style="width:50px; margin-left:0px;" id="node-input-sunriseEndOffsetType">
  216. <option value="1">+</option>
  217. <option value="-1">-</option>
  218. </select>&nbsp;
  219. <select style="width:50px; margin-left:0px;" id="node-input-sunriseEndOffsetHours">
  220. <option value="0">00</option>
  221. <option value="1">01</option>
  222. <option value="2">02</option>
  223. <option value="3">03</option>
  224. <option value="4">04</option>
  225. <option value="5">05</option>
  226. <option value="6">06</option>
  227. <option value="7">07</option>
  228. <option value="8">08</option>
  229. <option value="9">09</option>
  230. <option value="10">10</option>
  231. <option value="11">11</option>
  232. <option value="12">12</option>
  233. <option value="13">13</option>
  234. <option value="14">14</option>
  235. <option value="15">15</option>
  236. <option value="16">16</option>
  237. <option value="17">17</option>
  238. <option value="18">18</option>
  239. <option value="19">19</option>
  240. <option value="20">20</option>
  241. <option value="21">21</option>
  242. <option value="22">22</option>
  243. <option value="23">23</option>
  244. </select>&nbsp;hours
  245. <select style="width:50px; margin-left:0px;" id="node-input-sunriseEndOffsetMinutes">
  246. <option value="0">00</option>
  247. <option value="1">01</option>
  248. <option value="2">02</option>
  249. <option value="3">03</option>
  250. <option value="4">04</option>
  251. <option value="5">05</option>
  252. <option value="6">06</option>
  253. <option value="7">07</option>
  254. <option value="8">08</option>
  255. <option value="9">09</option>
  256. <option value="10">10</option>
  257. <option value="15">15</option>
  258. <option value="20">20</option>
  259. <option value="25">25</option>
  260. <option value="30">30</option>
  261. <option value="35">35</option>
  262. <option value="40">40</option>
  263. <option value="45">45</option>
  264. <option value="50">50</option>
  265. <option value="55">55</option>
  266. </select>&nbsp;minutes
  267. <input type="hidden" id="node-input-sunriseEndOffset">
  268. </div>
  269. <hr />
  270. <!-- goldenHourEnd -->
  271. <div class="form-row">
  272. <label for="node-input-goldenHourEnd"><i class="fa fa-clock-o"></i> Golden Hour End</label>
  273. <span>Morning golden hour (soft light, best time for photography) ends</span>
  274. </div>
  275. <div class="form-row">
  276. <label for="node-input-goldenHourEndPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  277. <input type="text" id="node-input-goldenHourEndPayload" style="width:70%">
  278. <input type="hidden" id="node-input-goldenHourEndPayloadType">
  279. </div>
  280. <div class="form-row">
  281. <label for="node-input-goldenHourEndTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  282. <input type="text" id="node-input-goldenHourEndTopic">
  283. </div>
  284. <div class="form-row">
  285. <label for="node-input-goldenHourEndOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  286. <select style="width:50px; margin-left:0px;" id="node-input-goldenHourEndOffsetType">
  287. <option value="1">+</option>
  288. <option value="-1">-</option>
  289. </select>&nbsp;
  290. <select style="width:50px; margin-left:0px;" id="node-input-goldenHourEndOffsetHours">
  291. <option value="0">00</option>
  292. <option value="1">01</option>
  293. <option value="2">02</option>
  294. <option value="3">03</option>
  295. <option value="4">04</option>
  296. <option value="5">05</option>
  297. <option value="6">06</option>
  298. <option value="7">07</option>
  299. <option value="8">08</option>
  300. <option value="9">09</option>
  301. <option value="10">10</option>
  302. <option value="11">11</option>
  303. <option value="12">12</option>
  304. <option value="13">13</option>
  305. <option value="14">14</option>
  306. <option value="15">15</option>
  307. <option value="16">16</option>
  308. <option value="17">17</option>
  309. <option value="18">18</option>
  310. <option value="19">19</option>
  311. <option value="20">20</option>
  312. <option value="21">21</option>
  313. <option value="22">22</option>
  314. <option value="23">23</option>
  315. </select>&nbsp;hours
  316. <select style="width:50px; margin-left:0px;" id="node-input-goldenHourEndOffsetMinutes">
  317. <option value="0">00</option>
  318. <option value="1">01</option>
  319. <option value="2">02</option>
  320. <option value="3">03</option>
  321. <option value="4">04</option>
  322. <option value="5">05</option>
  323. <option value="6">06</option>
  324. <option value="7">07</option>
  325. <option value="8">08</option>
  326. <option value="9">09</option>
  327. <option value="10">10</option>
  328. <option value="15">15</option>
  329. <option value="20">20</option>
  330. <option value="25">25</option>
  331. <option value="30">30</option>
  332. <option value="35">35</option>
  333. <option value="40">40</option>
  334. <option value="45">45</option>
  335. <option value="50">50</option>
  336. <option value="55">55</option>
  337. </select>&nbsp;minutes
  338. <input type="hidden" id="node-input-goldenHourEndOffset">
  339. </div>
  340. <hr />
  341. <!-- solarNoon -->
  342. <div class="form-row">
  343. <label for="node-input-solarNoon"><i class="fa fa-clock-o"></i> Solar Noon</label>
  344. <span>Sun is in the highest position</span>
  345. </div>
  346. <div class="form-row">
  347. <label for="node-input-solarNoonPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  348. <input type="text" id="node-input-solarNoonPayload" style="width:70%">
  349. <input type="hidden" id="node-input-solarNoonPayloadType">
  350. </div>
  351. <div class="form-row">
  352. <label for="node-input-solarNoonTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  353. <input type="text" id="node-input-solarNoonTopic">
  354. </div>
  355. <div class="form-row">
  356. <label for="node-input-solarNoonOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  357. <select style="width:50px; margin-left:0px;" id="node-input-solarNoonOffsetType">
  358. <option value="1">+</option>
  359. <option value="-1">-</option>
  360. </select>&nbsp;
  361. <select style="width:50px; margin-left:0px;" id="node-input-solarNoonOffsetHours">
  362. <option value="0">00</option>
  363. <option value="1">01</option>
  364. <option value="2">02</option>
  365. <option value="3">03</option>
  366. <option value="4">04</option>
  367. <option value="5">05</option>
  368. <option value="6">06</option>
  369. <option value="7">07</option>
  370. <option value="8">08</option>
  371. <option value="9">09</option>
  372. <option value="10">10</option>
  373. <option value="11">11</option>
  374. <option value="12">12</option>
  375. <option value="13">13</option>
  376. <option value="14">14</option>
  377. <option value="15">15</option>
  378. <option value="16">16</option>
  379. <option value="17">17</option>
  380. <option value="18">18</option>
  381. <option value="19">19</option>
  382. <option value="20">20</option>
  383. <option value="21">21</option>
  384. <option value="22">22</option>
  385. <option value="23">23</option>
  386. </select>&nbsp;hours
  387. <select style="width:50px; margin-left:0px;" id="node-input-solarNoonOffsetMinutes">
  388. <option value="0">00</option>
  389. <option value="1">01</option>
  390. <option value="2">02</option>
  391. <option value="3">03</option>
  392. <option value="4">04</option>
  393. <option value="5">05</option>
  394. <option value="6">06</option>
  395. <option value="7">07</option>
  396. <option value="8">08</option>
  397. <option value="9">09</option>
  398. <option value="10">10</option>
  399. <option value="15">15</option>
  400. <option value="20">20</option>
  401. <option value="25">25</option>
  402. <option value="30">30</option>
  403. <option value="35">35</option>
  404. <option value="40">40</option>
  405. <option value="45">45</option>
  406. <option value="50">50</option>
  407. <option value="55">55</option>
  408. </select>&nbsp;minutes
  409. <input type="hidden" id="node-input-solarNoonOffset">
  410. </div>
  411. <hr />
  412. <!-- goldenHour -->
  413. <div class="form-row">
  414. <label for="node-input-goldenHour"><i class="fa fa-clock-o"></i> Golden Hour</label>
  415. <span>Evening golden hour starts</span>
  416. </div>
  417. <div class="form-row">
  418. <label for="node-input-goldenHourPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  419. <input type="text" id="node-input-goldenHourPayload" style="width:70%">
  420. <input type="hidden" id="node-input-goldenHourPayloadType">
  421. </div>
  422. <div class="form-row">
  423. <label for="node-input-goldenHourTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  424. <input type="text" id="node-input-goldenHourTopic">
  425. </div>
  426. <div class="form-row">
  427. <label for="node-input-goldenHourOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  428. <select style="width:50px; margin-left:0px;" id="node-input-goldenHourOffsetType">
  429. <option value="1">+</option>
  430. <option value="-1">-</option>
  431. </select>&nbsp;
  432. <select style="width:50px; margin-left:0px;" id="node-input-goldenHourOffsetHours">
  433. <option value="0">00</option>
  434. <option value="1">01</option>
  435. <option value="2">02</option>
  436. <option value="3">03</option>
  437. <option value="4">04</option>
  438. <option value="5">05</option>
  439. <option value="6">06</option>
  440. <option value="7">07</option>
  441. <option value="8">08</option>
  442. <option value="9">09</option>
  443. <option value="10">10</option>
  444. <option value="11">11</option>
  445. <option value="12">12</option>
  446. <option value="13">13</option>
  447. <option value="14">14</option>
  448. <option value="15">15</option>
  449. <option value="16">16</option>
  450. <option value="17">17</option>
  451. <option value="18">18</option>
  452. <option value="19">19</option>
  453. <option value="20">20</option>
  454. <option value="21">21</option>
  455. <option value="22">22</option>
  456. <option value="23">23</option>
  457. </select>&nbsp;hours
  458. <select style="width:50px; margin-left:0px;" id="node-input-goldenHourOffsetMinutes">
  459. <option value="0">00</option>
  460. <option value="1">01</option>
  461. <option value="2">02</option>
  462. <option value="3">03</option>
  463. <option value="4">04</option>
  464. <option value="5">05</option>
  465. <option value="6">06</option>
  466. <option value="7">07</option>
  467. <option value="8">08</option>
  468. <option value="9">09</option>
  469. <option value="10">10</option>
  470. <option value="15">15</option>
  471. <option value="20">20</option>
  472. <option value="25">25</option>
  473. <option value="30">30</option>
  474. <option value="35">35</option>
  475. <option value="40">40</option>
  476. <option value="45">45</option>
  477. <option value="50">50</option>
  478. <option value="55">55</option>
  479. </select>&nbsp;minutes
  480. <input type="hidden" id="node-input-goldenHourOffset">
  481. </div>
  482. <hr />
  483. <!-- sunsetStart -->
  484. <div class="form-row">
  485. <label for="node-input-sunsetStart"><i class="fa fa-clock-o"></i> Sunset Start</label>
  486. <span>Bottom edge of the sun touches the horizon</span>
  487. </div>
  488. <div class="form-row">
  489. <label for="node-input-sunsetStartPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  490. <input type="text" id="node-input-sunsetStartPayload" style="width:70%">
  491. <input type="hidden" id="node-input-sunsetStartPayloadType">
  492. </div>
  493. <div class="form-row">
  494. <label for="node-input-sunsetStartTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  495. <input type="text" id="node-input-sunsetStartTopic">
  496. </div>
  497. <div class="form-row">
  498. <label for="node-input-sunsetStartOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  499. <select style="width:50px; margin-left:0px;" id="node-input-sunsetStartOffsetType">
  500. <option value="1">+</option>
  501. <option value="-1">-</option>
  502. </select>&nbsp;
  503. <select style="width:50px; margin-left:0px;" id="node-input-sunsetStartOffsetHours">
  504. <option value="0">00</option>
  505. <option value="1">01</option>
  506. <option value="2">02</option>
  507. <option value="3">03</option>
  508. <option value="4">04</option>
  509. <option value="5">05</option>
  510. <option value="6">06</option>
  511. <option value="7">07</option>
  512. <option value="8">08</option>
  513. <option value="9">09</option>
  514. <option value="10">10</option>
  515. <option value="11">11</option>
  516. <option value="12">12</option>
  517. <option value="13">13</option>
  518. <option value="14">14</option>
  519. <option value="15">15</option>
  520. <option value="16">16</option>
  521. <option value="17">17</option>
  522. <option value="18">18</option>
  523. <option value="19">19</option>
  524. <option value="20">20</option>
  525. <option value="21">21</option>
  526. <option value="22">22</option>
  527. <option value="23">23</option>
  528. </select>&nbsp;hours
  529. <select style="width:50px; margin-left:0px;" id="node-input-sunsetStartOffsetMinutes">
  530. <option value="0">00</option>
  531. <option value="1">01</option>
  532. <option value="2">02</option>
  533. <option value="3">03</option>
  534. <option value="4">04</option>
  535. <option value="5">05</option>
  536. <option value="6">06</option>
  537. <option value="7">07</option>
  538. <option value="8">08</option>
  539. <option value="9">09</option>
  540. <option value="10">10</option>
  541. <option value="15">15</option>
  542. <option value="20">20</option>
  543. <option value="25">25</option>
  544. <option value="30">30</option>
  545. <option value="35">35</option>
  546. <option value="40">40</option>
  547. <option value="45">45</option>
  548. <option value="50">50</option>
  549. <option value="55">55</option>
  550. </select>&nbsp;minutes
  551. <input type="hidden" id="node-input-sunsetStartOffset">
  552. </div>
  553. <hr />
  554. <!-- sunset -->
  555. <div class="form-row">
  556. <label for="node-input-sunset"><i class="fa fa-clock-o"></i> Sunset</label>
  557. <span>Sun disappears below the horizon, evening civil twilight starts</span>
  558. </div>
  559. <div class="form-row">
  560. <label for="node-input-sunsetPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  561. <input type="text" id="node-input-sunsetPayload" style="width:70%">
  562. <input type="hidden" id="node-input-sunsetPayloadType">
  563. </div>
  564. <div class="form-row">
  565. <label for="node-input-sunsetTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  566. <input type="text" id="node-input-sunsetTopic">
  567. </div>
  568. <div class="form-row">
  569. <label for="node-input-sunsetOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  570. <select style="width:50px; margin-left:0px;" id="node-input-sunsetOffsetType">
  571. <option value="1">+</option>
  572. <option value="-1">-</option>
  573. </select>&nbsp;
  574. <select style="width:50px; margin-left:0px;" id="node-input-sunsetOffsetHours">
  575. <option value="0">00</option>
  576. <option value="1">01</option>
  577. <option value="2">02</option>
  578. <option value="3">03</option>
  579. <option value="4">04</option>
  580. <option value="5">05</option>
  581. <option value="6">06</option>
  582. <option value="7">07</option>
  583. <option value="8">08</option>
  584. <option value="9">09</option>
  585. <option value="10">10</option>
  586. <option value="11">11</option>
  587. <option value="12">12</option>
  588. <option value="13">13</option>
  589. <option value="14">14</option>
  590. <option value="15">15</option>
  591. <option value="16">16</option>
  592. <option value="17">17</option>
  593. <option value="18">18</option>
  594. <option value="19">19</option>
  595. <option value="20">20</option>
  596. <option value="21">21</option>
  597. <option value="22">22</option>
  598. <option value="23">23</option>
  599. </select>&nbsp;hours
  600. <select style="width:50px; margin-left:0px;" id="node-input-sunsetOffsetMinutes">
  601. <option value="0">00</option>
  602. <option value="1">01</option>
  603. <option value="2">02</option>
  604. <option value="3">03</option>
  605. <option value="4">04</option>
  606. <option value="5">05</option>
  607. <option value="6">06</option>
  608. <option value="7">07</option>
  609. <option value="8">08</option>
  610. <option value="9">09</option>
  611. <option value="10">10</option>
  612. <option value="15">15</option>
  613. <option value="20">20</option>
  614. <option value="25">25</option>
  615. <option value="30">30</option>
  616. <option value="35">35</option>
  617. <option value="40">40</option>
  618. <option value="45">45</option>
  619. <option value="50">50</option>
  620. <option value="55">55</option>
  621. </select>&nbsp;minutes
  622. <input type="hidden" id="node-input-sunsetOffset">
  623. </div>
  624. <hr />
  625. <!-- dusk -->
  626. <div class="form-row">
  627. <label for="node-input-dusk"><i class="fa fa-clock-o"></i> Dusk</label>
  628. <span>Evening nautical twilight starts</span>
  629. </div>
  630. <div class="form-row">
  631. <label for="node-input-duskPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  632. <input type="text" id="node-input-duskPayload" style="width:70%">
  633. <input type="hidden" id="node-input-duskPayloadType">
  634. </div>
  635. <div class="form-row">
  636. <label for="node-input-duskTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  637. <input type="text" id="node-input-duskTopic">
  638. </div>
  639. <div class="form-row">
  640. <label for="node-input-duskOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  641. <select style="width:50px; margin-left:0px;" id="node-input-duskOffsetType">
  642. <option value="1">+</option>
  643. <option value="-1">-</option>
  644. </select>&nbsp;
  645. <select style="width:50px; margin-left:0px;" id="node-input-duskOffsetHours">
  646. <option value="0">00</option>
  647. <option value="1">01</option>
  648. <option value="2">02</option>
  649. <option value="3">03</option>
  650. <option value="4">04</option>
  651. <option value="5">05</option>
  652. <option value="6">06</option>
  653. <option value="7">07</option>
  654. <option value="8">08</option>
  655. <option value="9">09</option>
  656. <option value="10">10</option>
  657. <option value="11">11</option>
  658. <option value="12">12</option>
  659. <option value="13">13</option>
  660. <option value="14">14</option>
  661. <option value="15">15</option>
  662. <option value="16">16</option>
  663. <option value="17">17</option>
  664. <option value="18">18</option>
  665. <option value="19">19</option>
  666. <option value="20">20</option>
  667. <option value="21">21</option>
  668. <option value="22">22</option>
  669. <option value="23">23</option>
  670. </select>&nbsp;hours
  671. <select style="width:50px; margin-left:0px;" id="node-input-duskOffsetMinutes">
  672. <option value="0">00</option>
  673. <option value="1">01</option>
  674. <option value="2">02</option>
  675. <option value="3">03</option>
  676. <option value="4">04</option>
  677. <option value="5">05</option>
  678. <option value="6">06</option>
  679. <option value="7">07</option>
  680. <option value="8">08</option>
  681. <option value="9">09</option>
  682. <option value="10">10</option>
  683. <option value="15">15</option>
  684. <option value="20">20</option>
  685. <option value="25">25</option>
  686. <option value="30">30</option>
  687. <option value="35">35</option>
  688. <option value="40">40</option>
  689. <option value="45">45</option>
  690. <option value="50">50</option>
  691. <option value="55">55</option>
  692. </select>&nbsp;minutes
  693. <input type="hidden" id="node-input-duskOffset">
  694. </div>
  695. <hr />
  696. <!-- nauticalDusk -->
  697. <div class="form-row">
  698. <label for="node-input-nauticalDusk"><i class="fa fa-clock-o"></i> Nautical Dusk</label>
  699. <span>Evening astronomical twilight starts</span>
  700. </div>
  701. <div class="form-row">
  702. <label for="node-input-nauticalDuskPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  703. <input type="text" id="node-input-nauticalDuskPayload" style="width:70%">
  704. <input type="hidden" id="node-input-nauticalDuskPayloadType">
  705. </div>
  706. <div class="form-row">
  707. <label for="node-input-nauticalDuskTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  708. <input type="text" id="node-input-nauticalDuskTopic">
  709. </div>
  710. <div class="form-row">
  711. <label for="node-input-nauticalDuskOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  712. <select style="width:50px; margin-left:0px;" id="node-input-nauticalDuskOffsetType">
  713. <option value="1">+</option>
  714. <option value="-1">-</option>
  715. </select>&nbsp;
  716. <select style="width:50px; margin-left:0px;" id="node-input-nauticalDuskOffsetHours">
  717. <option value="0">00</option>
  718. <option value="1">01</option>
  719. <option value="2">02</option>
  720. <option value="3">03</option>
  721. <option value="4">04</option>
  722. <option value="5">05</option>
  723. <option value="6">06</option>
  724. <option value="7">07</option>
  725. <option value="8">08</option>
  726. <option value="9">09</option>
  727. <option value="10">10</option>
  728. <option value="11">11</option>
  729. <option value="12">12</option>
  730. <option value="13">13</option>
  731. <option value="14">14</option>
  732. <option value="15">15</option>
  733. <option value="16">16</option>
  734. <option value="17">17</option>
  735. <option value="18">18</option>
  736. <option value="19">19</option>
  737. <option value="20">20</option>
  738. <option value="21">21</option>
  739. <option value="22">22</option>
  740. <option value="23">23</option>
  741. </select>&nbsp;hours
  742. <select style="width:50px; margin-left:0px;" id="node-input-nauticalDuskOffsetMinutes">
  743. <option value="0">00</option>
  744. <option value="1">01</option>
  745. <option value="2">02</option>
  746. <option value="3">03</option>
  747. <option value="4">04</option>
  748. <option value="5">05</option>
  749. <option value="6">06</option>
  750. <option value="7">07</option>
  751. <option value="8">08</option>
  752. <option value="9">09</option>
  753. <option value="10">10</option>
  754. <option value="15">15</option>
  755. <option value="20">20</option>
  756. <option value="25">25</option>
  757. <option value="30">30</option>
  758. <option value="35">35</option>
  759. <option value="40">40</option>
  760. <option value="45">45</option>
  761. <option value="50">50</option>
  762. <option value="55">55</option>
  763. </select>&nbsp;minutes
  764. <input type="hidden" id="node-input-nauticalDuskOffset">
  765. </div>
  766. <hr />
  767. <!-- night -->
  768. <div class="form-row">
  769. <label for="node-input-night"><i class="fa fa-clock-o"></i> Night</label>
  770. <span>Dark enough for astronomical observations</span>
  771. </div>
  772. <div class="form-row">
  773. <label for="node-input-nightPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  774. <input type="text" id="node-input-nightPayload" style="width:70%">
  775. <input type="hidden" id="node-input-nightPayloadType">
  776. </div>
  777. <div class="form-row">
  778. <label for="node-input-nightTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  779. <input type="text" id="node-input-nightTopic">
  780. </div>
  781. <div class="form-row">
  782. <label for="node-input-nightOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  783. <select style="width:50px; margin-left:0px;" id="node-input-nightOffsetType">
  784. <option value="1">+</option>
  785. <option value="-1">-</option>
  786. </select>&nbsp;
  787. <select style="width:50px; margin-left:0px;" id="node-input-nightOffsetHours">
  788. <option value="0">00</option>
  789. <option value="1">01</option>
  790. <option value="2">02</option>
  791. <option value="3">03</option>
  792. <option value="4">04</option>
  793. <option value="5">05</option>
  794. <option value="6">06</option>
  795. <option value="7">07</option>
  796. <option value="8">08</option>
  797. <option value="9">09</option>
  798. <option value="10">10</option>
  799. <option value="11">11</option>
  800. <option value="12">12</option>
  801. <option value="13">13</option>
  802. <option value="14">14</option>
  803. <option value="15">15</option>
  804. <option value="16">16</option>
  805. <option value="17">17</option>
  806. <option value="18">18</option>
  807. <option value="19">19</option>
  808. <option value="20">20</option>
  809. <option value="21">21</option>
  810. <option value="22">22</option>
  811. <option value="23">23</option>
  812. </select>&nbsp;hours
  813. <select style="width:50px; margin-left:0px;" id="node-input-nightOffsetMinutes">
  814. <option value="0">00</option>
  815. <option value="1">01</option>
  816. <option value="2">02</option>
  817. <option value="3">03</option>
  818. <option value="4">04</option>
  819. <option value="5">05</option>
  820. <option value="6">06</option>
  821. <option value="7">07</option>
  822. <option value="8">08</option>
  823. <option value="9">09</option>
  824. <option value="10">10</option>
  825. <option value="15">15</option>
  826. <option value="20">20</option>
  827. <option value="25">25</option>
  828. <option value="30">30</option>
  829. <option value="35">35</option>
  830. <option value="40">40</option>
  831. <option value="45">45</option>
  832. <option value="50">50</option>
  833. <option value="55">55</option>
  834. </select>&nbsp;minutes
  835. <input type="hidden" id="node-input-nightOffset">
  836. </div>
  837. <hr />
  838. <!-- nadir -->
  839. <div class="form-row">
  840. <label for="node-input-nadir"><i class="fa fa-clock-o"></i> Nadir</label>
  841. <span>Darkest moment of the night, sun is in the lowest position</span>
  842. </div>
  843. <div class="form-row">
  844. <label for="node-input-nadirPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  845. <input type="text" id="node-input-nadirPayload" style="width:70%">
  846. <input type="hidden" id="node-input-nadirPayloadType">
  847. </div>
  848. <div class="form-row">
  849. <label for="node-input-nadirTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  850. <input type="text" id="node-input-nadirTopic">
  851. </div>
  852. <div class="form-row">
  853. <label for="node-input-nadirOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  854. <select style="width:50px; margin-left:0px;" id="node-input-nadirOffsetType">
  855. <option value="1">+</option>
  856. <option value="-1">-</option>
  857. </select>&nbsp;
  858. <select style="width:50px; margin-left:0px;" id="node-input-nadirOffsetHours">
  859. <option value="0">00</option>
  860. <option value="1">01</option>
  861. <option value="2">02</option>
  862. <option value="3">03</option>
  863. <option value="4">04</option>
  864. <option value="5">05</option>
  865. <option value="6">06</option>
  866. <option value="7">07</option>
  867. <option value="8">08</option>
  868. <option value="9">09</option>
  869. <option value="10">10</option>
  870. <option value="11">11</option>
  871. <option value="12">12</option>
  872. <option value="13">13</option>
  873. <option value="14">14</option>
  874. <option value="15">15</option>
  875. <option value="16">16</option>
  876. <option value="17">17</option>
  877. <option value="18">18</option>
  878. <option value="19">19</option>
  879. <option value="20">20</option>
  880. <option value="21">21</option>
  881. <option value="22">22</option>
  882. <option value="23">23</option>
  883. </select>&nbsp;hours
  884. <select style="width:50px; margin-left:0px;" id="node-input-nadirOffsetMinutes">
  885. <option value="0">00</option>
  886. <option value="1">01</option>
  887. <option value="2">02</option>
  888. <option value="3">03</option>
  889. <option value="4">04</option>
  890. <option value="5">05</option>
  891. <option value="6">06</option>
  892. <option value="7">07</option>
  893. <option value="8">08</option>
  894. <option value="9">09</option>
  895. <option value="10">10</option>
  896. <option value="15">15</option>
  897. <option value="20">20</option>
  898. <option value="25">25</option>
  899. <option value="30">30</option>
  900. <option value="35">35</option>
  901. <option value="40">40</option>
  902. <option value="45">45</option>
  903. <option value="50">50</option>
  904. <option value="55">55</option>
  905. </select>&nbsp;minutes
  906. <input type="hidden" id="node-input-nadirOffset">
  907. </div>
  908. <hr />
  909. <!-- nightEnd -->
  910. <div class="form-row">
  911. <label for="node-input-nightEnd"><i class="fa fa-clock-o"></i> Night End</label>
  912. <span>Morning astronomical twilight starts</span>
  913. </div>
  914. <div class="form-row">
  915. <label for="node-input-nightEndPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  916. <input type="text" id="node-input-nightEndPayload" style="width:70%">
  917. <input type="hidden" id="node-input-nightEndPayloadType">
  918. </div>
  919. <div class="form-row">
  920. <label for="node-input-nightEndTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  921. <input type="text" id="node-input-nightEndTopic">
  922. </div>
  923. <div class="form-row">
  924. <label for="node-input-nightEndOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  925. <select style="width:50px; margin-left:0px;" id="node-input-nightEndOffsetType">
  926. <option value="1">+</option>
  927. <option value="-1">-</option>
  928. </select>&nbsp;
  929. <select style="width:50px; margin-left:0px;" id="node-input-nightEndOffsetHours">
  930. <option value="0">00</option>
  931. <option value="1">01</option>
  932. <option value="2">02</option>
  933. <option value="3">03</option>
  934. <option value="4">04</option>
  935. <option value="5">05</option>
  936. <option value="6">06</option>
  937. <option value="7">07</option>
  938. <option value="8">08</option>
  939. <option value="9">09</option>
  940. <option value="10">10</option>
  941. <option value="11">11</option>
  942. <option value="12">12</option>
  943. <option value="13">13</option>
  944. <option value="14">14</option>
  945. <option value="15">15</option>
  946. <option value="16">16</option>
  947. <option value="17">17</option>
  948. <option value="18">18</option>
  949. <option value="19">19</option>
  950. <option value="20">20</option>
  951. <option value="21">21</option>
  952. <option value="22">22</option>
  953. <option value="23">23</option>
  954. </select>&nbsp;hours
  955. <select style="width:50px; margin-left:0px;" id="node-input-nightEndOffsetMinutes">
  956. <option value="0">00</option>
  957. <option value="1">01</option>
  958. <option value="2">02</option>
  959. <option value="3">03</option>
  960. <option value="4">04</option>
  961. <option value="5">05</option>
  962. <option value="6">06</option>
  963. <option value="7">07</option>
  964. <option value="8">08</option>
  965. <option value="9">09</option>
  966. <option value="10">10</option>
  967. <option value="15">15</option>
  968. <option value="20">20</option>
  969. <option value="25">25</option>
  970. <option value="30">30</option>
  971. <option value="35">35</option>
  972. <option value="40">40</option>
  973. <option value="45">45</option>
  974. <option value="50">50</option>
  975. <option value="55">55</option>
  976. </select>&nbsp;minutes
  977. <input type="hidden" id="node-input-nightEndOffset">
  978. </div>
  979. <hr />
  980. <!-- nauticalDawn -->
  981. <div class="form-row">
  982. <label for="node-input-nauticalDawn"><i class="fa fa-clock-o"></i> Nautical Dawn</label>
  983. <span>Morning nautical twilight starts</span>
  984. </div>
  985. <div class="form-row">
  986. <label for="node-input-nauticalDawnPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  987. <input type="text" id="node-input-nauticalDawnPayload" style="width:70%">
  988. <input type="hidden" id="node-input-nauticalDawnPayloadType">
  989. </div>
  990. <div class="form-row">
  991. <label for="node-input-nauticalDawnTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  992. <input type="text" id="node-input-nauticalDawnTopic">
  993. </div>
  994. <div class="form-row">
  995. <label for="node-input-nauticalDawnOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  996. <select style="width:50px; margin-left:0px;" id="node-input-nauticalDawnOffsetType">
  997. <option value="1">+</option>
  998. <option value="-1">-</option>
  999. </select>&nbsp;
  1000. <select style="width:50px; margin-left:0px;" id="node-input-nauticalDawnOffsetHours">
  1001. <option value="0">00</option>
  1002. <option value="1">01</option>
  1003. <option value="2">02</option>
  1004. <option value="3">03</option>
  1005. <option value="4">04</option>
  1006. <option value="5">05</option>
  1007. <option value="6">06</option>
  1008. <option value="7">07</option>
  1009. <option value="8">08</option>
  1010. <option value="9">09</option>
  1011. <option value="10">10</option>
  1012. <option value="11">11</option>
  1013. <option value="12">12</option>
  1014. <option value="13">13</option>
  1015. <option value="14">14</option>
  1016. <option value="15">15</option>
  1017. <option value="16">16</option>
  1018. <option value="17">17</option>
  1019. <option value="18">18</option>
  1020. <option value="19">19</option>
  1021. <option value="20">20</option>
  1022. <option value="21">21</option>
  1023. <option value="22">22</option>
  1024. <option value="23">23</option>
  1025. </select>&nbsp;hours
  1026. <select style="width:50px; margin-left:0px;" id="node-input-nauticalDawnOffsetMinutes">
  1027. <option value="0">00</option>
  1028. <option value="1">01</option>
  1029. <option value="2">02</option>
  1030. <option value="3">03</option>
  1031. <option value="4">04</option>
  1032. <option value="5">05</option>
  1033. <option value="6">06</option>
  1034. <option value="7">07</option>
  1035. <option value="8">08</option>
  1036. <option value="9">09</option>
  1037. <option value="10">10</option>
  1038. <option value="15">15</option>
  1039. <option value="20">20</option>
  1040. <option value="25">25</option>
  1041. <option value="30">30</option>
  1042. <option value="35">35</option>
  1043. <option value="40">40</option>
  1044. <option value="45">45</option>
  1045. <option value="50">50</option>
  1046. <option value="55">55</option>
  1047. </select>&nbsp;minutes
  1048. <input type="hidden" id="node-input-nauticalDawnOffset">
  1049. </div>
  1050. <hr />
  1051. <!-- dawn -->
  1052. <div class="form-row">
  1053. <label for="node-input-dawn"><i class="fa fa-clock-o"></i> Dawn</label>
  1054. <span>Morning nautical twilight ends, morning civil twilight starts</span>
  1055. </div>
  1056. <div class="form-row">
  1057. <label for="node-input-dawnPayload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload">Payload</span></label>
  1058. <input type="text" id="node-input-dawnPayload" style="width:70%">
  1059. <input type="hidden" id="node-input-dawnPayloadType">
  1060. </div>
  1061. <div class="form-row">
  1062. <label for="node-input-dawnTopic"><i class="fa fa-tasks"></i> <span>Topic</span></label>
  1063. <input type="text" id="node-input-dawnTopic">
  1064. </div>
  1065. <div class="form-row">
  1066. <label for="node-input-dawnOffsetType"><i class="fa fa-sliders"></i> <span>Offset</span></label>
  1067. <select style="width:50px; margin-left:0px;" id="node-input-dawnOffsetType">
  1068. <option value="1">+</option>
  1069. <option value="-1">-</option>
  1070. </select>&nbsp;
  1071. <select style="width:50px; margin-left:0px;" id="node-input-dawnOffsetHours">
  1072. <option value="0">00</option>
  1073. <option value="1">01</option>
  1074. <option value="2">02</option>
  1075. <option value="3">03</option>
  1076. <option value="4">04</option>
  1077. <option value="5">05</option>
  1078. <option value="6">06</option>
  1079. <option value="7">07</option>
  1080. <option value="8">08</option>
  1081. <option value="9">09</option>
  1082. <option value="10">10</option>
  1083. <option value="11">11</option>
  1084. <option value="12">12</option>
  1085. <option value="13">13</option>
  1086. <option value="14">14</option>
  1087. <option value="15">15</option>
  1088. <option value="16">16</option>
  1089. <option value="17">17</option>
  1090. <option value="18">18</option>
  1091. <option value="19">19</option>
  1092. <option value="20">20</option>
  1093. <option value="21">21</option>
  1094. <option value="22">22</option>
  1095. <option value="23">23</option>
  1096. </select>&nbsp;hours
  1097. <select style="width:50px; margin-left:0px;" id="node-input-dawnOffsetMinutes">
  1098. <option value="0">00</option>
  1099. <option value="1">01</option>
  1100. <option value="2">02</option>
  1101. <option value="3">03</option>
  1102. <option value="4">04</option>
  1103. <option value="5">05</option>
  1104. <option value="6">06</option>
  1105. <option value="7">07</option>
  1106. <option value="8">08</option>
  1107. <option value="9">09</option>
  1108. <option value="10">10</option>
  1109. <option value="15">15</option>
  1110. <option value="20">20</option>
  1111. <option value="25">25</option>
  1112. <option value="30">30</option>
  1113. <option value="35">35</option>
  1114. <option value="40">40</option>
  1115. <option value="45">45</option>
  1116. <option value="50">50</option>
  1117. <option value="55">55</option>
  1118. </select>&nbsp;minutes
  1119. <input type="hidden" id="node-input-dawnOffset">
  1120. </div>
  1121. <hr />
  1122. </script>
  1123. <script type="text/x-red" data-help-name="suncron">
  1124. <p>This node emits configurable outgoing messages based on the position of the sun.</p>
  1125. <h3>Sun event outputs</h3>
  1126. <dl class="message-properties">
  1127. <dt>msg.payload
  1128. <span class="property-type">string | bool | number | obj</span>
  1129. </dt>
  1130. <dt>msg.topic
  1131. <span class="property-type">string</span>
  1132. </dt>
  1133. <dt>msg.schedule
  1134. <span class="property-type">obj</span>
  1135. </dt>
  1136. <dt>msg.next
  1137. <span class="property-type">obj</span>
  1138. </dt>
  1139. </dl>
  1140. <h4>Details</h4>
  1141. <p>
  1142. For each significant sun event (e.g. sunrise, noon, dusk etc.) a <code>msg.payload</code> and <code>msg.topic</code> can be
  1143. specified which the node will emit once the event fires.
  1144. </p>
  1145. <p>
  1146. You can configure a positive or negative offset to adjust each event.
  1147. </p>
  1148. <h4>Schedule</h4>
  1149. <p>
  1150. The <code>msg.schedule</code> attribute contains an object with details about the
  1151. schedule of the current date. The schedule contains only events which have been configured with a payload.
  1152. Each event has the following attributes:
  1153. <ul>
  1154. <li><code>event</code> is the name of the sun event</li>
  1155. <li><code>sunEventTime</code> refers to the unadjusted time of the respective sun event.</li>
  1156. <li><code>cronTime</code> refers to the adjusted time, i.e. taking the offset into account.</li>
  1157. </ul>
  1158. </p>
  1159. <h5>Example <code>msg.schedule</code> object</h5>
  1160. <pre>
  1161. {
  1162. "sunrise": {
  1163. "event": "sunrise",
  1164. "sunEventTime": "2019-09-08T06:29:51",
  1165. "cronTime": "2019-09-08T07:31:51"
  1166. },
  1167. "sunriseEnd": {
  1168. "event": "sunriseEnd",
  1169. "sunEventTime": "2019-09-08T06:33:24",
  1170. "cronTime": "2019-09-08T03:33:24"
  1171. },
  1172. "dawn": {
  1173. "event": "dawn",
  1174. "sunEventTime": "2019-09-08T05:54:49",
  1175. "cronTime": "2019-09-08T06:54:49"
  1176. }
  1177. ...
  1178. }
  1179. </pre>
  1180. <h4>Next</h4>
  1181. <p>
  1182. The <code>msg.next</code> attribute contains the event object of the schedule which is coming up next.
  1183. </p>
  1184. <h3>Schedule event outputs</h3>
  1185. <p>
  1186. If the checkbox &quot;Emit schedule when updated&quot; is ticked, the node will emit additional messages whenever
  1187. the schedule gets updated. This happens on startup, when offsets are overridden at runtime, and shortly
  1188. after midnight. Those messages will contain the schedule object as <code>msg.payload</code> (same structure as above)
  1189. and the string &quot;suncron:schedule&quot; as <code>msg.topic</code>.
  1190. </p>
  1191. <dl class="message-properties">
  1192. <dt>msg.payload
  1193. <span class="property-type">obj</span>
  1194. </dt>
  1195. <dt>msg.topic
  1196. <span class="property-type">&quot;suncron:schedule&quot;</span>
  1197. </dt>
  1198. </dl>
  1199. </script>