edit_config_template.html 122 KB

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