edit_config_template.html 121 KB

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