edit_config_param.html 91 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442
  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)));">Seconds
  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="6.0" max="9.9" value="9.2"
  557. oninput="(!validity.rangeUnderflow||(value=6.0)) && (!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">
  670. <td class="indent1">
  671. <label><class id="MQTT_RetainMessages_text" style="color:black;">Retain Messages</class></label>
  672. </td>
  673. <td>
  674. <select id="MQTT_RetainMessages_value1">
  675. <option value="true" selected>true</option>
  676. <option value="false" >false</option>
  677. </select>
  678. </td>
  679. <td>$TOOLTIP_MQTT_RetainMessages</td>
  680. </tr>
  681. <tr class="MQTTItem">
  682. <td class="indent1" style="padding-top:25px" colspan="2">
  683. <b>Homeassistant Discovery (using MQTT)</b><br>
  684. If activated, the discovery topics gets automatically scheduled to sent once after device startup during state "Publish to MQTT".
  685. To schedule a retransmission: Use "Manual Control > Resend HA Discovery" or call REST API:
  686. <a href=mqtt_publish_discovery target="_blank">http://&lt;IP&gt;/mqtt_publish_discovery</a>
  687. </td>
  688. </tr>
  689. <tr class="MQTTItem">
  690. <td class="indent2">
  691. <label><class id="MQTT_HomeassistantDiscovery_text" style="color:black;">Homeassistant Discovery</class></label>
  692. </td>
  693. <td>
  694. <select id="MQTT_HomeassistantDiscovery_value1">
  695. <option value="true" selected>true</option>
  696. <option value="false" >false</option>
  697. </select>
  698. </td>
  699. <td>$TOOLTIP_MQTT_HomeassistantDiscovery</td>
  700. </tr>
  701. <tr class="MQTTItem">
  702. <td class="indent2">
  703. <input type="checkbox" id="MQTT_MeterType_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MeterType")' unchecked >
  704. <label for=MQTT_MeterType_enabled><class id="MQTT_MeterType_text" style="color:black;">Meter Type</class></label>
  705. </td>
  706. <td>
  707. <select class="select_large" id="MQTT_MeterType_value1"> <!-- See https://developers.home-assistant.io/docs/core/entity/sensor/#available-device-classes -->
  708. <option value="other" selected>Other (no Units)</option>
  709. <option value="water_m3">Watermeter (Value: m³, Rate: m³/h)</option>
  710. <option value="water_l">Watermeter (Value: l, Rate: l/h)</option>
  711. <option value="water_gal">Watermeter (Value: gal, Rate: gal/h)</option>
  712. <option value="water_ft3">Watermeter (Value: ft³, Rate: ft³/m)</option>
  713. <option value="gas_m3">Gasmeter (Value: m³, Rate: m³/h)</option>
  714. <option value="gas_ft3">Gasmeter (Value: ft³, Rate: ft³/m)</option>
  715. <option value="energy_wh">Energymeter (Value: Wh, Rate: W)</option>
  716. <option value="energy_kwh">Energymeter (Value: kWh, Rate: kW)</option>
  717. <option value="energy_mwh">Energymeter (Value: MWh, Rate: MW)</option>
  718. <option value="energy_gj">Energymeter (Value: GJ, Rate: GJ/h)</option>
  719. </select>
  720. </td>
  721. <td>$TOOLTIP_MQTT_MeterType</td>
  722. </tr>
  723. <!------------- INFLUXDB v1 ------------------>
  724. <tr style="border-bottom: 2px solid lightgray;">
  725. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  726. <h4>
  727. <input type="checkbox" id="Category_InfluxDB_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  728. <label for=Category_InfluxDB_enabled>InfluxDB v1.x</label></h4>
  729. </td>
  730. </tr>
  731. <tr class="InfluxDBv1Item">
  732. <td class="indent1">
  733. <input type="checkbox" id="InfluxDB_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Uri")' unchecked >
  734. <label for=InfluxDB_Uri_enabled><class id="InfluxDB_Uri_text" style="color:black;">URI</class></label>
  735. </td>
  736. <td>
  737. <input required type="text" id="InfluxDB_Uri_value1">
  738. </td>
  739. <td>$TOOLTIP_InfluxDB_Uri</td>
  740. </tr>
  741. <tr class="InfluxDBv1Item">
  742. <td class="indent1">
  743. <input type="checkbox" id="InfluxDB_Database_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Database")' unchecked >
  744. <label for=InfluxDB_Database_enabled><class id="InfluxDB_Database_text" style="color:black;">Database</class></label>
  745. </td>
  746. <td>
  747. <input required type="text" id="InfluxDB_Database_value1">
  748. </td>
  749. <td>$TOOLTIP_InfluxDB_Database</td>
  750. </tr>
  751. <tr class="InfluxDBv1Item">
  752. <td class="indent1">
  753. <input type="checkbox" id="InfluxDB_user_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "user")' unchecked >
  754. <label for=InfluxDB_user_enabled><class id="InfluxDB_user_text" style="color:black;">Username</class></label>
  755. </td>
  756. <td>
  757. <input type="text" id="InfluxDB_user_value1">
  758. </td>
  759. <td>$TOOLTIP_InfluxDB_user</td>
  760. </tr>
  761. <tr class="InfluxDBv1Item">
  762. <td class="indent1">
  763. <input type="checkbox" id="InfluxDB_password_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "password")' unchecked >
  764. <label for=InfluxDB_password_enabled><class id="InfluxDB_password_text" style="color:black;">Password</class></label>
  765. </td>
  766. <td>
  767. <input type="text" id="InfluxDB_password_value1">
  768. </td>
  769. <td>$TOOLTIP_InfluxDB_password</td>
  770. </tr>
  771. <tr class="InfluxDBv1Item" style="margin-top:12px">
  772. <td class="indent1" style="padding-top:25px" colspan="3">
  773. <b>Parameter per number sequence:</b>
  774. <select
  775. style="font-weight: bold; margin-left:17px" id="NumbersInfluxDB_value1" onchange="numberInfluxDBChanged()">
  776. </select>
  777. </td>
  778. </tr>
  779. <tr class="InfluxDBv1Item">
  780. <td class="indent2">
  781. <input type="checkbox" id="InfluxDB_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Measurement")' unchecked >
  782. <label for=InfluxDB_Measurement_enabled><class id="InfluxDB_Measurement_text" style="color:black;">Measurement</class></label>
  783. </td>
  784. <td>
  785. <input required type="text" id="InfluxDB_Measurement_value1">
  786. </td>
  787. <td>$TOOLTIP_InfluxDB_NUMBER.Measurement</td>
  788. </tr>
  789. <tr class="InfluxDBv1Item">
  790. <td class="indent2">
  791. <input type="checkbox" id="InfluxDB_Field_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Field")' unchecked >
  792. <label for=InfluxDB_Field_enabled><class id="InfluxDB_Field_text" style="color:black;">Field</class></label>
  793. </td>
  794. <td>
  795. <input required type="text" id="InfluxDB_Field_value1">
  796. </td>
  797. <td>$TOOLTIP_InfluxDB_NUMBER.Field</td>
  798. </tr>
  799. <!------------- INFLUXDB v2 ------------------>
  800. <tr style="border-bottom: 2px solid lightgray;">
  801. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  802. <h4>
  803. <input type="checkbox" id="Category_InfluxDBv2_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  804. <label for=Category_InfluxDBv2_enabled>InfluxDB v2.x</label></h4>
  805. </td>
  806. </tr>
  807. <tr class="InfluxDBv2Item">
  808. <td class="indent1">
  809. <input type="checkbox" id="InfluxDBv2_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Uri")' unchecked >
  810. <label for=InfluxDBv2_Uri_enabled><class id="InfluxDBv2_Uri_text" style="color:black;">URI</class></label>
  811. </td>
  812. <td>
  813. <input required type="text" id="InfluxDBv2_Uri_value1">
  814. </td>
  815. <td>$TOOLTIP_InfluxDBv2_Uri</td>
  816. </tr>
  817. <tr class="InfluxDBv2Item">
  818. <td class="indent1">
  819. <input type="checkbox" id="InfluxDBv2_Database_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Database")' unchecked >
  820. <label for=InfluxDBv2_Database_enabled><class id="InfluxDBv2_Database_text" style="color:black;">Database</class></label>
  821. </td>
  822. <td>
  823. <input required type="text" id="InfluxDBv2_Database_value1">
  824. </td>
  825. <td>$TOOLTIP_InfluxDBv2_Database</td>
  826. </tr>
  827. <tr class="InfluxDBv2Item">
  828. <td class="indent1">
  829. <input type="checkbox" id="InfluxDBv2_Org_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Org")' unchecked >
  830. <label for=InfluxDBv2_Org_enabled><class id="InfluxDBv2_Org_text" style="color:black;">Organization (Org)</class></label>
  831. </td>
  832. <td>
  833. <input type="text" id="InfluxDBv2_Org_value1">
  834. </td>
  835. <td>$TOOLTIP_InfluxDBv2_Org</td>
  836. </tr>
  837. <tr class="InfluxDBv2Item">
  838. <td class="indent1">
  839. <input type="checkbox" id="InfluxDBv2_Token_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Token")' unchecked >
  840. <label for=InfluxDBv2_Token_enabled><class id="InfluxDBv2_Token_text" style="color:black;">Token</class></label>
  841. </td>
  842. <td>
  843. <input type="text" id="InfluxDBv2_Token_value1">
  844. </td>
  845. <td>$TOOLTIP_InfluxDBv2_Token</td>
  846. </tr>
  847. <tr class="InfluxDBv2Item" style="margin-top:12px">
  848. <td class="indent1" style="padding-top:25px" colspan="3">
  849. <b>Parameter per number sequence:</b>
  850. <select
  851. style="font-weight: bold; margin-left:17px" id="NumbersInfluxDBv2_value1" onchange="numberInfluxDBv2Changed()">
  852. </select>
  853. </td>
  854. </tr>
  855. <tr class="InfluxDBv2Item">
  856. <td class="indent2">
  857. <input type="checkbox" id="InfluxDBv2_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Measurement")' unchecked >
  858. <label for=InfluxDBv2_Measurement_enabled><class id="InfluxDBv2_Measurement_text" style="color:black;">Measurement</class></label>
  859. </td>
  860. <td>
  861. <input required type="text" id="InfluxDBv2_Measurement_value1">
  862. </td>
  863. <td>$TOOLTIP_InfluxDBv2_NUMBER.Measurement</td>
  864. </tr>
  865. <tr class="InfluxDBv2Item">
  866. <td class="indent2">
  867. <input type="checkbox" id="InfluxDBv2_Field_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Field")' unchecked >
  868. <label for=InfluxDBv2_Field_enabled><class id="InfluxDBv2_Field_text" style="color:black;">Field</class></label>
  869. </td>
  870. <td>
  871. <input required type="text" id="InfluxDBv2_Field_value1">
  872. </td>
  873. <td>$TOOLTIP_InfluxDBv2_NUMBER.Field</td>
  874. </tr>
  875. <!------------- GPIO ------------------>
  876. <tr style="border-bottom: 2px solid lightgray;">
  877. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  878. <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='UpdateAfterCategoryCheck()' unchecked >
  879. <label for=Category_GPIO_enabled>GPIO (General Purpose Input / Output)</label></h4>
  880. </td>
  881. </tr>
  882. <!------------- GPIO0 begin ------------------>
  883. <tr class="GPIO_IO0 GPIO_item expert">
  884. <td class="indent1">
  885. <input type="checkbox" id="GPIO_IO0_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO0")' unchecked>
  886. <label for=GPIO_IO0_enabled><span id="GPIO_IO0_text">GPIO0 Configuration</span></label>
  887. </td>
  888. <td>
  889. <select id="GPIO_IO0_value1">
  890. <option value="input">input</option>
  891. <option value="input-pullup">input pullup</option>
  892. <option value="input-pulldown">input pulldown</option>
  893. <option value="output">output</option>
  894. </select>
  895. </td>
  896. <td>$TOOLTIP_GPIO_IO0</td>
  897. </tr>
  898. <tr class="GPIO_IO0 GPIO_item expert">
  899. <td class="indent2">
  900. <span id="GPIO_IO0_text" class="GPIO_IO0 GPIO_item">GPIO0 Use Interrupt</span>
  901. </td>
  902. <td>
  903. <select id="GPIO_IO0_value2">
  904. <option value="disabled">disabled</option>
  905. <option value="rising-edge">rising edge</option>
  906. <option value="falling-edge">falling edge</option>
  907. <option value="rising-and-falling">rising and falling</option>
  908. <option value="low-level-trigger">low level trigger</option>
  909. <option value="high-level-trigger">high level trigger</option>
  910. </select>
  911. </td>
  912. <td></td>
  913. </tr>
  914. <tr class="GPIO_IO0 GPIO_item expert">
  915. <td class="indent2">
  916. <span class="GPIO_IO0 GPIO_item">GPIO0 PWM Duty Cycle Resolution</span>
  917. </td>
  918. <td>
  919. <input required type="number" id="GPIO_IO0_value3" min="1" max="20"
  920. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  921. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO0 GPIO_item">Bits</span>
  922. </td>
  923. <td></td>
  924. </tr>
  925. <tr class="GPIO_IO0 GPIO_item expert">
  926. <td class="indent2">
  927. <span class="GPIO_IO0 GPIO_item">GPIO0 Enable MQTT</span>
  928. </td>
  929. <td><input type="checkbox" id="GPIO_IO0_value4"></td>
  930. <td></td>
  931. </tr>
  932. <tr class="GPIO_IO0 GPIO_item expert">
  933. <td class="indent2">
  934. <span class="GPIO_IO0 GPIO_item">GPIO0 Enable REST API</span>
  935. </td>
  936. <td><input type="checkbox" id="GPIO_IO0_value5"></td>
  937. <td></td>
  938. </tr>
  939. <tr class="GPIO_IO0 GPIO_item expert">
  940. <td class="indent2">
  941. <span class="GPIO_IO0 GPIO_item">GPIO0 Name</span>
  942. </td>
  943. <td><input type="text" id="GPIO_IO0_value6"></td>
  944. <td></td>
  945. </tr>
  946. <!------------- GPIO0 end ------------------>
  947. <!------------- GPIO1 begin ------------------>
  948. <tr class="GPIO_IO1 GPIO_item expert">
  949. <td class="indent1">
  950. <input type="checkbox" id="GPIO_IO1_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO1")' unchecked>
  951. <label for=GPIO_IO1_enabled><span id="GPIO_IO1_text">GPIO1 Configuration</span></label>
  952. </td>
  953. <td>
  954. <select id="GPIO_IO1_value1">
  955. <option value="input">input</option>
  956. <option value="input-pullup">input pullup</option>
  957. <option value="input-pulldown">input pulldown</option>
  958. <option value="output">output</option>
  959. </select>
  960. </td>
  961. <td>$TOOLTIP_GPIO_IO1</td>
  962. </tr>
  963. <tr class="GPIO_IO1 GPIO_item expert">
  964. <td class="indent2">
  965. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO1 Use Interrupt</span>
  966. </td>
  967. <td>
  968. <select id="GPIO_IO1_value2">
  969. <option value="disabled">disabled</option>
  970. <option value="rising-edge" disabled>rising edge</option>
  971. <option value="falling-edge" disabled>falling edge</option>
  972. <option value="rising-and-falling">rising and falling</option>
  973. <option value="low-level-trigger">low level trigger</option>
  974. <option value="high-level-trigger">high level trigger</option>
  975. </select>
  976. </td>
  977. <td></td>
  978. </tr>
  979. <tr class="GPIO_IO1 GPIO_item expert">
  980. <td class="indent2">
  981. <span class="GPIO_IO1 GPIO_item">GPIO1 PWM Duty Cycle Resolution</span>
  982. </td>
  983. <td><input required type="number" id="GPIO_IO1_value3" min="1" max="20"
  984. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  985. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO1 GPIO_item">Bits</span>
  986. </td>
  987. <td></td>
  988. </tr>
  989. <tr class="GPIO_IO1 GPIO_item expert">
  990. <td class="indent2">
  991. <span class="GPIO_IO1 GPIO_item">GPIO1 Enable MQTT</span>
  992. </td>
  993. <td><input type="checkbox" id="GPIO_IO1_value4"></td>
  994. <td></td>
  995. </tr>
  996. <tr class="GPIO_IO1 GPIO_item expert">
  997. <td class="indent2">
  998. <span class="GPIO_IO1 GPIO_item">GPIO1 Enable REST API</span>
  999. </td>
  1000. <td><input type="checkbox" id="GPIO_IO1_value5"></td>
  1001. <td></td>
  1002. </tr>
  1003. <tr class="GPIO_IO1 GPIO_item expert">
  1004. <td class="indent2">
  1005. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO1 Name</span>
  1006. </td>
  1007. <td><input type="text" id="GPIO_IO1_value6"></td>
  1008. <td></td>
  1009. </tr>
  1010. <!------------- GPIO1 end ------------------>
  1011. <!------------- GPIO3 begin ------------------>
  1012. <tr class="GPIO_IO3 GPIO_item expert">
  1013. <td class="indent1">
  1014. <input type="checkbox" id="GPIO_IO3_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO3")' unchecked>
  1015. <label for=GPIO_IO3_enabled><span id="GPIO_IO3_text">GPIO3 Configuration</span></label>
  1016. </td>
  1017. <td>
  1018. <select id="GPIO_IO3_value1">
  1019. <option value="input">input</option>
  1020. <option value="input-pullup">input pullup</option>
  1021. <option value="input-pulldown">input pulldown</option>
  1022. <option value="output">output</option>
  1023. </select>
  1024. </td>
  1025. <td>$TOOLTIP_GPIO_IO3</td>
  1026. </tr>
  1027. <tr class="GPIO_IO3 GPIO_item expert">
  1028. <td class="indent2">
  1029. <span class="GPIO_IO3 GPIO_item">GPIO3 Use Interrupt</span>
  1030. </td>
  1031. <td>
  1032. <select id="GPIO_IO3_value2">
  1033. <option value="disabled">disabled</option>
  1034. <option value="rising-edge" disabled>rising edge</option>
  1035. <option value="falling-edge" disabled>falling edge</option>
  1036. <option value="rising-and-falling">rising and falling</option>
  1037. <option value="low-level-trigger">low level trigger</option>
  1038. <option value="high-level-trigger">high level trigger</option>
  1039. </select>
  1040. </td>
  1041. <td></td>
  1042. </tr>
  1043. <tr class="GPIO_IO3 GPIO_item expert">
  1044. <td class="indent2">
  1045. <span class="GPIO_IO3 GPIO_item">GPIO3 PWM Duty Cycle Resolution</span>
  1046. </td>
  1047. <td><input required type="number" id="GPIO_IO3_value3" min="1" max="20"
  1048. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1049. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO3 GPIO_item">Bits</span>
  1050. </td>
  1051. <td></td>
  1052. </tr>
  1053. <tr class="GPIO_IO3 GPIO_item expert">
  1054. <td class="indent2">
  1055. <span class="GPIO_IO3 GPIO_item">GPIO3 Enable MQTT</span>
  1056. </td>
  1057. <td><input type="checkbox" id="GPIO_IO3_value4"></td>
  1058. <td></td>
  1059. </tr>
  1060. <tr class="GPIO_IO3 GPIO_item expert">
  1061. <td class="indent2">
  1062. <span class="GPIO_IO3 GPIO_item">GPIO3 Enable REST API</span>
  1063. </td>
  1064. <td><input type="checkbox" id="GPIO_IO3_value5"></td>
  1065. <td></td>
  1066. </tr>
  1067. <tr class="GPIO_IO3 GPIO_item expert">
  1068. <td class="indent2">
  1069. <span class="GPIO_IO3 GPIO_item">GPIO3 Name</span>
  1070. </td>
  1071. <td><input type="text" id="GPIO_IO3_value6"></td>
  1072. <td></td>
  1073. </tr>
  1074. <!------------- GPIO3 end ------------------>
  1075. <!------------- GPIO4 begin ------------------>
  1076. <tr class="GPIO_item" style="border-bottom: 0px;">
  1077. <td class="indent1">
  1078. <input type="checkbox" id="GPIO_IO4_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO4")' checked>
  1079. <label for=GPIO_IO4_enabled><span id="GPIO_IO4_text">GPIO4 Configuration</span></label>
  1080. </td>
  1081. <td>
  1082. <select id="GPIO_IO4_value1">
  1083. <option value="input">input</option>
  1084. <option value="input-pullup">input pullup</option>
  1085. <option value="input-pulldown">input pulldown</option>
  1086. <option value="output">output</option>
  1087. <option value="built-in-led" select>built-in led flash light</option>
  1088. </select>
  1089. </td>
  1090. <td>$TOOLTIP_GPIO_IO4</td>
  1091. </tr>
  1092. <tr class="GPIO_item" style="border-top: 0px;">
  1093. <td colspan="2" style="padding-left:28px">
  1094. <b>IMPORTANT NOTE:</b><br>
  1095. If you'd like to use the built-in flash LED in parallel with other GPIO functionality,
  1096. you have to explicitely activate the "built-in LED flash light" option on GPIO4. The light
  1097. intensity control (PWM) of the LED flash light is not functional anymore (only 100%).
  1098. </td>
  1099. </tr>
  1100. <tr class="GPIO_IO4 GPIO_item expert">
  1101. <td class="indent2">
  1102. <span class="GPIO_IO4 GPIO_item">GPIO4 Use Interrupt</span>
  1103. </td>
  1104. <td>
  1105. <select id="GPIO_IO4_value2">
  1106. <option value="disabled">disabled</option>
  1107. <option value="rising-edge">rising edge</option>
  1108. <option value="falling-edge">falling edge</option>
  1109. <option value="rising-and-falling">rising and falling</option>
  1110. <option value="low-level-trigger">low level trigger</option>
  1111. <option value="high-level-trigger">high level trigger</option>
  1112. </select>
  1113. </td>
  1114. <td></td>
  1115. </tr>
  1116. <tr class="GPIO_IO4 GPIO_item expert">
  1117. <td class="indent2">
  1118. <span class="GPIO_IO4 GPIO_item">GPIO4 PWM Duty Cycle Resolution</span>
  1119. </td>
  1120. <td><input required type="number" id="GPIO_IO4_value3" min="1" max="20"
  1121. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1122. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO4 GPIO_item">Bits</span>
  1123. </td>
  1124. <td></td>
  1125. </tr>
  1126. <tr class="GPIO_IO4 GPIO_item expert">
  1127. <td class="indent2">
  1128. <span class="GPIO_IO4 GPIO_item">GPIO4 Enable MQTT</span>
  1129. </td>
  1130. <td><input type="checkbox" id="GPIO_IO4_value4"></td>
  1131. <td></td>
  1132. </tr>
  1133. <tr class="GPIO_IO4 GPIO_item expert">
  1134. <td class="indent2">
  1135. <span class="GPIO_IO4 GPIO_item">GPIO4 Enable REST API</span>
  1136. </td>
  1137. <td><input type="checkbox" id="GPIO_IO4_value5"></td>
  1138. <td></td>
  1139. </tr>
  1140. <tr class="GPIO_IO4 GPIO_item expert">
  1141. <td class="indent2">
  1142. <span class="GPIO_IO4 GPIO_item">GPIO4 Name</span>
  1143. </td>
  1144. <td><input type="text" id="GPIO_IO4_value6"></td>
  1145. <td></td>
  1146. </tr>
  1147. <!------------- GPIO4 end ------------------>
  1148. <!------------- GPIO12 begin ------------------>
  1149. <tr class="GPIO_item">
  1150. <td class="indent1">
  1151. <input type="checkbox" id="GPIO_IO12_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO12")' unchecked>
  1152. <label for=GPIO_IO12_enabled><span id="GPIO_IO12_text">GPIO12 Configuration</span></label>
  1153. </td>
  1154. <td>
  1155. <select id="GPIO_IO12_value1">
  1156. <option value="input">input</option>
  1157. <option value="input-pullup">input pullup</option>
  1158. <option value="input-pulldown">input pulldown</option>
  1159. <option value="output">output</option>
  1160. <option value="external-flash-ws281x">external flash light ws281x controlled</option>
  1161. </select>
  1162. </td>
  1163. <td>$TOOLTIP_GPIO_IO12</td>
  1164. </tr>
  1165. <tr class="GPIO_IO12 GPIO_item expert">
  1166. <td class="indent2">
  1167. <span class="GPIO_IO12 GPIO_item">GPIO12 Use Interrupt</span>
  1168. </td>
  1169. <td>
  1170. <select class="GPIO_IO12 GPIO_item" id="GPIO_IO12_value2">
  1171. <option value="disabled">disabled</option>
  1172. <option value="rising-edge">rising edge</option>
  1173. <option value="falling-edge">falling edge</option>
  1174. <option value="rising-and-falling">rising and falling</option>
  1175. <option value="low-level-trigger">low level trigger</option>
  1176. <option value="high-level-trigger">high level trigger</option>
  1177. </select>
  1178. </td>
  1179. <td></td>
  1180. </tr>
  1181. <tr class="GPIO_IO12 GPIO_item expert">
  1182. <td class="indent2">
  1183. <span class="GPIO_IO12 GPIO_item">GPIO12 PWM Duty Cycle Resolution</span>
  1184. </td>
  1185. <td><input required type="number" id="GPIO_IO12_value3" min="1" max="20"
  1186. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1187. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO12 GPIO_item">Bits</span>
  1188. </td>
  1189. <td></td>
  1190. </tr>
  1191. <tr class="GPIO_IO12 GPIO_item expert">
  1192. <td class="indent2">
  1193. <span class="GPIO_IO12 GPIO_item">GPIO12 Enable MQTT</span>
  1194. </td>
  1195. <td><input type="checkbox" id="GPIO_IO12_value4"></td>
  1196. <td></td>
  1197. </tr>
  1198. <tr class="GPIO_IO12 GPIO_item expert">
  1199. <td class="indent2">
  1200. <span class="GPIO_IO12 GPIO_item">GPIO12 Enable REST API</span>
  1201. </td>
  1202. <td><input type="checkbox" id="GPIO_IO12_value5"></td>
  1203. <td></td>
  1204. </tr>
  1205. <tr class="GPIO_IO12 GPIO_item expert">
  1206. <td class="indent2">
  1207. <span class="GPIO_IO12 GPIO_item">GPIO12 Name</span>
  1208. </td>
  1209. <td><input type="text" id="GPIO_IO12_value6"></td>
  1210. <td></td>
  1211. </tr>
  1212. <tr class="GPIO_item" id="wstypeex3">
  1213. <td class="indent1">
  1214. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDType_text">LED Type (NeoPixel)</span>
  1215. </td>
  1216. <td class="GPIO_item">
  1217. <select class="GPIO_item" id="GPIO_LEDType_value1">
  1218. <option value="WS2812" selected>WS2812</option>
  1219. <option value="WS2812B">WS2812B</option>
  1220. <option value="SK6812">SK6812</option>
  1221. <option value="WS2813">WS2813 (not tested)</option>
  1222. </select>
  1223. </td>
  1224. <td>$TOOLTIP_GPIO_LEDType</td>
  1225. </tr>
  1226. <tr class="GPIO_item" id="LEDANZex8" >
  1227. <td class="indent1">
  1228. <span class="GPIO_item" id="GPIO_LEDNumbers_text">Numbers of LEDs</span>
  1229. </td>
  1230. <td>
  1231. <input required type="number" name="name" id="GPIO_LEDNumbers_value1" size="13" min="1"
  1232. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  1233. </td>
  1234. <td>$TOOLTIP_GPIO_LEDNumbers</td>
  1235. </tr>
  1236. <tr class="GPIO_item" id="LEDRGBex9">
  1237. <td class="indent1">
  1238. <span class="GPIO_item" id="GPIO_LEDColor_text">LED Color</span>
  1239. </td>
  1240. <td class="GPIO_item">
  1241. R <input required style="min-width:35px;width:35px;" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value1"
  1242. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1243. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1244. G <input required style="min-width:35px;width:35px" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value2"
  1245. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1246. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1247. B <input required style="min-width:35px;width:35px" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value3"
  1248. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1249. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1250. </td>
  1251. <td>$TOOLTIP_GPIO_LEDColor</td>
  1252. </tr>
  1253. <!------------- GPIO12 end ------------------>
  1254. <!------------- GPIO13 begin ------------------>
  1255. <tr class="GPIO_IO13 GPIO_item expert">
  1256. <td class="indent1">
  1257. <input type="checkbox" id="GPIO_IO13_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO13")' unchecked>
  1258. <label for=GPIO_IO13_enabled><span id="GPIO_IO13_text">GPIO13 Configuration</span></label>
  1259. </td>
  1260. <td>
  1261. <select id="GPIO_IO13_value1">
  1262. <option value="input">input</option>
  1263. <option value="input-pullup">input pullup</option>
  1264. <option value="input-pulldown">input pulldown</option>
  1265. <option value="output">output</option>
  1266. </select>
  1267. </td>
  1268. <td>$TOOLTIP_GPIO_IO13</td>
  1269. </tr>
  1270. <tr class="GPIO_IO13 GPIO_item expert">
  1271. <td class="indent2">
  1272. <span class="GPIO_IO13 GPIO_item">GPIO13 Use Interrupt</span>
  1273. </td>
  1274. <td>
  1275. <select id="GPIO_IO13_value2">
  1276. <option value="disabled">disabled</option>
  1277. <option value="rising-edge" disabled>rising edge</option>
  1278. <option value="falling-edge" disabled>falling edge</option>
  1279. <option value="rising-and-falling">rising and falling</option>
  1280. <option value="low-level-trigger">low level trigger</option>
  1281. <option value="high-level-trigger">high level trigger</option>
  1282. </select>
  1283. </td>
  1284. <td></td>
  1285. </tr>
  1286. <tr class="GPIO_IO13 GPIO_item expert">
  1287. <td class="indent2">
  1288. <span class="GPIO_IO13 GPIO_item">GPIO13 PWM Duty Cycle Resolution</span>
  1289. </td>
  1290. <td><input required type="number" id="GPIO_IO13_value3" min="1" max="20"
  1291. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1292. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO13 GPIO_item">Bits</span></td>
  1293. <td></td>
  1294. </tr>
  1295. <tr class="GPIO_IO13 GPIO_item expert">
  1296. <td class="indent2">
  1297. <span class="GPIO_IO13 GPIO_item">GPIO13 Enable MQTT</span>
  1298. </td>
  1299. <td><input type="checkbox" id="GPIO_IO13_value4"></td>
  1300. <td></td>
  1301. </tr>
  1302. <tr class="GPIO_IO13 GPIO_item expert">
  1303. <td class="indent2">
  1304. <span class="GPIO_IO13 GPIO_item">GPIO13 Enable REST API</span>
  1305. </td>
  1306. <td><input type="checkbox" id="GPIO_IO13_value5"></td>
  1307. <td></td>
  1308. </tr>
  1309. <tr class="GPIO_IO13 GPIO_item expert">
  1310. <td class="indent2">
  1311. <span class="GPIO_IO13 GPIO_item">GPIO13 Name</span>
  1312. </td>
  1313. <td><input type="text" id="GPIO_IO13_value6"></td>
  1314. <td></td>
  1315. </tr>
  1316. <!------------- GPIO13 end ------------------>
  1317. <!------------- Autotimer ------------------>
  1318. <tr style="border-bottom: 2px solid lightgray;">
  1319. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Auto Timer</h4></td>
  1320. </tr>
  1321. <tr class="expert" id="ex13">
  1322. <td class="indent1">
  1323. <class id="AutoTimer_AutoStart_text" style="color:black;">Automatic Round Start</class>
  1324. </td>
  1325. <td>
  1326. <select id="AutoTimer_AutoStart_value1">
  1327. <option value="true" selected>true</option>
  1328. <option value="false" >false</option>
  1329. </select>
  1330. </td>
  1331. <td>$TOOLTIP_AutoTimer_AutoStart</td>
  1332. </tr>
  1333. <tr>
  1334. <td class="indent1">
  1335. <class id="AutoTimer_Interval_text" style="color:black;">Round Interval</class>
  1336. </td>
  1337. <td>
  1338. <input required type="number" id="AutoTimer_Interval_value1" size="13" min="1" step="any"
  1339. oninput="(!validity.rangeUnderflow||(value=1));">Minutes
  1340. </td>
  1341. <td>$TOOLTIP_AutoTimer_Interval</td>
  1342. </tr>
  1343. <!------------- Data Logging ------------------>
  1344. <tr style="border-bottom: 2px solid lightgray;">
  1345. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Data Logging</h4></td>
  1346. </tr>
  1347. <tr>
  1348. <td class="indent1">
  1349. <class id="DataLogging_DataLogActive_text" style="color:black;">Data Logging</class>
  1350. </td>
  1351. <td>
  1352. <select id="DataLogging_DataLogActive_value1">
  1353. <option value="true" selected>true</option>
  1354. <option value="false" >false</option>
  1355. </select>
  1356. </td>
  1357. <td>$TOOLTIP_DataLogging_DataLogActive</td>
  1358. </tr>
  1359. <tr>
  1360. <td class="indent1">
  1361. <class id="DataLogging_DataFilesRetention_text" style="color:black;">Data Files Retention</class>
  1362. </td>
  1363. <td>
  1364. <input required type="number" id="DataLogging_DataFilesRetention_value1" size="13" min="0" step="1"
  1365. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  1366. </td>
  1367. <td>$TOOLTIP_DataLogging_DataFilesRetention</td>
  1368. </tr>
  1369. <!------------- Debug Logging ------------------>
  1370. <tr style="border-bottom: 2px solid lightgray;">
  1371. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Debug</h4></td>
  1372. </tr>
  1373. <tr>
  1374. <td class="indent1">
  1375. <class id="Debug_LogLevel_text" style="color:black;">Logfile Log Level</class>
  1376. </td>
  1377. <td>
  1378. <select id="Debug_LogLevel_value1">
  1379. <option value="1" selected>ERROR</option> <!-- matches esp_log_level_t -->
  1380. <option value="2">WARNING</option>
  1381. <option value="3">INFO</option>
  1382. <option value="4">DEBUG</option>
  1383. </select>
  1384. </td>
  1385. <td>$TOOLTIP_Debug_LogLevel</td>
  1386. </tr>
  1387. <tr>
  1388. <td class="indent1">
  1389. <class id="Debug_LogfilesRetention_text" style="color:black;">Logfiles Retention</class>
  1390. </td>
  1391. <td>
  1392. <input required type="number" id="Debug_LogfilesRetention_value1" size="13" min="0" step="1"
  1393. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  1394. </td>
  1395. <td>$TOOLTIP_Debug_LogfilesRetention</td>
  1396. </tr>
  1397. <!------------- System ------------------>
  1398. <tr style="border-bottom: 2px solid lightgray;">
  1399. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>System</h4></td>
  1400. </tr>
  1401. <tr>
  1402. <td class="indent1">
  1403. <input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeZone")' unchecked >
  1404. <label for=System_TimeZone_enabled><class id="System_TimeZone_text" style="color:black;">Time Zone</class></label>
  1405. <p></p><p></p>
  1406. </td>
  1407. <td>
  1408. <input type="text" id="System_TimeZone_value1">
  1409. <p>Use <a href="timezones.html" target="_blank">timezones</a> to find your settings</p>
  1410. </td>
  1411. <td>$TOOLTIP_System_TimeZone</td>
  1412. </tr>
  1413. <tr class="expert" id="ex16">
  1414. <td class="indent1">
  1415. <input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeServer")' unchecked >
  1416. <label for=System_TimeServer_enabled><class id="System_TimeServer_text" style="color:black;">Time Server (NTP)</class></label>
  1417. </td>
  1418. <td>
  1419. <input type="text" id="System_TimeServer_value1">
  1420. </td>
  1421. <td>$TOOLTIP_System_TimeServer</td>
  1422. </tr>
  1423. <tr class="expert" id="System_Hostname">
  1424. <td class="indent1">
  1425. <input type="checkbox" id="System_Hostname_enabled" value="1" onclick = 'InvertEnableItem("System", "Hostname")' unchecked >
  1426. <label for=System_Hostname_enabled><class id="System_Hostname_text" style="color:black;">Hostname</class></label>
  1427. </td>
  1428. <td>
  1429. <input type="text" id="System_Hostname_value1">
  1430. </td>
  1431. <td>$TOOLTIP_System_Hostname</td>
  1432. </tr>
  1433. <tr class="expert" id="System_RSSIThreshold">
  1434. <td class="indent1">
  1435. <input type="checkbox" id="System_RSSIThreshold_enabled" value="1" onclick = 'InvertEnableItem("System", "RSSIThreshold")' unchecked >
  1436. <label for=System_RSSIThreshold_enabled><class id="System_RSSIThreshold_text" style="color:black;">RSSI Threshold</class></label>
  1437. </td>
  1438. <td>
  1439. <input required type="number" name="name" id="System_RSSIThreshold_value1" min="-100" max="0" step="1"
  1440. oninput="(!validity.rangeUnderflow||(value=-100)) && (!validity.rangeOverflow||(value=0)) &&
  1441. (!validity.stepMismatch||(value=parseInt(this.value)));">dBm
  1442. </td>
  1443. <td>$TOOLTIP_System_RSSIThreshold</td>
  1444. </tr>
  1445. <tr class="expert" id="System_CPUFrequency">
  1446. <td class="indent1">
  1447. <input type="checkbox" id="System_CPUFrequency_enabled" value="1" onclick = 'InvertEnableItem("System", "CPUFrequency")' unchecked >
  1448. <label for=System_CPUFrequency_enabled><class id="System_CPUFrequency_text" style="color:black;">CPU Frequency</class></label>
  1449. </td>
  1450. <td>
  1451. <select id="System_CPUFrequency_value1">
  1452. <option value="160" selected>160 MHz</option>
  1453. <option value="240">240 MHz</option>
  1454. </select>
  1455. </td>
  1456. <td>$TOOLTIP_System_CPUFrequency</td>
  1457. </tr>
  1458. </table>
  1459. <table style="padding-top:10px">
  1460. <td>
  1461. <button class="button" onclick="saveTextAsFile()">Save Config</button>
  1462. </td>
  1463. <td>
  1464. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate changes</button>
  1465. </td>
  1466. </table>
  1467. </div>
  1468. <script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
  1469. <script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
  1470. <script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
  1471. <script type="text/javascript">
  1472. var canvas = document.getElementById('canvas'),
  1473. domainname = getDomainname();
  1474. param;
  1475. category;
  1476. NUNBERSAkt = -1;
  1477. NUMBERS;
  1478. function LoadConfigNeu() {
  1479. domainname = getDomainname();
  1480. if (!loadConfig(domainname)) {
  1481. firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
  1482. return;
  1483. }
  1484. ParseConfig();
  1485. param = getConfigParameters();
  1486. category = getConfigCategory();
  1487. InitIndivParameter();
  1488. UpdateInput();
  1489. var sel = document.getElementById("Numbers_value1");
  1490. UpdateInputIndividual(sel);
  1491. UpdateExpertModus();
  1492. document.getElementById("divall").style.display = '';
  1493. }
  1494. function InitIndivParameter()
  1495. {
  1496. NUMBERS = getNUMBERInfo();
  1497. var _index = document.getElementById("Numbers_value1");
  1498. while (_index.length)
  1499. _index.remove(0);
  1500. var _indexInflux = document.getElementById("NumbersInfluxDBv2_value1");
  1501. while (_indexInflux.length)
  1502. _indexInflux.remove(0);
  1503. var _indexInfluxv1 = document.getElementById("NumbersInfluxDB_value1");
  1504. while (_indexInflux.length)
  1505. _indexInfluxv1.remove(0);
  1506. for (var i = 0; i < NUMBERS.length; ++i){
  1507. var option = document.createElement("option");
  1508. option.text = NUMBERS[i]["name"];
  1509. option.value = i;
  1510. _index.add(option);
  1511. var optionInflux = document.createElement("option");
  1512. optionInflux.text = NUMBERS[i]["name"];
  1513. optionInflux.value = i;
  1514. _indexInflux.add(optionInflux);
  1515. var optionInfluxv1 = document.createElement("option");
  1516. optionInfluxv1.text = NUMBERS[i]["name"];
  1517. optionInfluxv1.value = i;
  1518. _indexInfluxv1.add(optionInfluxv1);
  1519. }
  1520. _index.selectedIndex = 0;
  1521. _indexInflux.selectedIndex = 0;
  1522. _indexInfluxv1.selectedIndex = 0;
  1523. }
  1524. function getParameterByName(name, url = window.location.href) {
  1525. name = name.replace(/[\[\]]/g, '\\$&');
  1526. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  1527. results = regex.exec(url);
  1528. if (!results) return null;
  1529. if (!results[2]) return '';
  1530. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  1531. }
  1532. function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1){
  1533. let anzpara;
  1534. try {
  1535. anzpara = _param[_cat][_name].anzParam;
  1536. }
  1537. catch (error) {
  1538. firework.launch("Parameter '" + _name + "' in category '" + _cat + "' is unknown!", 'danger', 30000);
  1539. return;
  1540. }
  1541. if (_number > -1) {
  1542. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1543. return;
  1544. if (_optional) {
  1545. document.getElementById(_cat+"_"+_name+"_enabled").checked = NUMBERS[_number][_cat][_name]["enabled"];
  1546. for (var j = 1; j <= anzpara; ++j) {
  1547. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !NUMBERS[_number][_cat][_name]["enabled"];
  1548. }
  1549. }
  1550. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  1551. setEnabled(_cat+"_"+_name, true);
  1552. for (var j = 1; j <= anzpara; ++j) {
  1553. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1554. if (element.tagName.toLowerCase() == "select") {
  1555. var textToFind = NUMBERS[_number][_cat][_name]["value"+j];
  1556. if (textToFind == undefined)
  1557. continue;
  1558. _isFound = false;
  1559. element.selectedIndex = -1;
  1560. for (var i = 0; i < element.options.length; i++) {
  1561. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1562. element.selectedIndex = i;
  1563. _isFound = true;
  1564. break;
  1565. }
  1566. }
  1567. if (!_isFound)
  1568. {
  1569. _zw_txt = "In the selected field the value '" + textToFind + "' in the parameter '";
  1570. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  1571. firework.launch(_zw_txt, 'warning', 10000);
  1572. }
  1573. }
  1574. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1575. element.checked = NUMBERS[_number][_cat][_name]["value"+j] == "true";
  1576. }
  1577. else {
  1578. element.value = NUMBERS[_number][_cat][_name]["value"+j];
  1579. }
  1580. }
  1581. }
  1582. else {
  1583. if (_optional) {
  1584. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  1585. for (var j = 1; j <= anzpara; ++j) {
  1586. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  1587. }
  1588. }
  1589. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  1590. setEnabled(_cat+"_"+_name, true);
  1591. for (var j = 1; j <= anzpara; ++j) {
  1592. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1593. if (element.tagName.toLowerCase() == "select") {
  1594. var textToFind = _param[_cat][_name]["value"+j];
  1595. if (textToFind == undefined)
  1596. continue;
  1597. _isFound = false;
  1598. element.selectedIndex = -1;
  1599. for (var i = 0; i < element.options.length; i++) {
  1600. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1601. element.selectedIndex = i;
  1602. _isFound = true;
  1603. break;
  1604. }
  1605. }
  1606. if (!_isFound)
  1607. {
  1608. _zw_txt = "In the selected field the value '" + textToFind + "' in the section '";
  1609. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  1610. firework.launch(_zw_txt, 'warning', 10000);
  1611. }
  1612. }
  1613. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1614. element.checked = _param[_cat][_name]["value"+j] == "true";
  1615. }
  1616. else {
  1617. element.value = _param[_cat][_name]["value"+j];
  1618. }
  1619. }
  1620. }
  1621. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  1622. if (_category[_cat]["enabled"] == false)
  1623. {
  1624. if (_optional) {
  1625. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  1626. for (var j = 1; j <= anzpara; ++j) {
  1627. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  1628. }
  1629. }
  1630. document.getElementById(_cat+"_"+_name+"_text").style="color: gray;"
  1631. setEnabled(_cat+"_"+_name, false);
  1632. }
  1633. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional, _number);
  1634. }
  1635. function InvertEnableItem(_cat, _param)
  1636. {
  1637. _zw = _cat + "_" + _param + "_enabled";
  1638. _isOn = document.getElementById(_zw).checked;
  1639. _color = "rgb(122, 122, 122)";
  1640. if (_isOn) {
  1641. _color = "black";
  1642. }
  1643. _zw = _cat + "_" + _param + "_text";
  1644. document.getElementById(_zw).disabled = !_isOn;
  1645. document.getElementById(_zw).style.color = _color;
  1646. setEnabled(_cat + "_" + _param, _isOn);
  1647. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  1648. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  1649. document.getElementById(_cat+"_"+_param+"_value"+j).style.color = _color;
  1650. }
  1651. }
  1652. function setEnabled(className, enabled) {
  1653. _color = "rgb(122, 122, 122)";
  1654. if (enabled) {
  1655. _color = "black";
  1656. }
  1657. let elements = document.getElementsByClassName(className);
  1658. for (i = 0; i < elements.length; i++) {
  1659. if (enabled) {
  1660. elements[i].classList.remove("disabled");
  1661. } else {
  1662. elements[i].classList.add("disabled");
  1663. }
  1664. let inputs = elements[i].getElementsByTagName("input");
  1665. for (j = 0; j < inputs.length; j++) {
  1666. if (inputs[j].id.endsWith("_enabled"))
  1667. continue;
  1668. inputs[j].style.color = _color;
  1669. if (enabled) {
  1670. inputs[j].removeAttribute("disabled");
  1671. } else {
  1672. inputs[j].setAttribute("disabled", "disabled");
  1673. }
  1674. }
  1675. }
  1676. }
  1677. function setVisible(className, visible) {
  1678. let elements = document.getElementsByClassName(className);
  1679. for (i = 0; i < elements.length; i++) {
  1680. if (visible) {
  1681. elements[i].classList.remove("hidden");
  1682. } else {
  1683. elements[i].classList.add("hidden");
  1684. }
  1685. }
  1686. }
  1687. function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1)
  1688. {
  1689. _status = _category[_cat]["enabled"];
  1690. _color = "rgb(122, 122, 122)";
  1691. if (_status) {
  1692. _color = "black";
  1693. }
  1694. if (_optional) {
  1695. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  1696. document.getElementById(_cat+"_"+_name+"_enabled").style.color = _color;
  1697. }
  1698. if (_number == -1){
  1699. if (!_param[_cat][_name]["enabled"]) {
  1700. _status = false;
  1701. _color = "rgb(122, 122, 122)";
  1702. }
  1703. }
  1704. else
  1705. if (!NUMBERS[_number][_cat][_name]["enabled"]) {
  1706. _status = false;
  1707. _color = "rgb(122, 122, 122)";
  1708. }
  1709. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  1710. document.getElementById(_cat+"_"+_name+"_text").style.color = _color;
  1711. setEnabled(_cat+"_"+_name, _status);
  1712. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1713. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  1714. document.getElementById(_cat+"_"+_name+"_value"+j).style.color = _color;
  1715. }
  1716. }
  1717. function ReadParameter(_param, _cat, _name, _optional, _number = -1){
  1718. if (_number > -1) {
  1719. if (_cat == "Digits")
  1720. _cat = "digit";
  1721. if (_cat == "Analog")
  1722. _cat = "analog";
  1723. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1724. return;
  1725. if (_optional) {
  1726. NUMBERS[_number][_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1727. }
  1728. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1729. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1730. if (element.tagName.toLowerCase() == "select") {
  1731. NUMBERS[_number][_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1732. }
  1733. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1734. NUMBERS[_number][_cat][_name]["value"+j] = element.checked;
  1735. }
  1736. else {
  1737. if ((NUMBERS[_number][_cat][_name].checkRegExList != null) && (NUMBERS[_number][_cat][_name].checkRegExList[j-1] != null)) {
  1738. if (!element.value.match(NUMBERS[_cat][_name].checkRegExList[j-1])) {
  1739. element.classList.add("invalid-input");
  1740. } else {
  1741. element.classList.remove("invalid-input");
  1742. }
  1743. }
  1744. NUMBERS[_number][_cat][_name]["value"+j] = element.value;
  1745. }
  1746. }
  1747. }
  1748. else
  1749. {
  1750. if (_optional) {
  1751. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1752. }
  1753. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1754. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1755. if (element.tagName.toLowerCase() == "select") {
  1756. _param[_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1757. }
  1758. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1759. _param[_cat][_name]["value"+j] = element.checked;
  1760. }
  1761. else {
  1762. if ((_param[_cat][_name].checkRegExList != null) && (_param[_cat][_name].checkRegExList[j-1] != null)) {
  1763. if (!element.value.match(_param[_cat][_name].checkRegExList[j-1])) {
  1764. element.classList.add("invalid-input");
  1765. } else {
  1766. element.classList.remove("invalid-input");
  1767. }
  1768. }
  1769. _param[_cat][_name]["value"+j] = element.value;
  1770. }
  1771. }
  1772. }
  1773. }
  1774. function UpdateInputIndividual(sel)
  1775. {
  1776. if (NUNBERSAkt != -1)
  1777. {
  1778. ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1779. ReadParameter(param, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1780. ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1781. ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1782. ReadParameter(param, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1783. ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1784. ReadParameter(param, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1785. ReadParameter(param, "InfluxDB", "Field", true, NUNBERSAkt);
  1786. ReadParameter(param, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1787. ReadParameter(param, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1788. ReadParameter(param, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1789. }
  1790. // var sel = document.getElementById("Numbers_value1");
  1791. NUNBERSAkt = sel.selectedIndex;
  1792. WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1793. WriteParameter(param, category, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1794. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1795. WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1796. WriteParameter(param, category, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1797. WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1798. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1799. WriteParameter(param, category, "InfluxDB", "Field", true, NUNBERSAkt);
  1800. WriteParameter(param, category, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1801. WriteParameter(param, category, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1802. WriteParameter(param, category, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1803. }
  1804. function UpdateInput() {
  1805. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  1806. setVisible("DigitItem", category["Digits"]["enabled"]);
  1807. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  1808. setVisible("AnalogItem", category["Analog"]["enabled"]);
  1809. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  1810. setVisible("MQTTItem", category["MQTT"]["enabled"]);
  1811. document.getElementById("Category_GPIO_enabled").checked = category["GPIO"]["enabled"];
  1812. setVisible("GPIO_item", category["GPIO"]["enabled"]);
  1813. document.getElementById("Category_InfluxDB_enabled").checked = category["InfluxDB"]["enabled"];
  1814. setVisible("InfluxDBv1Item", category["InfluxDB"]["enabled"]);
  1815. document.getElementById("Category_InfluxDBv2_enabled").checked = category["InfluxDBv2"]["enabled"];
  1816. setVisible("InfluxDBv2Item", category["InfluxDBv2"]["enabled"]);
  1817. WriteParameter(param, category, "TakeImage", "RawImagesLocation", true);
  1818. WriteParameter(param, category, "TakeImage", "RawImagesRetention", true);
  1819. WriteParameter(param, category, "TakeImage", "Demo", false);
  1820. WriteParameter(param, category, "TakeImage", "WaitBeforeTakingPicture", false);
  1821. WriteParameter(param, category, "TakeImage", "ImageQuality", false);
  1822. WriteParameter(param, category, "TakeImage", "Brightness", false);
  1823. WriteParameter(param, category, "TakeImage", "Contrast", false);
  1824. WriteParameter(param, category, "TakeImage", "Saturation", false);
  1825. WriteParameter(param, category, "TakeImage", "LEDIntensity", false);
  1826. WriteParameter(param, category, "TakeImage", "ImageSize", false);
  1827. WriteParameter(param, category, "TakeImage", "FixedExposure", false);
  1828. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  1829. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  1830. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true);
  1831. WriteParameter(param, category, "Alignment", "FlipImageSize", false);
  1832. WriteParameter(param, category, "Alignment", "InitialMirror", false);
  1833. WriteParameter(param, category, "Digits", "CNNGoodThreshold", true);
  1834. WriteParameter(param, category, "Digits", "ROIImagesLocation", true);
  1835. WriteParameter(param, category, "Digits", "ROIImagesRetention", true);
  1836. WriteParameter(param, category, "Analog", "ROIImagesLocation", true);
  1837. WriteParameter(param, category, "Analog", "ROIImagesRetention", true);
  1838. WriteParameter(param, category, "PostProcessing", "PreValueUse", false);
  1839. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  1840. // WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true);
  1841. WriteParameter(param, category, "PostProcessing", "ErrorMessage", false);
  1842. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  1843. WriteParameter(param, category, "MQTT", "Uri", true);
  1844. WriteParameter(param, category, "MQTT", "MainTopic", true);
  1845. WriteParameter(param, category, "MQTT", "ClientID", true);
  1846. WriteParameter(param, category, "MQTT", "user", true);
  1847. WriteParameter(param, category, "MQTT", "password", true);
  1848. WriteParameter(param, category, "MQTT", "RetainMessages", false);
  1849. WriteParameter(param, category, "MQTT", "HomeassistantDiscovery", false);
  1850. WriteParameter(param, category, "MQTT", "MeterType", true);
  1851. WriteParameter(param, category, "InfluxDB", "Uri", true);
  1852. WriteParameter(param, category, "InfluxDB", "Database", true);
  1853. // WriteParameter(param, category, "InfluxDB", "Measurement", true);
  1854. WriteParameter(param, category, "InfluxDB", "user", true);
  1855. WriteParameter(param, category, "InfluxDB", "password", true);
  1856. // WriteParameter(param, category, "InfluxDB", "Field", true);
  1857. WriteParameter(param, category, "InfluxDBv2", "Uri", true);
  1858. WriteParameter(param, category, "InfluxDBv2", "Database", true);
  1859. // WriteParameter(param, category, "InfluxDBv2", "Measurement", true);
  1860. WriteParameter(param, category, "InfluxDBv2", "Org", true);
  1861. WriteParameter(param, category, "InfluxDBv2", "Token", true);
  1862. // WriteParameter(param, category, "InfluxDBv2", "Field", true);
  1863. WriteParameter(param, category, "GPIO", "IO0", true);
  1864. WriteParameter(param, category, "GPIO", "IO1", true);
  1865. WriteParameter(param, category, "GPIO", "IO3", true);
  1866. WriteParameter(param, category, "GPIO", "IO4", true);
  1867. WriteParameter(param, category, "GPIO", "IO12", true);
  1868. WriteParameter(param, category, "GPIO", "IO13", true);
  1869. WriteParameter(param, category, "GPIO", "LEDType", false);
  1870. WriteParameter(param, category, "GPIO", "LEDNumbers", false);
  1871. WriteParameter(param, category, "GPIO", "LEDColor", false);
  1872. WriteParameter(param, category, "AutoTimer", "AutoStart", false);
  1873. WriteParameter(param, category, "AutoTimer", "Interval", false);
  1874. WriteParameter(param, category, "DataLogging", "DataLogActive", false);
  1875. WriteParameter(param, category, "DataLogging", "DataFilesRetention", false);
  1876. WriteParameter(param, category, "Debug", "LogLevel", false);
  1877. WriteParameter(param, category, "Debug", "LogfilesRetention", false);
  1878. WriteParameter(param, category, "System", "TimeZone", true);
  1879. WriteParameter(param, category, "System", "Hostname", true);
  1880. WriteParameter(param, category, "System", "TimeServer", true);
  1881. WriteParameter(param, category, "System", "RSSIThreshold", true);
  1882. WriteParameter(param, category, "System", "CPUFrequency", true);
  1883. WriteModelFiles();
  1884. }
  1885. function WriteModelFiles()
  1886. {
  1887. list_tflite = getTFLITEList();
  1888. var _indexDig = document.getElementById("Digits_Model_value1");
  1889. var _indexAna = document.getElementById("Analog_Model_value1");
  1890. while (_indexDig.length)
  1891. _indexDig.remove(0);
  1892. while (_indexAna.length)
  1893. _indexAna.remove(0);
  1894. for (var i = 0; i < list_tflite.length; ++i){
  1895. var optionDig = document.createElement("option");
  1896. var optionAna = document.createElement("option");
  1897. var text = list_tflite[i].replace("/config/", "");
  1898. if (list_tflite[i].includes("/dig")) { // Its a digital file, only show in the digital list box
  1899. optionDig.text = text;
  1900. optionDig.value = list_tflite[i];
  1901. _indexDig.add(optionDig);
  1902. }
  1903. else if (list_tflite[i].includes("/ana")) { // Its a digital file, only show in the analog list box
  1904. optionAna.text = text;
  1905. optionAna.value = list_tflite[i];
  1906. _indexAna.add(optionAna);
  1907. }
  1908. else { // all other files, show in both list boxes
  1909. optionDig.text = text;
  1910. optionDig.value = list_tflite[i];
  1911. _indexDig.add(optionDig);
  1912. optionAna.text = text;
  1913. optionAna.value = list_tflite[i];
  1914. _indexAna.add(optionAna);
  1915. }
  1916. }
  1917. WriteParameter(param, category, "Analog", "Model", false);
  1918. WriteParameter(param, category, "Digits", "Model", false);
  1919. }
  1920. function ReadParameterAll()
  1921. {
  1922. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  1923. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  1924. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  1925. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  1926. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  1927. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  1928. ReadParameter(param, "TakeImage", "RawImagesLocation", true);
  1929. ReadParameter(param, "TakeImage", "RawImagesRetention", true);
  1930. ReadParameter(param, "TakeImage", "Demo", false);
  1931. ReadParameter(param, "TakeImage", "WaitBeforeTakingPicture", false);
  1932. ReadParameter(param, "TakeImage", "ImageQuality", false);
  1933. ReadParameter(param, "TakeImage", "Brightness", false);
  1934. ReadParameter(param, "TakeImage", "Contrast", false);
  1935. ReadParameter(param, "TakeImage", "Saturation", false);
  1936. ReadParameter(param, "TakeImage", "LEDIntensity", false);
  1937. ReadParameter(param, "TakeImage", "ImageSize", false);
  1938. ReadParameter(param, "TakeImage", "FixedExposure", false);
  1939. ReadParameter(param, "Alignment", "SearchFieldX", false);
  1940. ReadParameter(param, "Alignment", "SearchFieldY", false);
  1941. ReadParameter(param, "Alignment", "AlignmentAlgo", true);
  1942. ReadParameter(param, "Alignment", "FlipImageSize", false);
  1943. ReadParameter(param, "Alignment", "InitialMirror", false);
  1944. ReadParameter(param, "Digits", "Model", false);
  1945. ReadParameter(param, "Digits", "CNNGoodThreshold", true);
  1946. ReadParameter(param, "Digits", "ROIImagesLocation", true);
  1947. ReadParameter(param, "Digits", "ROIImagesRetention", true);
  1948. ReadParameter(param, "Analog", "Model", false);
  1949. ReadParameter(param, "Analog", "ROIImagesLocation", true);
  1950. ReadParameter(param, "Analog", "ROIImagesRetention", true);
  1951. ReadParameter(param, "PostProcessing", "PreValueUse", false);
  1952. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  1953. ReadParameter(param, "PostProcessing", "ErrorMessage", false);
  1954. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  1955. ReadParameter(param, "MQTT", "Uri", true);
  1956. ReadParameter(param, "MQTT", "MainTopic", true);
  1957. ReadParameter(param, "MQTT", "ClientID", true);
  1958. ReadParameter(param, "MQTT", "user", true);
  1959. ReadParameter(param, "MQTT", "password", true);
  1960. ReadParameter(param, "MQTT", "RetainMessages", false);
  1961. ReadParameter(param, "MQTT", "HomeassistantDiscovery", false);
  1962. ReadParameter(param, "MQTT", "MeterType", true);
  1963. ReadParameter(param, "InfluxDB", "Uri", true);
  1964. ReadParameter(param, "InfluxDB", "Database", true);
  1965. ReadParameter(param, "InfluxDB", "Measurement", true);
  1966. ReadParameter(param, "InfluxDB", "user", true);
  1967. ReadParameter(param, "InfluxDB", "password", true);
  1968. ReadParameter(param, "InfluxDBv2", "Uri", true);
  1969. ReadParameter(param, "InfluxDBv2", "Database", true);
  1970. ReadParameter(param, "InfluxDBv2", "Measurement", true);
  1971. ReadParameter(param, "InfluxDBv2", "Org", true);
  1972. ReadParameter(param, "InfluxDBv2", "Token", true);
  1973. // ReadParameter(param, "InfluxDB", "Field", true);
  1974. ReadParameter(param, "GPIO", "IO0", true);
  1975. ReadParameter(param, "GPIO", "IO1", true);
  1976. ReadParameter(param, "GPIO", "IO3", true);
  1977. ReadParameter(param, "GPIO", "IO4", true);
  1978. ReadParameter(param, "GPIO", "IO12", true);
  1979. ReadParameter(param, "GPIO", "IO13", true);
  1980. ReadParameter(param, "GPIO", "LEDType", false);
  1981. ReadParameter(param, "GPIO", "LEDNumbers", false);
  1982. ReadParameter(param, "GPIO", "LEDColor", false);
  1983. // Folgende Zeilen sind für Abwärtskompatibität < v9.0.0 notwendig (manchmal parameter auskommentiert)
  1984. param["GPIO"]["LEDType"]["enabled"] = true;
  1985. param["GPIO"]["LEDNumbers"]["enabled"] = true;
  1986. param["GPIO"]["LEDColor"]["enabled"] = true;
  1987. param["GPIO"]["LEDType"]["found"] = true;
  1988. param["GPIO"]["LEDNumbers"]["found"] = true;
  1989. param["GPIO"]["LEDColor"]["found"] = true;
  1990. ReadParameter(param, "AutoTimer", "AutoStart", false);
  1991. ReadParameter(param, "AutoTimer", "Interval", false);
  1992. ReadParameter(param, "DataLogging", "DataLogActive", false);
  1993. ReadParameter(param, "DataLogging", "DataFilesRetention", false);
  1994. ReadParameter(param, "Debug", "LogLevel", false);
  1995. ReadParameter(param, "Debug", "LogfilesRetention", false);
  1996. ReadParameter(param, "System", "TimeZone", true);
  1997. ReadParameter(param, "System", "Hostname", true);
  1998. ReadParameter(param, "System", "TimeServer", true);
  1999. ReadParameter(param, "System", "RSSIThreshold", true);
  2000. ReadParameter(param, "System", "CPUFrequency", true);
  2001. var sel = document.getElementById("Numbers_value1");
  2002. UpdateInputIndividual(sel);
  2003. // FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  2004. }
  2005. function FormatDecimalValue(_param, _cat, _name) {
  2006. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  2007. var _val = _param[_cat][_name]["value"+j];
  2008. _val = _val.replace(",", ".");
  2009. _param[_cat][_name]["value"+j] = _val;
  2010. }
  2011. }
  2012. function UpdateAfterCategoryCheck() {
  2013. ReadParameterAll();
  2014. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  2015. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  2016. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  2017. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  2018. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  2019. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  2020. UpdateInput();
  2021. var sel = document.getElementById("Numbers_value1");
  2022. UpdateInputIndividual(sel);
  2023. }
  2024. function UpdateExpertModus()
  2025. {
  2026. // var _style = 'display:none;';
  2027. var _style_pur = 'none';
  2028. var _hidden = true;
  2029. if (document.getElementById("ExpertModus_enabled").checked) {
  2030. // _style = '';
  2031. _style_pur = '';
  2032. _hidden = false;
  2033. document.getElementById("Edit_Config_Direct").style.display = "";
  2034. firework.launch("Expert view activated. Please use carefully", 'warning', 5000);
  2035. }
  2036. else
  2037. {
  2038. document.getElementById("Edit_Config_Direct").style.display = "none";
  2039. }
  2040. const expert = document.querySelectorAll(".expert");
  2041. for (var i = 0; i < expert.length; i++) {
  2042. expert[i].style.display = _style_pur;
  2043. // document.getElementById(expert[i].id).style = _style;
  2044. }
  2045. // 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
  2046. Array.from(document.querySelector("#GPIO_IO4_value1").options).forEach(function(option_element) {
  2047. if (option_element.value != "built-in-led")
  2048. option_element.hidden = _hidden;
  2049. });
  2050. Array.from(document.querySelector("#GPIO_IO12_value1").options).forEach(function(option_element) {
  2051. if (option_element.value != "external-flash-ws281x")
  2052. option_element.hidden = _hidden;
  2053. });
  2054. }
  2055. function saveTextAsFile()
  2056. {
  2057. ReadParameterAll();
  2058. if (document.getElementsByClassName("invalid-input").length > 0) {
  2059. firework.launch("Settings cannot be saved. Please check your entries!", 'danger', 30000);
  2060. return;
  2061. }
  2062. if (confirm("Are you sure you want to save the configuration?")) {
  2063. ReadParameterAll();
  2064. WriteConfigININew();
  2065. SaveConfigToServer(domainname);
  2066. firework.launch('Configuration saved. It will get applied after the next reboot!', 'success', 5000);
  2067. }
  2068. }
  2069. function doReboot() {
  2070. if (confirm("Are you sure you want to reboot?")) {
  2071. var stringota = getDomainname() + "/reboot";
  2072. window.location = stringota;
  2073. window.location.href = stringota;
  2074. window.location.assign(stringota);
  2075. window.location.replace(stringota);
  2076. }
  2077. }
  2078. function editConfigDirect() {
  2079. if (confirm("Proceed to switch the view? Unsaved changes get lost")) {
  2080. var stringota = getDomainname() + "/edit_config.html?v=$COMMIT_HASH";
  2081. window.location = stringota;
  2082. window.location.href = stringota;
  2083. window.location.assign(stringota);
  2084. window.location.replace(stringota);
  2085. }
  2086. }
  2087. function numberChanged()
  2088. {
  2089. var sel = document.getElementById("Numbers_value1");
  2090. _neu = sel.selectedIndex;
  2091. UpdateInputIndividual(sel);
  2092. var _selInflux = document.getElementById("NumbersInfluxDBv2_value1");
  2093. if (_selInflux.selectedIndex != _neu)
  2094. _selInflux.selectedIndex = _neu
  2095. }
  2096. function numberInfluxDBv2Changed()
  2097. {
  2098. var sel = document.getElementById("NumbersInfluxDBv2_value1");
  2099. _neu = sel.selectedIndex;
  2100. UpdateInputIndividual(sel);
  2101. var _sel2 = document.getElementById("Numbers_value1");
  2102. if (_sel2.selectedIndex != _neu)
  2103. _sel2.selectedIndex = _neu
  2104. var _sel3 = document.getElementById("NumbersInfluxDB_value1");
  2105. if (_sel3.selectedIndex != _neu)
  2106. _sel3.selectedIndex = _neu
  2107. }
  2108. function numberInfluxDBChanged()
  2109. {
  2110. var sel = document.getElementById("NumbersInfluxDB_value1");
  2111. _neu = sel.selectedIndex;
  2112. UpdateInputIndividual(sel);
  2113. var _sel2 = document.getElementById("Numbers_value1");
  2114. if (_sel2.selectedIndex != _neu)
  2115. _sel2.selectedIndex = _neu
  2116. var _sel3 = document.getElementById("NumbersInfluxDBv2_value1");
  2117. if (_sel3.selectedIndex != _neu)
  2118. _sel3.selectedIndex = _neu
  2119. }
  2120. /* hash #description open the details part of the page */
  2121. function openDescription()
  2122. {
  2123. if(window.location.hash) {
  2124. var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
  2125. if(hash == 'description')
  2126. document.getElementById("desc_details").open = true;
  2127. document.getElementById("reboot").style.display = "none";
  2128. document.getElementById("reboot_text").style.display = "none";
  2129. }
  2130. }
  2131. openDescription();
  2132. LoadConfigNeu();
  2133. </script>
  2134. </body>
  2135. </html>