edit_config_template.html 120 KB

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