edit_config_template.html 119 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158
  1. <!DOCTYPE html>
  2. <html lang="en" xml:lang="en">
  3. <head>
  4. <title>Configuration</title>
  5. <meta charset="UTF-8" />
  6. <style>
  7. h1 {font-size: 2em;}
  8. h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
  9. h3 {font-size: 1.2em;}
  10. h4 {font-size: 1.05em; margin-bottom: 0;}
  11. h5 {font-size: 0.83em; margin-top: 0.2em; margin-bottom: 0;}
  12. p {font-size: 1em;}
  13. .table {
  14. border: 0pt;
  15. border-collapse: collapse;
  16. table-layout: fixed;
  17. width:100%;
  18. }
  19. td {
  20. padding: 10px;
  21. vertical-align: middle;
  22. }
  23. .button {
  24. padding: 5px 10px;
  25. width: 220px;
  26. font-size: 16px;
  27. }
  28. input[type=number] {
  29. width: 60px;
  30. min-width: 60px;
  31. max-width: 60px;
  32. margin-right: 10px;
  33. padding: 3px 5px;
  34. display: inline-block;
  35. border: 1px solid #ccc;
  36. font-size: 16px;
  37. vertical-align: middle;
  38. }
  39. input[type=text] {
  40. width: 96%;
  41. min-width:240px;
  42. max-width:96%;
  43. margin-right: 10px;
  44. padding: 3px 5px;
  45. display: inline-block;
  46. border: 1px solid #ccc;
  47. font-size: 16px;
  48. vertical-align: middle;
  49. }
  50. select {
  51. min-width: 72px;
  52. max-width: 100%;
  53. padding: 3px 5px;
  54. display: inline-block;
  55. border: 1px solid #ccc;
  56. font-size: 16px;
  57. margin-right: 10px;
  58. vertical-align: middle;
  59. }
  60. .select_large {
  61. width: 100%;
  62. min-width: 250px;
  63. max-width: 100%;
  64. padding: 3px 5px;
  65. display: inline-block;
  66. border: 1px solid #ccc;
  67. font-size: 16px;
  68. margin-right: 10px;
  69. vertical-align: middle;
  70. }
  71. textarea {
  72. font-size: 14px;
  73. }
  74. .description {
  75. color: black;
  76. font-size: 80%;
  77. }
  78. .disabled {
  79. color:rgb(122, 122, 122);
  80. }
  81. #GPIO_LEDColor_value1 #GPIO_LEDColor_value2 #GPIO_LEDColor_value3 {
  82. width: 30px;
  83. font-size: 16px;
  84. }
  85. .invalid-input {
  86. background-color: #FFAA00;
  87. }
  88. input:out-of-range {
  89. background-color: rgba(255, 0, 0, 0.25);
  90. border: 1px solid red;
  91. }
  92. input:invalid {
  93. background-color: rgba(255, 0, 0, 0.25);
  94. border: 1px solid red;
  95. }
  96. .hidden {
  97. display: none;
  98. }
  99. .expert {
  100. background-color: #ffefef;
  101. font-size: 16px;
  102. }
  103. .indent1 {
  104. padding-left: 25px;
  105. font-size: 16px;
  106. }
  107. .indent2 {
  108. padding-left: 50px;
  109. font-size: 16px;
  110. }
  111. .tooltip {
  112. position: relative;
  113. display: inline-block;
  114. }
  115. .tooltip .tooltiptext {
  116. visibility: hidden;
  117. width: 600px;
  118. background-color: #fcfcfc;
  119. padding: 5px;
  120. padding-bottom: 0;
  121. border: solid black 2px;
  122. /* Position the tooltip */
  123. position: absolute;
  124. z-index: 1;
  125. top: 100%;
  126. left: 100%;
  127. margin-left: -600px;
  128. }
  129. .tooltip:hover .tooltiptext {
  130. visibility: visible;
  131. }
  132. .tooltip-content {
  133. width: calc(100% - 2px);
  134. height: calc(100% - 2px);
  135. padding: 1px;
  136. }
  137. #overlay {
  138. position: fixed;
  139. display: none;
  140. width: 100%;
  141. height: 100%;
  142. top: 0;
  143. left: 0;
  144. right: 0;
  145. bottom: 0;
  146. background-color: rgba(0,0,0,0.8);
  147. z-index: 2;
  148. }
  149. #overlaytext{
  150. position: absolute;
  151. top: 50%;
  152. left: 50%;
  153. font-size: 150%;
  154. color: white;
  155. transform: translate(-50%,-50%);
  156. -ms-transform: translate(-50%,-50%);
  157. }
  158. </style>
  159. <link rel="stylesheet" href="mkdocs_theme.css?v=$COMMIT_HASH" />
  160. <link rel="stylesheet" href="mkdocs_theme_extra.css?v=$COMMIT_HASH" />
  161. <link rel="stylesheet" href="github.min.css?v=$COMMIT_HASH" />
  162. <link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
  163. <script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
  164. <script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
  165. <script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
  166. <script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
  167. <script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
  168. </head>
  169. <body style="font-family: arial; padding: 0px 10px;">
  170. <div id="overlay">
  171. <div id="overlaytext"></div>
  172. </div>
  173. <h2>Configuration</h2>
  174. <details id="desc_details">
  175. <summary><b>CLICK HERE</b> for usage description. More infos in documentation:
  176. <a href="https://jomjol.github.io/AI-on-the-edge-device-docs/Parameters" target="_blank">Parameter</a>
  177. </summary>
  178. <p>
  179. This page lists all available configuration parameters of the device.<br>
  180. The description of each parameter can be shown by hovering over or by clicking the <img src="help.png" width="16px"> icon.
  181. </p>
  182. <p>
  183. The page gets opened with the default view which should be sufficient for regular configuration tasks. Enabling the <b>"Show Expert Parameters"</b>
  184. some expert parameters (light red background color) will be added to the parameter list. Additionally the button <b>"Edit "Config.ini" File"</b>
  185. to edit the underlaying configuration file (config.ini) manually is now shown on top of the page. This function should be only used for special cases.
  186. </p>
  187. <p>
  188. Sections (entire functionality) or single parameters having a checkbox can be enabled or disabled.
  189. Disabling a complete section results in a disabled functionality. Whenever only a single parameter of a section is disabled
  190. the hard-coded default value is used for the disabled parameter.
  191. </p>
  192. <p>
  193. Don't forget to save the changes with the button <b>"Save Config"</b> at the bottom of this page.<br>
  194. <label id="reboot_text" name="reboot_text">
  195. To apply the new configuration a restart of the device is neccessary: <b>"Reboot to apply changes"</b>
  196. </label>
  197. </p>
  198. </details>
  199. <hr />
  200. <div id="divall" style="display:none">
  201. <table class="table">
  202. <colgroup>
  203. <col span="1" style="width:290px">
  204. <col span="1" style="width:300px;">
  205. <col span="1">
  206. </colgroup>
  207. <tr style="border-bottom: 2px solid lightgray;">
  208. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Configuration View</h4></td>
  209. </tr>
  210. <tr>
  211. <td class="indent1">
  212. <input style="margin-top:12px;margin-bottom:12px" type="checkbox" id="ExpertModus_enabled" value="1" onclick='UpdateExpertModus()' unchecked>
  213. <label for="ExpertModus_enabled">Show Expert Parameters</label>
  214. </td>
  215. <td>
  216. <button style="display:none;" class="button" id="Button_Edit_Config_Raw" onclick="editConfigRaw()">Edit Config file in raw mode</button>
  217. </td>
  218. </tr>
  219. <!------------- Take Image ------------------>
  220. <tr style="border-bottom: 2px solid lightgray;">
  221. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Take Image</h4></td>
  222. </tr>
  223. <tr>
  224. <td class="indent1">
  225. <input type="checkbox" id="TakeImage_RawImagesLocation_enabled" value="1" onclick='InvertEnableItem("TakeImage", "RawImagesLocation")' unchecked >
  226. <label for=TakeImage_RawImagesLocation_enabled><class id="TakeImage_RawImagesLocation_text" style="color:black;">Raw Images Location</class></label>
  227. </td>
  228. <td>
  229. <input required type="text" name="name" id="TakeImage_RawImagesLocation_value1">
  230. </td>
  231. <td>$TOOLTIP_TakeImage_RawImagesLocation</td>
  232. </tr>
  233. <tr>
  234. <td class="indent1">
  235. <input type="checkbox" id="TakeImage_RawImagesRetention_enabled" value="1" onclick='InvertEnableItem("TakeImage", "RawImagesRetention")' unchecked >
  236. <label for=TakeImage_RawImagesRetention_enabled><class id="TakeImage_RawImagesRetention_text" style="color:black;">Raw Images Retention</class></label>
  237. </td>
  238. <td>
  239. <input required type="number" id="TakeImage_RawImagesRetention_value1" size="13" min="0" step="1"
  240. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  241. </td>
  242. <td>$TOOLTIP_TakeImage_RawImagesRetention</td>
  243. </tr>
  244. <tr class="expert" unused_id="TakeImage_WaitBeforeTakingPicture_ex3">
  245. <td class="indent1">
  246. <class id="TakeImage_WaitBeforeTakingPicture_text" style="color:black;">Wait Before Taking Picture</class>
  247. </td>
  248. <td>
  249. <input required type="number" id="TakeImage_WaitBeforeTakingPicture_value1" size="13" min="0" step="any" onchange="cameraParameterChanged()"
  250. oninput="(!validity.rangeUnderflow||(value=0));">Seconds
  251. </td>
  252. <td>$TOOLTIP_TakeImage_WaitBeforeTakingPicture</td>
  253. </tr>
  254. <tr class="expert" unused_id="TakeImage_CamGainceiling_ex3">
  255. <td class="indent1">
  256. <class id="TakeImage_CamGainceiling_text" style="color:black;">CamGainceiling</class>
  257. </td>
  258. <td>
  259. <select id="TakeImage_CamGainceiling_value1" onchange="cameraParameterChanged()">
  260. <option value="x2" selected>x2</option>
  261. <option value="x4" >x4</option>
  262. <option value="x8" >x8</option>
  263. <option value="x16" >x16</option>
  264. <option value="x32" >x32</option>
  265. <option value="x64" >x64</option>
  266. <option value="x128" >x128</option>
  267. </select>
  268. </td>
  269. <td>$TOOLTIP_TakeImage_CamGainceiling</td>
  270. </tr>
  271. <tr class="expert" unused_id="TakeImage_CamQuality_ex3">
  272. <td class="indent1">
  273. <class id="TakeImage_CamQuality_text" style="color:black;">Image Quality</class>
  274. </td>
  275. <td>
  276. <input required type="number" id="TakeImage_CamQuality_value1" size="13" min="5" max="63" onchange="cameraParameterChanged()"
  277. oninput="(!validity.rangeUnderflow||(value=5)) && (!validity.rangeOverflow||(value=63)) &&
  278. (!validity.stepMismatch||(value=parseInt(this.value)));">
  279. </td>
  280. <td>$TOOLTIP_TakeImage_CamQuality</td>
  281. </tr>
  282. <tr unused_id="TakeImage_CamBrightness_ex3">
  283. <td class="indent1">
  284. <class id="TakeImage_CamBrightness_text" style="color:black;">Brightness</class>
  285. </td>
  286. <td>
  287. <input required type="number" id="TakeImage_CamBrightness_value1" size="13" min="-2" max="2" onchange="cameraParameterChanged()"
  288. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  289. </td>
  290. <td>$TOOLTIP_TakeImage_CamBrightness</td>
  291. </tr>
  292. <tr unused_id="TakeImage_CamContrast_ex3">
  293. <td class="indent1">
  294. <class id="TakeImage_CamContrast_text" style="color:black;">Contrast</class>
  295. </td>
  296. <td>
  297. <input required type="number" id="TakeImage_CamContrast_value1" size="13" min="-2" max="2" onchange="cameraParameterChanged()"
  298. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  299. </td>
  300. <td>$TOOLTIP_TakeImage_CamContrast</td>
  301. </tr>
  302. <tr unused_id="TakeImage_CamSaturation_ex3">
  303. <td class="indent1">
  304. <class id="TakeImage_CamSaturation_text" style="color:black;">Saturation</class>
  305. </td>
  306. <td>
  307. <input required type="number" id="TakeImage_CamSaturation_value1" size="13" min="-2" max="2" onchange="cameraParameterChanged()"
  308. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  309. </td>
  310. <td>$TOOLTIP_TakeImage_CamSaturation</td>
  311. </tr>
  312. <tr class="expert" unused_id="TakeImage_CamAutoSharpness_ex3">
  313. <td class="indent1">
  314. <class id="TakeImage_CamAutoSharpness_text" style="color:black;">AutoSharpness</class>
  315. </td>
  316. <td>
  317. <select id="TakeImage_CamAutoSharpness_value1" onchange="cameraParameterChanged()">
  318. <option value="true">enable</option>
  319. <option value="false" selected>disable</option>
  320. </select>
  321. </td>
  322. <td>$TOOLTIP_TakeImage_CamAutoSharpness</td>
  323. </tr>
  324. <tr class="expert" unused_id="TakeImage_CamSharpness_ex3">
  325. <td class="indent1">
  326. <class id="TakeImage_CamSharpness_text" style="color:black;">Sharpness</class>
  327. </td>
  328. <td>
  329. <input required type="number" id="TakeImage_CamSharpness_value1" size="13" min="-2" max="2" onchange="cameraParameterChanged()"
  330. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  331. </td>
  332. <td>$TOOLTIP_TakeImage_CamSharpness</td>
  333. </tr>
  334. <tr class="expert" unused_id="TakeImage_CamSpecialEffect_ex3">
  335. <td class="indent1">
  336. <class id="TakeImage_CamSpecialEffect_text" style="color:black;">SpecialEffect</class>
  337. </td>
  338. <td>
  339. <select id="TakeImage_CamSpecialEffect_value1" onchange="cameraParameterChanged()">
  340. <option value="no_effect" selected>no effect</option>
  341. <option value="negative" >negative</option>
  342. <option value="grayscale" >grayscale</option>
  343. <option value="red" >red</option>
  344. <option value="green" >green</option>
  345. <option value="blue" >blue</option>
  346. <option value="retro" >retro</option>
  347. </select>
  348. </td>
  349. <td>$TOOLTIP_TakeImage_CamSpecialEffect</td>
  350. </tr>
  351. <tr class="expert" unused_id="TakeImage_CamWbMode_ex3">
  352. <td class="indent1">
  353. <class id="TakeImage_CamWbMode_text" style="color:black;">White Balance Mode</class>
  354. </td>
  355. <td>
  356. <select id="TakeImage_CamWbMode_value1" onchange="cameraParameterChanged()">
  357. <option value="auto" selected>auto</option>
  358. <option value="sunny" >sunny</option>
  359. <option value="cloudy" >cloudy</option>
  360. <option value="office" >office</option>
  361. <option value="home" >home</option>
  362. </select>
  363. </td>
  364. <td>$TOOLTIP_TakeImage_CamWbMode</td>
  365. </tr>
  366. <tr class="expert" unused_id="TakeImage_CamAwb_ex3">
  367. <td class="indent1">
  368. <class id="TakeImage_CamAwb_text" style="color:black;">White Balance</class>
  369. </td>
  370. <td>
  371. <select id="TakeImage_CamAwb_value1" onchange="cameraParameterChanged()">
  372. <option value="true">enable</option>
  373. <option value="false" selected>disable</option>
  374. </select>
  375. </td>
  376. <td>$TOOLTIP_TakeImage_CamAwb</td>
  377. </tr>
  378. <tr class="expert" unused_id="TakeImage_CamAwbGain_ex3">
  379. <td class="indent1">
  380. <class id="TakeImage_CamAwbGain_text" style="color:black;">Auto White Balance</class>
  381. </td>
  382. <td>
  383. <select id="TakeImage_CamAwbGain_value1" onchange="cameraParameterChanged()">
  384. <option value="true">enable</option>
  385. <option value="false" selected>disable</option>
  386. </select>
  387. </td>
  388. <td>$TOOLTIP_TakeImage_CamAwbGain</td>
  389. </tr>
  390. <tr class="expert" unused_id="TakeImage_CamAec_ex3">
  391. <td class="indent1">
  392. <class id="TakeImage_CamAec_text" style="color:black;">Auto-Exposure Control</class>
  393. </td>
  394. <td>
  395. <select id="TakeImage_CamAec_value1" onchange="cameraParameterChanged()">
  396. <option value="true">enable</option>
  397. <option value="false" selected>disable</option>
  398. </select>
  399. </td>
  400. <td>$TOOLTIP_TakeImage_CamAec</td>
  401. </tr>
  402. <tr class="expert" unused_id="TakeImage_CamAec2_ex3">
  403. <td class="indent1">
  404. <class id="TakeImage_CamAec2_text" style="color:black;">Auto-Exposure Control 2</class>
  405. </td>
  406. <td>
  407. <select id="TakeImage_CamAec2_value1" onchange="cameraParameterChanged()">
  408. <option value="true">enable</option>
  409. <option value="false" selected>disable</option>
  410. </select>
  411. </td>
  412. <td>$TOOLTIP_TakeImage_CamAec2</td>
  413. </tr>
  414. <tr class="expert" unused_id="TakeImage_CamAeLevel_ex3">
  415. <td class="indent1">
  416. <class id="TakeImage_CamAeLevel_text" style="color:black;">Auto Exposure Level</class>
  417. </td>
  418. <td>
  419. <input required type="number" id="TakeImage_CamAeLevel_value1" size="13" min="-2" max="2" onchange="cameraParameterChanged()"
  420. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  421. </td>
  422. <td>$TOOLTIP_TakeImage_CamAeLevel</td>
  423. </tr>
  424. <tr class="expert" unused_id="TakeImage_CamAecValue_ex3">
  425. <td class="indent1">
  426. <class id="TakeImage_CamAecValue_text" style="color:black;">Auto Exposure Value</class>
  427. </td>
  428. <td>
  429. <input required type="number" id="TakeImage_CamAecValue_value1" size="13" min="0" max="1200" onchange="cameraParameterChanged()"
  430. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=1200)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  431. </td>
  432. <td>$TOOLTIP_TakeImage_CamAecValue</td>
  433. </tr>
  434. <tr class="expert" unused_id="TakeImage_CamAgc_ex3">
  435. <td class="indent1">
  436. <class id="TakeImage_CamAgc_text" style="color:black;">Auto Gain</class>
  437. </td>
  438. <td>
  439. <select id="TakeImage_CamAgc_value1" onchange="cameraParameterChanged()">
  440. <option value="true">enable</option>
  441. <option value="false" selected>disable</option>
  442. </select>
  443. </td>
  444. <td>$TOOLTIP_TakeImage_CamAgc</td>
  445. </tr>
  446. <tr class="expert" unused_id="TakeImage_CamAgcGain_ex3">
  447. <td class="indent1">
  448. <class id="TakeImage_CamAgcGain_text" style="color:black;">Gain Manuall Value</class>
  449. </td>
  450. <td>
  451. <input required type="number" id="TakeImage_CamAgcGain_value1" size="13" min="0" max="30" onchange="cameraParameterChanged()"
  452. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=30)) &&
  453. (!validity.stepMismatch||(value=parseInt(this.value)));">
  454. </td>
  455. <td>$TOOLTIP_TakeImage_CamAgcGain</td>
  456. </tr>
  457. <tr class="expert" unused_id="TakeImage_CamBpc_ex3">
  458. <td class="indent1">
  459. <class id="TakeImage_CamBpc_text" style="color:black;">Black Pixel Correction</class>
  460. </td>
  461. <td>
  462. <select id="TakeImage_CamBpc_value1" onchange="cameraParameterChanged()">
  463. <option value="true">enable</option>
  464. <option value="false" selected>disable</option>
  465. </select>
  466. </td>
  467. <td>$TOOLTIP_TakeImage_CamBpc</td>
  468. </tr>
  469. <tr class="expert" unused_id="TakeImage_CamWpc_ex3">
  470. <td class="indent1">
  471. <class id="TakeImage_CamWpc_text" style="color:black;">White Pixel Correction</class>
  472. </td>
  473. <td>
  474. <select id="TakeImage_CamWpc_value1" onchange="cameraParameterChanged()">
  475. <option value="true">enable</option>
  476. <option value="false" selected>disable</option>
  477. </select>
  478. </td>
  479. <td>$TOOLTIP_TakeImage_CamWpc</td>
  480. </tr>
  481. <tr class="expert" unused_id="TakeImage_CamRawGma_ex3">
  482. <td class="indent1">
  483. <class id="TakeImage_CamRawGma_text" style="color:black;">CamRawGma</class>
  484. </td>
  485. <td>
  486. <select id="TakeImage_CamRawGma_value1" onchange="cameraParameterChanged()">
  487. <option value="true">enable</option>
  488. <option value="false" selected>disable</option>
  489. </select>
  490. </td>
  491. <td>$TOOLTIP_TakeImage_CamRawGma</td>
  492. </tr>
  493. <tr class="expert" unused_id="TakeImage_CamLenc_ex3">
  494. <td class="indent1">
  495. <class id="TakeImage_CamLenc_text" style="color:black;">Lens Correction</class>
  496. </td>
  497. <td>
  498. <select id="TakeImage_CamLenc_value1" onchange="cameraParameterChanged()">
  499. <option value="true">enable</option>
  500. <option value="false" selected>disable</option>
  501. </select>
  502. </td>
  503. <td>$TOOLTIP_TakeImage_CamLenc</td>
  504. </tr>
  505. <tr unused_id="TakeImage_CamHmirror_ex3">
  506. <td class="indent1">
  507. <class id="TakeImage_CamHmirror_text" style="color:black;">Mirror Image</class>
  508. </td>
  509. <td>
  510. <select id="TakeImage_CamHmirror_value1" onchange="cameraParameterChanged()">
  511. <option value="true">enable</option>
  512. <option value="false" selected>disable</option>
  513. </select>
  514. </td>
  515. <td>$TOOLTIP_TakeImage_CamHmirror</td>
  516. </tr>
  517. <tr unused_id="TakeImage_CamVflip_ex3">
  518. <td class="indent1">
  519. <class id="TakeImage_CamVflip_text" style="color:black;">Flip Image</class>
  520. </td>
  521. <td>
  522. <select id="TakeImage_CamVflip_value1" onchange="cameraParameterChanged()">
  523. <option value="true">enable</option>
  524. <option value="false" selected>disable</option>
  525. </select>
  526. </td>
  527. <td>$TOOLTIP_TakeImage_CamVflip</td>
  528. </tr>
  529. <tr class="expert" unused_id="TakeImage_CamDcw_ex3">
  530. <td class="indent1">
  531. <class id="TakeImage_CamDcw_text" style="color:black;">Downsize</class>
  532. </td>
  533. <td>
  534. <select id="TakeImage_CamDcw_value1" onchange="cameraParameterChanged()">
  535. <option value="true">enable</option>
  536. <option value="false" selected>disable</option>
  537. </select>
  538. </td>
  539. <td>$TOOLTIP_TakeImage_CamDcw</td>
  540. </tr>
  541. <tr class="expert" unused_id="TakeImage_CamZoom_ex3">
  542. <td class="indent1">
  543. <class id="TakeImage_CamZoom_text" style="color:black;">Zoom</class>
  544. </td>
  545. <td>
  546. <select id="TakeImage_CamZoom_value1" onchange="cameraParameterChanged()">
  547. <option value="true">enable</option>
  548. <option value="false" selected>disable</option>
  549. </select>
  550. </td>
  551. <td>$TOOLTIP_TakeImage_CamZoom</td>
  552. </tr>
  553. <tr class="expert" unused_id="TakeImage_CamZoomSize_ex3">
  554. <td class="indent1">
  555. <class id="TakeImage_CamZoomSize_text" style="color:black;">Zoom Size</class>
  556. </td>
  557. <td>
  558. <input required type="number" id="TakeImage_CamZoomSize_value1" value="0" min="0" max="29" step="1" onchange="cameraParameterChanged()"
  559. oninput="(!validity.rangeOverflow||(value=29)) && (!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  560. </td>
  561. <td>$TOOLTIP_TakeImage_CamZoomSize</td>
  562. </tr>
  563. <tr class="expert" unused_id="TakeImage_CamZoomOffsetX_ex3">
  564. <td class="indent1">
  565. <class id="TakeImage_CamZoomOffsetX_text" style="color:black;">Zoom Offset X</class>
  566. </td>
  567. <td>
  568. <input required type="number" id="TakeImage_CamZoomOffsetX_value1" value="0" min="-480" max="480" step="8" onchange="cameraParameterChanged()"
  569. oninput="(!validity.rangeOverflow||(value=480)) && (!validity.rangeUnderflow||(value=-480)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Pixel
  570. </td>
  571. <td>$TOOLTIP_TakeImage_CamZoomOffsetX</td>
  572. </tr>
  573. <tr class="expert" unused_id="TakeImage_CamZoomOffsetY_ex3">
  574. <td class="indent1">
  575. <class id="TakeImage_CamZoomOffsetY_text" style="color:black;">Zoom Offset Y</class>
  576. </td>
  577. <td>
  578. <input required type="number" id="TakeImage_CamZoomOffsetY_value1" value="0" min="-360" max="360" step="8" onchange="cameraParameterChanged()"
  579. oninput="(!validity.rangeOverflow||(value=360)) && (!validity.rangeUnderflow||(value=-360)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Pixel
  580. </td>
  581. <td>$TOOLTIP_TakeImage_CamZoomOffsetY</td>
  582. </tr>
  583. <tr unused_id="TakeImage_LEDIntensity_ex3">
  584. <td class="indent1">
  585. <class id="TakeImage_LEDIntensity_text" style="color:black;">LED Intensity</class>
  586. </td>
  587. <td>
  588. <input required type="number" id="TakeImage_LEDIntensity_value1" size="13" min="0" max="100" onchange="cameraParameterChanged()"
  589. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=100)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  590. </td>
  591. <td>$TOOLTIP_TakeImage_LEDIntensity</td>
  592. </tr>
  593. <tr class="expert" unused_id="TakeImage_Demo_ex3">
  594. <td class="indent1">
  595. <label>
  596. <class id="TakeImage_Demo_text" style="color:black;">Demo Mode</class>
  597. </label>
  598. </td>
  599. <td>
  600. <select id="TakeImage_Demo_value1">
  601. <option value="true">enable</option>
  602. <option value="false" selected>disable</option>
  603. </select>
  604. </td>
  605. <td>$TOOLTIP_TakeImage_Demo</td>
  606. </tr>
  607. <!------------- Alignment ------------------>
  608. <tr style="border-bottom: 2px solid lightgray;" id="ex4">
  609. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Alignment</h4></td>
  610. </tr>
  611. <tr class="expert" unused_id="Alignment_SearchFieldX_ex6">
  612. <td class="indent1">
  613. <class id="Alignment_SearchFieldX_text" style="color:black;">Search Field X</class>
  614. </td>
  615. <td>
  616. <input required type="number" name="name" id="Alignment_SearchFieldX_value1" size="13" min="1" step="1"
  617. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Pixel
  618. </td>
  619. <td>$TOOLTIP_Alignment_SearchFieldX</td>
  620. </tr>
  621. <tr class="expert" unused_id="Alignment_SearchFieldY_ex8">
  622. <td class="indent1">
  623. <class id="Alignment_SearchFieldY_text" style="color:black;">Search Field Y</class>
  624. </td>
  625. <td>
  626. <input required type="number" name="name" id="Alignment_SearchFieldY_value1" size="13" min="1"
  627. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Pixel
  628. </td>
  629. <td>$TOOLTIP_Alignment_SearchFieldY</td>
  630. </tr>
  631. <tr class="expert" unused_id="Alignment_AlignmentAlgo_ex8">
  632. <td class="indent1">
  633. <input type="checkbox" id="Alignment_AlignmentAlgo_enabled" value="1" onclick = 'InvertEnableItem("Alignment", "AlignmentAlgo")' unchecked >
  634. <label for=Alignment_AlignmentAlgo_enabled><class id="Alignment_AlignmentAlgo_text" style="color:black;">Alignment Algorithm</class></label>
  635. </td>
  636. <td>
  637. <select id="Alignment_AlignmentAlgo_value1">
  638. <option value="default" selected>Default</option>
  639. <option value="highAccuracy" >HighAccuracy</option>
  640. <option value="fast" >Fast</option>
  641. <option value="off" >Off</option><!-- add disable aligment algo |01.2023 -->
  642. </select>
  643. </td>
  644. <td>$TOOLTIP_Alignment_AlignmentAlgo</td>
  645. </tr>
  646. <tr unused_id="Alignment_InitialRotate_ex8">
  647. <td class="indent1">
  648. <class id="Alignment_InitialRotate_text" style="color:black;">Rotation angle</class>
  649. </td>
  650. <td>
  651. <input required type="number" name="name" id="Alignment_InitialRotate_value1" size="13" min="-180" max="+180" step="0.1"
  652. oninput="(!validity.rangeOverflow||(value=180)) && (!validity.rangeUnderflow||(value=-180)) && (!validity.stepMismatch||(value=parseInt(this.value)));">degree
  653. </td>
  654. <td>$TOOLTIP_Alignment_InitialRotate</td>
  655. </tr>
  656. <!------------- Digit ROIs ------------------>
  657. <tr style="border-bottom: 2px solid lightgray;" id="Category_Digits_ex4">
  658. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  659. <h4><input type="checkbox" id="Category_Digits_enabled" value="1" onclick ='UpdateAfterCategoryCheck()' unchecked >
  660. <label for=Category_Digits_enabled>Digit ROI Processing</label></h4>
  661. </td>
  662. </tr>
  663. <tr class="DigitItem">
  664. <td class="indent1" >
  665. <class id="Digits_Model_text" style="color:black;">Model</class>
  666. </td>
  667. <td>
  668. <select required class="select_large" id="Digits_Model_value1">
  669. </select>
  670. </td>
  671. <td>$TOOLTIP_Digits_Model</td>
  672. </tr>
  673. <tr class="DigitItem expert" unused_id="ex91">
  674. <td class="indent1">
  675. <input type="checkbox" id="Digits_CNNGoodThreshold_enabled" value="1" onclick = 'InvertEnableItem("Digits", "CNNGoodThreshold")' unchecked >
  676. <label for=Digits_CNNGoodThreshold_enabled><class id="Digits_CNNGoodThreshold_text" style="color:black;">CNN Good Threshold</class></label>
  677. </td>
  678. <td>
  679. <input required type="number" id="Digits_CNNGoodThreshold_value1" min="0" max="1" step="0.1"
  680. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=1)) &&
  681. (!validity.stepMismatch||(value=parseInt(this.value)));">
  682. </td>
  683. <td>$TOOLTIP_Digits_CNNGoodThreshold</td>
  684. </tr>
  685. <tr class="DigitItem">
  686. <td class="indent1">
  687. <input type="checkbox" id="Digits_ROIImagesLocation_enabled" value="1" onclick = 'InvertEnableItem("Digits", "ROIImagesLocation")' unchecked >
  688. <label for=Digits_ROIImagesLocation_enabled><class id="Digits_ROIImagesLocation_text" style="color:black;">ROI Images Location</class></label>
  689. </td>
  690. <td>
  691. <input required type="text" name="name" id="Digits_ROIImagesLocation_value1">
  692. </td>
  693. <td>$TOOLTIP_Digits_ROIImagesLocation</td>
  694. </tr>
  695. <tr class="DigitItem">
  696. <td class="indent1">
  697. <input type="checkbox" id="Digits_ROIImagesRetention_enabled" value="1" onclick = 'InvertEnableItem("Digits", "ROIImagesRetention")' unchecked >
  698. <label for=Digits_ROIImagesRetention_enabled><class id="Digits_ROIImagesRetention_text" style="color:black;">ROI Images Retention</class></label>
  699. </td>
  700. <td>
  701. <input required type="number" id="Digits_ROIImagesRetention_value1" min="0" step="1"
  702. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  703. </td>
  704. <td>$TOOLTIP_Digits_ROIImagesRetention</td>
  705. </tr>
  706. <!------------- Ananlog ROIs ------------------>
  707. <tr style="border-bottom: 2px solid lightgray;" id="Category_Analog_ex4">
  708. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  709. <h4><input type="checkbox" id="Category_Analog_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  710. <label for=Category_Analog_enabled>Analog ROI Processing</label></h4>
  711. </td>
  712. </tr>
  713. <tr class="AnalogItem">
  714. <td class="indent1">
  715. <class id="Analog_Model_text" style="color:black;">Model</class>
  716. </td>
  717. <td>
  718. <select required class="select_large" id="Analog_Model_value1">
  719. </select>
  720. </td>
  721. <td>$TOOLTIP_Analog_Model</td>
  722. </tr>
  723. <tr class="AnalogItem">
  724. <td class="indent1">
  725. <input type="checkbox" id="Analog_ROIImagesLocation_enabled" value="1" onclick = 'InvertEnableItem("Analog", "ROIImagesLocation")' unchecked >
  726. <label for=Analog_ROIImagesLocation_enabled><class id="Analog_ROIImagesLocation_text" style="color:black;">ROI Images Location</class>
  727. </label>
  728. </td>
  729. <td> <input required type="text" name="name" id="Analog_ROIImagesLocation_value1"> </td>
  730. <td>$TOOLTIP_Analog_ROIImagesLocation</td>
  731. </tr>
  732. <tr class="AnalogItem">
  733. <td class="indent1">
  734. <input type="checkbox" id="Analog_ROIImagesRetention_enabled" value="1" onclick = 'InvertEnableItem("Analog", "ROIImagesRetention")' unchecked >
  735. <label for=Analog_ROIImagesRetention_enabled><class id="Analog_ROIImagesRetention_text" style="color:black;">ROI Images Retention</class></label></td>
  736. <td>
  737. <input required type="number" id="Analog_ROIImagesRetention_value1" min="0" step="1"
  738. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  739. </td>
  740. <td>$TOOLTIP_Analog_ROIImagesRetention</td>
  741. </tr>
  742. <!------------- Post-Processing ------------------>
  743. <tr style="border-bottom: 2px solid lightgray;">
  744. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Post-Processing</h4></td>
  745. </tr>
  746. <tr>
  747. <td class="indent1">
  748. <label><class id="PostProcessing_PreValueUse_text" style="color:black;">Previous Value</class></label>
  749. </td>
  750. <td>
  751. <select id="PostProcessing_PreValueUse_value1">
  752. <option value="true">enable</option>
  753. <option value="false" selected>disable</option>
  754. </select>
  755. </td>
  756. <td>$TOOLTIP_PostProcessing_PreValueUse</td>
  757. </tr>
  758. <tr class="expert" unused_id="ex11">
  759. <td class="indent1">
  760. <input type="checkbox" id="PostProcessing_PreValueAgeStartup_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "PreValueAgeStartup")' unchecked >
  761. <label for=PostProcessing_PreValueAgeStartup_enabled><class id="PostProcessing_PreValueAgeStartup_text" style="color:black;">Maximum Age of Previous Value after Startup</class></label>
  762. </td>
  763. <td>
  764. <input required type="number" id="PostProcessing_PreValueAgeStartup_value1" size="13" min="0"
  765. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Minutes
  766. </td>
  767. <td>$TOOLTIP_PostProcessing_PreValueAgeStartup</td>
  768. </tr>
  769. <tr class="expert" unused_id="ex12">
  770. <td class="indent1">
  771. <label><class id="PostProcessing_ErrorMessage_text" style="color:black;">Skip Messages on Error</class></label>
  772. </td>
  773. <td>
  774. <select id="PostProcessing_ErrorMessage_value1">
  775. <option value="true">enable</option>
  776. <option value="false" selected>disable</option>
  777. </select>
  778. </td>
  779. <td>$TOOLTIP_PostProcessing_ErrorMessage</td>
  780. </tr>
  781. <tr class="expert" unused_id="ex1dddd">
  782. <td class="indent1">
  783. <label><class id="PostProcessing_CheckDigitIncreaseConsistency_text" style="color:black;">Check Digit Increase Consistency</class></label>
  784. </td>
  785. <td>
  786. <select id="PostProcessing_CheckDigitIncreaseConsistency_value1">
  787. <option value="true">enable</option>
  788. <option value="false" selected>disable</option>
  789. </select>
  790. </td>
  791. <td>$TOOLTIP_PostProcessing_CheckDigitIncreaseConsistency</td>
  792. </tr>
  793. <tr style="margin-top:12px">
  794. <td class="indent1" style="padding-top:25px" colspan="3">
  795. <b>Parameter per number sequence:</b>
  796. <select
  797. style="font-weight: bold; margin-left:17px" id="Numbers_value1" onchange="numberChanged()">
  798. </select>
  799. </td>
  800. </tr>
  801. <tr>
  802. <td class="indent2">
  803. <label><class id="PostProcessing_AllowNegativeRates_text" style="color:black;">Allow Negative Rate</class></label>
  804. </td>
  805. <td>
  806. <select id="PostProcessing_AllowNegativeRates_value1">
  807. <option value="true">enable</option>
  808. <option value="false" selected>disable</option>
  809. </select>
  810. </td>
  811. <td>$TOOLTIP_PostProcessing_NUMBER.AllowNegativeRates</td>
  812. </tr>
  813. <tr>
  814. <td class="indent2">
  815. <input type="checkbox" id="PostProcessing_DecimalShift_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "DecimalShift")' unchecked >
  816. <label for=PostProcessing_DecimalShift_enabled><class id="PostProcessing_DecimalShift_text" style="color:black;">Decimal Shift</class></label>
  817. </td>
  818. <td>
  819. <input required type="number" id="PostProcessing_DecimalShift_value1" value="0" step="1" min="-9" max="9"
  820. oninput="(!validity.rangeUnderflow||(value=-9)) && (!validity.rangeOverflow||(value=9)) &&
  821. (!validity.stepMismatch||(value=parseInt(this.value)));">
  822. </td>
  823. <td>$TOOLTIP_PostProcessing_NUMBER.DecimalShift</td>
  824. </tr>
  825. <tr>
  826. <td class="indent2">
  827. <input type="checkbox" id="PostProcessing_AnalogDigitalTransitionStart_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "AnalogDigitalTransitionStart")' unchecked >
  828. <label for=PostProcessing_AnalogDigitalTransitionStart_enabled><class id="PostProcessing_AnalogDigitalTransitionStart_text" style="color:black;">Analog/Digital Transition Start</class></label>
  829. </td>
  830. <td>
  831. <input required type="number" id="PostProcessing_AnalogDigitalTransitionStart_value1" step="0.1" min="3.0" max="9.9" value="9.2"
  832. oninput="(!validity.rangeUnderflow||(value=3.0)) && (!validity.rangeOverflow||(value=9.9)) &&
  833. (!validity.stepMismatch||(value=parseInt(this.value)));">
  834. </td>
  835. <td>$TOOLTIP_PostProcessing_NUMBER.AnalogDigitalTransitionStart</td>
  836. </tr>
  837. <tr>
  838. <td class="indent2">
  839. <input type="checkbox" id="PostProcessing_MaxRateValue_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateValue")' unchecked >
  840. <label for=PostProcessing_MaxRateValue_enabled><class id="PostProcessing_MaxRateValue_text" style="color:black;">Maximum Rate Value</class></label>
  841. </td>
  842. <td>
  843. <input required type="number" id="PostProcessing_MaxRateValue_value1" size="13" min="0" step="any"
  844. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  845. </td>
  846. <td>$TOOLTIP_PostProcessing_NUMBER.MaxRateValue</td>
  847. </tr>
  848. <tr>
  849. <td class="indent2">
  850. <input type="checkbox" id="PostProcessing_MaxRateType_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateType")' unchecked >
  851. <label for=PostProcessing_MaxRateType_enabled><class id="PostProcessing_MaxRateType_text" style="color:black;">Maximum Rate Type</class></label>
  852. </td>
  853. <td>
  854. <select id="PostProcessing_MaxRateType_value1">
  855. <option value="AbsoluteChange" >AbsoluteChange</option>
  856. <option value="RateChange" selected>RateChange</option>
  857. </select>
  858. </td>
  859. <td>$TOOLTIP_PostProcessing_NUMBER.MaxRateType</td>
  860. </tr>
  861. <tr>
  862. <td class="indent2">
  863. <label><class id="PostProcessing_ExtendedResolution_text" style="color:black;">Extended Resolution</class></label>
  864. </td>
  865. <td>
  866. <select id="PostProcessing_ExtendedResolution_value1">
  867. <option value="true">enable</option>
  868. <option value="false" selected>disable</option>
  869. </select>
  870. </td>
  871. <td>$TOOLTIP_PostProcessing_NUMBER.ExtendedResolution</td>
  872. </tr>
  873. <tr>
  874. <td class="indent2">
  875. <label><class id="PostProcessing_IgnoreLeadingNaN_text" style="color:black;">Ignore Leading NaNs</class></label>
  876. </td>
  877. <td>
  878. <select id="PostProcessing_IgnoreLeadingNaN_value1">
  879. <option value="true">enable</option>
  880. <option value="false" selected>disable</option>
  881. </select>
  882. </td>
  883. <td>$TOOLTIP_PostProcessing_NUMBER.IgnoreLeadingNaN</td>
  884. </tr>
  885. <!-------------
  886. <tr>
  887. <td class="indent2">
  888. <label><class id="PostProcessing_IgnoreAllNaN_text" style="color:black;">Ignore All NaNs</class></label>
  889. </td>
  890. <td>
  891. <select id="PostProcessing_IgnoreAllNaN_value1">
  892. <option value="true">enable</option>
  893. <option value="false" selected>disable</option>
  894. </select>
  895. </td>
  896. <td>$TOOLTIP_PostProcessing_NUMBER.IgnoreAllNaN</td>
  897. </tr>
  898. ------------------>
  899. <!------------- MQTT ------------------>
  900. <tr style="border-bottom: 2px solid lightgray;">
  901. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  902. <h4>
  903. <input type="checkbox" id="Category_MQTT_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  904. <label for=Category_MQTT_enabled>MQTT</label>
  905. </h4>
  906. </td>
  907. </tr>
  908. <tr class="MQTTItem">
  909. <td class="indent1">
  910. <input type="checkbox" id="MQTT_Uri_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Uri")' unchecked >
  911. <label for=MQTT_Uri_enabled><class id="MQTT_Uri_text" style="color:black;">URI</class></label>
  912. </td>
  913. <td>
  914. <input required type="text" id="MQTT_Uri_value1">
  915. </td>
  916. <td>$TOOLTIP_MQTT_Uri</td>
  917. </tr>
  918. <tr class="MQTTItem">
  919. <td class="indent1">
  920. <input type="checkbox" id="MQTT_MainTopic_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MainTopic")' unchecked >
  921. <label for=MQTT_MainTopic_enabled><class id="MQTT_MainTopic_text" style="color:black;">Main Topic</class></label>
  922. </td>
  923. <td>
  924. <input required type="text" id="MQTT_MainTopic_value1">
  925. </td>
  926. <td>$TOOLTIP_MQTT_MainTopic</td>
  927. </tr>
  928. <tr class="MQTTItem">
  929. <td class="indent1">
  930. <input type="checkbox" id="MQTT_ClientID_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientID")' unchecked >
  931. <label for=MQTT_ClientID_enabled><class id="MQTT_ClientID_text" style="color:black;">Client ID</class></label>
  932. </td>
  933. <td>
  934. <input required type="text" id="MQTT_ClientID_value1">
  935. </td>
  936. <td>$TOOLTIP_MQTT_ClientID</td>
  937. </tr>
  938. <tr class="MQTTItem">
  939. <td class="indent1">
  940. <input type="checkbox" id="MQTT_user_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "user")' unchecked >
  941. <label for=MQTT_user_enabled><class id="MQTT_user_text" style="color:black;">Username</class></label>
  942. </td>
  943. <td>
  944. <input type="text" id="MQTT_user_value1">
  945. </td>
  946. <td>$TOOLTIP_MQTT_user</td>
  947. </tr>
  948. <tr class="MQTTItem">
  949. <td class="indent1">
  950. <input type="checkbox" id="MQTT_password_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "password")' unchecked >
  951. <label for=MQTT_password_enabled><class id="MQTT_password_text" style="color:black;">Password</class></label>
  952. </td>
  953. <td>
  954. <input type="text" id="MQTT_password_value1">
  955. </td>
  956. <td>$TOOLTIP_MQTT_password</td>
  957. </tr>
  958. <tr class="MQTTItem expert" unused_id="exMqtt">
  959. <td class="indent1">
  960. <input type="checkbox" id="MQTT_CACert_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "CACert")' unchecked >
  961. <label for=MQTT_CACert_enabled><class id="MQTT_CACert_text" style="color:black;">Root CA Certificate file</class></label>
  962. </td>
  963. <td>
  964. <input type="text" id="MQTT_CACert_value1">
  965. </td>
  966. <td>$TOOLTIP_MQTT_CACert</td>
  967. </tr>
  968. <tr class="MQTTItem expert" unused_id="exMqtt">
  969. <td class="indent1">
  970. <input type="checkbox" id="MQTT_ClientCert_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientCert")' unchecked >
  971. <label for=MQTT_ClientCert_enabled><class id="MQTT_ClientCert_text" style="color:black;">Client Certificate file</class></label>
  972. </td>
  973. <td>
  974. <input type="text" id="MQTT_ClientCert_value1">
  975. </td>
  976. <td>$TOOLTIP_MQTT_ClientCert</td>
  977. </tr>
  978. <tr class="MQTTItem expert" unused_id="exMqtt">
  979. <td class="indent1">
  980. <input type="checkbox" id="MQTT_ClientKey_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientKey")' unchecked >
  981. <label for=MQTT_ClientKey_enabled><class id="MQTT_ClientKey_text" style="color:black;">Client Key file</class></label>
  982. </td>
  983. <td>
  984. <input type="text" id="MQTT_ClientKey_value1">
  985. </td>
  986. <td>$TOOLTIP_MQTT_ClientKey</td>
  987. </tr>
  988. <tr class="MQTTItem">
  989. <td class="indent1">
  990. <label><class id="MQTT_RetainMessages_text" style="color:black;">Retain Messages</class></label>
  991. </td>
  992. <td>
  993. <select id="MQTT_RetainMessages_value1">
  994. <option value="true">enable</option>
  995. <option value="false" selected>disable</option>
  996. </select>
  997. </td>
  998. <td>$TOOLTIP_MQTT_RetainMessages</td>
  999. </tr>
  1000. <tr class="MQTTItem">
  1001. <td class="indent1" style="padding-top:25px" colspan="2">
  1002. <b>Homeassistant Discovery (using MQTT)</b><br>
  1003. If activated, the discovery topics gets automatically scheduled to sent once after device startup during state "Publish to MQTT".
  1004. To schedule a retransmission: Use "Manual Control > Resend HA Discovery" or call REST API:
  1005. <a href=mqtt_publish_discovery target="_blank">http://&lt;IP&gt;/mqtt_publish_discovery</a>
  1006. </td>
  1007. </tr>
  1008. <tr class="MQTTItem">
  1009. <td class="indent2">
  1010. <label><class id="MQTT_HomeassistantDiscovery_text" style="color:black;">Homeassistant Discovery</class></label>
  1011. </td>
  1012. <td>
  1013. <select id="MQTT_HomeassistantDiscovery_value1">
  1014. <option value="true">enable</option>
  1015. <option value="false" selected>disable</option>
  1016. </select>
  1017. </td>
  1018. <td>$TOOLTIP_MQTT_HomeassistantDiscovery</td>
  1019. </tr>
  1020. <tr class="MQTTItem">
  1021. <td class="indent2">
  1022. <input type="checkbox" id="MQTT_MeterType_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MeterType")' unchecked >
  1023. <label for=MQTT_MeterType_enabled><class id="MQTT_MeterType_text" style="color:black;">Meter Type</class></label>
  1024. </td>
  1025. <td>
  1026. <select class="select_large" id="MQTT_MeterType_value1"> <!-- See https://developers.home-assistant.io/docs/core/entity/sensor/#available-device-classes -->
  1027. <option value="other" selected>Other (no Units)</option>
  1028. <option value="water_m3">Watermeter (Value: m³, Rate: m³/h)</option>
  1029. <option value="water_l">Watermeter (Value: l, Rate: l/h)</option>
  1030. <option value="water_gal">Watermeter (Value: gal, Rate: gal/h)</option>
  1031. <option value="water_ft3">Watermeter (Value: ft³, Rate: ft³/m)</option>
  1032. <option value="gas_m3">Gasmeter (Value: m³, Rate: m³/h)</option>
  1033. <option value="gas_ft3">Gasmeter (Value: ft³, Rate: ft³/m)</option>
  1034. <option value="energy_wh">Energymeter (Value: Wh, Rate: W)</option>
  1035. <option value="energy_kwh">Energymeter (Value: kWh, Rate: kW)</option>
  1036. <option value="energy_mwh">Energymeter (Value: MWh, Rate: MW)</option>
  1037. <option value="energy_gj">Energymeter (Value: GJ, Rate: GJ/h)</option>
  1038. </select>
  1039. </td>
  1040. <td>$TOOLTIP_MQTT_MeterType</td>
  1041. </tr>
  1042. <!------------- INFLUXDB v1 ------------------>
  1043. <tr style="border-bottom: 2px solid lightgray;">
  1044. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  1045. <h4>
  1046. <input type="checkbox" id="Category_InfluxDB_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  1047. <label for=Category_InfluxDB_enabled>InfluxDB v1.x</label></h4>
  1048. </td>
  1049. </tr>
  1050. <tr class="InfluxDBv1Item">
  1051. <td class="indent1">
  1052. <input type="checkbox" id="InfluxDB_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Uri")' unchecked >
  1053. <label for=InfluxDB_Uri_enabled><class id="InfluxDB_Uri_text" style="color:black;">URI</class></label>
  1054. </td>
  1055. <td>
  1056. <input required type="text" id="InfluxDB_Uri_value1">
  1057. </td>
  1058. <td>$TOOLTIP_InfluxDB_Uri</td>
  1059. </tr>
  1060. <tr class="InfluxDBv1Item">
  1061. <td class="indent1">
  1062. <input type="checkbox" id="InfluxDB_Database_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Database")' unchecked >
  1063. <label for=InfluxDB_Database_enabled><class id="InfluxDB_Database_text" style="color:black;">Database</class></label>
  1064. </td>
  1065. <td>
  1066. <input required type="text" id="InfluxDB_Database_value1">
  1067. </td>
  1068. <td>$TOOLTIP_InfluxDB_Database</td>
  1069. </tr>
  1070. <tr class="InfluxDBv1Item">
  1071. <td class="indent1">
  1072. <input type="checkbox" id="InfluxDB_user_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "user")' unchecked >
  1073. <label for=InfluxDB_user_enabled><class id="InfluxDB_user_text" style="color:black;">Username</class></label>
  1074. </td>
  1075. <td>
  1076. <input type="text" id="InfluxDB_user_value1">
  1077. </td>
  1078. <td>$TOOLTIP_InfluxDB_user</td>
  1079. </tr>
  1080. <tr class="InfluxDBv1Item">
  1081. <td class="indent1">
  1082. <input type="checkbox" id="InfluxDB_password_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "password")' unchecked >
  1083. <label for=InfluxDB_password_enabled><class id="InfluxDB_password_text" style="color:black;">Password</class></label>
  1084. </td>
  1085. <td>
  1086. <input type="text" id="InfluxDB_password_value1">
  1087. </td>
  1088. <td>$TOOLTIP_InfluxDB_password</td>
  1089. </tr>
  1090. <tr class="InfluxDBv1Item" style="margin-top:12px">
  1091. <td class="indent1" style="padding-top:25px" colspan="3">
  1092. <b>Parameter per number sequence:</b>
  1093. <select
  1094. style="font-weight: bold; margin-left:17px" id="NumbersInfluxDB_value1" onchange="numberInfluxDBChanged()">
  1095. </select>
  1096. </td>
  1097. </tr>
  1098. <tr class="InfluxDBv1Item">
  1099. <td class="indent2">
  1100. <input type="checkbox" id="InfluxDB_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Measurement")' unchecked >
  1101. <label for=InfluxDB_Measurement_enabled><class id="InfluxDB_Measurement_text" style="color:black;">Measurement</class></label>
  1102. </td>
  1103. <td>
  1104. <input required type="text" id="InfluxDB_Measurement_value1">
  1105. </td>
  1106. <td>$TOOLTIP_InfluxDB_NUMBER.Measurement</td>
  1107. </tr>
  1108. <tr class="InfluxDBv1Item">
  1109. <td class="indent2">
  1110. <input type="checkbox" id="InfluxDB_Field_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Field")' unchecked >
  1111. <label for=InfluxDB_Field_enabled><class id="InfluxDB_Field_text" style="color:black;">Field</class></label>
  1112. </td>
  1113. <td>
  1114. <input required type="text" id="InfluxDB_Field_value1">
  1115. </td>
  1116. <td>$TOOLTIP_InfluxDB_NUMBER.Field</td>
  1117. </tr>
  1118. <!------------- INFLUXDB v2 ------------------>
  1119. <tr style="border-bottom: 2px solid lightgray;">
  1120. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  1121. <h4>
  1122. <input type="checkbox" id="Category_InfluxDBv2_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  1123. <label for=Category_InfluxDBv2_enabled>InfluxDB v2.x</label></h4>
  1124. </td>
  1125. </tr>
  1126. <tr class="InfluxDBv2Item">
  1127. <td class="indent1">
  1128. <input type="checkbox" id="InfluxDBv2_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Uri")' unchecked >
  1129. <label for=InfluxDBv2_Uri_enabled><class id="InfluxDBv2_Uri_text" style="color:black;">URI</class></label>
  1130. </td>
  1131. <td>
  1132. <input required type="text" id="InfluxDBv2_Uri_value1">
  1133. </td>
  1134. <td>$TOOLTIP_InfluxDBv2_Uri</td>
  1135. </tr>
  1136. <tr class="InfluxDBv2Item">
  1137. <td class="indent1">
  1138. <input type="checkbox" id="InfluxDBv2_Bucket_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Bucket")' unchecked >
  1139. <label for=InfluxDBv2_Bucket_enabled><class id="InfluxDBv2_Bucket_text" style="color:black;">Bucket</class></label>
  1140. </td>
  1141. <td>
  1142. <input required type="text" id="InfluxDBv2_Bucket_value1">
  1143. </td>
  1144. <td>$TOOLTIP_InfluxDBv2_Bucket</td>
  1145. </tr>
  1146. <tr class="InfluxDBv2Item">
  1147. <td class="indent1">
  1148. <input type="checkbox" id="InfluxDBv2_Org_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Org")' unchecked >
  1149. <label for=InfluxDBv2_Org_enabled><class id="InfluxDBv2_Org_text" style="color:black;">Organization (Org)</class></label>
  1150. </td>
  1151. <td>
  1152. <input type="text" id="InfluxDBv2_Org_value1">
  1153. </td>
  1154. <td>$TOOLTIP_InfluxDBv2_Org</td>
  1155. </tr>
  1156. <tr class="InfluxDBv2Item">
  1157. <td class="indent1">
  1158. <input type="checkbox" id="InfluxDBv2_Token_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Token")' unchecked >
  1159. <label for=InfluxDBv2_Token_enabled><class id="InfluxDBv2_Token_text" style="color:black;">Token</class></label>
  1160. </td>
  1161. <td>
  1162. <input type="text" id="InfluxDBv2_Token_value1">
  1163. </td>
  1164. <td>$TOOLTIP_InfluxDBv2_Token</td>
  1165. </tr>
  1166. <tr class="InfluxDBv2Item" style="margin-top:12px">
  1167. <td class="indent1" style="padding-top:25px" colspan="3">
  1168. <b>Parameter per number sequence:</b>
  1169. <select
  1170. style="font-weight: bold; margin-left:17px" id="NumbersInfluxDBv2_value1" onchange="numberInfluxDBv2Changed()">
  1171. </select>
  1172. </td>
  1173. </tr>
  1174. <tr class="InfluxDBv2Item">
  1175. <td class="indent2">
  1176. <input type="checkbox" id="InfluxDBv2_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Measurement")' unchecked >
  1177. <label for=InfluxDBv2_Measurement_enabled><class id="InfluxDBv2_Measurement_text" style="color:black;">Measurement</class></label>
  1178. </td>
  1179. <td>
  1180. <input required type="text" id="InfluxDBv2_Measurement_value1">
  1181. </td>
  1182. <td>$TOOLTIP_InfluxDBv2_NUMBER.Measurement</td>
  1183. </tr>
  1184. <tr class="InfluxDBv2Item">
  1185. <td class="indent2">
  1186. <input type="checkbox" id="InfluxDBv2_Field_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Field")' unchecked >
  1187. <label for=InfluxDBv2_Field_enabled><class id="InfluxDBv2_Field_text" style="color:black;">Field</class></label>
  1188. </td>
  1189. <td>
  1190. <input required type="text" id="InfluxDBv2_Field_value1">
  1191. </td>
  1192. <td>$TOOLTIP_InfluxDBv2_NUMBER.Field</td>
  1193. </tr>
  1194. <!------------- GPIO ------------------>
  1195. <tr style="border-bottom: 2px solid lightgray;">
  1196. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  1197. <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='UpdateAfterCategoryCheck()' unchecked >
  1198. <label for=Category_GPIO_enabled>GPIO (General Purpose Input / Output)</label></h4>
  1199. </td>
  1200. </tr>
  1201. <!------------- GPIO0 begin ------------------>
  1202. <tr class="GPIO_IO0 GPIO_item expert">
  1203. <td class="indent1">
  1204. <input type="checkbox" id="GPIO_IO0_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO0")' unchecked>
  1205. <label for=GPIO_IO0_enabled><span id="GPIO_IO0_text">GPIO0 Configuration</span></label>
  1206. </td>
  1207. <td>
  1208. <select id="GPIO_IO0_value1">
  1209. <option value="input">input</option>
  1210. <option value="input-pullup">input pullup</option>
  1211. <option value="input-pulldown">input pulldown</option>
  1212. <option value="output">output</option>
  1213. </select>
  1214. </td>
  1215. <td>$TOOLTIP_GPIO_IO0</td>
  1216. </tr>
  1217. <tr class="GPIO_IO0 GPIO_item expert">
  1218. <td class="indent2">
  1219. <span id="GPIO_IO0_text" class="GPIO_IO0 GPIO_item">GPIO0 Use Interrupt</span>
  1220. </td>
  1221. <td>
  1222. <select id="GPIO_IO0_value2">
  1223. <option value="disabled">disabled</option>
  1224. <option value="rising-edge">rising edge</option>
  1225. <option value="falling-edge">falling edge</option>
  1226. <option value="rising-and-falling">rising and falling</option>
  1227. <option value="low-level-trigger">low level trigger</option>
  1228. <option value="high-level-trigger">high level trigger</option>
  1229. </select>
  1230. </td>
  1231. <td></td>
  1232. </tr>
  1233. <tr class="GPIO_IO0 GPIO_item expert">
  1234. <td class="indent2">
  1235. <span class="GPIO_IO0 GPIO_item">GPIO0 PWM Duty Cycle Resolution</span>
  1236. </td>
  1237. <td>
  1238. <input required type="number" id="GPIO_IO0_value3" min="1" max="20"
  1239. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1240. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO0 GPIO_item">Bits</span>
  1241. </td>
  1242. <td></td>
  1243. </tr>
  1244. <tr class="GPIO_IO0 GPIO_item expert">
  1245. <td class="indent2">
  1246. <span class="GPIO_IO0 GPIO_item">GPIO0 Enable MQTT</span>
  1247. </td>
  1248. <td><input type="checkbox" id="GPIO_IO0_value4"></td>
  1249. <td></td>
  1250. </tr>
  1251. <tr class="GPIO_IO0 GPIO_item expert">
  1252. <td class="indent2">
  1253. <span class="GPIO_IO0 GPIO_item">GPIO0 Enable REST API</span>
  1254. </td>
  1255. <td><input type="checkbox" id="GPIO_IO0_value5"></td>
  1256. <td></td>
  1257. </tr>
  1258. <tr class="GPIO_IO0 GPIO_item expert">
  1259. <td class="indent2">
  1260. <span class="GPIO_IO0 GPIO_item">GPIO0 Name</span>
  1261. </td>
  1262. <td><input type="text" id="GPIO_IO0_value6"></td>
  1263. <td></td>
  1264. </tr>
  1265. <!------------- GPIO0 end ------------------>
  1266. <!------------- GPIO1 begin ------------------>
  1267. <tr class="GPIO_IO1 GPIO_item expert">
  1268. <td class="indent1">
  1269. <input type="checkbox" id="GPIO_IO1_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO1")' unchecked>
  1270. <label for=GPIO_IO1_enabled><span id="GPIO_IO1_text">GPIO1 Configuration</span></label>
  1271. </td>
  1272. <td>
  1273. <select id="GPIO_IO1_value1">
  1274. <option value="input">input</option>
  1275. <option value="input-pullup">input pullup</option>
  1276. <option value="input-pulldown">input pulldown</option>
  1277. <option value="output">output</option>
  1278. </select>
  1279. </td>
  1280. <td>$TOOLTIP_GPIO_IO1</td>
  1281. </tr>
  1282. <tr class="GPIO_IO1 GPIO_item expert">
  1283. <td class="indent2">
  1284. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO1 Use Interrupt</span>
  1285. </td>
  1286. <td>
  1287. <select id="GPIO_IO1_value2">
  1288. <option value="disabled">disabled</option>
  1289. <option value="rising-edge" disabled>rising edge</option>
  1290. <option value="falling-edge" disabled>falling edge</option>
  1291. <option value="rising-and-falling">rising and falling</option>
  1292. <option value="low-level-trigger">low level trigger</option>
  1293. <option value="high-level-trigger">high level trigger</option>
  1294. </select>
  1295. </td>
  1296. <td></td>
  1297. </tr>
  1298. <tr class="GPIO_IO1 GPIO_item expert">
  1299. <td class="indent2">
  1300. <span class="GPIO_IO1 GPIO_item">GPIO1 PWM Duty Cycle Resolution</span>
  1301. </td>
  1302. <td><input required type="number" id="GPIO_IO1_value3" min="1" max="20"
  1303. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1304. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO1 GPIO_item">Bits</span>
  1305. </td>
  1306. <td></td>
  1307. </tr>
  1308. <tr class="GPIO_IO1 GPIO_item expert">
  1309. <td class="indent2">
  1310. <span class="GPIO_IO1 GPIO_item">GPIO1 Enable MQTT</span>
  1311. </td>
  1312. <td><input type="checkbox" id="GPIO_IO1_value4"></td>
  1313. <td></td>
  1314. </tr>
  1315. <tr class="GPIO_IO1 GPIO_item expert">
  1316. <td class="indent2">
  1317. <span class="GPIO_IO1 GPIO_item">GPIO1 Enable REST API</span>
  1318. </td>
  1319. <td><input type="checkbox" id="GPIO_IO1_value5"></td>
  1320. <td></td>
  1321. </tr>
  1322. <tr class="GPIO_IO1 GPIO_item expert">
  1323. <td class="indent2">
  1324. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO1 Name</span>
  1325. </td>
  1326. <td><input type="text" id="GPIO_IO1_value6"></td>
  1327. <td></td>
  1328. </tr>
  1329. <!------------- GPIO1 end ------------------>
  1330. <!------------- GPIO3 begin ------------------>
  1331. <tr class="GPIO_IO3 GPIO_item expert">
  1332. <td class="indent1">
  1333. <input type="checkbox" id="GPIO_IO3_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO3")' unchecked>
  1334. <label for=GPIO_IO3_enabled><span id="GPIO_IO3_text">GPIO3 Configuration</span></label>
  1335. </td>
  1336. <td>
  1337. <select id="GPIO_IO3_value1">
  1338. <option value="input">input</option>
  1339. <option value="input-pullup">input pullup</option>
  1340. <option value="input-pulldown">input pulldown</option>
  1341. <option value="output">output</option>
  1342. </select>
  1343. </td>
  1344. <td>$TOOLTIP_GPIO_IO3</td>
  1345. </tr>
  1346. <tr class="GPIO_IO3 GPIO_item expert">
  1347. <td class="indent2">
  1348. <span class="GPIO_IO3 GPIO_item">GPIO3 Use Interrupt</span>
  1349. </td>
  1350. <td>
  1351. <select id="GPIO_IO3_value2">
  1352. <option value="disabled">disabled</option>
  1353. <option value="rising-edge" disabled>rising edge</option>
  1354. <option value="falling-edge" disabled>falling edge</option>
  1355. <option value="rising-and-falling">rising and falling</option>
  1356. <option value="low-level-trigger">low level trigger</option>
  1357. <option value="high-level-trigger">high level trigger</option>
  1358. </select>
  1359. </td>
  1360. <td></td>
  1361. </tr>
  1362. <tr class="GPIO_IO3 GPIO_item expert">
  1363. <td class="indent2">
  1364. <span class="GPIO_IO3 GPIO_item">GPIO3 PWM Duty Cycle Resolution</span>
  1365. </td>
  1366. <td><input required type="number" id="GPIO_IO3_value3" min="1" max="20"
  1367. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1368. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO3 GPIO_item">Bits</span>
  1369. </td>
  1370. <td></td>
  1371. </tr>
  1372. <tr class="GPIO_IO3 GPIO_item expert">
  1373. <td class="indent2">
  1374. <span class="GPIO_IO3 GPIO_item">GPIO3 Enable MQTT</span>
  1375. </td>
  1376. <td><input type="checkbox" id="GPIO_IO3_value4"></td>
  1377. <td></td>
  1378. </tr>
  1379. <tr class="GPIO_IO3 GPIO_item expert">
  1380. <td class="indent2">
  1381. <span class="GPIO_IO3 GPIO_item">GPIO3 Enable REST API</span>
  1382. </td>
  1383. <td><input type="checkbox" id="GPIO_IO3_value5"></td>
  1384. <td></td>
  1385. </tr>
  1386. <tr class="GPIO_IO3 GPIO_item expert">
  1387. <td class="indent2">
  1388. <span class="GPIO_IO3 GPIO_item">GPIO3 Name</span>
  1389. </td>
  1390. <td><input type="text" id="GPIO_IO3_value6"></td>
  1391. <td></td>
  1392. </tr>
  1393. <!------------- GPIO3 end ------------------>
  1394. <!------------- GPIO4 begin ------------------>
  1395. <tr class="GPIO_item" style="border-bottom: 0px;">
  1396. <td class="indent1">
  1397. <input type="checkbox" id="GPIO_IO4_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO4")' checked>
  1398. <label for=GPIO_IO4_enabled><span id="GPIO_IO4_text">GPIO4 Configuration</span></label>
  1399. </td>
  1400. <td>
  1401. <select id="GPIO_IO4_value1">
  1402. <option value="input">input</option>
  1403. <option value="input-pullup">input pullup</option>
  1404. <option value="input-pulldown">input pulldown</option>
  1405. <option value="output">output</option>
  1406. <option value="built-in-led" select>built-in led flash light</option>
  1407. </select>
  1408. </td>
  1409. <td>$TOOLTIP_GPIO_IO4</td>
  1410. </tr>
  1411. <tr class="GPIO_item" style="border-top: 0px;">
  1412. <td colspan="2" style="padding-left:28px">
  1413. <b>IMPORTANT NOTE:</b><br>
  1414. If you'd like to use the built-in flash LED in parallel with other GPIO functionality,
  1415. you have to explicitely activate the "built-in LED flash light" option on GPIO4. The light
  1416. intensity control (PWM) of the LED flash light is not functional anymore (only 100%).
  1417. </td>
  1418. </tr>
  1419. <tr class="GPIO_IO4 GPIO_item expert">
  1420. <td class="indent2">
  1421. <span class="GPIO_IO4 GPIO_item">GPIO4 Use Interrupt</span>
  1422. </td>
  1423. <td>
  1424. <select id="GPIO_IO4_value2">
  1425. <option value="disabled">disabled</option>
  1426. <option value="rising-edge">rising edge</option>
  1427. <option value="falling-edge">falling edge</option>
  1428. <option value="rising-and-falling">rising and falling</option>
  1429. <option value="low-level-trigger">low level trigger</option>
  1430. <option value="high-level-trigger">high level trigger</option>
  1431. </select>
  1432. </td>
  1433. <td></td>
  1434. </tr>
  1435. <tr class="GPIO_IO4 GPIO_item expert">
  1436. <td class="indent2">
  1437. <span class="GPIO_IO4 GPIO_item">GPIO4 PWM Duty Cycle Resolution</span>
  1438. </td>
  1439. <td><input required type="number" id="GPIO_IO4_value3" min="1" max="20"
  1440. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1441. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO4 GPIO_item">Bits</span>
  1442. </td>
  1443. <td></td>
  1444. </tr>
  1445. <tr class="GPIO_IO4 GPIO_item expert">
  1446. <td class="indent2">
  1447. <span class="GPIO_IO4 GPIO_item">GPIO4 Enable MQTT</span>
  1448. </td>
  1449. <td><input type="checkbox" id="GPIO_IO4_value4"></td>
  1450. <td></td>
  1451. </tr>
  1452. <tr class="GPIO_IO4 GPIO_item expert">
  1453. <td class="indent2">
  1454. <span class="GPIO_IO4 GPIO_item">GPIO4 Enable REST API</span>
  1455. </td>
  1456. <td><input type="checkbox" id="GPIO_IO4_value5"></td>
  1457. <td></td>
  1458. </tr>
  1459. <tr class="GPIO_IO4 GPIO_item expert">
  1460. <td class="indent2">
  1461. <span class="GPIO_IO4 GPIO_item">GPIO4 Name</span>
  1462. </td>
  1463. <td><input type="text" id="GPIO_IO4_value6"></td>
  1464. <td></td>
  1465. </tr>
  1466. <!------------- GPIO4 end ------------------>
  1467. <!------------- GPIO12 begin ------------------>
  1468. <tr class="GPIO_item">
  1469. <td class="indent1">
  1470. <input type="checkbox" id="GPIO_IO12_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO12")' unchecked>
  1471. <label for=GPIO_IO12_enabled><span id="GPIO_IO12_text">GPIO12 Configuration</span></label>
  1472. </td>
  1473. <td>
  1474. <select id="GPIO_IO12_value1">
  1475. <option value="input">input</option>
  1476. <option value="input-pullup">input pullup</option>
  1477. <option value="input-pulldown">input pulldown</option>
  1478. <option value="output">output</option>
  1479. <!-- <option value="output-pwm">output-pwm</option> -->
  1480. <!-- <option value="external-flash-pwm">external-flash-pwm</option> -->
  1481. <option value="external-flash-ws281x">external flash light ws281x controlled</option>
  1482. </select>
  1483. </td>
  1484. <td>$TOOLTIP_GPIO_IO12</td>
  1485. </tr>
  1486. <tr class="GPIO_IO12 GPIO_item expert">
  1487. <td class="indent2">
  1488. <span class="GPIO_IO12 GPIO_item">GPIO12 Use Interrupt</span>
  1489. </td>
  1490. <td>
  1491. <select class="GPIO_IO12 GPIO_item" id="GPIO_IO12_value2">
  1492. <option value="disabled">disabled</option>
  1493. <option value="rising-edge">rising edge</option>
  1494. <option value="falling-edge">falling edge</option>
  1495. <option value="rising-and-falling">rising and falling</option>
  1496. <option value="low-level-trigger">low level trigger</option>
  1497. <option value="high-level-trigger">high level trigger</option>
  1498. </select>
  1499. </td>
  1500. <td></td>
  1501. </tr>
  1502. <tr class="GPIO_IO12 GPIO_item expert">
  1503. <td class="indent2">
  1504. <span class="GPIO_IO12 GPIO_item">GPIO12 PWM Duty Cycle Resolution</span>
  1505. </td>
  1506. <td><input required type="number" id="GPIO_IO12_value3" min="1" max="20"
  1507. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1508. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO12 GPIO_item">Bits</span>
  1509. </td>
  1510. <td></td>
  1511. </tr>
  1512. <tr class="GPIO_IO12 GPIO_item expert">
  1513. <td class="indent2">
  1514. <span class="GPIO_IO12 GPIO_item">GPIO12 Enable MQTT</span>
  1515. </td>
  1516. <td><input type="checkbox" id="GPIO_IO12_value4"></td>
  1517. <td></td>
  1518. </tr>
  1519. <tr class="GPIO_IO12 GPIO_item expert">
  1520. <td class="indent2">
  1521. <span class="GPIO_IO12 GPIO_item">GPIO12 Enable REST API</span>
  1522. </td>
  1523. <td><input type="checkbox" id="GPIO_IO12_value5"></td>
  1524. <td></td>
  1525. </tr>
  1526. <tr class="GPIO_IO12 GPIO_item expert">
  1527. <td class="indent2">
  1528. <span class="GPIO_IO12 GPIO_item">GPIO12 Name</span>
  1529. </td>
  1530. <td><input type="text" id="GPIO_IO12_value6"></td>
  1531. <td></td>
  1532. </tr>
  1533. <tr class="GPIO_item" unused_id="wstypeex3">
  1534. <td class="indent1">
  1535. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDType_text">LED Type (NeoPixel)</span>
  1536. </td>
  1537. <td class="GPIO_item">
  1538. <select class="GPIO_item" id="GPIO_LEDType_value1">
  1539. <option value="WS2812" selected>WS2812</option>
  1540. <option value="WS2812B">WS2812B</option>
  1541. <option value="SK6812">SK6812</option>
  1542. <option value="WS2813">WS2813 (not tested)</option>
  1543. </select>
  1544. </td>
  1545. <td>$TOOLTIP_GPIO_LEDType</td>
  1546. </tr>
  1547. <tr class="GPIO_item" unused_id="LEDANZex8" >
  1548. <td class="indent1">
  1549. <span class="GPIO_item" id="GPIO_LEDNumbers_text">Numbers of LEDs</span>
  1550. </td>
  1551. <td>
  1552. <input required type="number" name="name" id="GPIO_LEDNumbers_value1" size="13" min="1"
  1553. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  1554. </td>
  1555. <td>$TOOLTIP_GPIO_LEDNumbers</td>
  1556. </tr>
  1557. <tr class="GPIO_item" unused_id="LEDRGBex9">
  1558. <td class="indent1">
  1559. <span class="GPIO_item" id="GPIO_LEDColor_text">LED Color</span>
  1560. </td>
  1561. <td>
  1562. R <input required type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value1"
  1563. min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1564. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1565. </td>
  1566. <td>$TOOLTIP_GPIO_LEDColor</td>
  1567. </tr>
  1568. <tr class="GPIO_item" unused_id="LEDRGBex9">
  1569. <td></td>
  1570. <td>
  1571. G <input required type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value2"
  1572. min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1573. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1574. </td>
  1575. </tr>
  1576. <tr class="GPIO_item" unused_id="LEDRGBex9">
  1577. <td></td>
  1578. <td>
  1579. B <input required type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value3"
  1580. min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1581. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1582. </td>
  1583. </tr>
  1584. <!------------- GPIO12 end ------------------>
  1585. <!------------- GPIO13 begin ------------------>
  1586. <tr class="GPIO_IO13 GPIO_item expert">
  1587. <td class="indent1">
  1588. <input type="checkbox" id="GPIO_IO13_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO13")' unchecked>
  1589. <label for=GPIO_IO13_enabled><span id="GPIO_IO13_text">GPIO13 Configuration</span></label>
  1590. </td>
  1591. <td>
  1592. <select id="GPIO_IO13_value1">
  1593. <option value="input">input</option>
  1594. <option value="input-pullup">input pullup</option>
  1595. <option value="input-pulldown">input pulldown</option>
  1596. <option value="output">output</option>
  1597. </select>
  1598. </td>
  1599. <td>$TOOLTIP_GPIO_IO13</td>
  1600. </tr>
  1601. <tr class="GPIO_IO13 GPIO_item expert">
  1602. <td class="indent2">
  1603. <span class="GPIO_IO13 GPIO_item">GPIO13 Use Interrupt</span>
  1604. </td>
  1605. <td>
  1606. <select id="GPIO_IO13_value2">
  1607. <option value="disabled">disabled</option>
  1608. <option value="rising-edge" disabled>rising edge</option>
  1609. <option value="falling-edge" disabled>falling edge</option>
  1610. <option value="rising-and-falling">rising and falling</option>
  1611. <option value="low-level-trigger">low level trigger</option>
  1612. <option value="high-level-trigger">high level trigger</option>
  1613. </select>
  1614. </td>
  1615. <td></td>
  1616. </tr>
  1617. <tr class="GPIO_IO13 GPIO_item expert">
  1618. <td class="indent2">
  1619. <span class="GPIO_IO13 GPIO_item">GPIO13 PWM Duty Cycle Resolution</span>
  1620. </td>
  1621. <td><input required type="number" id="GPIO_IO13_value3" min="1" max="20"
  1622. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1623. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO13 GPIO_item">Bits</span></td>
  1624. <td></td>
  1625. </tr>
  1626. <tr class="GPIO_IO13 GPIO_item expert">
  1627. <td class="indent2">
  1628. <span class="GPIO_IO13 GPIO_item">GPIO13 Enable MQTT</span>
  1629. </td>
  1630. <td><input type="checkbox" id="GPIO_IO13_value4"></td>
  1631. <td></td>
  1632. </tr>
  1633. <tr class="GPIO_IO13 GPIO_item expert">
  1634. <td class="indent2">
  1635. <span class="GPIO_IO13 GPIO_item">GPIO13 Enable REST API</span>
  1636. </td>
  1637. <td><input type="checkbox" id="GPIO_IO13_value5"></td>
  1638. <td></td>
  1639. </tr>
  1640. <tr class="GPIO_IO13 GPIO_item expert">
  1641. <td class="indent2">
  1642. <span class="GPIO_IO13 GPIO_item">GPIO13 Name</span>
  1643. </td>
  1644. <td><input type="text" id="GPIO_IO13_value6"></td>
  1645. <td></td>
  1646. </tr>
  1647. <!------------- GPIO13 end ------------------>
  1648. <!------------- Autotimer ------------------>
  1649. <tr style="border-bottom: 2px solid lightgray;">
  1650. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Auto Timer</h4></td>
  1651. </tr>
  1652. <tr class="expert" unused_id="ex13">
  1653. <td class="indent1">
  1654. <class id="AutoTimer_AutoStart_text" style="color:black;">Automatic Round Start</class>
  1655. </td>
  1656. <td>
  1657. <select id="AutoTimer_AutoStart_value1">
  1658. <option value="true">enable</option>
  1659. <option value="false" selected>disable</option>
  1660. </select>
  1661. </td>
  1662. <td>$TOOLTIP_AutoTimer_AutoStart</td>
  1663. </tr>
  1664. <tr>
  1665. <td class="indent1">
  1666. <class id="AutoTimer_Interval_text" style="color:black;">Round Interval</class>
  1667. </td>
  1668. <td>
  1669. <input required type="number" id="AutoTimer_Interval_value1" size="13" min="1" step="any"
  1670. oninput="(!validity.rangeUnderflow||(value=1));">Minutes
  1671. </td>
  1672. <td>$TOOLTIP_AutoTimer_Interval</td>
  1673. </tr>
  1674. <!------------- Data Logging ------------------>
  1675. <tr style="border-bottom: 2px solid lightgray;">
  1676. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Data Logging</h4></td>
  1677. </tr>
  1678. <tr>
  1679. <td class="indent1">
  1680. <class id="DataLogging_DataLogActive_text" style="color:black;">Data Logging</class>
  1681. </td>
  1682. <td>
  1683. <select id="DataLogging_DataLogActive_value1">
  1684. <option value="true">enable</option>
  1685. <option value="false" selected>disable</option>
  1686. </select>
  1687. </td>
  1688. <td>$TOOLTIP_DataLogging_DataLogActive</td>
  1689. </tr>
  1690. <tr>
  1691. <td class="indent1">
  1692. <class id="DataLogging_DataFilesRetention_text" style="color:black;">Data Files Retention</class>
  1693. </td>
  1694. <td>
  1695. <input required type="number" id="DataLogging_DataFilesRetention_value1" size="13" min="0" step="1"
  1696. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  1697. </td>
  1698. <td>$TOOLTIP_DataLogging_DataFilesRetention</td>
  1699. </tr>
  1700. <!------------- Debug Logging ------------------>
  1701. <tr style="border-bottom: 2px solid lightgray;">
  1702. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Debug</h4></td>
  1703. </tr>
  1704. <tr>
  1705. <td class="indent1">
  1706. <class id="Debug_LogLevel_text" style="color:black;">Logfile Log Level</class>
  1707. </td>
  1708. <td>
  1709. <select id="Debug_LogLevel_value1">
  1710. <option value="1" selected>ERROR</option> <!-- matches esp_log_level_t -->
  1711. <option value="2">WARNING</option>
  1712. <option value="3">INFO</option>
  1713. <option value="4">DEBUG</option>
  1714. </select>
  1715. </td>
  1716. <td>$TOOLTIP_Debug_LogLevel</td>
  1717. </tr>
  1718. <tr>
  1719. <td class="indent1">
  1720. <class id="Debug_LogfilesRetention_text" style="color:black;">Logfiles Retention</class>
  1721. </td>
  1722. <td>
  1723. <input required type="number" id="Debug_LogfilesRetention_value1" size="13" min="0" step="1"
  1724. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  1725. </td>
  1726. <td>$TOOLTIP_Debug_LogfilesRetention</td>
  1727. </tr>
  1728. <!------------- System ------------------>
  1729. <tr style="border-bottom: 2px solid lightgray;">
  1730. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>System</h4></td>
  1731. </tr>
  1732. <tr>
  1733. <td class="indent1">
  1734. <input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeZone")' unchecked >
  1735. <label for=System_TimeZone_enabled><class id="System_TimeZone_text" style="color:black;">Time Zone</class></label>
  1736. <p></p><p></p>
  1737. </td>
  1738. <td>
  1739. <input type="text" id="System_TimeZone_value1">
  1740. <p>Use <a href="timezones.html" target="_blank">timezones</a> to find your settings</p>
  1741. </td>
  1742. <td>$TOOLTIP_System_TimeZone</td>
  1743. </tr>
  1744. <tr class="expert" unused_id="ex16">
  1745. <td class="indent1">
  1746. <input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeServer")' unchecked >
  1747. <label for=System_TimeServer_enabled><class id="System_TimeServer_text" style="color:black;">Time Server (NTP)</class></label>
  1748. </td>
  1749. <td>
  1750. <input type="text" id="System_TimeServer_value1">
  1751. </td>
  1752. <td>$TOOLTIP_System_TimeServer</td>
  1753. </tr>
  1754. <tr class="expert" unused_id="System_Hostname">
  1755. <td class="indent1">
  1756. <input type="checkbox" id="System_Hostname_enabled" value="1" onclick = 'InvertEnableItem("System", "Hostname")' unchecked >
  1757. <label for=System_Hostname_enabled><class id="System_Hostname_text" style="color:black;">Hostname</class></label>
  1758. </td>
  1759. <td>
  1760. <input type="text" id="System_Hostname_value1">
  1761. </td>
  1762. <td>$TOOLTIP_System_Hostname</td>
  1763. </tr>
  1764. <tr class="expert" unused_id="System_RSSIThreshold">
  1765. <td class="indent1">
  1766. <input type="checkbox" id="System_RSSIThreshold_enabled" value="1" onclick = 'InvertEnableItem("System", "RSSIThreshold")' unchecked >
  1767. <label for=System_RSSIThreshold_enabled><class id="System_RSSIThreshold_text" style="color:black;">RSSI Threshold</class></label>
  1768. </td>
  1769. <td>
  1770. <input required type="number" name="name" id="System_RSSIThreshold_value1" min="-100" max="0" step="1"
  1771. oninput="(!validity.rangeUnderflow||(value=-100)) && (!validity.rangeOverflow||(value=0)) &&
  1772. (!validity.stepMismatch||(value=parseInt(this.value)));">dBm
  1773. </td>
  1774. <td>$TOOLTIP_System_RSSIThreshold</td>
  1775. </tr>
  1776. <tr class="expert" unused_id="System_CPUFrequency">
  1777. <td class="indent1">
  1778. <input type="checkbox" id="System_CPUFrequency_enabled" value="1" onclick = 'InvertEnableItem("System", "CPUFrequency")' unchecked >
  1779. <label for=System_CPUFrequency_enabled><class id="System_CPUFrequency_text" style="color:black;">CPU Frequency</class></label>
  1780. </td>
  1781. <td>
  1782. <select id="System_CPUFrequency_value1">
  1783. <option value="160" selected>160 MHz</option>
  1784. <option value="240">240 MHz</option>
  1785. </select>
  1786. </td>
  1787. <td>$TOOLTIP_System_CPUFrequency</td>
  1788. </tr>
  1789. <tr>
  1790. <td class="indent1">
  1791. <class id="System_Tooltip_text" style="color:black;">Tooltip</class>
  1792. </td>
  1793. <td>
  1794. <select id="System_Tooltip_value1" onchange="UpdateTooltipModus()">
  1795. <option value="true">enable</option>
  1796. <option value="false" selected>disable</option>
  1797. </select>
  1798. </td>
  1799. <td></td>
  1800. </tr>
  1801. </table>
  1802. <table style="padding-top:10px">
  1803. <td>
  1804. <button class="button" onclick="saveTextAsFile()">Save Config</button>
  1805. </td>
  1806. <td>
  1807. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate changes</button>
  1808. </td>
  1809. </table>
  1810. </div>
  1811. <script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
  1812. <script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
  1813. <script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
  1814. <script type="text/javascript">
  1815. var canvas = document.getElementById('canvas'),
  1816. domainname = getDomainname(),
  1817. changeCamValue = 0,
  1818. param,
  1819. category,
  1820. NUNBERSAkt = -1,
  1821. NUMBERS;
  1822. function cameraParameterChanged() {
  1823. changeCamValue = 1;
  1824. if(!document.getElementById("TakeImage_CamZoom_value1").selectedIndex) {
  1825. // EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1)
  1826. EnDisableItem(true, param, category, "TakeImage", "CamZoomOffsetX", false);
  1827. EnDisableItem(true, param, category, "TakeImage", "CamZoomOffsetY", false);
  1828. EnDisableItem(true, param, category, "TakeImage", "CamZoomSize", false);
  1829. }
  1830. else {
  1831. EnDisableItem(false, param, category, "TakeImage", "CamZoomOffsetX", false);
  1832. EnDisableItem(false, param, category, "TakeImage", "CamZoomOffsetY", false);
  1833. EnDisableItem(false, param, category, "TakeImage", "CamZoomSize", false);
  1834. }
  1835. if(document.getElementById("TakeImage_CamAutoSharpness_value1").selectedIndex) {
  1836. EnDisableItem(true, param, category, "TakeImage", "CamSharpness", false);
  1837. }
  1838. else {
  1839. EnDisableItem(false, param, category, "TakeImage", "CamSharpness", false);
  1840. }
  1841. }
  1842. function LoadConfigNeu() {
  1843. domainname = getDomainname();
  1844. if (!loadConfig(domainname)) {
  1845. firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
  1846. return;
  1847. }
  1848. param = getCamConfig();
  1849. category = getConfigCategory();
  1850. InitIndivParameter();
  1851. UpdateInput();
  1852. var sel = document.getElementById("Numbers_value1");
  1853. UpdateInputIndividual(sel);
  1854. UpdateExpertModus();
  1855. UpdateTooltipModus();
  1856. document.getElementById("divall").style.display = '';
  1857. if(!document.getElementById("TakeImage_CamZoom_value1").selectedIndex) {
  1858. // EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1)
  1859. EnDisableItem(true, param, category, "TakeImage", "CamZoomOffsetX", false);
  1860. EnDisableItem(true, param, category, "TakeImage", "CamZoomOffsetY", false);
  1861. EnDisableItem(true, param, category, "TakeImage", "CamZoomSize", false);
  1862. }
  1863. else {
  1864. EnDisableItem(false, param, category, "TakeImage", "CamZoomOffsetX", false);
  1865. EnDisableItem(false, param, category, "TakeImage", "CamZoomOffsetY", false);
  1866. EnDisableItem(false, param, category, "TakeImage", "CamZoomSize", false);
  1867. }
  1868. if(document.getElementById("TakeImage_CamAutoSharpness_value1").selectedIndex) {
  1869. EnDisableItem(true, param, category, "TakeImage", "CamSharpness", false);
  1870. }
  1871. else {
  1872. EnDisableItem(false, param, category, "TakeImage", "CamSharpness", false);
  1873. }
  1874. }
  1875. function InitIndivParameter() {
  1876. NUMBERS = getNUMBERInfo();
  1877. var _index = document.getElementById("Numbers_value1");
  1878. while (_index.length) {
  1879. _index.remove(0);
  1880. }
  1881. var _indexInflux = document.getElementById("NumbersInfluxDBv2_value1");
  1882. while (_indexInflux.length) {
  1883. _indexInflux.remove(0);
  1884. }
  1885. var _indexInfluxv1 = document.getElementById("NumbersInfluxDB_value1");
  1886. while (_indexInfluxv1.length) {
  1887. _indexInfluxv1.remove(0);
  1888. }
  1889. for (var i = 0; i < NUMBERS.length; ++i) {
  1890. var option = document.createElement("option");
  1891. option.text = NUMBERS[i]["name"];
  1892. option.value = i;
  1893. _index.add(option);
  1894. var optionInflux = document.createElement("option");
  1895. optionInflux.text = NUMBERS[i]["name"];
  1896. optionInflux.value = i;
  1897. _indexInflux.add(optionInflux);
  1898. var optionInfluxv1 = document.createElement("option");
  1899. optionInfluxv1.text = NUMBERS[i]["name"];
  1900. optionInfluxv1.value = i;
  1901. _indexInfluxv1.add(optionInfluxv1);
  1902. }
  1903. _index.selectedIndex = 0;
  1904. _indexInflux.selectedIndex = 0;
  1905. _indexInfluxv1.selectedIndex = 0;
  1906. }
  1907. function UpdateInputIndividual(sel) {
  1908. if (NUNBERSAkt != -1) {
  1909. // ReadParameter(param, "PostProcessing", "PreValueUse", false, NUNBERSAkt);
  1910. ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1911. ReadParameter(param, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1912. ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1913. ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1914. ReadParameter(param, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1915. ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1916. // ReadParameter(param, "PostProcessing", "IgnoreAllNaN", false, NUNBERSAkt);
  1917. ReadParameter(param, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1918. ReadParameter(param, "InfluxDB", "Field", true, NUNBERSAkt);
  1919. ReadParameter(param, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1920. ReadParameter(param, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1921. ReadParameter(param, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1922. }
  1923. // var sel = document.getElementById("Numbers_value1");
  1924. NUNBERSAkt = sel.selectedIndex;
  1925. // WriteParameter(param, category, "PostProcessing", "PreValueUse", false, NUNBERSAkt);
  1926. WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1927. WriteParameter(param, category, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1928. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1929. WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1930. WriteParameter(param, category, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1931. WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1932. // WriteParameter(param, category, "PostProcessing", "IgnoreAllNaN", false, NUNBERSAkt);
  1933. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1934. WriteParameter(param, category, "InfluxDB", "Field", true, NUNBERSAkt);
  1935. WriteParameter(param, category, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1936. WriteParameter(param, category, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1937. WriteParameter(param, category, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1938. }
  1939. function UpdateInput() {
  1940. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  1941. setVisible("DigitItem", category["Digits"]["enabled"]);
  1942. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  1943. setVisible("AnalogItem", category["Analog"]["enabled"]);
  1944. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  1945. setVisible("MQTTItem", category["MQTT"]["enabled"]);
  1946. document.getElementById("Category_GPIO_enabled").checked = category["GPIO"]["enabled"];
  1947. setVisible("GPIO_item", category["GPIO"]["enabled"]);
  1948. document.getElementById("Category_InfluxDB_enabled").checked = category["InfluxDB"]["enabled"];
  1949. setVisible("InfluxDBv1Item", category["InfluxDB"]["enabled"]);
  1950. document.getElementById("Category_InfluxDBv2_enabled").checked = category["InfluxDBv2"]["enabled"];
  1951. setVisible("InfluxDBv2Item", category["InfluxDBv2"]["enabled"]);
  1952. WriteParameter(param, category, "TakeImage", "RawImagesLocation", true);
  1953. WriteParameter(param, category, "TakeImage", "RawImagesRetention", true);
  1954. WriteParameter(param, category, "TakeImage", "WaitBeforeTakingPicture", false);
  1955. WriteParameter(param, category, "TakeImage", "CamGainceiling", false);
  1956. WriteParameter(param, category, "TakeImage", "CamQuality", false);
  1957. WriteParameter(param, category, "TakeImage", "CamBrightness", false);
  1958. WriteParameter(param, category, "TakeImage", "CamContrast", false);
  1959. WriteParameter(param, category, "TakeImage", "CamSaturation", false);
  1960. WriteParameter(param, category, "TakeImage", "CamSharpness", false);
  1961. WriteParameter(param, category, "TakeImage", "CamAutoSharpness", false);
  1962. WriteParameter(param, category, "TakeImage", "CamSpecialEffect", false);
  1963. WriteParameter(param, category, "TakeImage", "CamWbMode", false);
  1964. WriteParameter(param, category, "TakeImage", "CamAwb", false);
  1965. WriteParameter(param, category, "TakeImage", "CamAwbGain", false);
  1966. WriteParameter(param, category, "TakeImage", "CamAec", false);
  1967. WriteParameter(param, category, "TakeImage", "CamAec2", false);
  1968. WriteParameter(param, category, "TakeImage", "CamAeLevel", false);
  1969. WriteParameter(param, category, "TakeImage", "CamAecValue", false);
  1970. WriteParameter(param, category, "TakeImage", "CamAgc", false);
  1971. WriteParameter(param, category, "TakeImage", "CamAgcGain", false);
  1972. WriteParameter(param, category, "TakeImage", "CamBpc", false);
  1973. WriteParameter(param, category, "TakeImage", "CamWpc", false);
  1974. WriteParameter(param, category, "TakeImage", "CamRawGma", false);
  1975. WriteParameter(param, category, "TakeImage", "CamLenc", false);
  1976. WriteParameter(param, category, "TakeImage", "CamHmirror", false);
  1977. WriteParameter(param, category, "TakeImage", "CamVflip", false);
  1978. WriteParameter(param, category, "TakeImage", "CamDcw", false);
  1979. WriteParameter(param, category, "TakeImage", "CamZoom", false);
  1980. WriteParameter(param, category, "TakeImage", "CamZoomOffsetX", false);
  1981. WriteParameter(param, category, "TakeImage", "CamZoomOffsetY", false);
  1982. WriteParameter(param, category, "TakeImage", "CamZoomSize", false);
  1983. WriteParameter(param, category, "TakeImage", "LEDIntensity", false);
  1984. WriteParameter(param, category, "TakeImage", "Demo", false);
  1985. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  1986. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  1987. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true);
  1988. WriteParameter(param, category, "Alignment", "InitialRotate", false);
  1989. WriteParameter(param, category, "Digits", "CNNGoodThreshold", true);
  1990. WriteParameter(param, category, "Digits", "ROIImagesLocation", true);
  1991. WriteParameter(param, category, "Digits", "ROIImagesRetention", true);
  1992. WriteParameter(param, category, "Analog", "ROIImagesLocation", true);
  1993. WriteParameter(param, category, "Analog", "ROIImagesRetention", true);
  1994. WriteParameter(param, category, "PostProcessing", "PreValueUse", false);
  1995. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  1996. WriteParameter(param, category, "PostProcessing", "ErrorMessage", false);
  1997. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  1998. WriteParameter(param, category, "MQTT", "Uri", true);
  1999. WriteParameter(param, category, "MQTT", "MainTopic", true);
  2000. WriteParameter(param, category, "MQTT", "ClientID", true);
  2001. WriteParameter(param, category, "MQTT", "user", true);
  2002. WriteParameter(param, category, "MQTT", "password", true);
  2003. WriteParameter(param, category, "MQTT", "RetainMessages", false);
  2004. WriteParameter(param, category, "MQTT", "HomeassistantDiscovery", false);
  2005. WriteParameter(param, category, "MQTT", "MeterType", true);
  2006. WriteParameter(param, category, "MQTT", "CACert", true);
  2007. WriteParameter(param, category, "MQTT", "ClientCert", true);
  2008. WriteParameter(param, category, "MQTT", "ClientKey", true);
  2009. WriteParameter(param, category, "InfluxDB", "Uri", true);
  2010. WriteParameter(param, category, "InfluxDB", "Database", true);
  2011. // WriteParameter(param, category, "InfluxDB", "Measurement", true);
  2012. WriteParameter(param, category, "InfluxDB", "user", true);
  2013. WriteParameter(param, category, "InfluxDB", "password", true);
  2014. // WriteParameter(param, category, "InfluxDB", "Field", true);
  2015. WriteParameter(param, category, "InfluxDBv2", "Uri", true);
  2016. WriteParameter(param, category, "InfluxDBv2", "Bucket", true);
  2017. // WriteParameter(param, category, "InfluxDBv2", "Measurement", true);
  2018. WriteParameter(param, category, "InfluxDBv2", "Org", true);
  2019. WriteParameter(param, category, "InfluxDBv2", "Token", true);
  2020. // WriteParameter(param, category, "InfluxDBv2", "Field", true);
  2021. WriteParameter(param, category, "GPIO", "IO0", true);
  2022. WriteParameter(param, category, "GPIO", "IO1", true);
  2023. WriteParameter(param, category, "GPIO", "IO3", true);
  2024. WriteParameter(param, category, "GPIO", "IO4", true);
  2025. WriteParameter(param, category, "GPIO", "IO12", true);
  2026. WriteParameter(param, category, "GPIO", "IO13", true);
  2027. WriteParameter(param, category, "GPIO", "LEDType", false);
  2028. WriteParameter(param, category, "GPIO", "LEDNumbers", false);
  2029. WriteParameter(param, category, "GPIO", "LEDColor", false);
  2030. WriteParameter(param, category, "AutoTimer", "AutoStart", false);
  2031. WriteParameter(param, category, "AutoTimer", "Interval", false);
  2032. WriteParameter(param, category, "DataLogging", "DataLogActive", false);
  2033. WriteParameter(param, category, "DataLogging", "DataFilesRetention", false);
  2034. WriteParameter(param, category, "Debug", "LogLevel", false);
  2035. WriteParameter(param, category, "Debug", "LogfilesRetention", false);
  2036. WriteParameter(param, category, "System", "Tooltip", false);
  2037. WriteParameter(param, category, "System", "TimeZone", true);
  2038. WriteParameter(param, category, "System", "Hostname", true);
  2039. WriteParameter(param, category, "System", "TimeServer", true);
  2040. WriteParameter(param, category, "System", "RSSIThreshold", true);
  2041. WriteParameter(param, category, "System", "CPUFrequency", true);
  2042. WriteModelFiles();
  2043. }
  2044. function WriteModelFiles() {
  2045. list_tflite = getTFLITEList();
  2046. var _indexDig = document.getElementById("Digits_Model_value1");
  2047. var _indexAna = document.getElementById("Analog_Model_value1");
  2048. while (_indexDig.length) {
  2049. _indexDig.remove(0);
  2050. }
  2051. while (_indexAna.length) {
  2052. _indexAna.remove(0);
  2053. }
  2054. for (var i = 0; i < list_tflite.length; ++i) {
  2055. var optionDig = document.createElement("option");
  2056. var optionAna = document.createElement("option");
  2057. var text = list_tflite[i].replace("/config/", "");
  2058. if (list_tflite[i].includes("/dig")) { // Its a digital file, only show in the digital list box
  2059. optionDig.text = text;
  2060. optionDig.value = list_tflite[i];
  2061. _indexDig.add(optionDig);
  2062. }
  2063. else if (list_tflite[i].includes("/ana")) { // Its a digital file, only show in the analog list box
  2064. optionAna.text = text;
  2065. optionAna.value = list_tflite[i];
  2066. _indexAna.add(optionAna);
  2067. }
  2068. else { // all other files, show in both list boxes
  2069. optionDig.text = text;
  2070. optionDig.value = list_tflite[i];
  2071. _indexDig.add(optionDig);
  2072. optionAna.text = text;
  2073. optionAna.value = list_tflite[i];
  2074. _indexAna.add(optionAna);
  2075. }
  2076. }
  2077. WriteParameter(param, category, "Analog", "Model", false);
  2078. WriteParameter(param, category, "Digits", "Model", false);
  2079. }
  2080. function ReadParameterAll() {
  2081. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  2082. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  2083. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  2084. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  2085. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  2086. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  2087. ReadParameter(param, "TakeImage", "RawImagesLocation", true);
  2088. ReadParameter(param, "TakeImage", "RawImagesRetention", true);
  2089. ReadParameter(param, "TakeImage", "WaitBeforeTakingPicture", false);
  2090. ReadParameter(param, "TakeImage", "CamGainceiling", false);
  2091. ReadParameter(param, "TakeImage", "CamQuality", false);
  2092. ReadParameter(param, "TakeImage", "CamBrightness", false);
  2093. ReadParameter(param, "TakeImage", "CamContrast", false);
  2094. ReadParameter(param, "TakeImage", "CamSaturation", false);
  2095. ReadParameter(param, "TakeImage", "CamSharpness", false);
  2096. ReadParameter(param, "TakeImage", "CamAutoSharpness", false);
  2097. ReadParameter(param, "TakeImage", "CamSpecialEffect", false);
  2098. ReadParameter(param, "TakeImage", "CamWbMode", false);
  2099. ReadParameter(param, "TakeImage", "CamAwb", false);
  2100. ReadParameter(param, "TakeImage", "CamAwbGain", false);
  2101. ReadParameter(param, "TakeImage", "CamAec", false);
  2102. ReadParameter(param, "TakeImage", "CamAec2", false);
  2103. ReadParameter(param, "TakeImage", "CamAeLevel", false);
  2104. ReadParameter(param, "TakeImage", "CamAecValue", false);
  2105. ReadParameter(param, "TakeImage", "CamAgc", false);
  2106. ReadParameter(param, "TakeImage", "CamAgcGain", false);
  2107. ReadParameter(param, "TakeImage", "CamBpc", false);
  2108. ReadParameter(param, "TakeImage", "CamWpc", false);
  2109. ReadParameter(param, "TakeImage", "CamRawGma", false);
  2110. ReadParameter(param, "TakeImage", "CamLenc", false);
  2111. ReadParameter(param, "TakeImage", "CamHmirror", false);
  2112. ReadParameter(param, "TakeImage", "CamVflip", false);
  2113. ReadParameter(param, "TakeImage", "CamDcw", false);
  2114. ReadParameter(param, "TakeImage", "CamZoom", false);
  2115. ReadParameter(param, "TakeImage", "CamZoomOffsetX", false);
  2116. ReadParameter(param, "TakeImage", "CamZoomOffsetY", false);
  2117. ReadParameter(param, "TakeImage", "CamZoomSize", false);
  2118. ReadParameter(param, "TakeImage", "LEDIntensity", false);
  2119. ReadParameter(param, "TakeImage", "Demo", false);
  2120. ReadParameter(param, "Alignment", "SearchFieldX", false);
  2121. ReadParameter(param, "Alignment", "SearchFieldY", false);
  2122. ReadParameter(param, "Alignment", "AlignmentAlgo", true);
  2123. ReadParameter(param, "Alignment", "InitialRotate", false);
  2124. ReadParameter(param, "Digits", "Model", false);
  2125. ReadParameter(param, "Digits", "CNNGoodThreshold", true);
  2126. ReadParameter(param, "Digits", "ROIImagesLocation", true);
  2127. ReadParameter(param, "Digits", "ROIImagesRetention", true);
  2128. ReadParameter(param, "Analog", "Model", false);
  2129. ReadParameter(param, "Analog", "ROIImagesLocation", true);
  2130. ReadParameter(param, "Analog", "ROIImagesRetention", true);
  2131. ReadParameter(param, "PostProcessing", "PreValueUse", false);
  2132. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  2133. ReadParameter(param, "PostProcessing", "ErrorMessage", false);
  2134. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  2135. ReadParameter(param, "MQTT", "Uri", true);
  2136. ReadParameter(param, "MQTT", "MainTopic", true);
  2137. ReadParameter(param, "MQTT", "ClientID", true);
  2138. ReadParameter(param, "MQTT", "user", true);
  2139. ReadParameter(param, "MQTT", "password", true);
  2140. ReadParameter(param, "MQTT", "RetainMessages", false);
  2141. ReadParameter(param, "MQTT", "HomeassistantDiscovery", false);
  2142. ReadParameter(param, "MQTT", "MeterType", true);
  2143. ReadParameter(param, "MQTT", "CACert", true);
  2144. ReadParameter(param, "MQTT", "ClientCert", true);
  2145. ReadParameter(param, "MQTT", "ClientKey", true);
  2146. ReadParameter(param, "InfluxDB", "Uri", true);
  2147. ReadParameter(param, "InfluxDB", "Database", true);
  2148. ReadParameter(param, "InfluxDB", "Measurement", true);
  2149. ReadParameter(param, "InfluxDB", "user", true);
  2150. ReadParameter(param, "InfluxDB", "password", true);
  2151. ReadParameter(param, "InfluxDBv2", "Uri", true);
  2152. ReadParameter(param, "InfluxDBv2", "Bucket", true);
  2153. ReadParameter(param, "InfluxDBv2", "Measurement", true);
  2154. ReadParameter(param, "InfluxDBv2", "Org", true);
  2155. ReadParameter(param, "InfluxDBv2", "Token", true);
  2156. // ReadParameter(param, "InfluxDB", "Field", true);
  2157. ReadParameter(param, "GPIO", "IO0", true);
  2158. ReadParameter(param, "GPIO", "IO1", true);
  2159. ReadParameter(param, "GPIO", "IO3", true);
  2160. ReadParameter(param, "GPIO", "IO4", true);
  2161. ReadParameter(param, "GPIO", "IO12", true);
  2162. ReadParameter(param, "GPIO", "IO13", true);
  2163. ReadParameter(param, "GPIO", "LEDType", false);
  2164. ReadParameter(param, "GPIO", "LEDNumbers", false);
  2165. ReadParameter(param, "GPIO", "LEDColor", false);
  2166. // Folgende Zeilen sind für Abwärtskompatibität < v9.0.0 notwendig (manchmal parameter auskommentiert)
  2167. param["GPIO"]["LEDType"]["enabled"] = true;
  2168. param["GPIO"]["LEDNumbers"]["enabled"] = true;
  2169. param["GPIO"]["LEDColor"]["enabled"] = true;
  2170. param["GPIO"]["LEDType"]["found"] = true;
  2171. param["GPIO"]["LEDNumbers"]["found"] = true;
  2172. param["GPIO"]["LEDColor"]["found"] = true;
  2173. ReadParameter(param, "AutoTimer", "AutoStart", false);
  2174. ReadParameter(param, "AutoTimer", "Interval", false);
  2175. ReadParameter(param, "DataLogging", "DataLogActive", false);
  2176. ReadParameter(param, "DataLogging", "DataFilesRetention", false);
  2177. ReadParameter(param, "Debug", "LogLevel", false);
  2178. ReadParameter(param, "Debug", "LogfilesRetention", false);
  2179. ReadParameter(param, "System", "Tooltip", false);
  2180. ReadParameter(param, "System", "TimeZone", true);
  2181. ReadParameter(param, "System", "Hostname", true);
  2182. ReadParameter(param, "System", "TimeServer", true);
  2183. ReadParameter(param, "System", "RSSIThreshold", true);
  2184. ReadParameter(param, "System", "CPUFrequency", true);
  2185. var sel = document.getElementById("Numbers_value1");
  2186. UpdateInputIndividual(sel);
  2187. // FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  2188. }
  2189. function UpdateAfterCategoryCheck() {
  2190. ReadParameterAll();
  2191. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  2192. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  2193. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  2194. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  2195. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  2196. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  2197. UpdateInput();
  2198. var sel = document.getElementById("Numbers_value1");
  2199. UpdateInputIndividual(sel);
  2200. }
  2201. function UpdateExpertModus() {
  2202. // var _style = 'display:none;';
  2203. var _style_pur = 'none';
  2204. var _hidden = true;
  2205. if (document.getElementById("ExpertModus_enabled").checked) {
  2206. // _style = '';
  2207. _style_pur = '';
  2208. _hidden = false;
  2209. document.getElementById("Button_Edit_Config_Raw").style.display = "";
  2210. firework.launch("Expert view activated. Please use carefully", 'warning', 5000);
  2211. }
  2212. else {
  2213. document.getElementById("Button_Edit_Config_Raw").style.display = "none";
  2214. }
  2215. const expert = document.querySelectorAll(".expert");
  2216. for (var i = 0; i < expert.length; i++) {
  2217. expert[i].style.display = _style_pur;
  2218. // document.getElementById(expert[i].id).style = _style;
  2219. }
  2220. // Enable / Disable die Optionen in den Menues für die Auswahl. Falls kein Expertenmodus soll nur ein Wert (built-in-led oder externan-flash-ws281x) möglich sein
  2221. Array.from(document.querySelector("#GPIO_IO4_value1").options).forEach(function(option_element) {
  2222. if (option_element.value != "built-in-led") {
  2223. option_element.hidden = _hidden;
  2224. }
  2225. });
  2226. Array.from(document.querySelector("#GPIO_IO12_value1").options).forEach(function(option_element) {
  2227. if (option_element.value != "external-flash-ws281x") {
  2228. option_element.hidden = _hidden;
  2229. }
  2230. });
  2231. }
  2232. function UpdateTooltipModus() {
  2233. var _style_pur = 'none';
  2234. var _hidden = true;
  2235. if (!document.getElementById("System_Tooltip_value1").selectedIndex) {
  2236. _style_pur = '';
  2237. _hidden = false;
  2238. //firework.launch("Tooltip view activated.", 'warning', 5000);
  2239. }
  2240. const tooltip = document.querySelectorAll(".tooltip");
  2241. for (var i = 0; i < tooltip.length; i++) {
  2242. tooltip[i].style.display = _style_pur;
  2243. }
  2244. }
  2245. function saveTextAsFile() {
  2246. ReadParameterAll();
  2247. if (document.getElementsByClassName("invalid-input").length > 0) {
  2248. firework.launch("Settings cannot be saved. Please check your entries!", 'danger', 30000);
  2249. return;
  2250. }
  2251. if (confirm("Are you sure you want to save the configuration?")) {
  2252. ReadParameterAll();
  2253. WriteConfigININew();
  2254. SaveConfigToServer(domainname);
  2255. firework.launch('Configuration saved. It will get applied after the next reboot!', 'success', 5000);
  2256. if (changeCamValue == 1) {
  2257. camSettingsSet();
  2258. firework.launch('You have changed the camera settings, so creating a new reference image and updating the alignment marks is mandatory!', 'success', 10000);
  2259. }
  2260. }
  2261. }
  2262. function camSettingsSet(){
  2263. var domainname = getDomainname();
  2264. document.getElementById("overlay").style.display = "block";
  2265. document.getElementById("overlaytext").innerHTML = "Save Cam Settings...";
  2266. var _waitb_temp = document.getElementById("TakeImage_WaitBeforeTakingPicture_value1").value;
  2267. var _qual_temp = document.getElementById("TakeImage_CamQuality_value1").value;
  2268. var _bri_temp = document.getElementById("TakeImage_CamBrightness_value1").value;
  2269. var _con_temp = document.getElementById("TakeImage_CamContrast_value1").value;
  2270. var _sat_temp = document.getElementById("TakeImage_CamSaturation_value1").value;
  2271. var _shp_temp = document.getElementById("TakeImage_CamSharpness_value1").value;
  2272. var _ashp_temp = document.getElementById("TakeImage_CamAutoSharpness_value1").value;
  2273. if (_ashp_temp == '0') {
  2274. _ashp_temp = '1';
  2275. }
  2276. else {
  2277. _ashp_temp = '0';
  2278. }
  2279. var _spe_temp = document.getElementById("TakeImage_CamSpecialEffect_value1").selectedIndex;
  2280. var _wbm_temp = document.getElementById("TakeImage_CamWbMode_value1").selectedIndex;
  2281. var _awb_temp = document.getElementById("TakeImage_CamAwb_value1").selectedIndex;
  2282. if (_awb_temp == '0') {
  2283. _awb_temp = '1';
  2284. }
  2285. else {
  2286. _awb_temp = '0';
  2287. }
  2288. var _awbg_temp = document.getElementById("TakeImage_CamAwbGain_value1").selectedIndex;
  2289. if (_awbg_temp == '0') {
  2290. _awbg_temp = '1';
  2291. }
  2292. else {
  2293. _awbg_temp = '0';
  2294. }
  2295. var _aec_temp = document.getElementById("TakeImage_CamAec_value1").selectedIndex;
  2296. if (_aec_temp == '0') {
  2297. _aec_temp = '1';
  2298. }
  2299. else {
  2300. _aec_temp = '0';
  2301. }
  2302. var _aec2_temp = document.getElementById("TakeImage_CamAec2_value1").selectedIndex;
  2303. if (_aec2_temp == '0') {
  2304. _aec2_temp = '1';
  2305. }
  2306. else {
  2307. _aec2_temp = '0';
  2308. }
  2309. var _ael_temp = document.getElementById("TakeImage_CamAeLevel_value1").value;
  2310. var _aecv_temp = document.getElementById("TakeImage_CamAecValue_value1").value;
  2311. var _agc_temp = document.getElementById("TakeImage_CamAgc_value1").selectedIndex;
  2312. if (_agc_temp == '0') {
  2313. _agc_temp = '1';
  2314. }
  2315. else {
  2316. _agc_temp = '0';
  2317. }
  2318. var _agcg_temp = document.getElementById("TakeImage_CamAgcGain_value1").value;
  2319. var _bpc_temp = document.getElementById("TakeImage_CamBpc_value1").selectedIndex;
  2320. if (_bpc_temp == '0') {
  2321. _bpc_temp = '1';
  2322. }
  2323. else {
  2324. _bpc_temp = '0';
  2325. }
  2326. var _wpc_temp = document.getElementById("TakeImage_CamWpc_value1").selectedIndex;
  2327. if (_wpc_temp == '0') {
  2328. _wpc_temp = '1';
  2329. }
  2330. else {
  2331. _wpc_temp = '0';
  2332. }
  2333. var _rgma_temp = document.getElementById("TakeImage_CamRawGma_value1").selectedIndex;
  2334. if (_rgma_temp == '0') {
  2335. _rgma_temp = '1';
  2336. }
  2337. else {
  2338. _rgma_temp = '0';
  2339. }
  2340. var _lenc_temp = document.getElementById("TakeImage_CamLenc_value1").selectedIndex;
  2341. if (_lenc_temp == '0') {
  2342. _lenc_temp = '1';
  2343. }
  2344. else {
  2345. _lenc_temp = '0';
  2346. }
  2347. var _mirror_temp = document.getElementById("TakeImage_CamHmirror_value1").selectedIndex;
  2348. if (_mirror_temp == '0') {
  2349. _mirror_temp = '1';
  2350. }
  2351. else {
  2352. _mirror_temp = '0';
  2353. }
  2354. var _flip_temp = document.getElementById("TakeImage_CamVflip_value1").selectedIndex;
  2355. if (_flip_temp == '0') {
  2356. _flip_temp = '1';
  2357. }
  2358. else {
  2359. _flip_temp = '0';
  2360. }
  2361. var _dcw_temp = document.getElementById("TakeImage_CamDcw_value1").selectedIndex;
  2362. if (_dcw_temp == '0') {
  2363. _dcw_temp = '1';
  2364. }
  2365. else {
  2366. _dcw_temp = '0';
  2367. }
  2368. var _ledi_temp = document.getElementById("TakeImage_LEDIntensity_value1").value;
  2369. var _zoom_temp = document.getElementById("TakeImage_CamZoom_value1").selectedIndex;
  2370. if (_zoom_temp == '0') {
  2371. _zoom_temp = '1';
  2372. }
  2373. else {
  2374. _zoom_temp = '0';
  2375. }
  2376. var _zoomx_temp = document.getElementById("TakeImage_CamZoomOffsetX_value1").value;
  2377. var _zoomy_temp = document.getElementById("TakeImage_CamZoomOffsetY_value1").value;
  2378. var _zooms_temp = document.getElementById("TakeImage_CamZoomSize_value1").value;
  2379. // bei einmal Alles senden kommt es zu problemen!!!!!!!!!!!!!!!!!!!!
  2380. var url_1 = domainname + "/editflow?task=cam_settings";
  2381. url_1 = url_1 + "&waitb=" + _waitb_temp + "&qual=" + _qual_temp;
  2382. url_1 = url_1 + "&bri=" + _bri_temp + "&con=" + _con_temp + "&sat=" + _sat_temp + "&shp=" + _shp_temp + "&ashp=" + _ashp_temp;
  2383. url_1 = url_1 + "&spe=" + _spe_temp + "&wbm=" + _wbm_temp + "&awb=" + _awb_temp + "&awbg=" + _awbg_temp;
  2384. url_1 = url_1 + "&aec=" + _aec_temp + "&aec2=" + _aec2_temp + "&ael=" + _ael_temp + "&aecv=" + _aecv_temp;
  2385. var url_2 = domainname + "/editflow?task=cam_settings";
  2386. url_2 = url_2 + "&agc=" + _agc_temp + "&agcg=" + _agcg_temp + "&bpc=" + _bpc_temp + "&wpc=" + _wpc_temp;
  2387. url_2 = url_2 + "&rgma=" + _rgma_temp + "&lenc=" + _lenc_temp + "&mirror=" + _mirror_temp + "&flip=" + _flip_temp;
  2388. url_2 = url_2 + "&dcw=" + _dcw_temp + "&ledi=" + _ledi_temp;
  2389. if (_zoom_temp != '0') {
  2390. url_2 = url_2 + "&zoom=" + _zoom_temp + "&zooms=" + _zooms_temp;
  2391. url_2 = url_2 + "&zoomx=" + _zoomx_temp + "&zoomy=" + _zoomy_temp;
  2392. }
  2393. else {
  2394. url_2 = url_2 + "&zoom=0" + "&zooms=0" + "&zoomx=0" + "&zoomy=0";
  2395. }
  2396. if (domainname.length > 0){
  2397. url_1 = url_1 + "&host=" + domainname;
  2398. url_2 = url_2 + "&host=" + domainname;
  2399. }
  2400. var durchlaufe = 0;
  2401. function sleep(ms) {
  2402. return new Promise(resolve => setTimeout(resolve, ms));
  2403. }
  2404. async function task() {
  2405. while (true) {
  2406. var xhttp1 = new XMLHttpRequest();
  2407. var xhttp2 = new XMLHttpRequest();
  2408. if (durchlaufe > 10) {
  2409. document.getElementById("overlay").style.display = "none";
  2410. firework.launch('Save Cam Settings aborted, timeout!', 'success', 5000);
  2411. return;
  2412. }
  2413. try {
  2414. xhttp1.open("GET", url_1, false);
  2415. xhttp1.send();
  2416. xhttp2.open("GET", url_2, false);
  2417. xhttp2.send();
  2418. } catch (error){}
  2419. if ((xhttp1.responseText == "CamSettingsSet") && (xhttp2.responseText == "CamSettingsSet")) {
  2420. document.getElementById("overlay").style.display = "none";
  2421. return;
  2422. }
  2423. else {
  2424. // Get status
  2425. var _xhttp = new XMLHttpRequest();
  2426. durchlaufe = durchlaufe + 1;
  2427. try {
  2428. _xhttp.open("GET", domainname + "/statusflow", false);
  2429. _xhttp.send();
  2430. }
  2431. catch (error){}
  2432. document.getElementById("overlaytext").innerHTML = "Device is busy, plase waiting...<br><br>Current step: " + _xhttp.responseText;
  2433. console.log("Device is busy, waiting 2s then checking again...");
  2434. await sleep(2000);
  2435. }
  2436. }
  2437. }
  2438. setTimeout(function() { // Delay so the overlay gets shown
  2439. task();
  2440. }, 1);
  2441. }
  2442. function doReboot() {
  2443. if (confirm("Are you sure you want to reboot?")) {
  2444. var stringota = getDomainname() + "/reboot";
  2445. window.location = stringota;
  2446. window.location.href = stringota;
  2447. window.location.assign(stringota);
  2448. window.location.replace(stringota);
  2449. }
  2450. }
  2451. function FormatDecimalValue(_param, _cat, _name) {
  2452. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  2453. var _val = _param[_cat][_name]["value"+j];
  2454. _val = _val.replace(",", ".");
  2455. _param[_cat][_name]["value"+j] = _val;
  2456. }
  2457. }
  2458. function editConfigRaw() {
  2459. if (confirm("Proceed to switch to raw edit mode? Unsaved changes will get lost")) {
  2460. var stringota = getDomainname() + "/edit_config_raw.html?v=$COMMIT_HASH";
  2461. window.location = stringota;
  2462. window.location.href = stringota;
  2463. window.location.assign(stringota);
  2464. window.location.replace(stringota);
  2465. }
  2466. }
  2467. function numberChanged() {
  2468. var sel = document.getElementById("Numbers_value1");
  2469. _neu = sel.selectedIndex;
  2470. UpdateInputIndividual(sel);
  2471. var _selInflux = document.getElementById("NumbersInfluxDBv2_value1");
  2472. if (_selInflux.selectedIndex != _neu) {
  2473. _selInflux.selectedIndex = _neu
  2474. }
  2475. }
  2476. function numberInfluxDBv2Changed() {
  2477. var sel = document.getElementById("NumbersInfluxDBv2_value1");
  2478. _neu = sel.selectedIndex;
  2479. UpdateInputIndividual(sel);
  2480. var _sel2 = document.getElementById("Numbers_value1");
  2481. if (_sel2.selectedIndex != _neu) {
  2482. _sel2.selectedIndex = _neu
  2483. }
  2484. var _sel3 = document.getElementById("NumbersInfluxDB_value1");
  2485. if (_sel3.selectedIndex != _neu) {
  2486. _sel3.selectedIndex = _neu
  2487. }
  2488. }
  2489. function numberInfluxDBChanged() {
  2490. var sel = document.getElementById("NumbersInfluxDB_value1");
  2491. _neu = sel.selectedIndex;
  2492. UpdateInputIndividual(sel);
  2493. var _sel2 = document.getElementById("Numbers_value1");
  2494. if (_sel2.selectedIndex != _neu) {
  2495. _sel2.selectedIndex = _neu
  2496. }
  2497. var _sel3 = document.getElementById("NumbersInfluxDBv2_value1");
  2498. if (_sel3.selectedIndex != _neu) {
  2499. _sel3.selectedIndex = _neu
  2500. }
  2501. }
  2502. function getParameterByName(name, url = window.location.href) {
  2503. name = name.replace(/[\[\]]/g, '\\$&');
  2504. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  2505. results = regex.exec(url);
  2506. if (!results) {return null;}
  2507. if (!results[2]) {return '';}
  2508. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  2509. }
  2510. function InvertEnableItem(_cat, _param) {
  2511. _zw = _cat + "_" + _param + "_enabled";
  2512. _isOn = document.getElementById(_zw).checked;
  2513. _color = "rgb(122, 122, 122)";
  2514. if (_isOn) {
  2515. _color = "black";
  2516. }
  2517. _zw = _cat + "_" + _param + "_text";
  2518. document.getElementById(_zw).disabled = !_isOn;
  2519. document.getElementById(_zw).style.color = _color;
  2520. setEnabled(_cat + "_" + _param, _isOn);
  2521. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  2522. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  2523. document.getElementById(_cat+"_"+_param+"_value"+j).style.color = _color;
  2524. }
  2525. }
  2526. function setEnabled(className, enabled) {
  2527. _color = "rgb(122, 122, 122)";
  2528. if (enabled) {
  2529. _color = "black";
  2530. }
  2531. let elements = document.getElementsByClassName(className);
  2532. for (i = 0; i < elements.length; i++) {
  2533. if (enabled) {
  2534. elements[i].classList.remove("disabled");
  2535. }
  2536. else {
  2537. elements[i].classList.add("disabled");
  2538. }
  2539. let inputs = elements[i].getElementsByTagName("input");
  2540. for (j = 0; j < inputs.length; j++) {
  2541. if (inputs[j].id.endsWith("_enabled")) {
  2542. continue;
  2543. }
  2544. inputs[j].style.color = _color;
  2545. if (enabled) {
  2546. inputs[j].removeAttribute("disabled");
  2547. }
  2548. else {
  2549. inputs[j].setAttribute("disabled", "disabled");
  2550. }
  2551. }
  2552. }
  2553. }
  2554. function setVisible(className, visible) {
  2555. let elements = document.getElementsByClassName(className);
  2556. for (i = 0; i < elements.length; i++) {
  2557. if (visible) {
  2558. elements[i].classList.remove("hidden");
  2559. }
  2560. else {
  2561. elements[i].classList.add("hidden");
  2562. }
  2563. }
  2564. }
  2565. function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1) {
  2566. // _status = _category[_cat]["enabled"];
  2567. _color = "rgb(122, 122, 122)";
  2568. if (_status) {
  2569. _color = "black";
  2570. }
  2571. if (_optional) {
  2572. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  2573. document.getElementById(_cat+"_"+_name+"_enabled").style.color = _color;
  2574. }
  2575. if (_number == -1) {
  2576. if (!_param[_cat][_name]["enabled"]) {
  2577. _status = false;
  2578. _color = "rgb(122, 122, 122)";
  2579. }
  2580. }
  2581. else {
  2582. if (!NUMBERS[_number][_cat][_name]["enabled"]) {
  2583. _status = false;
  2584. _color = "rgb(122, 122, 122)";
  2585. }
  2586. }
  2587. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  2588. document.getElementById(_cat+"_"+_name+"_text").style.color = _color;
  2589. setEnabled(_cat+"_"+_name, _status);
  2590. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  2591. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  2592. document.getElementById(_cat+"_"+_name+"_value"+j).style.color = _color;
  2593. }
  2594. }
  2595. function ReadParameter(_param, _cat, _name, _optional, _number = -1) {
  2596. if (_number > -1) {
  2597. if (_cat == "Digits") {
  2598. _cat = "digit";
  2599. }
  2600. if (_cat == "Analog") {
  2601. _cat = "analog";
  2602. }
  2603. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined)) {
  2604. return;
  2605. }
  2606. if (_optional) {
  2607. NUMBERS[_number][_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  2608. }
  2609. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  2610. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  2611. if (element.tagName.toLowerCase() == "select") {
  2612. NUMBERS[_number][_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  2613. }
  2614. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  2615. NUMBERS[_number][_cat][_name]["value"+j] = element.checked;
  2616. }
  2617. else {
  2618. if ((NUMBERS[_number][_cat][_name].checkRegExList != null) && (NUMBERS[_number][_cat][_name].checkRegExList[j-1] != null)) {
  2619. if (!element.value.match(NUMBERS[_cat][_name].checkRegExList[j-1])) {
  2620. element.classList.add("invalid-input");
  2621. }
  2622. else {
  2623. element.classList.remove("invalid-input");
  2624. }
  2625. }
  2626. NUMBERS[_number][_cat][_name]["value"+j] = element.value;
  2627. }
  2628. }
  2629. }
  2630. else
  2631. {
  2632. if (_optional) {
  2633. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  2634. }
  2635. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  2636. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  2637. if (element.tagName.toLowerCase() == "select") {
  2638. _param[_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  2639. }
  2640. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  2641. _param[_cat][_name]["value"+j] = element.checked;
  2642. }
  2643. else {
  2644. if ((_param[_cat][_name].checkRegExList != null) && (_param[_cat][_name].checkRegExList[j-1] != null)) {
  2645. if (!element.value.match(_param[_cat][_name].checkRegExList[j-1])) {
  2646. element.classList.add("invalid-input");
  2647. }
  2648. else {
  2649. element.classList.remove("invalid-input");
  2650. }
  2651. }
  2652. _param[_cat][_name]["value"+j] = element.value;
  2653. }
  2654. }
  2655. }
  2656. }
  2657. function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1) {
  2658. let anzpara;
  2659. try {
  2660. anzpara = _param[_cat][_name].anzParam;
  2661. }
  2662. catch (error) {
  2663. firework.launch("Parameter '" + _name + "' in category '" + _cat + "' is unknown!", 'danger', 30000);
  2664. return;
  2665. }
  2666. if (_number > -1) {
  2667. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined)) {
  2668. return;
  2669. }
  2670. if (_optional) {
  2671. document.getElementById(_cat+"_"+_name+"_enabled").checked = NUMBERS[_number][_cat][_name]["enabled"];
  2672. for (var j = 1; j <= anzpara; ++j) {
  2673. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !NUMBERS[_number][_cat][_name]["enabled"];
  2674. }
  2675. }
  2676. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  2677. setEnabled(_cat+"_"+_name, true);
  2678. for (var j = 1; j <= anzpara; ++j) {
  2679. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  2680. if (element.tagName.toLowerCase() == "select") {
  2681. var textToFind = NUMBERS[_number][_cat][_name]["value"+j];
  2682. if (textToFind == undefined) {
  2683. continue;
  2684. }
  2685. _isFound = false;
  2686. element.selectedIndex = -1;
  2687. for (var i = 0; i < element.options.length; i++) {
  2688. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  2689. element.selectedIndex = i;
  2690. _isFound = true;
  2691. break;
  2692. }
  2693. }
  2694. if (!_isFound) {
  2695. _zw_txt = "In the selected field the value '" + textToFind + "' in the parameter '";
  2696. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  2697. firework.launch(_zw_txt, 'warning', 10000);
  2698. }
  2699. }
  2700. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  2701. element.checked = NUMBERS[_number][_cat][_name]["value"+j] == "true";
  2702. }
  2703. else {
  2704. element.value = NUMBERS[_number][_cat][_name]["value"+j];
  2705. }
  2706. }
  2707. }
  2708. else {
  2709. if (_optional) {
  2710. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  2711. for (var j = 1; j <= anzpara; ++j) {
  2712. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  2713. }
  2714. }
  2715. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  2716. setEnabled(_cat+"_"+_name, true);
  2717. for (var j = 1; j <= anzpara; ++j) {
  2718. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  2719. if (element.tagName.toLowerCase() == "select") {
  2720. var textToFind = _param[_cat][_name]["value"+j];
  2721. if (textToFind == undefined) {
  2722. continue;
  2723. }
  2724. _isFound = false;
  2725. element.selectedIndex = -1;
  2726. for (var i = 0; i < element.options.length; i++) {
  2727. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  2728. element.selectedIndex = i;
  2729. _isFound = true;
  2730. break;
  2731. }
  2732. }
  2733. if (!_isFound) {
  2734. _zw_txt = "In the selected field the value '" + textToFind + "' in the section '";
  2735. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  2736. firework.launch(_zw_txt, 'warning', 10000);
  2737. }
  2738. }
  2739. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  2740. element.checked = _param[_cat][_name]["value"+j] == "true";
  2741. }
  2742. else {
  2743. element.value = _param[_cat][_name]["value"+j];
  2744. }
  2745. }
  2746. }
  2747. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  2748. if (_category[_cat]["enabled"] == false) {
  2749. if (_optional) {
  2750. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  2751. for (var j = 1; j <= anzpara; ++j) {
  2752. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  2753. }
  2754. }
  2755. document.getElementById(_cat+"_"+_name+"_text").style="color: gray;"
  2756. setEnabled(_cat+"_"+_name, false);
  2757. }
  2758. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional, _number);
  2759. }
  2760. /* hash #description open the details part of the page */
  2761. function openDescription() {
  2762. if(window.location.hash) {
  2763. var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
  2764. if(hash == 'description') {
  2765. document.getElementById("desc_details").open = true;
  2766. document.getElementById("reboot").style.display = "none";
  2767. document.getElementById("reboot_text").style.display = "none";
  2768. }
  2769. }
  2770. }
  2771. openDescription();
  2772. LoadConfigNeu();
  2773. </script>
  2774. </body>
  2775. </html>