edit_config_param_template.html 92 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481
  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. </style>
  138. <link rel="stylesheet" href="mkdocs_theme.css?v=$COMMIT_HASH" />
  139. <link rel="stylesheet" href="mkdocs_theme_extra.css?v=$COMMIT_HASH" />
  140. <link rel="stylesheet" href="github.min.css?v=$COMMIT_HASH" />
  141. <link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
  142. <script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
  143. <script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
  144. </head>
  145. <body style="font-family: arial; padding: 0px 10px;">
  146. <h2>Configuration</h2>
  147. <details id="desc_details">
  148. <summary><b>CLICK HERE</b> for usage description. More infos in documentation:
  149. <a href="https://jomjol.github.io/AI-on-the-edge-device-docs/Parameters" target="_blank">Parameter</a>
  150. </summary>
  151. <p>
  152. This page lists all available configuration parameters of the device.<br>
  153. The description of each parameter can be shown by hovering over or by clicking the <img src="help.png" width="16px"> icon.
  154. </p>
  155. <p>
  156. The page gets opened with the default view which should be sufficient for regular configuration tasks. Enabling the <b>"Expert View"</b>
  157. some expert parameters (light red background color) will be added to the parameter list. Additionally the button <b>"Edit "Config.ini" File"</b>
  158. 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.
  159. </p>
  160. <p>
  161. Sections (entire functionality) or single parameters having a checkbox can be enabled or disabled.
  162. Disabling a complete section results in a disabled functionality. Whenever only a single parameter of a section is disabled
  163. the hard-coded default value is used for the disabled parameter.
  164. </p>
  165. <p>
  166. Don't forget to save the changes with the button <b>"Save Config"</b> at the bottom of this page.<br>
  167. <label id="reboot_text" name="reboot_text">
  168. To apply the new configuration a restart of the device is neccessary: <b>"Reboot to apply changes"</b>
  169. </label>
  170. </p>
  171. </details>
  172. <hr />
  173. <div id="divall" style="display:none">
  174. <table class="table">
  175. <colgroup>
  176. <col span="1" style="width:290px">
  177. <col span="1" style="width:300px;">
  178. <col span="1">
  179. </colgroup>
  180. <tr style="border-bottom: 2px solid lightgray;">
  181. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Configuration View</h4></td>
  182. </tr>
  183. <tr>
  184. <td class="indent1">
  185. <input style="margin-top:12px;margin-bottom:12px" type="checkbox" id="ExpertModus_enabled" value="1" onclick='UpdateExpertModus()' unchecked>
  186. <label for="ExpertModus_enabled">Expert View</label>
  187. </td>
  188. <td>
  189. <button style="display:none;" class="button" id="Edit_Config_Direct" onclick="editConfigDirect()">Edit "Config.ini" File</button>
  190. </td>
  191. </tr>
  192. <!------------- Take Image ------------------>
  193. <tr style="border-bottom: 2px solid lightgray;">
  194. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Take Image</h4></td>
  195. </tr>
  196. <tr>
  197. <td class="indent1">
  198. <input type="checkbox" id="TakeImage_RawImagesLocation_enabled" value="1" onclick='InvertEnableItem("TakeImage", "RawImagesLocation")' unchecked >
  199. <label for=TakeImage_RawImagesLocation_enabled><class id="TakeImage_RawImagesLocation_text" style="color:black;">Raw Images Location</class></label>
  200. </td>
  201. <td>
  202. <input required type="text" name="name" id="TakeImage_RawImagesLocation_value1">
  203. </td>
  204. <td>$TOOLTIP_TakeImage_RawImagesLocation</td>
  205. </tr>
  206. <tr>
  207. <td class="indent1">
  208. <input type="checkbox" id="TakeImage_RawImagesRetention_enabled" value="1" onclick='InvertEnableItem("TakeImage", "RawImagesRetention")' unchecked >
  209. <label for=TakeImage_RawImagesRetention_enabled><class id="TakeImage_RawImagesRetention_text" style="color:black;">Raw Images Retention</class></label>
  210. </td>
  211. <td>
  212. <input required type="number" id="TakeImage_RawImagesRetention_value1" size="13" min="0" step="1"
  213. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  214. </td>
  215. <td>$TOOLTIP_TakeImage_RawImagesRetention</td>
  216. </tr>
  217. <tr class="expert" id="ex1">
  218. <td class="indent1">
  219. <label><class id="TakeImage_Demo_text" style="color:black;">Demo Mode</class></label>
  220. </td>
  221. <td>
  222. <select id="TakeImage_Demo_value1">
  223. <option value="true">true</option>
  224. <option value="false" selected>false</option>
  225. </select>
  226. </td>
  227. <td>$TOOLTIP_TakeImage_Demo</td>
  228. </tr>
  229. <tr class="expert" id="ex1">
  230. <td class="indent1">
  231. <class id="TakeImage_WaitBeforeTakingPicture_text" style="color:black;">Wait Before Taking Picture</class>
  232. </td>
  233. <td>
  234. <input required type="number" id="TakeImage_WaitBeforeTakingPicture_value1" size="13" min="0" step="any"
  235. oninput="(!validity.rangeUnderflow||(value=0));">Seconds
  236. </td>
  237. <td>$TOOLTIP_TakeImage_WaitBeforeTakingPicture</td>
  238. </tr>
  239. <tr class="expert" id="ex2">
  240. <td class="indent1">
  241. <class id="TakeImage_ImageQuality_text" style="color:black;">Image Quality</class>
  242. </td>
  243. <td>
  244. <input required type="number" id="TakeImage_ImageQuality_value1" size="13" min="8" max="63"
  245. oninput="(!validity.rangeUnderflow||(value=8)) && (!validity.rangeOverflow||(value=63)) &&
  246. (!validity.stepMismatch||(value=parseInt(this.value)));">
  247. </td>
  248. <td>$TOOLTIP_TakeImage_ImageQuality</td>
  249. </tr>
  250. <tr class="expert" id="ex3">
  251. <td class="indent1">
  252. <class id="TakeImage_ImageSize_text" style="color:black;">Image Size</class>
  253. </td>
  254. <td>
  255. <select id="TakeImage_ImageSize_value1">
  256. <option value="VGA" selected>VGA</option>
  257. <option value="QVGA" >QVGA</option>
  258. </select>
  259. </td>
  260. <td>$TOOLTIP_TakeImage_ImageSize</td>
  261. </tr>
  262. <tr class="expert" id="LEDIntensity_ex3">
  263. <td class="indent1">
  264. <class id="TakeImage_LEDIntensity_text" style="color:black;">LED Intensity</class>
  265. </td>
  266. <td>
  267. <input required type="number" id="TakeImage_LEDIntensity_value1" size="13" min="0" max="100"
  268. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=100)) &&
  269. (!validity.stepMismatch||(value=parseInt(this.value)));">
  270. </td>
  271. <td>$TOOLTIP_TakeImage_LEDIntensity</td>
  272. </tr>
  273. <tr class="expert" id="Brightness_ex3">
  274. <td class="indent1">
  275. <class id="TakeImage_Brightness_text" style="color:black;">Brightness</class>
  276. </td>
  277. <td>
  278. <input required type="number" id="TakeImage_Brightness_value1" size="13" min="-2" max="2"
  279. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) &&
  280. (!validity.stepMismatch||(value=parseInt(this.value)));">
  281. </td>
  282. <td>$TOOLTIP_TakeImage_Brightness</td>
  283. </tr>
  284. <tr class="expert" id="Contrast_ex3">
  285. <td class="indent1">
  286. <class id="TakeImage_Contrast_text" style="color:black;">Contrast</class>
  287. </td>
  288. <td>
  289. <input required type="number" id="TakeImage_Contrast_value1" size="13" min="-2" max="2"
  290. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) &&
  291. (!validity.stepMismatch||(value=parseInt(this.value)));">
  292. </td>
  293. <td>$TOOLTIP_TakeImage_Contrast</td>
  294. </tr>
  295. <tr class="expert" id="Saturation_ex3">
  296. <td class="indent1">
  297. <class id="TakeImage_Saturation_text" style="color:black;">Saturation</class>
  298. </td>
  299. <td>
  300. <input required type="number" id="TakeImage_Saturation_value1" size="13" min="-2" max="2"
  301. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) &&
  302. (!validity.stepMismatch||(value=parseInt(this.value)));">
  303. </td>
  304. <td>$TOOLTIP_TakeImage_Saturation</td>
  305. </tr>
  306. <tr class="expert" id="TakeImage_FixedExposure_ex10">
  307. <td class="indent1">
  308. <class id="TakeImage_FixedExposure_text" style="color:black;">Fixed Exposure</class>
  309. </td>
  310. <td>
  311. <select id="TakeImage_FixedExposure_value1">
  312. <option value="true" selected>true</option>
  313. <option value="false" >false</option>
  314. </select>
  315. </td>
  316. <td>$TOOLTIP_TakeImage_FixedExposure</td>
  317. </tr>
  318. <!------------- Alignment ------------------>
  319. <tr class="expert" style="border-bottom: 2px solid lightgray;" id="ex4">
  320. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Alignment</h4></td>
  321. </tr>
  322. <tr class="expert" id="ex6">
  323. <td class="indent1">
  324. <class id="Alignment_SearchFieldX_text" style="color:black;">Search Field X</class>
  325. </td>
  326. <td>
  327. <input required type="number" name="name" id="Alignment_SearchFieldX_value1" size="13" min="1" step="1"
  328. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Pixel
  329. </td>
  330. <td>$TOOLTIP_Alignment_SearchFieldX</td>
  331. </tr>
  332. <tr class="expert" id="ex8">
  333. <td class="indent1">
  334. <class id="Alignment_SearchFieldY_text" style="color:black;">Search Field Y</class>
  335. </td>
  336. <td>
  337. <input required type="number" name="name" id="Alignment_SearchFieldY_value1" size="13" min="1"
  338. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Pixel
  339. </td>
  340. <td>$TOOLTIP_Alignment_SearchFieldY</td>
  341. </tr>
  342. <tr class="expert" id="AlignmentAlgo_ex8">
  343. <td class="indent1">
  344. <input type="checkbox" id="Alignment_AlignmentAlgo_enabled" value="1" onclick = 'InvertEnableItem("Alignment", "AlignmentAlgo")' unchecked >
  345. <label for=Alignment_AlignmentAlgo_enabled><class id="Alignment_AlignmentAlgo_text" style="color:black;">Alignment Algorithm</class></label>
  346. </td>
  347. <td>
  348. <select id="Alignment_AlignmentAlgo_value1">
  349. <option value="default" selected>Default</option>
  350. <option value="highAccuracy" >HighAccuracy</option>
  351. <option value="fast" >Fast</option>
  352. <option value="off" >Off</option><!-- add disable aligment algo |01.2023 -->
  353. </select>
  354. </td>
  355. <td>$TOOLTIP_Alignment_AlignmentAlgo</td>
  356. </tr>
  357. <tr class="expert" id="ex13">
  358. <td class="indent1">
  359. <class id="Alignment_FlipImageSize_text" style="color:black;">Flip Image Size</class>
  360. </td>
  361. <td>
  362. <select id="Alignment_FlipImageSize_value1">
  363. <option value="true">true</option>
  364. <option value="false" selected>false</option>
  365. </select>
  366. </td>
  367. <td>$TOOLTIP_Alignment_FlipImageSize</td>
  368. </tr>
  369. <tr class="expert" id="ex13">
  370. <td class="indent1">
  371. <class id="Alignment_InitialMirror_text" style="color:black;">Initial Mirror</class>
  372. </td>
  373. <td>
  374. <select id="Alignment_InitialMirror_value1">
  375. <option value="true">true</option>
  376. <option value="false" selected>false</option>
  377. </select>
  378. </td>
  379. <td>$TOOLTIP_Alignment_InitialMirror</td>
  380. </tr>
  381. <!------------- Digit ROIs ------------------>
  382. <tr style="border-bottom: 2px solid lightgray;" id="Category_Digits_ex4">
  383. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  384. <h4><input type="checkbox" id="Category_Digits_enabled" value="1" onclick ='UpdateAfterCategoryCheck()' unchecked >
  385. <label for=Category_Digits_enabled>Digit ROI Processing</label></h4>
  386. </td>
  387. </tr>
  388. <tr class="DigitItem">
  389. <td class="indent1" >
  390. <class id="Digits_Model_text" style="color:black;">Model</class>
  391. </td>
  392. <td>
  393. <select required class="select_large" id="Digits_Model_value1">
  394. </select>
  395. </td>
  396. <td>$TOOLTIP_Digits_Model</td>
  397. </tr>
  398. <tr class="DigitItem expert" id="ex91">
  399. <td class="indent1">
  400. <input type="checkbox" id="Digits_CNNGoodThreshold_enabled" value="1" onclick = 'InvertEnableItem("Digits", "CNNGoodThreshold")' unchecked >
  401. <label for=Digits_CNNGoodThreshold_enabled><class id="Digits_CNNGoodThreshold_text" style="color:black;">CNN Good Threshold</class></label>
  402. </td>
  403. <td>
  404. <input required type="number" id="Digits_CNNGoodThreshold_value1" min="0" max="1" step="0.1"
  405. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=1)) &&
  406. (!validity.stepMismatch||(value=parseInt(this.value)));">
  407. </td>
  408. <td>$TOOLTIP_Digits_CNNGoodThreshold</td>
  409. </tr>
  410. <tr class="DigitItem">
  411. <td class="indent1">
  412. <input type="checkbox" id="Digits_ROIImagesLocation_enabled" value="1" onclick = 'InvertEnableItem("Digits", "ROIImagesLocation")' unchecked >
  413. <label for=Digits_ROIImagesLocation_enabled><class id="Digits_ROIImagesLocation_text" style="color:black;">ROI Images Location</class></label>
  414. </td>
  415. <td>
  416. <input required type="text" name="name" id="Digits_ROIImagesLocation_value1">
  417. </td>
  418. <td>$TOOLTIP_Digits_ROIImagesLocation</td>
  419. </tr>
  420. <tr class="DigitItem">
  421. <td class="indent1">
  422. <input type="checkbox" id="Digits_ROIImagesRetention_enabled" value="1" onclick = 'InvertEnableItem("Digits", "ROIImagesRetention")' unchecked >
  423. <label for=Digits_ROIImagesRetention_enabled><class id="Digits_ROIImagesRetention_text" style="color:black;">ROI Images Retention</class></label>
  424. </td>
  425. <td>
  426. <input required type="number" id="Digits_ROIImagesRetention_value1" min="0" step="1"
  427. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  428. </td>
  429. <td>$TOOLTIP_Digits_ROIImagesRetention</td>
  430. </tr>
  431. <!------------- Ananlog ROIs ------------------>
  432. <tr style="border-bottom: 2px solid lightgray;" id="Category_Analog_ex4">
  433. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  434. <h4><input type="checkbox" id="Category_Analog_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  435. <label for=Category_Analog_enabled>Analog ROI Processing</label></h4>
  436. </td>
  437. </tr>
  438. <tr class="AnalogItem">
  439. <td class="indent1">
  440. <class id="Analog_Model_text" style="color:black;">Model</class>
  441. </td>
  442. <td>
  443. <select required class="select_large" id="Analog_Model_value1">
  444. </select>
  445. </td>
  446. <td>$TOOLTIP_Analog_Model</td>
  447. </tr>
  448. <tr class="AnalogItem">
  449. <td class="indent1">
  450. <input type="checkbox" id="Analog_ROIImagesLocation_enabled" value="1" onclick = 'InvertEnableItem("Analog", "ROIImagesLocation")' unchecked >
  451. <label for=Analog_ROIImagesLocation_enabled><class id="Analog_ROIImagesLocation_text" style="color:black;">ROI Images Location</class>
  452. </label>
  453. </td>
  454. <td> <input required type="text" name="name" id="Analog_ROIImagesLocation_value1"> </td>
  455. <td>$TOOLTIP_Analog_ROIImagesLocation</td>
  456. </tr>
  457. <tr class="AnalogItem">
  458. <td class="indent1">
  459. <input type="checkbox" id="Analog_ROIImagesRetention_enabled" value="1" onclick = 'InvertEnableItem("Analog", "ROIImagesRetention")' unchecked >
  460. <label for=Analog_ROIImagesRetention_enabled><class id="Analog_ROIImagesRetention_text" style="color:black;">ROI Images Retention</class></label></td>
  461. <td>
  462. <input required type="number" id="Analog_ROIImagesRetention_value1" min="0" step="1"
  463. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  464. </td>
  465. <td>$TOOLTIP_Analog_ROIImagesRetention</td>
  466. </tr>
  467. <!------------- Post-Processing ------------------>
  468. <tr style="border-bottom: 2px solid lightgray;">
  469. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Post-Processing</h4></td>
  470. </tr>
  471. <tr>
  472. <td class="indent1">
  473. <label><class id="PostProcessing_PreValueUse_text" style="color:black;">Previous Value</class></label>
  474. </td>
  475. <td>
  476. <select id="PostProcessing_PreValueUse_value1">
  477. <option value="true" selected>true</option>
  478. <option value="false" >false</option>
  479. </select>
  480. </td>
  481. <td>$TOOLTIP_PostProcessing_PreValueUse</td>
  482. </tr>
  483. <tr class="expert" id="ex11">
  484. <td class="indent1">
  485. <input type="checkbox" id="PostProcessing_PreValueAgeStartup_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "PreValueAgeStartup")' unchecked >
  486. <label for=PostProcessing_PreValueAgeStartup_enabled><class id="PostProcessing_PreValueAgeStartup_text" style="color:black;">Maximum Age of Previous Value after Startup</class></label>
  487. </td>
  488. <td>
  489. <input required type="number" id="PostProcessing_PreValueAgeStartup_value1" size="13" min="0"
  490. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Minutes
  491. </td>
  492. <td>$TOOLTIP_PostProcessing_PreValueAgeStartup</td>
  493. </tr>
  494. <tr class="expert" id="ex12">
  495. <td class="indent1">
  496. <label><class id="PostProcessing_ErrorMessage_text" style="color:black;">Skip Messages on Error</class></label>
  497. </td>
  498. <td>
  499. <select id="PostProcessing_ErrorMessage_value1">
  500. <option value="true" selected>true</option>
  501. <option value="false" >false</option>
  502. </select>
  503. </td>
  504. <td>$TOOLTIP_PostProcessing_ErrorMessage</td>
  505. </tr>
  506. <tr class="expert" id="ex1dddd">
  507. <td class="indent1">
  508. <label><class id="PostProcessing_CheckDigitIncreaseConsistency_text" style="color:black;">Check Digit Increase Consistency</class></label>
  509. </td>
  510. <td>
  511. <select id="PostProcessing_CheckDigitIncreaseConsistency_value1">
  512. <option value="true" selected>true</option>
  513. <option value="false" >false</option>
  514. </select>
  515. </td>
  516. <td>$TOOLTIP_PostProcessing_CheckDigitIncreaseConsistency</td>
  517. </tr>
  518. <tr style="margin-top:12px">
  519. <td class="indent1" style="padding-top:25px" colspan="3">
  520. <b>Parameter per number sequence:</b>
  521. <select
  522. style="font-weight: bold; margin-left:17px" id="Numbers_value1" onchange="numberChanged()">
  523. </select>
  524. </td>
  525. </tr>
  526. <tr>
  527. <td class="indent2">
  528. <label><class id="PostProcessing_AllowNegativeRates_text" style="color:black;">Allow Negative Rates</class></label>
  529. </td>
  530. <td>
  531. <select id="PostProcessing_AllowNegativeRates_value1">
  532. <option value="true" selected>true</option>
  533. <option value="false" >false</option>
  534. </select>
  535. </td>
  536. <td>$TOOLTIP_PostProcessing_NUMBER.AllowNegativeRates</td>
  537. </tr>
  538. <tr>
  539. <td class="indent2">
  540. <input type="checkbox" id="PostProcessing_DecimalShift_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "DecimalShift")' unchecked >
  541. <label for=PostProcessing_DecimalShift_enabled><class id="PostProcessing_DecimalShift_text" style="color:black;">Decimal Shift</class></label>
  542. </td>
  543. <td>
  544. <input required type="number" id="PostProcessing_DecimalShift_value1" value="0" step="1" min="-9" max="9"
  545. oninput="(!validity.rangeUnderflow||(value=-9)) && (!validity.rangeOverflow||(value=9)) &&
  546. (!validity.stepMismatch||(value=parseInt(this.value)));">
  547. </td>
  548. <td>$TOOLTIP_PostProcessing_NUMBER.DecimalShift</td>
  549. </tr>
  550. <tr>
  551. <td class="indent2">
  552. <input type="checkbox" id="PostProcessing_AnalogDigitalTransitionStart_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "AnalogDigitalTransitionStart")' unchecked >
  553. <label for=PostProcessing_AnalogDigitalTransitionStart_enabled><class id="PostProcessing_AnalogDigitalTransitionStart_text" style="color:black;">Analog/Digital Transition Start</class></label>
  554. </td>
  555. <td>
  556. <input required type="number" id="PostProcessing_AnalogDigitalTransitionStart_value1" step="0.1" min="0.1" max="9.9" value="9.2"
  557. oninput="(!validity.rangeUnderflow||(value=0.1)) && (!validity.rangeOverflow||(value=9.9)) &&
  558. (!validity.stepMismatch||(value=parseInt(this.value)));">
  559. </td>
  560. <td>$TOOLTIP_PostProcessing_NUMBER.AnalogDigitalTransitionStart</td>
  561. </tr>
  562. <tr>
  563. <td class="indent2">
  564. <input type="checkbox" id="PostProcessing_MaxRateValue_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateValue")' unchecked >
  565. <label for=PostProcessing_MaxRateValue_enabled><class id="PostProcessing_MaxRateValue_text" style="color:black;">Maximum Rate Value</class></label>
  566. </td>
  567. <td>
  568. <input required type="number" id="PostProcessing_MaxRateValue_value1" size="13" min="0" step="any"
  569. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  570. </td>
  571. <td>$TOOLTIP_PostProcessing_NUMBER.MaxRateValue</td>
  572. </tr>
  573. <tr>
  574. <td class="indent2">
  575. <input type="checkbox" id="PostProcessing_MaxRateType_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateType")' unchecked >
  576. <label for=PostProcessing_MaxRateType_enabled><class id="PostProcessing_MaxRateType_text" style="color:black;">Maximum Rate Type</class></label>
  577. </td>
  578. <td>
  579. <select id="PostProcessing_MaxRateType_value1">
  580. <option value="AbsoluteChange" >AbsoluteChange</option>
  581. <option value="RateChange" selected>RateChange</option>
  582. </select>
  583. </td>
  584. <td>$TOOLTIP_PostProcessing_NUMBER.MaxRateType</td>
  585. </tr>
  586. <tr>
  587. <td class="indent2">
  588. <label><class id="PostProcessing_ExtendedResolution_text" style="color:black;">Extended Resolution</class></label>
  589. </td>
  590. <td>
  591. <select id="PostProcessing_ExtendedResolution_value1">
  592. <option value="true" >true</option>
  593. <option value="false" selected>false</option>
  594. </select>
  595. </td>
  596. <td>$TOOLTIP_PostProcessing_NUMBER.ExtendedResolution</td>
  597. </tr>
  598. <tr>
  599. <td id="ex121" class="indent2">
  600. <label><class id="PostProcessing_IgnoreLeadingNaN_text" style="color:black;">Ignore Leading NaNs</class></label>
  601. </td>
  602. <td>
  603. <select id="PostProcessing_IgnoreLeadingNaN_value1">
  604. <option value="true" >true</option>
  605. <option value="false" selected>false</option>
  606. </select>
  607. </td>
  608. <td>$TOOLTIP_PostProcessing_NUMBER.IgnoreLeadingNaN</td>
  609. </tr>
  610. <!------------- MQTT ------------------>
  611. <tr style="border-bottom: 2px solid lightgray;">
  612. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  613. <h4>
  614. <input type="checkbox" id="Category_MQTT_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  615. <label for=Category_MQTT_enabled>MQTT</label>
  616. </h4>
  617. </td>
  618. </tr>
  619. <tr class="MQTTItem">
  620. <td class="indent1">
  621. <input type="checkbox" id="MQTT_Uri_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Uri")' unchecked >
  622. <label for=MQTT_Uri_enabled><class id="MQTT_Uri_text" style="color:black;">URI</class></label>
  623. </td>
  624. <td>
  625. <input required type="text" id="MQTT_Uri_value1">
  626. </td>
  627. <td>$TOOLTIP_MQTT_Uri</td>
  628. </tr>
  629. <tr class="MQTTItem">
  630. <td class="indent1">
  631. <input type="checkbox" id="MQTT_MainTopic_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MainTopic")' unchecked >
  632. <label for=MQTT_MainTopic_enabled><class id="MQTT_MainTopic_text" style="color:black;">Main Topic</class></label>
  633. </td>
  634. <td>
  635. <input required type="text" id="MQTT_MainTopic_value1">
  636. </td>
  637. <td>$TOOLTIP_MQTT_MainTopic</td>
  638. </tr>
  639. <tr class="MQTTItem">
  640. <td class="indent1">
  641. <input type="checkbox" id="MQTT_ClientID_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientID")' unchecked >
  642. <label for=MQTT_ClientID_enabled><class id="MQTT_ClientID_text" style="color:black;">Client ID</class></label>
  643. </td>
  644. <td>
  645. <input required type="text" id="MQTT_ClientID_value1">
  646. </td>
  647. <td>$TOOLTIP_MQTT_ClientID</td>
  648. </tr>
  649. <tr class="MQTTItem">
  650. <td class="indent1">
  651. <input type="checkbox" id="MQTT_user_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "user")' unchecked >
  652. <label for=MQTT_user_enabled><class id="MQTT_user_text" style="color:black;">Username</class></label>
  653. </td>
  654. <td>
  655. <input type="text" id="MQTT_user_value1">
  656. </td>
  657. <td>$TOOLTIP_MQTT_user</td>
  658. </tr>
  659. <tr class="MQTTItem">
  660. <td class="indent1">
  661. <input type="checkbox" id="MQTT_password_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "password")' unchecked >
  662. <label for=MQTT_password_enabled><class id="MQTT_password_text" style="color:black;">Password</class></label>
  663. </td>
  664. <td>
  665. <input type="text" id="MQTT_password_value1">
  666. </td>
  667. <td>$TOOLTIP_MQTT_password</td>
  668. </tr>
  669. <tr class="MQTTItem expert" id="exMqtt">
  670. <td class="indent1">
  671. <input type="checkbox" id="MQTT_CACert_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "CACert")' unchecked >
  672. <label for=MQTT_CACert_enabled><class id="MQTT_CACert_text" style="color:black;">Root CA Certificate file</class></label>
  673. </td>
  674. <td>
  675. <input type="text" id="MQTT_CACert_value1">
  676. </td>
  677. <td>$TOOLTIP_MQTT_CACert</td>
  678. </tr>
  679. <tr class="MQTTItem expert" id="exMqtt">
  680. <td class="indent1">
  681. <input type="checkbox" id="MQTT_ClientCert_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientCert")' unchecked >
  682. <label for=MQTT_ClientCert_enabled><class id="MQTT_ClientCert_text" style="color:black;">Client Certificate file</class></label>
  683. </td>
  684. <td>
  685. <input type="text" id="MQTT_ClientCert_value1">
  686. </td>
  687. <td>$TOOLTIP_MQTT_ClientCert</td>
  688. </tr>
  689. <tr class="MQTTItem expert" id="exMqtt">
  690. <td class="indent1">
  691. <input type="checkbox" id="MQTT_ClientKey_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientKey")' unchecked >
  692. <label for=MQTT_ClientKey_enabled><class id="MQTT_ClientKey_text" style="color:black;">Client Key file</class></label>
  693. </td>
  694. <td>
  695. <input type="text" id="MQTT_ClientKey_value1">
  696. </td>
  697. <td>$TOOLTIP_MQTT_ClientKey</td>
  698. </tr>
  699. <tr class="MQTTItem">
  700. <td class="indent1">
  701. <label><class id="MQTT_RetainMessages_text" style="color:black;">Retain Messages</class></label>
  702. </td>
  703. <td>
  704. <select id="MQTT_RetainMessages_value1">
  705. <option value="true" selected>true</option>
  706. <option value="false" >false</option>
  707. </select>
  708. </td>
  709. <td>$TOOLTIP_MQTT_RetainMessages</td>
  710. </tr>
  711. <tr class="MQTTItem">
  712. <td class="indent1" style="padding-top:25px" colspan="2">
  713. <b>Homeassistant Discovery (using MQTT)</b><br>
  714. If activated, the discovery topics gets automatically scheduled to sent once after device startup during state "Publish to MQTT".
  715. To schedule a retransmission: Use "Manual Control > Resend HA Discovery" or call REST API:
  716. <a href=mqtt_publish_discovery target="_blank">http://&lt;IP&gt;/mqtt_publish_discovery</a>
  717. </td>
  718. </tr>
  719. <tr class="MQTTItem">
  720. <td class="indent2">
  721. <label><class id="MQTT_HomeassistantDiscovery_text" style="color:black;">Homeassistant Discovery</class></label>
  722. </td>
  723. <td>
  724. <select id="MQTT_HomeassistantDiscovery_value1">
  725. <option value="true" selected>true</option>
  726. <option value="false" >false</option>
  727. </select>
  728. </td>
  729. <td>$TOOLTIP_MQTT_HomeassistantDiscovery</td>
  730. </tr>
  731. <tr class="MQTTItem">
  732. <td class="indent2">
  733. <input type="checkbox" id="MQTT_MeterType_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MeterType")' unchecked >
  734. <label for=MQTT_MeterType_enabled><class id="MQTT_MeterType_text" style="color:black;">Meter Type</class></label>
  735. </td>
  736. <td>
  737. <select class="select_large" id="MQTT_MeterType_value1"> <!-- See https://developers.home-assistant.io/docs/core/entity/sensor/#available-device-classes -->
  738. <option value="other" selected>Other (no Units)</option>
  739. <option value="water_m3">Watermeter (Value: m³, Rate: m³/h)</option>
  740. <option value="water_l">Watermeter (Value: l, Rate: l/h)</option>
  741. <option value="water_gal">Watermeter (Value: gal, Rate: gal/h)</option>
  742. <option value="water_ft3">Watermeter (Value: ft³, Rate: ft³/m)</option>
  743. <option value="gas_m3">Gasmeter (Value: m³, Rate: m³/h)</option>
  744. <option value="gas_ft3">Gasmeter (Value: ft³, Rate: ft³/m)</option>
  745. <option value="energy_wh">Energymeter (Value: Wh, Rate: W)</option>
  746. <option value="energy_kwh">Energymeter (Value: kWh, Rate: kW)</option>
  747. <option value="energy_mwh">Energymeter (Value: MWh, Rate: MW)</option>
  748. <option value="energy_gj">Energymeter (Value: GJ, Rate: GJ/h)</option>
  749. </select>
  750. </td>
  751. <td>$TOOLTIP_MQTT_MeterType</td>
  752. </tr>
  753. <!------------- INFLUXDB v1 ------------------>
  754. <tr style="border-bottom: 2px solid lightgray;">
  755. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  756. <h4>
  757. <input type="checkbox" id="Category_InfluxDB_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  758. <label for=Category_InfluxDB_enabled>InfluxDB v1.x</label></h4>
  759. </td>
  760. </tr>
  761. <tr class="InfluxDBv1Item">
  762. <td class="indent1">
  763. <input type="checkbox" id="InfluxDB_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Uri")' unchecked >
  764. <label for=InfluxDB_Uri_enabled><class id="InfluxDB_Uri_text" style="color:black;">URI</class></label>
  765. </td>
  766. <td>
  767. <input required type="text" id="InfluxDB_Uri_value1">
  768. </td>
  769. <td>$TOOLTIP_InfluxDB_Uri</td>
  770. </tr>
  771. <tr class="InfluxDBv1Item">
  772. <td class="indent1">
  773. <input type="checkbox" id="InfluxDB_Database_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Database")' unchecked >
  774. <label for=InfluxDB_Database_enabled><class id="InfluxDB_Database_text" style="color:black;">Database</class></label>
  775. </td>
  776. <td>
  777. <input required type="text" id="InfluxDB_Database_value1">
  778. </td>
  779. <td>$TOOLTIP_InfluxDB_Database</td>
  780. </tr>
  781. <tr class="InfluxDBv1Item">
  782. <td class="indent1">
  783. <input type="checkbox" id="InfluxDB_user_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "user")' unchecked >
  784. <label for=InfluxDB_user_enabled><class id="InfluxDB_user_text" style="color:black;">Username</class></label>
  785. </td>
  786. <td>
  787. <input type="text" id="InfluxDB_user_value1">
  788. </td>
  789. <td>$TOOLTIP_InfluxDB_user</td>
  790. </tr>
  791. <tr class="InfluxDBv1Item">
  792. <td class="indent1">
  793. <input type="checkbox" id="InfluxDB_password_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "password")' unchecked >
  794. <label for=InfluxDB_password_enabled><class id="InfluxDB_password_text" style="color:black;">Password</class></label>
  795. </td>
  796. <td>
  797. <input type="text" id="InfluxDB_password_value1">
  798. </td>
  799. <td>$TOOLTIP_InfluxDB_password</td>
  800. </tr>
  801. <tr class="InfluxDBv1Item" style="margin-top:12px">
  802. <td class="indent1" style="padding-top:25px" colspan="3">
  803. <b>Parameter per number sequence:</b>
  804. <select
  805. style="font-weight: bold; margin-left:17px" id="NumbersInfluxDB_value1" onchange="numberInfluxDBChanged()">
  806. </select>
  807. </td>
  808. </tr>
  809. <tr class="InfluxDBv1Item">
  810. <td class="indent2">
  811. <input type="checkbox" id="InfluxDB_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Measurement")' unchecked >
  812. <label for=InfluxDB_Measurement_enabled><class id="InfluxDB_Measurement_text" style="color:black;">Measurement</class></label>
  813. </td>
  814. <td>
  815. <input required type="text" id="InfluxDB_Measurement_value1">
  816. </td>
  817. <td>$TOOLTIP_InfluxDB_NUMBER.Measurement</td>
  818. </tr>
  819. <tr class="InfluxDBv1Item">
  820. <td class="indent2">
  821. <input type="checkbox" id="InfluxDB_Field_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Field")' unchecked >
  822. <label for=InfluxDB_Field_enabled><class id="InfluxDB_Field_text" style="color:black;">Field</class></label>
  823. </td>
  824. <td>
  825. <input required type="text" id="InfluxDB_Field_value1">
  826. </td>
  827. <td>$TOOLTIP_InfluxDB_NUMBER.Field</td>
  828. </tr>
  829. <!------------- INFLUXDB v2 ------------------>
  830. <tr style="border-bottom: 2px solid lightgray;">
  831. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  832. <h4>
  833. <input type="checkbox" id="Category_InfluxDBv2_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  834. <label for=Category_InfluxDBv2_enabled>InfluxDB v2.x</label></h4>
  835. </td>
  836. </tr>
  837. <tr class="InfluxDBv2Item">
  838. <td class="indent1">
  839. <input type="checkbox" id="InfluxDBv2_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Uri")' unchecked >
  840. <label for=InfluxDBv2_Uri_enabled><class id="InfluxDBv2_Uri_text" style="color:black;">URI</class></label>
  841. </td>
  842. <td>
  843. <input required type="text" id="InfluxDBv2_Uri_value1">
  844. </td>
  845. <td>$TOOLTIP_InfluxDBv2_Uri</td>
  846. </tr>
  847. <tr class="InfluxDBv2Item">
  848. <td class="indent1">
  849. <input type="checkbox" id="InfluxDBv2_Bucket_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Bucket")' unchecked >
  850. <label for=InfluxDBv2_Bucket_enabled><class id="InfluxDBv2_Bucket_text" style="color:black;">Bucket</class></label>
  851. </td>
  852. <td>
  853. <input required type="text" id="InfluxDBv2_Bucket_value1">
  854. </td>
  855. <td>$TOOLTIP_InfluxDBv2_Bucket</td>
  856. </tr>
  857. <tr class="InfluxDBv2Item">
  858. <td class="indent1">
  859. <input type="checkbox" id="InfluxDBv2_Org_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Org")' unchecked >
  860. <label for=InfluxDBv2_Org_enabled><class id="InfluxDBv2_Org_text" style="color:black;">Organization (Org)</class></label>
  861. </td>
  862. <td>
  863. <input type="text" id="InfluxDBv2_Org_value1">
  864. </td>
  865. <td>$TOOLTIP_InfluxDBv2_Org</td>
  866. </tr>
  867. <tr class="InfluxDBv2Item">
  868. <td class="indent1">
  869. <input type="checkbox" id="InfluxDBv2_Token_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Token")' unchecked >
  870. <label for=InfluxDBv2_Token_enabled><class id="InfluxDBv2_Token_text" style="color:black;">Token</class></label>
  871. </td>
  872. <td>
  873. <input type="text" id="InfluxDBv2_Token_value1">
  874. </td>
  875. <td>$TOOLTIP_InfluxDBv2_Token</td>
  876. </tr>
  877. <tr class="InfluxDBv2Item" style="margin-top:12px">
  878. <td class="indent1" style="padding-top:25px" colspan="3">
  879. <b>Parameter per number sequence:</b>
  880. <select
  881. style="font-weight: bold; margin-left:17px" id="NumbersInfluxDBv2_value1" onchange="numberInfluxDBv2Changed()">
  882. </select>
  883. </td>
  884. </tr>
  885. <tr class="InfluxDBv2Item">
  886. <td class="indent2">
  887. <input type="checkbox" id="InfluxDBv2_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Measurement")' unchecked >
  888. <label for=InfluxDBv2_Measurement_enabled><class id="InfluxDBv2_Measurement_text" style="color:black;">Measurement</class></label>
  889. </td>
  890. <td>
  891. <input required type="text" id="InfluxDBv2_Measurement_value1">
  892. </td>
  893. <td>$TOOLTIP_InfluxDBv2_NUMBER.Measurement</td>
  894. </tr>
  895. <tr class="InfluxDBv2Item">
  896. <td class="indent2">
  897. <input type="checkbox" id="InfluxDBv2_Field_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Field")' unchecked >
  898. <label for=InfluxDBv2_Field_enabled><class id="InfluxDBv2_Field_text" style="color:black;">Field</class></label>
  899. </td>
  900. <td>
  901. <input required type="text" id="InfluxDBv2_Field_value1">
  902. </td>
  903. <td>$TOOLTIP_InfluxDBv2_NUMBER.Field</td>
  904. </tr>
  905. <!------------- GPIO ------------------>
  906. <tr style="border-bottom: 2px solid lightgray;">
  907. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  908. <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='UpdateAfterCategoryCheck()' unchecked >
  909. <label for=Category_GPIO_enabled>GPIO (General Purpose Input / Output)</label></h4>
  910. </td>
  911. </tr>
  912. <!------------- GPIO0 begin ------------------>
  913. <tr class="GPIO_IO0 GPIO_item expert">
  914. <td class="indent1">
  915. <input type="checkbox" id="GPIO_IO0_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO0")' unchecked>
  916. <label for=GPIO_IO0_enabled><span id="GPIO_IO0_text">GPIO0 Configuration</span></label>
  917. </td>
  918. <td>
  919. <select id="GPIO_IO0_value1">
  920. <option value="input">input</option>
  921. <option value="input-pullup">input pullup</option>
  922. <option value="input-pulldown">input pulldown</option>
  923. <option value="output">output</option>
  924. </select>
  925. </td>
  926. <td>$TOOLTIP_GPIO_IO0</td>
  927. </tr>
  928. <tr class="GPIO_IO0 GPIO_item expert">
  929. <td class="indent2">
  930. <span id="GPIO_IO0_text" class="GPIO_IO0 GPIO_item">GPIO0 Use Interrupt</span>
  931. </td>
  932. <td>
  933. <select id="GPIO_IO0_value2">
  934. <option value="disabled">disabled</option>
  935. <option value="rising-edge">rising edge</option>
  936. <option value="falling-edge">falling edge</option>
  937. <option value="rising-and-falling">rising and falling</option>
  938. <option value="low-level-trigger">low level trigger</option>
  939. <option value="high-level-trigger">high level trigger</option>
  940. </select>
  941. </td>
  942. <td></td>
  943. </tr>
  944. <tr class="GPIO_IO0 GPIO_item expert">
  945. <td class="indent2">
  946. <span class="GPIO_IO0 GPIO_item">GPIO0 PWM Duty Cycle Resolution</span>
  947. </td>
  948. <td>
  949. <input required type="number" id="GPIO_IO0_value3" min="1" max="20"
  950. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  951. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO0 GPIO_item">Bits</span>
  952. </td>
  953. <td></td>
  954. </tr>
  955. <tr class="GPIO_IO0 GPIO_item expert">
  956. <td class="indent2">
  957. <span class="GPIO_IO0 GPIO_item">GPIO0 Enable MQTT</span>
  958. </td>
  959. <td><input type="checkbox" id="GPIO_IO0_value4"></td>
  960. <td></td>
  961. </tr>
  962. <tr class="GPIO_IO0 GPIO_item expert">
  963. <td class="indent2">
  964. <span class="GPIO_IO0 GPIO_item">GPIO0 Enable REST API</span>
  965. </td>
  966. <td><input type="checkbox" id="GPIO_IO0_value5"></td>
  967. <td></td>
  968. </tr>
  969. <tr class="GPIO_IO0 GPIO_item expert">
  970. <td class="indent2">
  971. <span class="GPIO_IO0 GPIO_item">GPIO0 Name</span>
  972. </td>
  973. <td><input type="text" id="GPIO_IO0_value6"></td>
  974. <td></td>
  975. </tr>
  976. <!------------- GPIO0 end ------------------>
  977. <!------------- GPIO1 begin ------------------>
  978. <tr class="GPIO_IO1 GPIO_item expert">
  979. <td class="indent1">
  980. <input type="checkbox" id="GPIO_IO1_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO1")' unchecked>
  981. <label for=GPIO_IO1_enabled><span id="GPIO_IO1_text">GPIO1 Configuration</span></label>
  982. </td>
  983. <td>
  984. <select id="GPIO_IO1_value1">
  985. <option value="input">input</option>
  986. <option value="input-pullup">input pullup</option>
  987. <option value="input-pulldown">input pulldown</option>
  988. <option value="output">output</option>
  989. </select>
  990. </td>
  991. <td>$TOOLTIP_GPIO_IO1</td>
  992. </tr>
  993. <tr class="GPIO_IO1 GPIO_item expert">
  994. <td class="indent2">
  995. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO1 Use Interrupt</span>
  996. </td>
  997. <td>
  998. <select id="GPIO_IO1_value2">
  999. <option value="disabled">disabled</option>
  1000. <option value="rising-edge" disabled>rising edge</option>
  1001. <option value="falling-edge" disabled>falling edge</option>
  1002. <option value="rising-and-falling">rising and falling</option>
  1003. <option value="low-level-trigger">low level trigger</option>
  1004. <option value="high-level-trigger">high level trigger</option>
  1005. </select>
  1006. </td>
  1007. <td></td>
  1008. </tr>
  1009. <tr class="GPIO_IO1 GPIO_item expert">
  1010. <td class="indent2">
  1011. <span class="GPIO_IO1 GPIO_item">GPIO1 PWM Duty Cycle Resolution</span>
  1012. </td>
  1013. <td><input required type="number" id="GPIO_IO1_value3" min="1" max="20"
  1014. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1015. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO1 GPIO_item">Bits</span>
  1016. </td>
  1017. <td></td>
  1018. </tr>
  1019. <tr class="GPIO_IO1 GPIO_item expert">
  1020. <td class="indent2">
  1021. <span class="GPIO_IO1 GPIO_item">GPIO1 Enable MQTT</span>
  1022. </td>
  1023. <td><input type="checkbox" id="GPIO_IO1_value4"></td>
  1024. <td></td>
  1025. </tr>
  1026. <tr class="GPIO_IO1 GPIO_item expert">
  1027. <td class="indent2">
  1028. <span class="GPIO_IO1 GPIO_item">GPIO1 Enable REST API</span>
  1029. </td>
  1030. <td><input type="checkbox" id="GPIO_IO1_value5"></td>
  1031. <td></td>
  1032. </tr>
  1033. <tr class="GPIO_IO1 GPIO_item expert">
  1034. <td class="indent2">
  1035. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO1 Name</span>
  1036. </td>
  1037. <td><input type="text" id="GPIO_IO1_value6"></td>
  1038. <td></td>
  1039. </tr>
  1040. <!------------- GPIO1 end ------------------>
  1041. <!------------- GPIO3 begin ------------------>
  1042. <tr class="GPIO_IO3 GPIO_item expert">
  1043. <td class="indent1">
  1044. <input type="checkbox" id="GPIO_IO3_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO3")' unchecked>
  1045. <label for=GPIO_IO3_enabled><span id="GPIO_IO3_text">GPIO3 Configuration</span></label>
  1046. </td>
  1047. <td>
  1048. <select id="GPIO_IO3_value1">
  1049. <option value="input">input</option>
  1050. <option value="input-pullup">input pullup</option>
  1051. <option value="input-pulldown">input pulldown</option>
  1052. <option value="output">output</option>
  1053. </select>
  1054. </td>
  1055. <td>$TOOLTIP_GPIO_IO3</td>
  1056. </tr>
  1057. <tr class="GPIO_IO3 GPIO_item expert">
  1058. <td class="indent2">
  1059. <span class="GPIO_IO3 GPIO_item">GPIO3 Use Interrupt</span>
  1060. </td>
  1061. <td>
  1062. <select id="GPIO_IO3_value2">
  1063. <option value="disabled">disabled</option>
  1064. <option value="rising-edge" disabled>rising edge</option>
  1065. <option value="falling-edge" disabled>falling edge</option>
  1066. <option value="rising-and-falling">rising and falling</option>
  1067. <option value="low-level-trigger">low level trigger</option>
  1068. <option value="high-level-trigger">high level trigger</option>
  1069. </select>
  1070. </td>
  1071. <td></td>
  1072. </tr>
  1073. <tr class="GPIO_IO3 GPIO_item expert">
  1074. <td class="indent2">
  1075. <span class="GPIO_IO3 GPIO_item">GPIO3 PWM Duty Cycle Resolution</span>
  1076. </td>
  1077. <td><input required type="number" id="GPIO_IO3_value3" min="1" max="20"
  1078. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1079. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO3 GPIO_item">Bits</span>
  1080. </td>
  1081. <td></td>
  1082. </tr>
  1083. <tr class="GPIO_IO3 GPIO_item expert">
  1084. <td class="indent2">
  1085. <span class="GPIO_IO3 GPIO_item">GPIO3 Enable MQTT</span>
  1086. </td>
  1087. <td><input type="checkbox" id="GPIO_IO3_value4"></td>
  1088. <td></td>
  1089. </tr>
  1090. <tr class="GPIO_IO3 GPIO_item expert">
  1091. <td class="indent2">
  1092. <span class="GPIO_IO3 GPIO_item">GPIO3 Enable REST API</span>
  1093. </td>
  1094. <td><input type="checkbox" id="GPIO_IO3_value5"></td>
  1095. <td></td>
  1096. </tr>
  1097. <tr class="GPIO_IO3 GPIO_item expert">
  1098. <td class="indent2">
  1099. <span class="GPIO_IO3 GPIO_item">GPIO3 Name</span>
  1100. </td>
  1101. <td><input type="text" id="GPIO_IO3_value6"></td>
  1102. <td></td>
  1103. </tr>
  1104. <!------------- GPIO3 end ------------------>
  1105. <!------------- GPIO4 begin ------------------>
  1106. <tr class="GPIO_item" style="border-bottom: 0px;">
  1107. <td class="indent1">
  1108. <input type="checkbox" id="GPIO_IO4_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO4")' checked>
  1109. <label for=GPIO_IO4_enabled><span id="GPIO_IO4_text">GPIO4 Configuration</span></label>
  1110. </td>
  1111. <td>
  1112. <select id="GPIO_IO4_value1">
  1113. <option value="input">input</option>
  1114. <option value="input-pullup">input pullup</option>
  1115. <option value="input-pulldown">input pulldown</option>
  1116. <option value="output">output</option>
  1117. <option value="built-in-led" select>built-in led flash light</option>
  1118. </select>
  1119. </td>
  1120. <td>$TOOLTIP_GPIO_IO4</td>
  1121. </tr>
  1122. <tr class="GPIO_item" style="border-top: 0px;">
  1123. <td colspan="2" style="padding-left:28px">
  1124. <b>IMPORTANT NOTE:</b><br>
  1125. If you'd like to use the built-in flash LED in parallel with other GPIO functionality,
  1126. you have to explicitely activate the "built-in LED flash light" option on GPIO4. The light
  1127. intensity control (PWM) of the LED flash light is not functional anymore (only 100%).
  1128. </td>
  1129. </tr>
  1130. <tr class="GPIO_IO4 GPIO_item expert">
  1131. <td class="indent2">
  1132. <span class="GPIO_IO4 GPIO_item">GPIO4 Use Interrupt</span>
  1133. </td>
  1134. <td>
  1135. <select id="GPIO_IO4_value2">
  1136. <option value="disabled">disabled</option>
  1137. <option value="rising-edge">rising edge</option>
  1138. <option value="falling-edge">falling edge</option>
  1139. <option value="rising-and-falling">rising and falling</option>
  1140. <option value="low-level-trigger">low level trigger</option>
  1141. <option value="high-level-trigger">high level trigger</option>
  1142. </select>
  1143. </td>
  1144. <td></td>
  1145. </tr>
  1146. <tr class="GPIO_IO4 GPIO_item expert">
  1147. <td class="indent2">
  1148. <span class="GPIO_IO4 GPIO_item">GPIO4 PWM Duty Cycle Resolution</span>
  1149. </td>
  1150. <td><input required type="number" id="GPIO_IO4_value3" min="1" max="20"
  1151. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1152. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO4 GPIO_item">Bits</span>
  1153. </td>
  1154. <td></td>
  1155. </tr>
  1156. <tr class="GPIO_IO4 GPIO_item expert">
  1157. <td class="indent2">
  1158. <span class="GPIO_IO4 GPIO_item">GPIO4 Enable MQTT</span>
  1159. </td>
  1160. <td><input type="checkbox" id="GPIO_IO4_value4"></td>
  1161. <td></td>
  1162. </tr>
  1163. <tr class="GPIO_IO4 GPIO_item expert">
  1164. <td class="indent2">
  1165. <span class="GPIO_IO4 GPIO_item">GPIO4 Enable REST API</span>
  1166. </td>
  1167. <td><input type="checkbox" id="GPIO_IO4_value5"></td>
  1168. <td></td>
  1169. </tr>
  1170. <tr class="GPIO_IO4 GPIO_item expert">
  1171. <td class="indent2">
  1172. <span class="GPIO_IO4 GPIO_item">GPIO4 Name</span>
  1173. </td>
  1174. <td><input type="text" id="GPIO_IO4_value6"></td>
  1175. <td></td>
  1176. </tr>
  1177. <!------------- GPIO4 end ------------------>
  1178. <!------------- GPIO12 begin ------------------>
  1179. <tr class="GPIO_item">
  1180. <td class="indent1">
  1181. <input type="checkbox" id="GPIO_IO12_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO12")' unchecked>
  1182. <label for=GPIO_IO12_enabled><span id="GPIO_IO12_text">GPIO12 Configuration</span></label>
  1183. </td>
  1184. <td>
  1185. <select id="GPIO_IO12_value1">
  1186. <option value="input">input</option>
  1187. <option value="input-pullup">input pullup</option>
  1188. <option value="input-pulldown">input pulldown</option>
  1189. <option value="output">output</option>
  1190. <option value="external-flash-ws281x">external flash light ws281x controlled</option>
  1191. </select>
  1192. </td>
  1193. <td>$TOOLTIP_GPIO_IO12</td>
  1194. </tr>
  1195. <tr class="GPIO_IO12 GPIO_item expert">
  1196. <td class="indent2">
  1197. <span class="GPIO_IO12 GPIO_item">GPIO12 Use Interrupt</span>
  1198. </td>
  1199. <td>
  1200. <select class="GPIO_IO12 GPIO_item" id="GPIO_IO12_value2">
  1201. <option value="disabled">disabled</option>
  1202. <option value="rising-edge">rising edge</option>
  1203. <option value="falling-edge">falling edge</option>
  1204. <option value="rising-and-falling">rising and falling</option>
  1205. <option value="low-level-trigger">low level trigger</option>
  1206. <option value="high-level-trigger">high level trigger</option>
  1207. </select>
  1208. </td>
  1209. <td></td>
  1210. </tr>
  1211. <tr class="GPIO_IO12 GPIO_item expert">
  1212. <td class="indent2">
  1213. <span class="GPIO_IO12 GPIO_item">GPIO12 PWM Duty Cycle Resolution</span>
  1214. </td>
  1215. <td><input required type="number" id="GPIO_IO12_value3" min="1" max="20"
  1216. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1217. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO12 GPIO_item">Bits</span>
  1218. </td>
  1219. <td></td>
  1220. </tr>
  1221. <tr class="GPIO_IO12 GPIO_item expert">
  1222. <td class="indent2">
  1223. <span class="GPIO_IO12 GPIO_item">GPIO12 Enable MQTT</span>
  1224. </td>
  1225. <td><input type="checkbox" id="GPIO_IO12_value4"></td>
  1226. <td></td>
  1227. </tr>
  1228. <tr class="GPIO_IO12 GPIO_item expert">
  1229. <td class="indent2">
  1230. <span class="GPIO_IO12 GPIO_item">GPIO12 Enable REST API</span>
  1231. </td>
  1232. <td><input type="checkbox" id="GPIO_IO12_value5"></td>
  1233. <td></td>
  1234. </tr>
  1235. <tr class="GPIO_IO12 GPIO_item expert">
  1236. <td class="indent2">
  1237. <span class="GPIO_IO12 GPIO_item">GPIO12 Name</span>
  1238. </td>
  1239. <td><input type="text" id="GPIO_IO12_value6"></td>
  1240. <td></td>
  1241. </tr>
  1242. <tr class="GPIO_item" id="wstypeex3">
  1243. <td class="indent1">
  1244. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDType_text">LED Type (NeoPixel)</span>
  1245. </td>
  1246. <td class="GPIO_item">
  1247. <select class="GPIO_item" id="GPIO_LEDType_value1">
  1248. <option value="WS2812" selected>WS2812</option>
  1249. <option value="WS2812B">WS2812B</option>
  1250. <option value="SK6812">SK6812</option>
  1251. <option value="WS2813">WS2813 (not tested)</option>
  1252. </select>
  1253. </td>
  1254. <td>$TOOLTIP_GPIO_LEDType</td>
  1255. </tr>
  1256. <tr class="GPIO_item" id="LEDANZex8" >
  1257. <td class="indent1">
  1258. <span class="GPIO_item" id="GPIO_LEDNumbers_text">Numbers of LEDs</span>
  1259. </td>
  1260. <td>
  1261. <input required type="number" name="name" id="GPIO_LEDNumbers_value1" size="13" min="1"
  1262. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  1263. </td>
  1264. <td>$TOOLTIP_GPIO_LEDNumbers</td>
  1265. </tr>
  1266. <tr class="GPIO_item" id="LEDRGBex9">
  1267. <td class="indent1">
  1268. <span class="GPIO_item" id="GPIO_LEDColor_text">LED Color</span>
  1269. </td>
  1270. <td class="GPIO_item">
  1271. R <input required style="min-width:35px;width:35px;" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value1"
  1272. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1273. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1274. G <input required style="min-width:35px;width:35px" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value2"
  1275. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1276. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1277. B <input required style="min-width:35px;width:35px" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value3"
  1278. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1279. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1280. </td>
  1281. <td>$TOOLTIP_GPIO_LEDColor</td>
  1282. </tr>
  1283. <!------------- GPIO12 end ------------------>
  1284. <!------------- GPIO13 begin ------------------>
  1285. <tr class="GPIO_IO13 GPIO_item expert">
  1286. <td class="indent1">
  1287. <input type="checkbox" id="GPIO_IO13_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO13")' unchecked>
  1288. <label for=GPIO_IO13_enabled><span id="GPIO_IO13_text">GPIO13 Configuration</span></label>
  1289. </td>
  1290. <td>
  1291. <select id="GPIO_IO13_value1">
  1292. <option value="input">input</option>
  1293. <option value="input-pullup">input pullup</option>
  1294. <option value="input-pulldown">input pulldown</option>
  1295. <option value="output">output</option>
  1296. </select>
  1297. </td>
  1298. <td>$TOOLTIP_GPIO_IO13</td>
  1299. </tr>
  1300. <tr class="GPIO_IO13 GPIO_item expert">
  1301. <td class="indent2">
  1302. <span class="GPIO_IO13 GPIO_item">GPIO13 Use Interrupt</span>
  1303. </td>
  1304. <td>
  1305. <select id="GPIO_IO13_value2">
  1306. <option value="disabled">disabled</option>
  1307. <option value="rising-edge" disabled>rising edge</option>
  1308. <option value="falling-edge" disabled>falling edge</option>
  1309. <option value="rising-and-falling">rising and falling</option>
  1310. <option value="low-level-trigger">low level trigger</option>
  1311. <option value="high-level-trigger">high level trigger</option>
  1312. </select>
  1313. </td>
  1314. <td></td>
  1315. </tr>
  1316. <tr class="GPIO_IO13 GPIO_item expert">
  1317. <td class="indent2">
  1318. <span class="GPIO_IO13 GPIO_item">GPIO13 PWM Duty Cycle Resolution</span>
  1319. </td>
  1320. <td><input required type="number" id="GPIO_IO13_value3" min="1" max="20"
  1321. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1322. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO13 GPIO_item">Bits</span></td>
  1323. <td></td>
  1324. </tr>
  1325. <tr class="GPIO_IO13 GPIO_item expert">
  1326. <td class="indent2">
  1327. <span class="GPIO_IO13 GPIO_item">GPIO13 Enable MQTT</span>
  1328. </td>
  1329. <td><input type="checkbox" id="GPIO_IO13_value4"></td>
  1330. <td></td>
  1331. </tr>
  1332. <tr class="GPIO_IO13 GPIO_item expert">
  1333. <td class="indent2">
  1334. <span class="GPIO_IO13 GPIO_item">GPIO13 Enable REST API</span>
  1335. </td>
  1336. <td><input type="checkbox" id="GPIO_IO13_value5"></td>
  1337. <td></td>
  1338. </tr>
  1339. <tr class="GPIO_IO13 GPIO_item expert">
  1340. <td class="indent2">
  1341. <span class="GPIO_IO13 GPIO_item">GPIO13 Name</span>
  1342. </td>
  1343. <td><input type="text" id="GPIO_IO13_value6"></td>
  1344. <td></td>
  1345. </tr>
  1346. <!------------- GPIO13 end ------------------>
  1347. <!------------- Autotimer ------------------>
  1348. <tr style="border-bottom: 2px solid lightgray;">
  1349. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Auto Timer</h4></td>
  1350. </tr>
  1351. <tr class="expert" id="ex13">
  1352. <td class="indent1">
  1353. <class id="AutoTimer_AutoStart_text" style="color:black;">Automatic Round Start</class>
  1354. </td>
  1355. <td>
  1356. <select id="AutoTimer_AutoStart_value1">
  1357. <option value="true" selected>true</option>
  1358. <option value="false" >false</option>
  1359. </select>
  1360. </td>
  1361. <td>$TOOLTIP_AutoTimer_AutoStart</td>
  1362. </tr>
  1363. <tr>
  1364. <td class="indent1">
  1365. <class id="AutoTimer_Interval_text" style="color:black;">Round Interval</class>
  1366. </td>
  1367. <td>
  1368. <input required type="number" id="AutoTimer_Interval_value1" size="13" min="1" step="any"
  1369. oninput="(!validity.rangeUnderflow||(value=1));">Minutes
  1370. </td>
  1371. <td>$TOOLTIP_AutoTimer_Interval</td>
  1372. </tr>
  1373. <!------------- Data Logging ------------------>
  1374. <tr style="border-bottom: 2px solid lightgray;">
  1375. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Data Logging</h4></td>
  1376. </tr>
  1377. <tr>
  1378. <td class="indent1">
  1379. <class id="DataLogging_DataLogActive_text" style="color:black;">Data Logging</class>
  1380. </td>
  1381. <td>
  1382. <select id="DataLogging_DataLogActive_value1">
  1383. <option value="true" selected>true</option>
  1384. <option value="false" >false</option>
  1385. </select>
  1386. </td>
  1387. <td>$TOOLTIP_DataLogging_DataLogActive</td>
  1388. </tr>
  1389. <tr>
  1390. <td class="indent1">
  1391. <class id="DataLogging_DataFilesRetention_text" style="color:black;">Data Files Retention</class>
  1392. </td>
  1393. <td>
  1394. <input required type="number" id="DataLogging_DataFilesRetention_value1" size="13" min="0" step="1"
  1395. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  1396. </td>
  1397. <td>$TOOLTIP_DataLogging_DataFilesRetention</td>
  1398. </tr>
  1399. <!------------- Debug Logging ------------------>
  1400. <tr style="border-bottom: 2px solid lightgray;">
  1401. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Debug</h4></td>
  1402. </tr>
  1403. <tr>
  1404. <td class="indent1">
  1405. <class id="Debug_LogLevel_text" style="color:black;">Logfile Log Level</class>
  1406. </td>
  1407. <td>
  1408. <select id="Debug_LogLevel_value1">
  1409. <option value="1" selected>ERROR</option> <!-- matches esp_log_level_t -->
  1410. <option value="2">WARNING</option>
  1411. <option value="3">INFO</option>
  1412. <option value="4">DEBUG</option>
  1413. </select>
  1414. </td>
  1415. <td>$TOOLTIP_Debug_LogLevel</td>
  1416. </tr>
  1417. <tr>
  1418. <td class="indent1">
  1419. <class id="Debug_LogfilesRetention_text" style="color:black;">Logfiles Retention</class>
  1420. </td>
  1421. <td>
  1422. <input required type="number" id="Debug_LogfilesRetention_value1" size="13" min="0" step="1"
  1423. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  1424. </td>
  1425. <td>$TOOLTIP_Debug_LogfilesRetention</td>
  1426. </tr>
  1427. <!------------- System ------------------>
  1428. <tr style="border-bottom: 2px solid lightgray;">
  1429. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>System</h4></td>
  1430. </tr>
  1431. <tr>
  1432. <td class="indent1">
  1433. <input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeZone")' unchecked >
  1434. <label for=System_TimeZone_enabled><class id="System_TimeZone_text" style="color:black;">Time Zone</class></label>
  1435. <p></p><p></p>
  1436. </td>
  1437. <td>
  1438. <input type="text" id="System_TimeZone_value1">
  1439. <p>Use <a href="timezones.html" target="_blank">timezones</a> to find your settings</p>
  1440. </td>
  1441. <td>$TOOLTIP_System_TimeZone</td>
  1442. </tr>
  1443. <tr class="expert" id="ex16">
  1444. <td class="indent1">
  1445. <input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeServer")' unchecked >
  1446. <label for=System_TimeServer_enabled><class id="System_TimeServer_text" style="color:black;">Time Server (NTP)</class></label>
  1447. </td>
  1448. <td>
  1449. <input type="text" id="System_TimeServer_value1">
  1450. </td>
  1451. <td>$TOOLTIP_System_TimeServer</td>
  1452. </tr>
  1453. <tr class="expert" id="System_Hostname">
  1454. <td class="indent1">
  1455. <input type="checkbox" id="System_Hostname_enabled" value="1" onclick = 'InvertEnableItem("System", "Hostname")' unchecked >
  1456. <label for=System_Hostname_enabled><class id="System_Hostname_text" style="color:black;">Hostname</class></label>
  1457. </td>
  1458. <td>
  1459. <input type="text" id="System_Hostname_value1">
  1460. </td>
  1461. <td>$TOOLTIP_System_Hostname</td>
  1462. </tr>
  1463. <tr class="expert" id="System_RSSIThreshold">
  1464. <td class="indent1">
  1465. <input type="checkbox" id="System_RSSIThreshold_enabled" value="1" onclick = 'InvertEnableItem("System", "RSSIThreshold")' unchecked >
  1466. <label for=System_RSSIThreshold_enabled><class id="System_RSSIThreshold_text" style="color:black;">RSSI Threshold</class></label>
  1467. </td>
  1468. <td>
  1469. <input required type="number" name="name" id="System_RSSIThreshold_value1" min="-100" max="0" step="1"
  1470. oninput="(!validity.rangeUnderflow||(value=-100)) && (!validity.rangeOverflow||(value=0)) &&
  1471. (!validity.stepMismatch||(value=parseInt(this.value)));">dBm
  1472. </td>
  1473. <td>$TOOLTIP_System_RSSIThreshold</td>
  1474. </tr>
  1475. <tr class="expert" id="System_CPUFrequency">
  1476. <td class="indent1">
  1477. <input type="checkbox" id="System_CPUFrequency_enabled" value="1" onclick = 'InvertEnableItem("System", "CPUFrequency")' unchecked >
  1478. <label for=System_CPUFrequency_enabled><class id="System_CPUFrequency_text" style="color:black;">CPU Frequency</class></label>
  1479. </td>
  1480. <td>
  1481. <select id="System_CPUFrequency_value1">
  1482. <option value="160" selected>160 MHz</option>
  1483. <option value="240">240 MHz</option>
  1484. </select>
  1485. </td>
  1486. <td>$TOOLTIP_System_CPUFrequency</td>
  1487. </tr>
  1488. </table>
  1489. <table style="padding-top:10px">
  1490. <td>
  1491. <button class="button" onclick="saveTextAsFile()">Save Config</button>
  1492. </td>
  1493. <td>
  1494. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate changes</button>
  1495. </td>
  1496. </table>
  1497. </div>
  1498. <script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
  1499. <script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
  1500. <script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
  1501. <script type="text/javascript">
  1502. var canvas = document.getElementById('canvas'),
  1503. domainname = getDomainname();
  1504. param;
  1505. category;
  1506. NUNBERSAkt = -1;
  1507. NUMBERS;
  1508. function LoadConfigNeu() {
  1509. domainname = getDomainname();
  1510. if (!loadConfig(domainname)) {
  1511. firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
  1512. return;
  1513. }
  1514. ParseConfig();
  1515. param = getConfigParameters();
  1516. category = getConfigCategory();
  1517. InitIndivParameter();
  1518. UpdateInput();
  1519. var sel = document.getElementById("Numbers_value1");
  1520. UpdateInputIndividual(sel);
  1521. UpdateExpertModus();
  1522. document.getElementById("divall").style.display = '';
  1523. }
  1524. function InitIndivParameter()
  1525. {
  1526. NUMBERS = getNUMBERInfo();
  1527. var _index = document.getElementById("Numbers_value1");
  1528. while (_index.length)
  1529. _index.remove(0);
  1530. var _indexInflux = document.getElementById("NumbersInfluxDBv2_value1");
  1531. while (_indexInflux.length)
  1532. _indexInflux.remove(0);
  1533. var _indexInfluxv1 = document.getElementById("NumbersInfluxDB_value1");
  1534. while (_indexInflux.length)
  1535. _indexInfluxv1.remove(0);
  1536. for (var i = 0; i < NUMBERS.length; ++i){
  1537. var option = document.createElement("option");
  1538. option.text = NUMBERS[i]["name"];
  1539. option.value = i;
  1540. _index.add(option);
  1541. var optionInflux = document.createElement("option");
  1542. optionInflux.text = NUMBERS[i]["name"];
  1543. optionInflux.value = i;
  1544. _indexInflux.add(optionInflux);
  1545. var optionInfluxv1 = document.createElement("option");
  1546. optionInfluxv1.text = NUMBERS[i]["name"];
  1547. optionInfluxv1.value = i;
  1548. _indexInfluxv1.add(optionInfluxv1);
  1549. }
  1550. _index.selectedIndex = 0;
  1551. _indexInflux.selectedIndex = 0;
  1552. _indexInfluxv1.selectedIndex = 0;
  1553. }
  1554. function getParameterByName(name, url = window.location.href) {
  1555. name = name.replace(/[\[\]]/g, '\\$&');
  1556. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  1557. results = regex.exec(url);
  1558. if (!results) return null;
  1559. if (!results[2]) return '';
  1560. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  1561. }
  1562. function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1){
  1563. let anzpara;
  1564. try {
  1565. anzpara = _param[_cat][_name].anzParam;
  1566. }
  1567. catch (error) {
  1568. firework.launch("Parameter '" + _name + "' in category '" + _cat + "' is unknown!", 'danger', 30000);
  1569. return;
  1570. }
  1571. if (_number > -1) {
  1572. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1573. return;
  1574. if (_optional) {
  1575. document.getElementById(_cat+"_"+_name+"_enabled").checked = NUMBERS[_number][_cat][_name]["enabled"];
  1576. for (var j = 1; j <= anzpara; ++j) {
  1577. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !NUMBERS[_number][_cat][_name]["enabled"];
  1578. }
  1579. }
  1580. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  1581. setEnabled(_cat+"_"+_name, true);
  1582. for (var j = 1; j <= anzpara; ++j) {
  1583. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1584. if (element.tagName.toLowerCase() == "select") {
  1585. var textToFind = NUMBERS[_number][_cat][_name]["value"+j];
  1586. if (textToFind == undefined)
  1587. continue;
  1588. _isFound = false;
  1589. element.selectedIndex = -1;
  1590. for (var i = 0; i < element.options.length; i++) {
  1591. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1592. element.selectedIndex = i;
  1593. _isFound = true;
  1594. break;
  1595. }
  1596. }
  1597. if (!_isFound)
  1598. {
  1599. _zw_txt = "In the selected field the value '" + textToFind + "' in the parameter '";
  1600. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  1601. firework.launch(_zw_txt, 'warning', 10000);
  1602. }
  1603. }
  1604. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1605. element.checked = NUMBERS[_number][_cat][_name]["value"+j] == "true";
  1606. }
  1607. else {
  1608. element.value = NUMBERS[_number][_cat][_name]["value"+j];
  1609. }
  1610. }
  1611. }
  1612. else {
  1613. if (_optional) {
  1614. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  1615. for (var j = 1; j <= anzpara; ++j) {
  1616. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  1617. }
  1618. }
  1619. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  1620. setEnabled(_cat+"_"+_name, true);
  1621. for (var j = 1; j <= anzpara; ++j) {
  1622. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1623. if (element.tagName.toLowerCase() == "select") {
  1624. var textToFind = _param[_cat][_name]["value"+j];
  1625. if (textToFind == undefined)
  1626. continue;
  1627. _isFound = false;
  1628. element.selectedIndex = -1;
  1629. for (var i = 0; i < element.options.length; i++) {
  1630. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1631. element.selectedIndex = i;
  1632. _isFound = true;
  1633. break;
  1634. }
  1635. }
  1636. if (!_isFound)
  1637. {
  1638. _zw_txt = "In the selected field the value '" + textToFind + "' in the section '";
  1639. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  1640. firework.launch(_zw_txt, 'warning', 10000);
  1641. }
  1642. }
  1643. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1644. element.checked = _param[_cat][_name]["value"+j] == "true";
  1645. }
  1646. else {
  1647. element.value = _param[_cat][_name]["value"+j];
  1648. }
  1649. }
  1650. }
  1651. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  1652. if (_category[_cat]["enabled"] == false)
  1653. {
  1654. if (_optional) {
  1655. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  1656. for (var j = 1; j <= anzpara; ++j) {
  1657. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  1658. }
  1659. }
  1660. document.getElementById(_cat+"_"+_name+"_text").style="color: gray;"
  1661. setEnabled(_cat+"_"+_name, false);
  1662. }
  1663. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional, _number);
  1664. }
  1665. function InvertEnableItem(_cat, _param)
  1666. {
  1667. _zw = _cat + "_" + _param + "_enabled";
  1668. _isOn = document.getElementById(_zw).checked;
  1669. _color = "rgb(122, 122, 122)";
  1670. if (_isOn) {
  1671. _color = "black";
  1672. }
  1673. _zw = _cat + "_" + _param + "_text";
  1674. document.getElementById(_zw).disabled = !_isOn;
  1675. document.getElementById(_zw).style.color = _color;
  1676. setEnabled(_cat + "_" + _param, _isOn);
  1677. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  1678. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  1679. document.getElementById(_cat+"_"+_param+"_value"+j).style.color = _color;
  1680. }
  1681. }
  1682. function setEnabled(className, enabled) {
  1683. _color = "rgb(122, 122, 122)";
  1684. if (enabled) {
  1685. _color = "black";
  1686. }
  1687. let elements = document.getElementsByClassName(className);
  1688. for (i = 0; i < elements.length; i++) {
  1689. if (enabled) {
  1690. elements[i].classList.remove("disabled");
  1691. } else {
  1692. elements[i].classList.add("disabled");
  1693. }
  1694. let inputs = elements[i].getElementsByTagName("input");
  1695. for (j = 0; j < inputs.length; j++) {
  1696. if (inputs[j].id.endsWith("_enabled"))
  1697. continue;
  1698. inputs[j].style.color = _color;
  1699. if (enabled) {
  1700. inputs[j].removeAttribute("disabled");
  1701. } else {
  1702. inputs[j].setAttribute("disabled", "disabled");
  1703. }
  1704. }
  1705. }
  1706. }
  1707. function setVisible(className, visible) {
  1708. let elements = document.getElementsByClassName(className);
  1709. for (i = 0; i < elements.length; i++) {
  1710. if (visible) {
  1711. elements[i].classList.remove("hidden");
  1712. } else {
  1713. elements[i].classList.add("hidden");
  1714. }
  1715. }
  1716. }
  1717. function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1)
  1718. {
  1719. _status = _category[_cat]["enabled"];
  1720. _color = "rgb(122, 122, 122)";
  1721. if (_status) {
  1722. _color = "black";
  1723. }
  1724. if (_optional) {
  1725. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  1726. document.getElementById(_cat+"_"+_name+"_enabled").style.color = _color;
  1727. }
  1728. if (_number == -1){
  1729. if (!_param[_cat][_name]["enabled"]) {
  1730. _status = false;
  1731. _color = "rgb(122, 122, 122)";
  1732. }
  1733. }
  1734. else
  1735. if (!NUMBERS[_number][_cat][_name]["enabled"]) {
  1736. _status = false;
  1737. _color = "rgb(122, 122, 122)";
  1738. }
  1739. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  1740. document.getElementById(_cat+"_"+_name+"_text").style.color = _color;
  1741. setEnabled(_cat+"_"+_name, _status);
  1742. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1743. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  1744. document.getElementById(_cat+"_"+_name+"_value"+j).style.color = _color;
  1745. }
  1746. }
  1747. function ReadParameter(_param, _cat, _name, _optional, _number = -1){
  1748. if (_number > -1) {
  1749. if (_cat == "Digits")
  1750. _cat = "digit";
  1751. if (_cat == "Analog")
  1752. _cat = "analog";
  1753. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1754. return;
  1755. if (_optional) {
  1756. NUMBERS[_number][_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1757. }
  1758. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1759. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1760. if (element.tagName.toLowerCase() == "select") {
  1761. NUMBERS[_number][_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1762. }
  1763. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1764. NUMBERS[_number][_cat][_name]["value"+j] = element.checked;
  1765. }
  1766. else {
  1767. if ((NUMBERS[_number][_cat][_name].checkRegExList != null) && (NUMBERS[_number][_cat][_name].checkRegExList[j-1] != null)) {
  1768. if (!element.value.match(NUMBERS[_cat][_name].checkRegExList[j-1])) {
  1769. element.classList.add("invalid-input");
  1770. } else {
  1771. element.classList.remove("invalid-input");
  1772. }
  1773. }
  1774. NUMBERS[_number][_cat][_name]["value"+j] = element.value;
  1775. }
  1776. }
  1777. }
  1778. else
  1779. {
  1780. if (_optional) {
  1781. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1782. }
  1783. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1784. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1785. if (element.tagName.toLowerCase() == "select") {
  1786. _param[_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1787. }
  1788. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1789. _param[_cat][_name]["value"+j] = element.checked;
  1790. }
  1791. else {
  1792. if ((_param[_cat][_name].checkRegExList != null) && (_param[_cat][_name].checkRegExList[j-1] != null)) {
  1793. if (!element.value.match(_param[_cat][_name].checkRegExList[j-1])) {
  1794. element.classList.add("invalid-input");
  1795. } else {
  1796. element.classList.remove("invalid-input");
  1797. }
  1798. }
  1799. _param[_cat][_name]["value"+j] = element.value;
  1800. }
  1801. }
  1802. }
  1803. }
  1804. function UpdateInputIndividual(sel)
  1805. {
  1806. if (NUNBERSAkt != -1)
  1807. {
  1808. ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1809. ReadParameter(param, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1810. ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1811. ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1812. ReadParameter(param, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1813. ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1814. ReadParameter(param, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1815. ReadParameter(param, "InfluxDB", "Field", true, NUNBERSAkt);
  1816. ReadParameter(param, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1817. ReadParameter(param, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1818. ReadParameter(param, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1819. }
  1820. // var sel = document.getElementById("Numbers_value1");
  1821. NUNBERSAkt = sel.selectedIndex;
  1822. WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1823. WriteParameter(param, category, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1824. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1825. WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1826. WriteParameter(param, category, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1827. WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1828. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1829. WriteParameter(param, category, "InfluxDB", "Field", true, NUNBERSAkt);
  1830. WriteParameter(param, category, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1831. WriteParameter(param, category, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1832. WriteParameter(param, category, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1833. }
  1834. function UpdateInput() {
  1835. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  1836. setVisible("DigitItem", category["Digits"]["enabled"]);
  1837. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  1838. setVisible("AnalogItem", category["Analog"]["enabled"]);
  1839. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  1840. setVisible("MQTTItem", category["MQTT"]["enabled"]);
  1841. document.getElementById("Category_GPIO_enabled").checked = category["GPIO"]["enabled"];
  1842. setVisible("GPIO_item", category["GPIO"]["enabled"]);
  1843. document.getElementById("Category_InfluxDB_enabled").checked = category["InfluxDB"]["enabled"];
  1844. setVisible("InfluxDBv1Item", category["InfluxDB"]["enabled"]);
  1845. document.getElementById("Category_InfluxDBv2_enabled").checked = category["InfluxDBv2"]["enabled"];
  1846. setVisible("InfluxDBv2Item", category["InfluxDBv2"]["enabled"]);
  1847. WriteParameter(param, category, "TakeImage", "RawImagesLocation", true);
  1848. WriteParameter(param, category, "TakeImage", "RawImagesRetention", true);
  1849. WriteParameter(param, category, "TakeImage", "Demo", false);
  1850. WriteParameter(param, category, "TakeImage", "WaitBeforeTakingPicture", false);
  1851. WriteParameter(param, category, "TakeImage", "ImageQuality", false);
  1852. WriteParameter(param, category, "TakeImage", "Brightness", false);
  1853. WriteParameter(param, category, "TakeImage", "Contrast", false);
  1854. WriteParameter(param, category, "TakeImage", "Saturation", false);
  1855. WriteParameter(param, category, "TakeImage", "LEDIntensity", false);
  1856. WriteParameter(param, category, "TakeImage", "ImageSize", false);
  1857. WriteParameter(param, category, "TakeImage", "FixedExposure", false);
  1858. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  1859. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  1860. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true);
  1861. WriteParameter(param, category, "Alignment", "FlipImageSize", false);
  1862. WriteParameter(param, category, "Alignment", "InitialMirror", false);
  1863. WriteParameter(param, category, "Digits", "CNNGoodThreshold", true);
  1864. WriteParameter(param, category, "Digits", "ROIImagesLocation", true);
  1865. WriteParameter(param, category, "Digits", "ROIImagesRetention", true);
  1866. WriteParameter(param, category, "Analog", "ROIImagesLocation", true);
  1867. WriteParameter(param, category, "Analog", "ROIImagesRetention", true);
  1868. WriteParameter(param, category, "PostProcessing", "PreValueUse", false);
  1869. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  1870. // WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true);
  1871. WriteParameter(param, category, "PostProcessing", "ErrorMessage", false);
  1872. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  1873. WriteParameter(param, category, "MQTT", "Uri", true);
  1874. WriteParameter(param, category, "MQTT", "MainTopic", true);
  1875. WriteParameter(param, category, "MQTT", "ClientID", true);
  1876. WriteParameter(param, category, "MQTT", "user", true);
  1877. WriteParameter(param, category, "MQTT", "password", true);
  1878. WriteParameter(param, category, "MQTT", "RetainMessages", false);
  1879. WriteParameter(param, category, "MQTT", "HomeassistantDiscovery", false);
  1880. WriteParameter(param, category, "MQTT", "MeterType", true);
  1881. WriteParameter(param, category, "MQTT", "CACert", true);
  1882. WriteParameter(param, category, "MQTT", "ClientCert", true);
  1883. WriteParameter(param, category, "MQTT", "ClientKey", true);
  1884. WriteParameter(param, category, "InfluxDB", "Uri", true);
  1885. WriteParameter(param, category, "InfluxDB", "Database", true);
  1886. // WriteParameter(param, category, "InfluxDB", "Measurement", true);
  1887. WriteParameter(param, category, "InfluxDB", "user", true);
  1888. WriteParameter(param, category, "InfluxDB", "password", true);
  1889. // WriteParameter(param, category, "InfluxDB", "Field", true);
  1890. WriteParameter(param, category, "InfluxDBv2", "Uri", true);
  1891. WriteParameter(param, category, "InfluxDBv2", "Bucket", true);
  1892. // WriteParameter(param, category, "InfluxDBv2", "Measurement", true);
  1893. WriteParameter(param, category, "InfluxDBv2", "Org", true);
  1894. WriteParameter(param, category, "InfluxDBv2", "Token", true);
  1895. // WriteParameter(param, category, "InfluxDBv2", "Field", true);
  1896. WriteParameter(param, category, "GPIO", "IO0", true);
  1897. WriteParameter(param, category, "GPIO", "IO1", true);
  1898. WriteParameter(param, category, "GPIO", "IO3", true);
  1899. WriteParameter(param, category, "GPIO", "IO4", true);
  1900. WriteParameter(param, category, "GPIO", "IO12", true);
  1901. WriteParameter(param, category, "GPIO", "IO13", true);
  1902. WriteParameter(param, category, "GPIO", "LEDType", false);
  1903. WriteParameter(param, category, "GPIO", "LEDNumbers", false);
  1904. WriteParameter(param, category, "GPIO", "LEDColor", false);
  1905. WriteParameter(param, category, "AutoTimer", "AutoStart", false);
  1906. WriteParameter(param, category, "AutoTimer", "Interval", false);
  1907. WriteParameter(param, category, "DataLogging", "DataLogActive", false);
  1908. WriteParameter(param, category, "DataLogging", "DataFilesRetention", false);
  1909. WriteParameter(param, category, "Debug", "LogLevel", false);
  1910. WriteParameter(param, category, "Debug", "LogfilesRetention", false);
  1911. WriteParameter(param, category, "System", "TimeZone", true);
  1912. WriteParameter(param, category, "System", "Hostname", true);
  1913. WriteParameter(param, category, "System", "TimeServer", true);
  1914. WriteParameter(param, category, "System", "RSSIThreshold", true);
  1915. WriteParameter(param, category, "System", "CPUFrequency", true);
  1916. WriteModelFiles();
  1917. }
  1918. function WriteModelFiles()
  1919. {
  1920. list_tflite = getTFLITEList();
  1921. var _indexDig = document.getElementById("Digits_Model_value1");
  1922. var _indexAna = document.getElementById("Analog_Model_value1");
  1923. while (_indexDig.length)
  1924. _indexDig.remove(0);
  1925. while (_indexAna.length)
  1926. _indexAna.remove(0);
  1927. for (var i = 0; i < list_tflite.length; ++i){
  1928. var optionDig = document.createElement("option");
  1929. var optionAna = document.createElement("option");
  1930. var text = list_tflite[i].replace("/config/", "");
  1931. if (list_tflite[i].includes("/dig")) { // Its a digital file, only show in the digital list box
  1932. optionDig.text = text;
  1933. optionDig.value = list_tflite[i];
  1934. _indexDig.add(optionDig);
  1935. }
  1936. else if (list_tflite[i].includes("/ana")) { // Its a digital file, only show in the analog list box
  1937. optionAna.text = text;
  1938. optionAna.value = list_tflite[i];
  1939. _indexAna.add(optionAna);
  1940. }
  1941. else { // all other files, show in both list boxes
  1942. optionDig.text = text;
  1943. optionDig.value = list_tflite[i];
  1944. _indexDig.add(optionDig);
  1945. optionAna.text = text;
  1946. optionAna.value = list_tflite[i];
  1947. _indexAna.add(optionAna);
  1948. }
  1949. }
  1950. WriteParameter(param, category, "Analog", "Model", false);
  1951. WriteParameter(param, category, "Digits", "Model", false);
  1952. }
  1953. function ReadParameterAll()
  1954. {
  1955. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  1956. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  1957. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  1958. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  1959. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  1960. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  1961. ReadParameter(param, "TakeImage", "RawImagesLocation", true);
  1962. ReadParameter(param, "TakeImage", "RawImagesRetention", true);
  1963. ReadParameter(param, "TakeImage", "Demo", false);
  1964. ReadParameter(param, "TakeImage", "WaitBeforeTakingPicture", false);
  1965. ReadParameter(param, "TakeImage", "ImageQuality", false);
  1966. ReadParameter(param, "TakeImage", "Brightness", false);
  1967. ReadParameter(param, "TakeImage", "Contrast", false);
  1968. ReadParameter(param, "TakeImage", "Saturation", false);
  1969. ReadParameter(param, "TakeImage", "LEDIntensity", false);
  1970. ReadParameter(param, "TakeImage", "ImageSize", false);
  1971. ReadParameter(param, "TakeImage", "FixedExposure", false);
  1972. ReadParameter(param, "Alignment", "SearchFieldX", false);
  1973. ReadParameter(param, "Alignment", "SearchFieldY", false);
  1974. ReadParameter(param, "Alignment", "AlignmentAlgo", true);
  1975. ReadParameter(param, "Alignment", "FlipImageSize", false);
  1976. ReadParameter(param, "Alignment", "InitialMirror", false);
  1977. ReadParameter(param, "Digits", "Model", false);
  1978. ReadParameter(param, "Digits", "CNNGoodThreshold", true);
  1979. ReadParameter(param, "Digits", "ROIImagesLocation", true);
  1980. ReadParameter(param, "Digits", "ROIImagesRetention", true);
  1981. ReadParameter(param, "Analog", "Model", false);
  1982. ReadParameter(param, "Analog", "ROIImagesLocation", true);
  1983. ReadParameter(param, "Analog", "ROIImagesRetention", true);
  1984. ReadParameter(param, "PostProcessing", "PreValueUse", false);
  1985. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  1986. ReadParameter(param, "PostProcessing", "ErrorMessage", false);
  1987. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  1988. ReadParameter(param, "MQTT", "Uri", true);
  1989. ReadParameter(param, "MQTT", "MainTopic", true);
  1990. ReadParameter(param, "MQTT", "ClientID", true);
  1991. ReadParameter(param, "MQTT", "user", true);
  1992. ReadParameter(param, "MQTT", "password", true);
  1993. ReadParameter(param, "MQTT", "RetainMessages", false);
  1994. ReadParameter(param, "MQTT", "HomeassistantDiscovery", false);
  1995. ReadParameter(param, "MQTT", "MeterType", true);
  1996. ReadParameter(param, "MQTT", "CACert", true);
  1997. ReadParameter(param, "MQTT", "ClientCert", true);
  1998. ReadParameter(param, "MQTT", "ClientKey", true);
  1999. ReadParameter(param, "InfluxDB", "Uri", true);
  2000. ReadParameter(param, "InfluxDB", "Database", true);
  2001. ReadParameter(param, "InfluxDB", "Measurement", true);
  2002. ReadParameter(param, "InfluxDB", "user", true);
  2003. ReadParameter(param, "InfluxDB", "password", true);
  2004. ReadParameter(param, "InfluxDBv2", "Uri", true);
  2005. ReadParameter(param, "InfluxDBv2", "Bucket", true);
  2006. ReadParameter(param, "InfluxDBv2", "Measurement", true);
  2007. ReadParameter(param, "InfluxDBv2", "Org", true);
  2008. ReadParameter(param, "InfluxDBv2", "Token", true);
  2009. // ReadParameter(param, "InfluxDB", "Field", true);
  2010. ReadParameter(param, "GPIO", "IO0", true);
  2011. ReadParameter(param, "GPIO", "IO1", true);
  2012. ReadParameter(param, "GPIO", "IO3", true);
  2013. ReadParameter(param, "GPIO", "IO4", true);
  2014. ReadParameter(param, "GPIO", "IO12", true);
  2015. ReadParameter(param, "GPIO", "IO13", true);
  2016. ReadParameter(param, "GPIO", "LEDType", false);
  2017. ReadParameter(param, "GPIO", "LEDNumbers", false);
  2018. ReadParameter(param, "GPIO", "LEDColor", false);
  2019. // Folgende Zeilen sind für Abwärtskompatibität < v9.0.0 notwendig (manchmal parameter auskommentiert)
  2020. param["GPIO"]["LEDType"]["enabled"] = true;
  2021. param["GPIO"]["LEDNumbers"]["enabled"] = true;
  2022. param["GPIO"]["LEDColor"]["enabled"] = true;
  2023. param["GPIO"]["LEDType"]["found"] = true;
  2024. param["GPIO"]["LEDNumbers"]["found"] = true;
  2025. param["GPIO"]["LEDColor"]["found"] = true;
  2026. ReadParameter(param, "AutoTimer", "AutoStart", false);
  2027. ReadParameter(param, "AutoTimer", "Interval", false);
  2028. ReadParameter(param, "DataLogging", "DataLogActive", false);
  2029. ReadParameter(param, "DataLogging", "DataFilesRetention", false);
  2030. ReadParameter(param, "Debug", "LogLevel", false);
  2031. ReadParameter(param, "Debug", "LogfilesRetention", false);
  2032. ReadParameter(param, "System", "TimeZone", true);
  2033. ReadParameter(param, "System", "Hostname", true);
  2034. ReadParameter(param, "System", "TimeServer", true);
  2035. ReadParameter(param, "System", "RSSIThreshold", true);
  2036. ReadParameter(param, "System", "CPUFrequency", true);
  2037. var sel = document.getElementById("Numbers_value1");
  2038. UpdateInputIndividual(sel);
  2039. // FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  2040. }
  2041. function FormatDecimalValue(_param, _cat, _name) {
  2042. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  2043. var _val = _param[_cat][_name]["value"+j];
  2044. _val = _val.replace(",", ".");
  2045. _param[_cat][_name]["value"+j] = _val;
  2046. }
  2047. }
  2048. function UpdateAfterCategoryCheck() {
  2049. ReadParameterAll();
  2050. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  2051. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  2052. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  2053. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  2054. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  2055. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  2056. UpdateInput();
  2057. var sel = document.getElementById("Numbers_value1");
  2058. UpdateInputIndividual(sel);
  2059. }
  2060. function UpdateExpertModus()
  2061. {
  2062. // var _style = 'display:none;';
  2063. var _style_pur = 'none';
  2064. var _hidden = true;
  2065. if (document.getElementById("ExpertModus_enabled").checked) {
  2066. // _style = '';
  2067. _style_pur = '';
  2068. _hidden = false;
  2069. document.getElementById("Edit_Config_Direct").style.display = "";
  2070. firework.launch("Expert view activated. Please use carefully", 'warning', 5000);
  2071. }
  2072. else
  2073. {
  2074. document.getElementById("Edit_Config_Direct").style.display = "none";
  2075. }
  2076. const expert = document.querySelectorAll(".expert");
  2077. for (var i = 0; i < expert.length; i++) {
  2078. expert[i].style.display = _style_pur;
  2079. // document.getElementById(expert[i].id).style = _style;
  2080. }
  2081. // 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
  2082. Array.from(document.querySelector("#GPIO_IO4_value1").options).forEach(function(option_element) {
  2083. if (option_element.value != "built-in-led")
  2084. option_element.hidden = _hidden;
  2085. });
  2086. Array.from(document.querySelector("#GPIO_IO12_value1").options).forEach(function(option_element) {
  2087. if (option_element.value != "external-flash-ws281x")
  2088. option_element.hidden = _hidden;
  2089. });
  2090. }
  2091. function saveTextAsFile()
  2092. {
  2093. ReadParameterAll();
  2094. if (document.getElementsByClassName("invalid-input").length > 0) {
  2095. firework.launch("Settings cannot be saved. Please check your entries!", 'danger', 30000);
  2096. return;
  2097. }
  2098. if (confirm("Are you sure you want to save the configuration?")) {
  2099. ReadParameterAll();
  2100. WriteConfigININew();
  2101. SaveConfigToServer(domainname);
  2102. firework.launch('Configuration saved. It will get applied after the next reboot!', 'success', 5000);
  2103. }
  2104. }
  2105. function doReboot() {
  2106. if (confirm("Are you sure you want to reboot?")) {
  2107. var stringota = getDomainname() + "/reboot";
  2108. window.location = stringota;
  2109. window.location.href = stringota;
  2110. window.location.assign(stringota);
  2111. window.location.replace(stringota);
  2112. }
  2113. }
  2114. function editConfigDirect() {
  2115. if (confirm("Proceed to switch the view? Unsaved changes get lost")) {
  2116. var stringota = getDomainname() + "/edit_config.html?v=$COMMIT_HASH";
  2117. window.location = stringota;
  2118. window.location.href = stringota;
  2119. window.location.assign(stringota);
  2120. window.location.replace(stringota);
  2121. }
  2122. }
  2123. function numberChanged()
  2124. {
  2125. var sel = document.getElementById("Numbers_value1");
  2126. _neu = sel.selectedIndex;
  2127. UpdateInputIndividual(sel);
  2128. var _selInflux = document.getElementById("NumbersInfluxDBv2_value1");
  2129. if (_selInflux.selectedIndex != _neu)
  2130. _selInflux.selectedIndex = _neu
  2131. }
  2132. function numberInfluxDBv2Changed()
  2133. {
  2134. var sel = document.getElementById("NumbersInfluxDBv2_value1");
  2135. _neu = sel.selectedIndex;
  2136. UpdateInputIndividual(sel);
  2137. var _sel2 = document.getElementById("Numbers_value1");
  2138. if (_sel2.selectedIndex != _neu)
  2139. _sel2.selectedIndex = _neu
  2140. var _sel3 = document.getElementById("NumbersInfluxDB_value1");
  2141. if (_sel3.selectedIndex != _neu)
  2142. _sel3.selectedIndex = _neu
  2143. }
  2144. function numberInfluxDBChanged()
  2145. {
  2146. var sel = document.getElementById("NumbersInfluxDB_value1");
  2147. _neu = sel.selectedIndex;
  2148. UpdateInputIndividual(sel);
  2149. var _sel2 = document.getElementById("Numbers_value1");
  2150. if (_sel2.selectedIndex != _neu)
  2151. _sel2.selectedIndex = _neu
  2152. var _sel3 = document.getElementById("NumbersInfluxDBv2_value1");
  2153. if (_sel3.selectedIndex != _neu)
  2154. _sel3.selectedIndex = _neu
  2155. }
  2156. /* hash #description open the details part of the page */
  2157. function openDescription()
  2158. {
  2159. if(window.location.hash) {
  2160. var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
  2161. if(hash == 'description')
  2162. document.getElementById("desc_details").open = true;
  2163. document.getElementById("reboot").style.display = "none";
  2164. document.getElementById("reboot_text").style.display = "none";
  2165. }
  2166. }
  2167. openDescription();
  2168. LoadConfigNeu();
  2169. </script>
  2170. </body>
  2171. </html>