edit_config_param.html 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="icon" href="favicon.ico" type="image/x-icon">
  5. <title>Edit Config</title>
  6. <meta charset="utf-8">
  7. <style>
  8. h1 {font-size: 2em;}
  9. h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
  10. h3 {font-size: 1.2em;}
  11. h4 {
  12. margin-bottom: 0;
  13. }
  14. p {font-size: 1em;}
  15. table {
  16. border: 0pt;
  17. border-collapse: collapse;
  18. }
  19. tr {
  20. border-bottom: 1px solid lightgray;
  21. }
  22. td {
  23. padding: 10px;
  24. }
  25. .button {
  26. padding: 5px 20px;
  27. width: 211px;
  28. font-size: 16px;
  29. }
  30. textarea {
  31. font-size: 14px;
  32. }
  33. .description {
  34. color: black;
  35. font-size: 80%;
  36. }
  37. .disabled {
  38. color:lightgrey;
  39. }
  40. .smallSelect {
  41. width: 30px;
  42. }
  43. .invalid-input {
  44. background-color: #FFAA00;
  45. }
  46. .hidden {
  47. display: none;
  48. }
  49. .expert {
  50. background-color: #ffc5c5;
  51. }
  52. </style>
  53. </head>
  54. <body style="font-family: arial; padding: 0px 10px;">
  55. <h2>Configuration</h2>
  56. <input type="checkbox" id="ExpertModus_enabled" value="1" onclick = 'UpdateExpertModus()' unchecked><label for="ExpertModus_enabled"> Expert Mode </label>
  57. <button class="button" id="Edit_Config_Direct" onclick="editConfigDirect()" style="display:none">Edit Config.ini direct</button>
  58. <p></p>
  59. <div id = "divall" style="display:none">
  60. <table>
  61. <tr>
  62. <!-- <th width="20px" style="text-align: left;">
  63. Enable
  64. </th>-->
  65. <th width="300px" style="text-align: left;">
  66. Parameter
  67. </th>
  68. <th style="text-align: left;">
  69. Value
  70. </th>
  71. <th style="text-align: left;">
  72. Information
  73. </th>
  74. </tr>
  75. <tr>
  76. <td colspan="3" style="padding-left: 20px;"><h4>TakeImage</h4></td>
  77. </tr>
  78. <tr>
  79. <td style="padding-left: 40px;">
  80. <input type="checkbox" id="MakeImage_LogImageLocation_enabled" value="1" onclick = 'InvertEnableItem("MakeImage", "LogImageLocation")' unchecked >
  81. <label for=MakeImage_LogImageLocation_enabled><class id="MakeImage_LogImageLocation_text" style="color:black;">LogImageLocation</class></label>
  82. </td>
  83. <td>
  84. <input type="text" name="name" id="MakeImage_LogImageLocation_value1">
  85. </td>
  86. <td class="description">
  87. Location to store raw images for logging
  88. </td>
  89. </tr>
  90. <tr>
  91. <td width="20px" style="padding-left: 40px;">
  92. <input type="checkbox" id="MakeImage_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("MakeImage", "LogfileRetentionInDays")' unchecked >
  93. <label for=MakeImage_LogfileRetentionInDays_enabled><class id="MakeImage_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class></label>
  94. </td>
  95. <td>
  96. <input type="number" id="MakeImage_LogfileRetentionInDays_value1" size="13" min="0" step="1">
  97. </td>
  98. <td class="description">
  99. Time to keep the raw image (in days, resp. "0" = forever)
  100. </td>
  101. </tr>
  102. <tr class="expert" id="ex1">
  103. <td width="20px" style="padding-left: 40px;">
  104. <class id="MakeImage_WaitBeforeTakingPicture_text" style="color:black;">WaitBeforeTakingPicture</class>
  105. </td>
  106. <td>
  107. <input type="number" id="MakeImage_WaitBeforeTakingPicture_value1" size="13" min="0" step="any">
  108. </td>
  109. <td class="description">
  110. Wait time between illumination switch on and take the picture (in seconds)
  111. </td>
  112. </tr>
  113. <tr class="expert" id="ex2">
  114. <td width="20px" style="padding-left: 40px;">
  115. <class id="MakeImage_ImageQuality_text" style="color:black;">ImageQuality</class>
  116. </td>
  117. <td>
  118. <input type="number" id="MakeImage_ImageQuality_value1" size="13" min="0" max="63">
  119. </td>
  120. <td class="description">
  121. Quality index for picture (default = "12" - "0" high ... "63" low) <br>
  122. Remark: values smaller than 12 can result in a reboot, as the bigger sized JPEG might not fit in the available RAM!
  123. </td>
  124. </tr>
  125. <tr class="expert" id="ex3">
  126. <td width="20px" style="padding-left: 40px;">
  127. <class id="MakeImage_ImageSize_text" style="color:black;">ImageSize</class>
  128. </td>
  129. <td>
  130. <select id="MakeImage_ImageSize_value1">
  131. <option value="VGA" selected>VGA</option>
  132. <option value="QVGA" >QVGA</option>
  133. </select>
  134. </td>
  135. <td class="description">
  136. Picture size camera (default = "VGA")
  137. </td>
  138. </tr>
  139. <tr class="expert" id="LEDIntensity_ex3">
  140. <td width="20px" style="padding-left: 40px;">
  141. <class id="MakeImage_LEDIntensity_text" style="color:black;">LEDIntensity</class>
  142. </td>
  143. <td>
  144. <input type="number" id="MakeImage_LEDIntensity_value1" size="13" min="0" max="100">
  145. </td>
  146. <td style="font-size: 80%;">
  147. Internal LED Flash Intensity (PWM from 0% - 100%). <br>
  148. Remark: as the camera autoillumination settings are used, this is rather for energy saving, than reducing reflections.
  149. </td>
  150. </tr>
  151. <tr class="expert" id="Brightness_ex3">
  152. <td width="20px" style="padding-left: 40px;">
  153. <class id="MakeImage_Brightness_text" style="color:black;">Brightness</class>
  154. </td>
  155. <td>
  156. <input type="number" id="MakeImage_Brightness_value1" size="13" min="-2" max="2">
  157. </td>
  158. <td style="font-size: 80%;">
  159. Image Brightness (-2 .. 2 - default = "0")
  160. </td>
  161. </tr>
  162. <tr class="expert" id="Contrast_ex3">
  163. <td width="20px" style="padding-left: 40px;">
  164. <class id="MakeImage_Contrast_text" style="color:black;">Contrast</class>
  165. </td>
  166. <td>
  167. <input type="number" id="MakeImage_Contrast_value1" size="13" min="-2" max="2">
  168. </td>
  169. <td style="font-size: 80%;">
  170. Image Contrast (-2 .. 2 - default = "0") <br>
  171. Remark: camera driver is not fully supporting this setting yet (no impact on image)
  172. </td>
  173. </tr>
  174. <tr class="expert" id="Saturation_ex3">
  175. <td width="20px" style="padding-left: 40px;">
  176. <class id="MakeImage_Saturation_text" style="color:black;">Saturation</class>
  177. </td>
  178. <td>
  179. <input type="number" id="MakeImage_Saturation_value1" size="13" min="-2" max="2">
  180. </td>
  181. <td style="font-size: 80%;">
  182. Image Saturation (-2 .. 2 - default = "0") <br>
  183. Remark: camera driver is not fully supporting this setting yet (no impact on image)
  184. </td>
  185. </tr>
  186. <tr class="expert" id="MakeImage_FixedExposure_ex10">
  187. <td style="padding-left: 40px;">
  188. <class id="MakeImage_FixedExposure_text" style="color:black;">FixedExposure</class>
  189. </td>
  190. <td>
  191. <select id="MakeImage_FixedExposure_value1">
  192. <option value="true" selected>true</option>
  193. <option value="false" >false</option>
  194. </select>
  195. </td>
  196. <td style="font-size: 80%;">
  197. Fixes the illumination setting of camera at the startup and uses this later --> individual round is faster
  198. </td>
  199. </tr>
  200. <tr class="expert" id="ex4">
  201. <td colspan="3" style="padding-left: 20px;"><h4>Alignment</h4></td>
  202. </tr>
  203. <tr class="expert" id="ex6">
  204. <td style="padding-left: 40px;">
  205. <class id="Alignment_SearchFieldX_text" style="color:black;">SearchFieldX</class>
  206. </td>
  207. <td>
  208. <input type="number" name="name" id="Alignment_SearchFieldX_value1" size="13" min="1" step="1">
  209. </td>
  210. <td style="font-size: 80%;">
  211. x size (width) in which the reference is searched (default = "20")
  212. </td>
  213. </tr>
  214. <tr class="expert" id="ex8">
  215. <td style="padding-left: 40px;">
  216. <class id="Alignment_SearchFieldY_text" style="color:black;">SearchFieldY</class>
  217. </td>
  218. <td>
  219. <input type="number" name="name" id="Alignment_SearchFieldY_value1" size="13" min="1">
  220. </td>
  221. <td style="font-size: 80%;">
  222. y size (height) in which the reference is searched (default = "20")
  223. </td>
  224. </tr>
  225. <tr class="expert" id="AlignmentAlgo_ex8">
  226. <td style="padding-left: 40px;">
  227. <input type="checkbox" id="Alignment_AlignmentAlgo_enabled" value="1" onclick = 'InvertEnableItem("Alignment", "AlignmentAlgo")' unchecked >
  228. <label for=Alignment_AlignmentAlgo_enabled><class id="Alignment_AlignmentAlgo_text" style="color:black;">AlignmentAlgo</class></label>
  229. </td>
  230. <td>
  231. <select id="Alignment_AlignmentAlgo_value1">
  232. <option value="default" selected>Default</option>
  233. <option value="highAccuracy" >HighAccuracy</option>
  234. <option value="fast" >Fast</option>
  235. </select>
  236. </td>
  237. <td style="font-size: 80%;">
  238. "Default" = use only R-Channel, "HighAccuracy" = use all Channels (RGB, 3x slower), <br> "Fast" (First time RGB, then only check if image is shifted)
  239. </td>
  240. </tr>
  241. <tr id="Category_Digits_ex4">
  242. <td colspan="3" style="padding-left: 20px;">
  243. <h4><input type="checkbox" id="Category_Digits_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  244. <label for=Category_Digits_enabled>Digits</h4></label>
  245. </td>
  246. </tr>
  247. <tr>
  248. <td style="padding-left: 40px;">
  249. <class id="Digits_Model_text" style="color:black;">Model</class>
  250. </td>
  251. <td>
  252. <select id="Digits_Model_value1">
  253. </select>
  254. </td>
  255. <td style="font-size: 80%;">
  256. Path to CNN model file for image recognition. Check the <a href="https://github.com/jomjol/AI-on-the-edge-device/wiki/Choosing-the-Model" target="_blank">documentation</a> for details.
  257. </td>
  258. </tr>
  259. <tr class="expert" id="ex91">
  260. <td style="padding-left: 40px;">
  261. <input type="checkbox" id="Digits_CNNGoodThreshold_enabled" value="1" onclick = 'InvertEnableItem("Digits", "CNNGoodThreshold")' unchecked >
  262. <label for=Digits_CNNGoodThreshold_enabled><class id="Digits_CNNGoodThreshold_text" style="color:black;">CNNGoodThreshold</class></label>
  263. </td>
  264. <td>
  265. <input width="40px" type="number" id="Digits_CNNGoodThreshold_value1" min="0" max="1" step="0.1">
  266. </td>
  267. <td style="font-size: 80%;">
  268. EXPERIMENTAL - NOT WORKING FOR ALL CNNs! - Threshold above which the classification should be to accept the value (only for digits meaningfull)
  269. </td>
  270. </tr>
  271. <tr>
  272. <td style="padding-left: 40px;">
  273. <input type="checkbox" id="Digits_LogImageLocation_enabled" value="1" onclick = 'InvertEnableItem("Digits", "LogImageLocation")' unchecked >
  274. <label for=Digits_LogImageLocation_enabled><class id="Digits_LogImageLocation_text" style="color:black;">LogImageLocation</class></label>
  275. </td>
  276. <td>
  277. <input type="text" name="name" id="Digits_LogImageLocation_value1">
  278. </td>
  279. <td style="font-size: 80%;">
  280. Location to store separated digits for logging
  281. </td>
  282. </tr>
  283. <tr>
  284. <td style="padding-left: 40px;">
  285. <input type="checkbox" id="Digits_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("Digits", "LogfileRetentionInDays")' unchecked >
  286. <label for=Digits_LogfileRetentionInDays_enabled><class id="Digits_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class></label>
  287. </td>
  288. <td>
  289. <input type="number" id="Digits_LogfileRetentionInDays_value1" min="0" step="1">
  290. </td>
  291. <td style="font-size: 80%;">
  292. Time to keep the separated digit images (in days, resp. "0" = forever)
  293. </td>
  294. </tr>
  295. <!--
  296. <tr class="expert" id="ex9">
  297. <td style="padding-left: 40px;">
  298. <class id="Digits_ModelInputSize_text" style="color:black;">ModelInputSize</class>
  299. </td>
  300. <td>
  301. x: <input type="number" id="Digits_ModelInputSize_value1" class="smallSelect" min="1" step="1">
  302. y: <input type="number" id="Digits_ModelInputSize_value2" class="smallSelect" min="1" step="1">
  303. </td>
  304. <td style="font-size: 80%;">
  305. Size of the input image for the CNN model
  306. </td>
  307. </tr>
  308. -->
  309. <tr id="Category_Analog_ex4">
  310. <td colspan="3" style="padding-left: 20px;">
  311. <h4><input type="checkbox" id="Category_Analog_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  312. <label for=Category_Analog_enabled>Analog</h4></label>
  313. </td>
  314. </tr>
  315. <tr>
  316. <td style="padding-left: 40px;">
  317. <class id="Analog_Model_text" style="color:black;">Model</class>
  318. </td>
  319. <td>
  320. <select id="Analog_Model_value1">
  321. </select>
  322. </td>
  323. <td style="font-size: 80%;"> Path to CNN model file for image recognition. Check the <a href="https://github.com/jomjol/AI-on-the-edge-device/wiki/Choosing-the-Model" target="_blank">documentation</a> for details.</td>
  324. </tr>
  325. <tr>
  326. <td style="padding-left: 40px;">
  327. <input type="checkbox" id="Analog_LogImageLocation_enabled" value="1" onclick = 'InvertEnableItem("Analog", "LogImageLocation")' unchecked >
  328. <label for=Analog_LogImageLocation_enabled><class id="Analog_LogImageLocation_text" style="color:black;">LogImageLocation</class>
  329. </label>
  330. </td>
  331. <td> <input type="text" name="name" id="Analog_LogImageLocation_value1"> </td>
  332. <td style="font-size: 80%;"> Location to store separated digits for logging </td>
  333. </tr>
  334. <tr>
  335. <td style="padding-left: 40px;">
  336. <input type="checkbox" id="Analog_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("Analog", "LogfileRetentionInDays")' unchecked >
  337. <label for=Analog_LogfileRetentionInDays_enabled><class id="Analog_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class></label></td>
  338. <td> <input type="number" id="Analog_LogfileRetentionInDays_value1" min="0" step="1"> </td>
  339. <td style="font-size: 80%;"> Time to keep the separated digit images (in days, resp. "0" = forever) </td>
  340. </tr>
  341. <!--
  342. <tr class="expert" id="ex10">
  343. <td style="padding-left: 40px;"> </td>
  344. <td> <class id="Analog_ModelInputSize_text" style="color:black;">ModelInputSize</class> </td>
  345. <td>
  346. x: <input type="number" id="Analog_ModelInputSize_value1" class="smallSelect" min="1" step="1">
  347. y: <input type="number" id="Analog_ModelInputSize_value2" class="smallSelect" min="1" step="1">
  348. </td>
  349. <td style="font-size: 80%;"> Size of the input image for the CNN model </td>
  350. </tr>
  351. -->
  352. <tr>
  353. <td colspan="3" style="padding-left: 20px;"><h4>PostProcessing</h4></td>
  354. </tr>
  355. <tr>
  356. <td style="padding-left: 40px;">
  357. <input type="checkbox" id="PostProcessing_PreValueUse_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "PreValueUse")' unchecked >
  358. <label for=PostProcessing_PreValueUse_enabled><class id="PostProcessing_PreValueUse_text" style="color:black;">PreValueUse</class></label>
  359. </td>
  360. <td>
  361. <select id="PostProcessing_PreValueUse_value1">
  362. <option value="true" selected>true</option>
  363. <option value="false" >false</option>
  364. </select>
  365. </td>
  366. <td style="font-size: 80%;">
  367. Enable to use the previous read value for consistency checks - also on reboots
  368. </td>
  369. </tr>
  370. <tr class="expert" id="ex11">
  371. <td style="padding-left: 40px;">
  372. <input type="checkbox" id="PostProcessing_PreValueAgeStartup_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "PreValueAgeStartup")' unchecked >
  373. <label for=PostProcessing_PreValueAgeStartup_enabled><class id="PostProcessing_PreValueAgeStartup_text" style="color:black;">PreValueAgeStartup</class></label>
  374. </td>
  375. <td>
  376. <input type="number" id="PostProcessing_PreValueAgeStartup_value1" size="13" min="0">
  377. </td>
  378. <td style="font-size: 80%;">
  379. Time (in minutes), how long a previous read value is valid after reboot (default = 720 min)
  380. </td>
  381. </tr>
  382. <tr>
  383. <td style="padding-left: 40px;">
  384. <input type="checkbox" id="PostProcessing_AllowNegativeRates_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "AllowNegativeRates")' unchecked >
  385. <label for=PostProcessing_AllowNegativeRates_enabled><class id="PostProcessing_AllowNegativeRates_text" style="color:black;">AllowNegativeRates</class></label>
  386. </td>
  387. <td>
  388. <select id="PostProcessing_AllowNegativeRates_value1">
  389. <option value="true" selected>true</option>
  390. <option value="false" >false</option>
  391. </select>
  392. </td>
  393. <td style="font-size: 80%;">
  394. Set on "false" to ensure, that only positive changes are accepted (typically for counter)
  395. </td>
  396. </tr>
  397. <tr class="expert" id="ex12">
  398. <td style="padding-left: 40px;">
  399. <input type="checkbox" id="PostProcessing_ErrorMessage_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "ErrorMessage")' unchecked >
  400. <label for=PostProcessing_ErrorMessage_enabled><class id="PostProcessing_ErrorMessage_text" style="color:black;">ErrorMessage</class></label>
  401. </td>
  402. <td>
  403. <select id="PostProcessing_ErrorMessage_value1">
  404. <option value="true" selected>true</option>
  405. <option value="false" >false</option>
  406. </select>
  407. </td>
  408. <td style="font-size: 80%;">
  409. Do not show error message in return value - in error case, the last valid number will be send out
  410. </td>
  411. </tr>
  412. <tr class="expert" id="ex1dddd">
  413. <td style="padding-left: 40px;">
  414. <input type="checkbox" id="PostProcessing_CheckDigitIncreaseConsistency_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "CheckDigitIncreaseConsistency")' unchecked >
  415. <label for=PostProcessing_CheckDigitIncreaseConsistency_enabled><class id="PostProcessing_CheckDigitIncreaseConsistency_text" style="color:black;">CheckDigitIncreaseConsistency</class></label>
  416. </td>
  417. <td>
  418. <select id="PostProcessing_CheckDigitIncreaseConsistency_value1">
  419. <option value="true" selected>true</option>
  420. <option value="false" >false</option>
  421. </select>
  422. </td>
  423. <td style="font-size: 80%;">
  424. Enable additional consistency check - especially zero crossing check between digits
  425. </td>
  426. </tr>
  427. <tr>
  428. <td style="padding-left: 40px;" colspan="3">
  429. <br>
  430. <b>Postprocessing Individual Parameters:
  431. <select id="Numbers_value1" onchange="numberChanged()">
  432. <option value="0" selected>default</option>
  433. <option value="1" >NT</option>
  434. <option value="2" >HT</option>
  435. </select></b>
  436. </td>
  437. </tr>
  438. <tr>
  439. <td style="padding-left: 40px;">
  440. <input type="checkbox" id="PostProcessing_DecimalShift_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "DecimalShift")' unchecked >
  441. <label for=PostProcessing_DecimalShift_enabled><class id="PostProcessing_DecimalShift_text" style="color:black;">DecimalShift</class></label>
  442. </td>
  443. <td>
  444. <input type="number" id="PostProcessing_DecimalShift_value1" step="1">
  445. </td>
  446. <td style="font-size: 80%;">
  447. Shift the digit separator within the digital digits (positiv and negativ)
  448. </td>
  449. </tr>
  450. <tr>
  451. <td style="padding-left: 40px;">
  452. <input type="checkbox" id="PostProcessing_MaxRateValue_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateValue")' unchecked >
  453. <label for=PostProcessing_MaxRateValue_enabled><class id="PostProcessing_MaxRateValue_text" style="color:black;">MaxRateValue</class></label>
  454. </td>
  455. <td>
  456. <input type="number" id="PostProcessing_MaxRateValue_value1" size="13" min="0" step="any">
  457. </td>
  458. <td style="font-size: 80%;">
  459. Maximum change of a reading - if threated as absolute or relative change see next parameter.
  460. </td>
  461. </tr>
  462. <tr>
  463. <td style="padding-left: 40px;">
  464. <input type="checkbox" id="PostProcessing_MaxRateType_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateType")' unchecked >
  465. <label for=PostProcessing_MaxRateType_enabled><class id="PostProcessing_MaxRateType_text" style="color:black;">MaxRateType</class></label>
  466. </td>
  467. <td>
  468. <select id="PostProcessing_MaxRateType_value1">
  469. <option value="AbsoluteChange" >AbsoluteChange</option>
  470. <option value="RateChange" selected>RateChange</option>
  471. </select>
  472. </td>
  473. <td style="font-size: 80%;">
  474. Defines if the change rate compared to the previous value is calculated as absolute change (AbsoluteChange) or as rate normalized to the intervall (RateChange = change/minute).
  475. </td>
  476. </tr>
  477. <tr>
  478. <td style="padding-left: 40px;">
  479. <input type="checkbox" id="PostProcessing_ExtendedResolution_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "ExtendedResolution")' unchecked >
  480. <label for=PostProcessing_ExtendedResolution_enabled><class id="PostProcessing_ExtendedResolution_text" style="color:black;">ExtendedResolution</class></label>
  481. </td>
  482. <td>
  483. <select id="PostProcessing_ExtendedResolution_value1">
  484. <option value="true" >true</option>
  485. <option value="false" selected>false</option>
  486. </select>
  487. </td>
  488. <td style="font-size: 80%;">
  489. Enable to use the after point resolution for the last analog counter
  490. </td>
  491. </tr>
  492. <tr>
  493. <td id="ex121" style="padding-left: 40px;">
  494. <input type="checkbox" id="PostProcessing_IgnoreLeadingNaN_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "IgnoreLeadingNaN")' unchecked >
  495. <label for=PostProcessing_IgnoreLeadingNaN_enabled><class id="PostProcessing_IgnoreLeadingNaN_text" style="color:black;">IgnoreLeadingNaN</class></label>
  496. </td>
  497. <td>
  498. <select id="PostProcessing_IgnoreLeadingNaN_value1">
  499. <option value="true" >true</option>
  500. <option value="false" selected>false</option>
  501. </select>
  502. </td>
  503. <td style="font-size: 80%;">
  504. Leading "N"'s will be deleted before further processing
  505. </td>
  506. </tr>
  507. <tr>
  508. <td colspan="3" style="padding-left: 20px;">
  509. <h4>
  510. <input type="checkbox" id="Category_MQTT_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  511. <label for=Category_MQTT_enabled>MQTT</label>
  512. </h4>
  513. </td>
  514. </tr>
  515. <tr>
  516. <td style="padding-left: 40px;">
  517. <input type="checkbox" id="MQTT_Uri_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Uri")' unchecked >
  518. <label for=MQTT_Uri_enabled><class id="MQTT_Uri_text" style="color:black;">Uri</class></label>
  519. </td>
  520. <td>
  521. <input type="text" id="MQTT_Uri_value1">
  522. </td>
  523. <td style="font-size: 80%;">
  524. URI to the MQTT broker including port e.g.: mqtt://IP-Address:Port
  525. </td>
  526. </tr>
  527. <tr>
  528. <td style="padding-left: 40px;">
  529. <input type="checkbox" id="MQTT_MainTopic_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MainTopic")' unchecked >
  530. <label for=MQTT_MainTopic_enabled><class id="MQTT_MainTopic_text" style="color:black;">MainTopic</class></label>
  531. </td>
  532. <td>
  533. <input type="text" id="MQTT_MainTopic_value1">
  534. </td>
  535. <td style="font-size: 80%;">
  536. MQTT main topic, under which the counters are published. <br>
  537. The single value will be published with the following key: MAINTOPIC/VALUE_NAME/PARAMETER where
  538. <ul>
  539. <li> VALUE_NAME is the name of the value (a meter might have more than one value) as defined during analog and digital ROI configuration (defaults to "main")</li>
  540. <li> and PARAMETERS are: value, rate, timestamp, error</li>
  541. </ul>
  542. The general connection status can be found in MAINTOPIC/CONNECTION
  543. </td>
  544. </tr>
  545. <tr>
  546. <td style="padding-left: 40px;">
  547. <input type="checkbox" id="MQTT_ClientID_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientID")' unchecked >
  548. <label for=MQTT_ClientID_enabled><class id="MQTT_ClientID_text" style="color:black;">ClientID</class></label>
  549. </td>
  550. <td>
  551. <input type="text" id="MQTT_ClientID_value1">
  552. </td>
  553. <td style="font-size: 80%;">
  554. ClientID to connect to the MQTT broker
  555. </td>
  556. </tr>
  557. <tr>
  558. <td style="padding-left: 40px;">
  559. <input type="checkbox" id="MQTT_user_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "user")' unchecked >
  560. <label for=MQTT_user_enabled><class id="MQTT_user_text" style="color:black;">user</class></label>
  561. </td>
  562. <td>
  563. <input type="text" id="MQTT_user_value1">
  564. </td>
  565. <td style="font-size: 80%;">
  566. User for MQTT authentication
  567. </td>
  568. </tr>
  569. <tr>
  570. <td style="padding-left: 40px;">
  571. <input type="checkbox" id="MQTT_password_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "password")' unchecked >
  572. <label for=MQTT_password_enabled><class id="MQTT_password_text" style="color:black;">password</class></label>
  573. </td>
  574. <td>
  575. <input type="text" id="MQTT_password_value1">
  576. </td>
  577. <td style="font-size: 80%;">
  578. Password for MQTT authentication
  579. </td>
  580. </tr>
  581. <tr>
  582. <td style="padding-left: 40px;">
  583. <input type="checkbox" id="MQTT_SetRetainFlag_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "SetRetainFlag")' unchecked >
  584. <label for=MQTT_SetRetainFlag_enabled><class id="MQTT_SetRetainFlag_text" style="color:black;">Enable MQTT Retain Flag</class></label>
  585. </td>
  586. <td>
  587. <select id="MQTT_SetRetainFlag_value1">
  588. <option value="true" selected>true</option>
  589. <option value="false" >false</option>
  590. </select>
  591. </td>
  592. <td style="font-size: 80%;">
  593. Enable or disable the retain flag for all MQTT entries
  594. </td>
  595. </tr>
  596. <tr>
  597. <td colspan="3" style="padding-left: 20px;">
  598. <h4>
  599. <input type="checkbox" id="Category_InfluxDB_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  600. <label for=Category_InfluxDB_enabled>InfluxDB</label>
  601. </h4>
  602. </td>
  603. </tr>
  604. <tr>
  605. <td style="padding-left: 40px;">
  606. <input type="checkbox" id="InfluxDB_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Uri")' unchecked >
  607. <label for=InfluxDB_Uri_enabled><class id="InfluxDB_Uri_text" style="color:black;">Uri</class></label>
  608. </td>
  609. <td>
  610. <input type="text" id="InfluxDB_Uri_value1">
  611. </td>
  612. <td style="font-size: 80%;">
  613. URI of the HTTP interface to InfluxDB, without traililing slash, e.g. http://IP-Address:Port
  614. </td>
  615. </tr>
  616. <tr>
  617. <td style="padding-left: 40px;">
  618. <input type="checkbox" id="InfluxDB_Database_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Database")' unchecked >
  619. <label for=InfluxDB_Database_enabled><class id="InfluxDB_Database_text" style="color:black;">Database</class></label>
  620. </td>
  621. <td>
  622. <input type="text" id="InfluxDB_Database_value1">
  623. </td>
  624. <td style="font-size: 80%;">
  625. Database name in which to publish the read value.
  626. </td>
  627. </tr>
  628. <tr>
  629. <td style="padding-left: 40px;">
  630. <input type="checkbox" id="InfluxDB_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Measurement")' unchecked >
  631. <label for=InfluxDB_Measurement_enabled><class id="InfluxDB_Measurement_text" style="color:black;">Measurement</class></label>
  632. </td>
  633. <td>
  634. <input type="text" id="InfluxDB_Measurement_value1">
  635. </td>
  636. <td style="font-size: 80%;">
  637. Measurement name to use to publish the read value.
  638. </td>
  639. </tr>
  640. <tr>
  641. <td style="padding-left: 40px;">
  642. <input type="checkbox" id="InfluxDB_user_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "user")' unchecked >
  643. <label for=InfluxDB_user_enabled><class id="InfluxDB_user_text" style="color:black;">user</class></label>
  644. </td>
  645. <td>
  646. <input type="text" id="InfluxDB_user_value1">
  647. </td>
  648. <td style="font-size: 80%;">
  649. User for InfluxDB authentication
  650. </td>
  651. </tr>
  652. <tr>
  653. <td style="padding-left: 40px;">
  654. <input type="checkbox" id="InfluxDB_password_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "password")' unchecked >
  655. <label for=InfluxDB_password_enabled><class id="InfluxDB_password_text" style="color:black;">password</class></label>
  656. </td>
  657. <td>
  658. <input type="text" id="InfluxDB_password_value1">
  659. </td>
  660. <td style="font-size: 80%;">
  661. Password for InfluxDB authentication
  662. </td>
  663. </tr>
  664. <tr>
  665. <td colspan="3" style="padding-left: 20px;"><h4>AutoTimer</h4></td>
  666. </tr>
  667. <tr class="expert" id="ex13">
  668. <td style="padding-left: 40px;">
  669. <class id="AutoTimer_AutoStart_text" style="color:black;">AutoStart</class>
  670. </td>
  671. <td>
  672. <select id="AutoTimer_AutoStart_value1">
  673. <option value="true" selected>true</option>
  674. <option value="false" >false</option>
  675. </select>
  676. </td>
  677. <td style="font-size: 80%;">
  678. Start the image recognition immediatly after power up. false is basically for debugging.
  679. </td>
  680. </tr>
  681. <tr>
  682. <td style="padding-left: 40px;">
  683. <class id="AutoTimer_Intervall_text" style="color:black;">Intervall</class>
  684. </td>
  685. <td>
  686. <input type="number" id="AutoTimer_Intervall_value1" size="13" min="3" step="any">
  687. </td>
  688. <td style="font-size: 80%;">
  689. Intervall in which the counter is read (in minutes). Number must be greater than 3 minutes.
  690. </td>
  691. </tr>
  692. <tr>
  693. <td colspan="3" style="padding-left: 20px;">
  694. <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='UpdateAfterCategoryCheck()' unchecked >
  695. <label for=Category_GPIO_enabled>GPIO Settings
  696. <span class="GPIO_Item" > - Enabling GPIO handler, disable by default integrated flash light. Please enable it with GPIO4 (internal flash LED) settings or GPIO12 (external LED).</span></label>
  697. </h4>
  698. </td>
  699. </tr>
  700. <!------------- GPIO0 begin ------------------>
  701. <tr class="expert" class="GPIO_IO0 GPIO_item">
  702. <td style="padding-left: 40px;">
  703. <input type="checkbox" id="GPIO_IO0_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO0")' unchecked>
  704. <label for=GPIO_IO0_enabled><span id="GPIO_IO0_text">GPIO 0 state</span></label>
  705. </td>
  706. <td>
  707. <select id="GPIO_IO0_value1">
  708. <option value="input">input</option>
  709. <option value="input-pullup">input pullup</option>
  710. <option value="input-pulldown">input pulldown</option>
  711. <option value="output">output</option>
  712. </select>
  713. </td>
  714. <td class="description">
  715. GPIO 0 Usable with restrictions.<br>
  716. <b>Must be disabled when camera is used.</b><br>
  717. <b>Pin is used to activate flash mode and must therefore be HIGH when booting.</b>
  718. </td>
  719. </tr>
  720. <tr class="expert" class="GPIO_IO0 GPIO_item">
  721. <td style="padding-left: 68px;">
  722. <span id="GPIO_IO0_text" class="GPIO_IO0 GPIO_item">GPIO 0 use interrupt</span>
  723. </td>
  724. <td>
  725. <select id="GPIO_IO0_value2">
  726. <option value="disabled">disabled</option>
  727. <option value="rising-edge">rising edge</option>
  728. <option value="falling-edge">falling edge</option>
  729. <option value="rising-and-falling">rising and falling</option>
  730. <option value="low-level-trigger">low level trigger</option>
  731. <option value="high-level-trigger">high level trigger</option>
  732. </select>
  733. </td>
  734. <td class="description">
  735. GPIO 0 enable interrupt trigger
  736. </td>
  737. </tr>
  738. <tr class="expert" class="GPIO_IO0 GPIO_item">
  739. <td style="padding-left: 68px;">
  740. <span class="GPIO_IO0 GPIO_item">GPIO 0 PWM duty resolution</span>
  741. </td>
  742. <td><input type="number" id="GPIO_IO0_value3" min="1" max="20"></td>
  743. <td class="description">
  744. GPIO 0 LEDC PWM duty resolution in bit
  745. </td>
  746. </tr>
  747. <tr class="expert" class="GPIO_IO0 GPIO_item">
  748. <td style="padding-left: 68px;">
  749. <span class="GPIO_IO0 GPIO_item">GPIO 0 enable MQTT</span>
  750. </td>
  751. <td><input type="checkbox" id="GPIO_IO0_value4"></td>
  752. <td class="description">
  753. GPIO 0 enable MQTT publishing/subscribing
  754. </td>
  755. </tr>
  756. <tr class="expert" class="GPIO_IO0 GPIO_item">
  757. <td style="padding-left: 68px;">
  758. <span class="GPIO_IO0 GPIO_item">GPIO 0 enable HTTP</span>
  759. </td>
  760. <td><input type="checkbox" id="GPIO_IO0_value5"></td>
  761. <td class="description">
  762. GPIO 0 enable HTTP write/read
  763. </td>
  764. </tr>
  765. <tr class="expert" class="GPIO_IO0 GPIO_item">
  766. <td style="padding-left: 68px;">
  767. <span class="GPIO_IO0 GPIO_item">GPIO 0 name</span>
  768. </td>
  769. <td><input type="text" id="GPIO_IO0_value6"></td>
  770. <td class="description">
  771. GPIO 0 MQTT topic name (empty = GPIO0). Allowed characters (a-z, A-Z, 0-9, _, -)
  772. </td>
  773. </tr>
  774. <!------------- GPIO0 end ------------------>
  775. <!------------- GPIO1 begin ------------------>
  776. <tr class="expert" class="GPIO_IO1 GPIO_item">
  777. <td style="padding-left: 40px;">
  778. <input type="checkbox" id="GPIO_IO1_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO1")' unchecked>
  779. <label=GPIO_IO1_enabled><span id="GPIO_IO1_text" class="GPIO_IO1 GPIO_item">GPIO 1 state</span>
  780. </td>
  781. <td>
  782. <select id="GPIO_IO1_value1">
  783. <option value="input">input</option>
  784. <option value="input-pullup">input pullup</option>
  785. <option value="input-pulldown">input pulldown</option>
  786. <option value="output">output</option>
  787. </select>
  788. </td>
  789. <td class="description">
  790. GPIO 1 <br><span style="color: blue">Used by default for serial communication as TX pin.<br>Required for seriales monitor.</span>
  791. </td>
  792. </tr>
  793. <tr class="expert" class="GPIO_IO1 GPIO_item">
  794. <td style="padding-left: 68px;">
  795. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO 1 use interrupt</span>
  796. </td>
  797. <td>
  798. <select id="GPIO_IO1_value2">
  799. <option value="disabled">disabled</option>
  800. <option value="rising-edge" disabled>rising edge</option>
  801. <option value="falling-edge" disabled>falling edge</option>
  802. <option value="rising-and-falling">rising and falling</option>
  803. <option value="low-level-trigger">low level trigger</option>
  804. <option value="high-level-trigger">high level trigger</option>
  805. </select>
  806. </td>
  807. <td class="description">
  808. GPIO 1 enable interrupt trigger
  809. </td>
  810. </tr>
  811. <tr class="expert" class="GPIO_IO1 GPIO_item">
  812. <td style="padding-left: 68px;">
  813. <span class="GPIO_IO1 GPIO_item">GPIO 1 PWM duty resolution</span>
  814. </td>
  815. <td><input type="number" id="GPIO_IO1_value3" min="1" max="20"></td>
  816. <td class="description">
  817. GPIO 1 LEDC PWM duty resolution in bit
  818. </td>
  819. </tr>
  820. <tr class="expert" class="GPIO_IO1 GPIO_item">
  821. <td style="padding-left: 68px;">
  822. <span class="GPIO_IO1 GPIO_item">GPIO 1 enable MQTT</span>
  823. </td>
  824. <td><input type="checkbox" id="GPIO_IO1_value4"></td>
  825. <td class="description">
  826. GPIO 1 enable MQTT publishing/subscribing
  827. </td>
  828. </tr>
  829. <tr class="expert" class="GPIO_IO1 GPIO_item">
  830. <td style="padding-left: 68px;">
  831. <span class="GPIO_IO1 GPIO_item">GPIO 1 enable HTTP</span>
  832. </td>
  833. <td><input type="checkbox" id="GPIO_IO1_value5"></td>
  834. <td class="description">
  835. GPIO 1 enable HTTP write/read
  836. </td>
  837. </tr>
  838. <tr class="expert" class="GPIO_IO1 GPIO_item">
  839. <td style="padding-left: 68px;">
  840. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO 1 name</span>
  841. </td>
  842. <td><input type="text" id="GPIO_IO1_value6"></td>
  843. <td class="description">
  844. GPIO 1 MQTT topic name (empty = GPIO1). Allowed characters (a-z, A-Z, 0-9, _, -)
  845. </td>
  846. </tr>
  847. <!------------- GPIO1 end ------------------>
  848. <!------------- GPIO3 begin ------------------>
  849. <tr class="expert" class="GPIO_IO3 GPIO_item">
  850. <td style="padding-left: 40px;">
  851. <input type="checkbox" id="GPIO_IO3_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO3")' unchecked>
  852. <label=GPIO_IO3_enabled><span id="GPIO_IO3_text" class="GPIO_IO3 GPIO_item">GPIO 3 state</span>
  853. </td>
  854. <td>
  855. <select id="GPIO_IO3_value1">
  856. <option value="input">input</option>
  857. <option value="input-pullup">input pullup</option>
  858. <option value="input-pulldown">input pulldown</option>
  859. <option value="output">output</option>
  860. </select>
  861. </td>
  862. <td class="description">
  863. GPIO 3 <span style="color: blue">Used by default for serial communication as RX pin.</span>
  864. </td>
  865. </tr>
  866. <tr class="expert" class="GPIO_IO3 GPIO_item">
  867. <td style="padding-left: 68px;">
  868. <span class="GPIO_IO3 GPIO_item">GPIO 3 use interrupt</span>
  869. </td>
  870. <td>
  871. <select id="GPIO_IO3_value2">
  872. <option value="disabled">disabled</option>
  873. <option value="rising-edge" disabled>rising edge</option>
  874. <option value="falling-edge" disabled>falling edge</option>
  875. <option value="rising-and-falling">rising and falling</option>
  876. <option value="low-level-trigger">low level trigger</option>
  877. <option value="high-level-trigger">high level trigger</option>
  878. </select>
  879. </td>
  880. <td class="description">
  881. GPIO 3 Used by default for serial communication as RX pin.
  882. </td>
  883. </tr>
  884. <tr class="expert" class="GPIO_IO3 GPIO_item">
  885. <td style="padding-left: 68px;">
  886. <span class="GPIO_IO3 GPIO_item">GPIO 3 PWM duty resolution</span>
  887. </td>
  888. <td><input type="number" id="GPIO_IO3_value3" min="1" max="20"></td>
  889. <td class="description">
  890. GPIO 3 LEDC PWM duty resolution in bit
  891. </td>
  892. </tr>
  893. <tr class="expert" class="GPIO_IO3 GPIO_item">
  894. <td style="padding-left: 68px;">
  895. <span class="GPIO_IO3 GPIO_item">GPIO 3 enable MQTT</span>
  896. </td>
  897. <td><input type="checkbox" id="GPIO_IO3_value4"></td>
  898. <td class="description">
  899. GPIO 3 enable MQTT publishing/subscribing
  900. </td>
  901. </tr>
  902. <tr class="expert" class="GPIO_IO3 GPIO_item">
  903. <td style="padding-left: 68px;">
  904. <span class="GPIO_IO3 GPIO_item">GPIO 3 enable HTTP</span>
  905. </td>
  906. <td><input type="checkbox" id="GPIO_IO3_value5"></td>
  907. <td class="description">
  908. GPIO 3 enable HTTP write/read
  909. </td>
  910. </tr>
  911. <tr class="expert" class="GPIO_IO3 GPIO_item">
  912. <td style="padding-left: 68px;">
  913. <span class="GPIO_IO3 GPIO_item">GPIO 3 name</span>
  914. </td>
  915. <td><input type="text" id="GPIO_IO3_value6"></td>
  916. <td class="description">
  917. GPIO 3 MQTT topic name (empty = GPIO3). Allowed characters (a-z, A-Z, 0-9, _, -)
  918. </td>
  919. </tr>
  920. <!------------- GPIO3 end ------------------>
  921. <!------------- GPIO4 begin ------------------>
  922. <tr class="GPIO_IO4 GPIO_item">
  923. <td style="padding-left: 40px;">
  924. <input type="checkbox" id="GPIO_IO4_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO4")' unchecked>
  925. <label for=GPIO_IO4_enabled><span id="GPIO_IO4_text" class="GPIO_IO4 GPIO_item">GPIO 4 state</span></label>
  926. </td>
  927. <td>
  928. <select id="GPIO_IO4_value1">
  929. <option value="input">input</option>
  930. <option value="input-pullup">input pullup</option>
  931. <option value="input-pulldown">input pulldown</option>
  932. <option value="output">output</option>
  933. <option value="built-in-led">built-in led flash light</option>
  934. </select>
  935. </td>
  936. <td class="description">
  937. GPIO 4 Usable with restrictions.<br>
  938. <b>Pin is used for build-in flash light.</b>
  939. </td>
  940. </tr>
  941. <tr class="expert" class="GPIO_IO4 GPIO_item">
  942. <td style="padding-left: 68px;">
  943. <span class="GPIO_IO4 GPIO_item">GPIO 4 use interrupt</span>
  944. </td>
  945. <td>
  946. <select id="GPIO_IO4_value2">
  947. <option value="disabled">disabled</option>
  948. <option value="rising-edge">rising edge</option>
  949. <option value="falling-edge">falling edge</option>
  950. <option value="rising-and-falling">rising and falling</option>
  951. <option value="low-level-trigger">low level trigger</option>
  952. <option value="high-level-trigger">high level trigger</option>
  953. </select>
  954. </td>
  955. <td class="description">
  956. GPIO 4 enable interrupt trigger
  957. </td>
  958. </tr>
  959. <tr class="expert" class="GPIO_IO4 GPIO_item">
  960. <td style="padding-left: 68px;">
  961. <span class="GPIO_IO4 GPIO_item">GPIO 4 PWM duty resolution</span>
  962. </td>
  963. <td><input type="number" id="GPIO_IO4_value3" min="1" max="20"></td>
  964. <td class="description">
  965. GPIO 4 LEDC PWM duty resolution in bit
  966. </td>
  967. </tr>
  968. <tr class="expert" class="GPIO_IO4 GPIO_item">
  969. <td style="padding-left: 68px;">
  970. <span class="GPIO_IO4 GPIO_item">GPIO 4 enable MQTT</span>
  971. </td>
  972. <td><input type="checkbox" id="GPIO_IO4_value4"></td>
  973. <td class="description">
  974. GPIO 4 enable MQTT publishing/subscribing
  975. </td>
  976. </tr>
  977. <tr class="expert" class="GPIO_IO4 GPIO_item">
  978. <td style="padding-left: 68px;">
  979. <span class="GPIO_IO4 GPIO_item">GPIO 4 enable HTTP</span>
  980. </td>
  981. <td><input type="checkbox" id="GPIO_IO4_value5"></td>
  982. <td class="description">
  983. GPIO 4 enable HTTP write/read
  984. </td>
  985. </tr>
  986. <tr class="expert" class="GPIO_IO4 GPIO_item">
  987. <td style="padding-left: 68px;">
  988. <span class="GPIO_IO4 GPIO_item">GPIO 4 name</span>
  989. </td>
  990. <td><input type="text" id="GPIO_IO4_value6"></td>
  991. <td class="description">
  992. GPIO 4 MQTT topic name (empty = GPIO4). Allowed characters (a-z, A-Z, 0-9, _, -)
  993. </td>
  994. </tr>
  995. <!------------- GPIO4 end ------------------>
  996. <!------------- GPIO12 begin ------------------>
  997. <tr class="GPIO_IO12 GPIO_item">
  998. <td style="padding-left: 40px;">
  999. <input type="checkbox" id="GPIO_IO12_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO12")' unchecked>
  1000. <label for=GPIO_IO12_enabled><span class="GPIO_IO12 GPIO_item" id="GPIO_IO12_text">GPIO 12 state</span></label>
  1001. </td>
  1002. <td>
  1003. <select id="GPIO_IO12_value1">
  1004. <option value="input">input</option>
  1005. <option value="input-pullup">input pullup</option>
  1006. <option value="input-pulldown">input pulldown</option>
  1007. <option value="output">output</option>
  1008. <option value="external-flash-ws281x">external flash light ws281x controlled</option>
  1009. </select>
  1010. </td>
  1011. <td class="description">
  1012. GPIO 12 is usable without restrictions
  1013. </td>
  1014. </tr>
  1015. <tr class="expert" class="GPIO_IO12 GPIO_item">
  1016. <td style="padding-left: 68px;">
  1017. <span class="GPIO_IO12 GPIO_item">GPIO 12 use interrupt</span>
  1018. </td>
  1019. <td>
  1020. <select class="GPIO_IO12 GPIO_item" id="GPIO_IO12_value2">
  1021. <option value="disabled">disabled</option>
  1022. <option value="rising-edge">rising edge</option>
  1023. <option value="falling-edge">falling edge</option>
  1024. <option value="rising-and-falling">rising and falling</option>
  1025. <option value="low-level-trigger">low level trigger</option>
  1026. <option value="high-level-trigger">high level trigger</option>
  1027. </select>
  1028. </td>
  1029. <td class="description">
  1030. GPIO 12 enable interrupt trigger
  1031. </td>
  1032. </tr>
  1033. <tr class="expert" class="GPIO_IO12 GPIO_item">
  1034. <td style="padding-left: 68px;">
  1035. <span class="GPIO_IO12 GPIO_item">GPIO 12 PWM duty resolution</span>
  1036. </td>
  1037. <td><input type="number" id="GPIO_IO12_value3" min="1" max="20"></td>
  1038. <td class="description">
  1039. GPIO 12 LEDC PWM duty resolution in bit
  1040. </td>
  1041. </tr>
  1042. <tr class="expert" class="GPIO_IO12 GPIO_item">
  1043. <td style="padding-left: 68px;">
  1044. <span class="GPIO_IO12 GPIO_item">GPIO 12 enable MQTT</span>
  1045. </td>
  1046. <td><input type="checkbox" id="GPIO_IO12_value4"></td>
  1047. <td class="description">
  1048. GPIO 12 enable MQTT publishing/subscribing
  1049. </td>
  1050. </tr>
  1051. <tr class="expert" class="GPIO_IO12 GPIO_item">
  1052. <td style="padding-left: 68px;">
  1053. <span class="GPIO_IO12 GPIO_item">GPIO 12 enable HTTP</span>
  1054. </td>
  1055. <td><input type="checkbox" id="GPIO_IO12_value5"></td>
  1056. <td class="description">
  1057. GPIO 12 enable HTTP write/read
  1058. </td>
  1059. </tr>
  1060. <tr class="expert" class="GPIO_IO12 GPIO_item">
  1061. <td style="padding-left: 68px;">
  1062. <span class="GPIO_IO12 GPIO_item">GPIO 12 name</span>
  1063. </td>
  1064. <td><input type="text" id="GPIO_IO12_value6"></td>
  1065. <td class="description">
  1066. GPIO 12 MQTT topic name (empty = GPIO12). Allowed characters (a-z, A-Z, 0-9, _, -)
  1067. </td>
  1068. </tr>
  1069. <tr class="GPIO_IO12 GPIO_item" id="wstypeex3">
  1070. <td width="20px" style="padding-left: 40px;">
  1071. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDType_text">LED-Type</span>
  1072. </td>
  1073. <td class="GPIO_IO12 GPIO_item">
  1074. <select class="GPIO_IO12 GPIO_item" id="GPIO_LEDType_value1">
  1075. <option value="WS2812" selected>WS2812</option>
  1076. <option value="WS2812B">WS2812B</option>
  1077. <option value="SK6812">SK6812 (not tested)</option>
  1078. <option value="WS2813">WS2813 (not tested)</option>
  1079. </select>
  1080. </td>
  1081. <td class="description">
  1082. Type of WS2812x, that is connected to GPIO12
  1083. </td>
  1084. </tr>
  1085. <tr class="GPIO_IO12 GPIO_item" id="LEDANZex8" >
  1086. <td style="padding-left: 40px;">
  1087. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDNumbers_text">Numbers of LEDs</span>
  1088. </td>
  1089. <td>
  1090. <input type="number" name="name" id="GPIO_LEDNumbers_value1" size="13" min="1">
  1091. </td>
  1092. <td style="font-size: 80%;">
  1093. Number of LEDs on the external LED-stripe
  1094. </td>
  1095. </tr>
  1096. <tr class="GPIO_IO12 GPIO_item" id="LEDRGBex9">
  1097. <td style="padding-left: 40px;">
  1098. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_text">LED Color</span>
  1099. </td>
  1100. <td class="GPIO_IO12 GPIO_item">
  1101. R <input class="smallSelect" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value1" size="12">
  1102. G <input class="smallSelect" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value2" size="12">
  1103. B <input class="smallSelect" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value3" size="12">
  1104. </td>
  1105. <td style="font-size: 80%;">
  1106. Color of LEDs in (R)ed, (G)reen (B)lue from 0...255
  1107. </td>
  1108. </tr>
  1109. <!------------- GPIO12 end ------------------>
  1110. <!------------- GPIO13 begin ------------------>
  1111. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1112. <td style="padding-left: 40px;">
  1113. <input type="checkbox" id="GPIO_IO13_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO13")' unchecked>
  1114. <label=GPIO_IO13_enabled><span id="GPIO_IO13_text">GPIO 13 state</span>
  1115. </td>
  1116. <td>
  1117. <select id="GPIO_IO13_value1">
  1118. <option value="input">input</option>
  1119. <option value="input-pullup">input pullup</option>
  1120. <option value="input-pulldown">input pulldown</option>
  1121. <option value="output">output</option>
  1122. </select>
  1123. </td>
  1124. <td class="description">
  1125. GPIO 13 is usable without restrictions
  1126. </td>
  1127. </tr>
  1128. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1129. <td style="padding-left: 68px;">
  1130. <span class="GPIO_IO13 GPIO_item">GPIO 13 use interrupt</span>
  1131. </td>
  1132. <td>
  1133. <select id="GPIO_IO13_value2">
  1134. <option value="disabled">disabled</option>
  1135. <option value="rising-edge" disabled>rising edge</option>
  1136. <option value="falling-edge" disabled>falling edge</option>
  1137. <option value="rising-and-falling">rising and falling</option>
  1138. <option value="low-level-trigger">low level trigger</option>
  1139. <option value="high-level-trigger">high level trigger</option>
  1140. </select>
  1141. </td>
  1142. <td class="description">
  1143. GPIO 13 enable interrupt trigger
  1144. </td>
  1145. </tr>
  1146. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1147. <td style="padding-left: 68px;">
  1148. <span class="GPIO_IO13 GPIO_item">GPIO 13 PWM duty resolution</span>
  1149. </td>
  1150. <td><input type="number" id="GPIO_IO13_value3" min="1" max="20"></td>
  1151. <td class="description">
  1152. GPIO 13 LEDC PWM duty resolution in bit
  1153. </td>
  1154. </tr>
  1155. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1156. <td style="padding-left: 68px;">
  1157. <span class="GPIO_IO13 GPIO_item">GPIO 13 enable MQTT</span>
  1158. </td>
  1159. <td><input type="checkbox" id="GPIO_IO13_value4"></td>
  1160. <td class="description">
  1161. GPIO 13 enable MQTT publishing/subscribing
  1162. </td>
  1163. </tr>
  1164. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1165. <td style="padding-left: 68px;">
  1166. <span class="GPIO_IO13 GPIO_item">GPIO 13 enable HTTP</span>
  1167. </td>
  1168. <td><input type="checkbox" id="GPIO_IO13_value5"></td>
  1169. <td class="description">
  1170. GPIO 13 enable HTTP write/read
  1171. </td>
  1172. </tr>
  1173. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1174. <td style="padding-left: 68px;">
  1175. <span class="GPIO_IO13 GPIO_item">GPIO 13 name</span>
  1176. </td>
  1177. <td><input type="text" id="GPIO_IO13_value6"></td>
  1178. <td class="description">
  1179. GPIO 13 MQTT topic name (empty = GPIO13). Allowed characters (a-z, A-Z, 0-9, _, -)
  1180. </td>
  1181. </tr>
  1182. <!------------- GPIO13 end ------------------>
  1183. <tr>
  1184. <td colspan="3" style="padding-left: 20px;"><h4>Debug</h4></td>
  1185. </tr>
  1186. <tr>
  1187. <td style="padding-left: 40px;">
  1188. <input type="checkbox" id="Debug_Logfile_enabled" value="1" onclick = 'InvertEnableItem("Debug", "Logfile")' unchecked >
  1189. <label for=Debug_Logfile_enabled><class id="Debug_Logfile_text" style="color:black;">Logfile</class></label>
  1190. </td>
  1191. <td>
  1192. <select id="Debug_Logfile_value1">
  1193. <option value="true" selected>true</option>
  1194. <option value="false" >false</option>
  1195. </select>
  1196. </td>
  1197. <td class="description">
  1198. Turn on/off the extended logging
  1199. </td>
  1200. </tr>
  1201. <tr>
  1202. <td style="padding-left: 40px;">
  1203. <input type="checkbox" id="Debug_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("Debug", "LogfileRetentionInDays")' unchecked >
  1204. <label for=Debug_LogfileRetentionInDays_enabled><class id="Debug_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class></label>
  1205. </td>
  1206. <td>
  1207. <input type="number" id="Debug_LogfileRetentionInDays_value1" size="13" min="0" step="1">
  1208. </td>
  1209. <td class="description">
  1210. Time to keep the log files (in days - "0" = forever)
  1211. </td>
  1212. </tr>
  1213. <tr>
  1214. <td colspan="3" style="padding-left: 20px;"><h4>System</h4></td>
  1215. </tr>
  1216. <tr>
  1217. <td style="padding-left: 40px;">
  1218. <input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeZone")' unchecked >
  1219. <label for=System_TimeZone_enabled><class id="System_TimeZone_text" style="color:black;">TimeZone</class></label>
  1220. </td>
  1221. <td>
  1222. <input type="text" id="System_TimeZone_value1">
  1223. </td>
  1224. <td class="description">
  1225. Time zone in POSIX syntax (Europe/Berlin = "CET-1CEST,M3.5.0,M10.5.0/3" - incl. daylight saving)
  1226. </td>
  1227. </tr>
  1228. <tr class="expert" id="ex16">
  1229. <td style="padding-left: 40px;">
  1230. <input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeServer")' unchecked >
  1231. <label for=System_TimeServer_enabled><class id="System_TimeServer_text" style="color:black;">TimeServer</class></label>
  1232. </td>
  1233. <td>
  1234. <input type="text" id="System_TimeServer_value1">
  1235. </td>
  1236. <td class="description">
  1237. Time server to synchronize system time (default: "pool.ntp.org" - used if nothing is specified)
  1238. </td>
  1239. </tr>
  1240. <tr class="expert" id="System_Hostname">
  1241. <td style="padding-left: 40px;">
  1242. <input type="checkbox" id="System_Hostname_enabled" value="1" onclick = 'InvertEnableItem("System", "Hostname")' unchecked >
  1243. <label for=System_Hostname_enabled><class id="System_Hostname_text" style="color:black;">Hostname</class></label>
  1244. </td>
  1245. <td>
  1246. <input type="text" id="System_Hostname_value1">
  1247. <td class="description">
  1248. Hostname for server - will be transfered to wlan.ini at next startup)
  1249. </td>
  1250. </tr>
  1251. </table>
  1252. <p>
  1253. <button class="button" onclick="saveTextAsFile()">Update Config.ini</button>
  1254. </p>
  1255. <p>
  1256. </p>
  1257. <div id="doreboot">
  1258. <p>
  1259. <button class="button" id="Edit_Config_Direct" onclick="editConfigDirect()" style="display:none">Edit Config.ini direct</button>
  1260. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
  1261. </p>
  1262. </div>
  1263. </div>
  1264. <script type="text/javascript" src="./gethost.js"></script>
  1265. <script type="text/javascript" src="./readconfigcommon.js"></script>
  1266. <script type="text/javascript" src="./readconfigparam.js"></script>
  1267. <script type="text/javascript">
  1268. var canvas = document.getElementById('canvas'),
  1269. basepath = "http://192.168.178.22";
  1270. param;
  1271. category;
  1272. NUNBERSAkt = -1;
  1273. NUMBERS;
  1274. function LoadConfigNeu() {
  1275. var isInitialSetup = getParameterByName('InitialSetup');
  1276. if (isInitialSetup === 'true')
  1277. {
  1278. document.getElementById("reboot").style.display = "none";
  1279. }
  1280. basepath = getbasepath();
  1281. if (!loadConfig(basepath)) {
  1282. alert("Config.ini could not be loaded!\nPlease reload the page.");
  1283. return;
  1284. }
  1285. ParseConfig();
  1286. param = getConfigParameters();
  1287. category = getConfigCategory();
  1288. InitIndivParameter();
  1289. UpdateInput();
  1290. UpdateInputIndividual();
  1291. UpdateExpertModus();
  1292. document.getElementById("divall").style.display = '';
  1293. }
  1294. function InitIndivParameter()
  1295. {
  1296. NUMBERS = getNUMBERInfo();
  1297. var _index = document.getElementById("Numbers_value1");
  1298. while (_index.length)
  1299. _index.remove(0);
  1300. for (var i = 0; i < NUMBERS.length; ++i){
  1301. var option = document.createElement("option");
  1302. option.text = NUMBERS[i]["name"];
  1303. option.value = i;
  1304. _index.add(option);
  1305. }
  1306. _index.selectedIndex = 0;
  1307. }
  1308. function getParameterByName(name, url = window.location.href) {
  1309. name = name.replace(/[\[\]]/g, '\\$&');
  1310. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  1311. results = regex.exec(url);
  1312. if (!results) return null;
  1313. if (!results[2]) return '';
  1314. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  1315. }
  1316. function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1){
  1317. let anzpara = _param[_cat][_name].anzParam;
  1318. if (_number > -1) {
  1319. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1320. return;
  1321. if (_optional) {
  1322. document.getElementById(_cat+"_"+_name+"_enabled").checked = NUMBERS[_number][_cat][_name]["enabled"];
  1323. for (var j = 1; j <= anzpara; ++j) {
  1324. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !NUMBERS[_number][_cat][_name]["enabled"];
  1325. }
  1326. }
  1327. document.getElementById(_cat+"_"+_name+"_text").style="color:black;"
  1328. setEnabled(_cat+"_"+_name, true);
  1329. for (var j = 1; j <= anzpara; ++j) {
  1330. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1331. if (element.tagName.toLowerCase() == "select") {
  1332. var textToFind = NUMBERS[_number][_cat][_name]["value"+j];
  1333. if (textToFind == undefined)
  1334. continue;
  1335. _isFound = false;
  1336. element.selectedIndex = -1;
  1337. for (var i = 0; i < element.options.length; i++) {
  1338. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1339. element.selectedIndex = i;
  1340. _isFound = true;
  1341. break;
  1342. }
  1343. }
  1344. if (!_isFound)
  1345. {
  1346. _zw_txt = "In the selectd field the value '" + textToFind + "' in the parameter '";
  1347. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid.\nPLEASE CHECK BEFORE SAVING!";
  1348. alert(_zw_txt);
  1349. }
  1350. }
  1351. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1352. element.checked = NUMBERS[_number][_cat][_name]["value"+j] == "true";
  1353. }
  1354. else {
  1355. element.value = NUMBERS[_number][_cat][_name]["value"+j];
  1356. }
  1357. }
  1358. }
  1359. else {
  1360. if (_optional) {
  1361. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  1362. for (var j = 1; j <= anzpara; ++j) {
  1363. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  1364. }
  1365. }
  1366. document.getElementById(_cat+"_"+_name+"_text").style="color:black;"
  1367. setEnabled(_cat+"_"+_name, true);
  1368. for (var j = 1; j <= anzpara; ++j) {
  1369. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1370. if (element.tagName.toLowerCase() == "select") {
  1371. var textToFind = _param[_cat][_name]["value"+j];
  1372. if (textToFind == undefined)
  1373. continue;
  1374. _isFound = false;
  1375. element.selectedIndex = -1;
  1376. for (var i = 0; i < element.options.length; i++) {
  1377. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1378. element.selectedIndex = i;
  1379. _isFound = true;
  1380. break;
  1381. }
  1382. }
  1383. if (!_isFound)
  1384. {
  1385. _zw_txt = "In the selectd field the value '" + textToFind + "' in the section '";
  1386. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid.\nPLEASE CHECK BEFORE SAVING!";
  1387. alert(_zw_txt);
  1388. }
  1389. }
  1390. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1391. element.checked = _param[_cat][_name]["value"+j] == "true";
  1392. }
  1393. else {
  1394. element.value = _param[_cat][_name]["value"+j];
  1395. }
  1396. }
  1397. }
  1398. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  1399. if (_category[_cat]["enabled"] == false)
  1400. {
  1401. if (_optional) {
  1402. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  1403. for (var j = 1; j <= anzpara; ++j) {
  1404. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  1405. }
  1406. }
  1407. document.getElementById(_cat+"_"+_name+"_text").style="color: gray;"
  1408. setEnabled(_cat+"_"+_name, false);
  1409. }
  1410. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional, _number);
  1411. }
  1412. function InvertEnableItem(_cat, _param)
  1413. {
  1414. _zw = _cat + "_" + _param + "_enabled";
  1415. _isOn = document.getElementById(_zw).checked;
  1416. _color = "color:lightgrey;";
  1417. if (_isOn) {
  1418. _color = "color:black;";
  1419. }
  1420. _zw = _cat + "_" + _param + "_text";
  1421. document.getElementById(_zw).disabled = !_isOn;
  1422. document.getElementById(_zw).style = _color;
  1423. setEnabled(_cat + "_" + _param, _isOn);
  1424. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  1425. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  1426. document.getElementById(_cat+"_"+_param+"_value"+j).style=_color;
  1427. }
  1428. }
  1429. function setEnabled(className, enabled) {
  1430. _color = "color:lightgrey;";
  1431. if (enabled) {
  1432. _color = "color:black;";
  1433. }
  1434. let elements = document.getElementsByClassName(className);
  1435. for (i = 0; i < elements.length; i++) {
  1436. if (enabled) {
  1437. elements[i].classList.remove("disabled");
  1438. } else {
  1439. elements[i].classList.add("disabled");
  1440. }
  1441. let inputs = elements[i].getElementsByTagName("input");
  1442. for (j = 0; j < inputs.length; j++) {
  1443. if (inputs[j].id.endsWith("_enabled"))
  1444. continue;
  1445. inputs[j].style = _color
  1446. if (enabled) {
  1447. inputs[j].removeAttribute("disabled");
  1448. } else {
  1449. inputs[j].setAttribute("disabled", "disabled");
  1450. }
  1451. }
  1452. }
  1453. }
  1454. function setVisible(className, visible) {
  1455. let elements = document.getElementsByClassName(className);
  1456. for (i = 0; i < elements.length; i++) {
  1457. if (visible) {
  1458. elements[i].classList.remove("hidden");
  1459. } else {
  1460. elements[i].classList.add("hidden");
  1461. }
  1462. }
  1463. }
  1464. function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1)
  1465. {
  1466. _status = _category[_cat]["enabled"];
  1467. _color = "color:lightgrey;";
  1468. if (_status) {
  1469. _color = "color:black;";
  1470. }
  1471. if (_optional) {
  1472. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  1473. document.getElementById(_cat+"_"+_name+"_enabled").style=_color;
  1474. }
  1475. if (_number == -1){
  1476. if (!_param[_cat][_name]["enabled"]) {
  1477. _status = false;
  1478. _color = "color:lightgrey;";
  1479. }
  1480. }
  1481. else
  1482. if (!NUMBERS[_number][_cat][_name]["enabled"]) {
  1483. _status = false;
  1484. _color = "color:lightgrey;";
  1485. }
  1486. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  1487. document.getElementById(_cat+"_"+_name+"_text").style = _color;
  1488. setEnabled(_cat+"_"+_name, _status);
  1489. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1490. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  1491. document.getElementById(_cat+"_"+_name+"_value"+j).style=_color;
  1492. }
  1493. }
  1494. function ReadParameter(_param, _cat, _name, _optional, _number = -1){
  1495. if (_number > -1) {
  1496. if (_cat == "Digits")
  1497. _cat = "digit";
  1498. if (_cat == "Analog")
  1499. _cat = "analog";
  1500. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1501. return;
  1502. if (_optional) {
  1503. NUMBERS[_number][_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1504. }
  1505. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1506. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1507. if (element.tagName.toLowerCase() == "select") {
  1508. NUMBERS[_number][_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1509. }
  1510. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1511. NUMBERS[_number][_cat][_name]["value"+j] = element.checked;
  1512. }
  1513. else {
  1514. if ((NUMBERS[_number][_cat][_name].checkRegExList != null) && (NUMBERS[_number][_cat][_name].checkRegExList[j-1] != null)) {
  1515. if (!element.value.match(NUMBERS[_cat][_name].checkRegExList[j-1])) {
  1516. element.classList.add("invalid-input");
  1517. } else {
  1518. element.classList.remove("invalid-input");
  1519. }
  1520. }
  1521. NUMBERS[_number][_cat][_name]["value"+j] = element.value;
  1522. }
  1523. }
  1524. }
  1525. else
  1526. {
  1527. if (_optional) {
  1528. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1529. }
  1530. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1531. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1532. if (element.tagName.toLowerCase() == "select") {
  1533. _param[_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1534. }
  1535. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1536. _param[_cat][_name]["value"+j] = element.checked;
  1537. }
  1538. else {
  1539. if ((_param[_cat][_name].checkRegExList != null) && (_param[_cat][_name].checkRegExList[j-1] != null)) {
  1540. if (!element.value.match(_param[_cat][_name].checkRegExList[j-1])) {
  1541. element.classList.add("invalid-input");
  1542. } else {
  1543. element.classList.remove("invalid-input");
  1544. }
  1545. }
  1546. _param[_cat][_name]["value"+j] = element.value;
  1547. }
  1548. }
  1549. }
  1550. }
  1551. function UpdateInputIndividual()
  1552. {
  1553. if (NUNBERSAkt != -1)
  1554. {
  1555. ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt)
  1556. ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt)
  1557. ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt)
  1558. ReadParameter(param, "PostProcessing", "ExtendedResolution", true, NUNBERSAkt)
  1559. ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", true, NUNBERSAkt)
  1560. }
  1561. var sel = document.getElementById("Numbers_value1");
  1562. NUNBERSAkt = sel.selectedIndex;
  1563. WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1564. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1565. WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1566. WriteParameter(param, category, "PostProcessing", "ExtendedResolution", true, NUNBERSAkt);
  1567. WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", true, NUNBERSAkt);
  1568. }
  1569. function UpdateInput() {
  1570. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  1571. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  1572. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  1573. document.getElementById("Category_GPIO_enabled").checked = category["GPIO"]["enabled"];
  1574. document.getElementById("Category_InfluxDB_enabled").checked = category["InfluxDB"]["enabled"];
  1575. setVisible("GPIO_item", category["GPIO"]["enabled"]);
  1576. WriteParameter(param, category, "MakeImage", "LogImageLocation", true);
  1577. WriteParameter(param, category, "MakeImage", "LogfileRetentionInDays", true);
  1578. WriteParameter(param, category, "MakeImage", "WaitBeforeTakingPicture", false);
  1579. WriteParameter(param, category, "MakeImage", "ImageQuality", false);
  1580. WriteParameter(param, category, "MakeImage", "Brightness", false);
  1581. WriteParameter(param, category, "MakeImage", "Contrast", false);
  1582. WriteParameter(param, category, "MakeImage", "Saturation", false);
  1583. WriteParameter(param, category, "MakeImage", "LEDIntensity", false);
  1584. WriteParameter(param, category, "MakeImage", "ImageSize", false);
  1585. WriteParameter(param, category, "MakeImage", "FixedExposure", false);
  1586. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  1587. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  1588. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true);
  1589. WriteParameter(param, category, "Digits", "CNNGoodThreshold", true);
  1590. WriteParameter(param, category, "Digits", "LogImageLocation", true);
  1591. WriteParameter(param, category, "Digits", "LogfileRetentionInDays", true);
  1592. // WriteParameter(param, category, "Digits", "ModelInputSize", false);
  1593. WriteParameter(param, category, "Analog", "LogImageLocation", true);
  1594. WriteParameter(param, category, "Analog", "LogfileRetentionInDays", true);
  1595. // WriteParameter(param, category, "Analog", "ModelInputSize", false);
  1596. WriteParameter(param, category, "PostProcessing", "PreValueUse", true);
  1597. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  1598. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true);
  1599. WriteParameter(param, category, "PostProcessing", "ErrorMessage", true);
  1600. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", true);
  1601. WriteParameter(param, category, "MQTT", "Uri", true);
  1602. WriteParameter(param, category, "MQTT", "MainTopic", true);
  1603. WriteParameter(param, category, "MQTT", "ClientID", true);
  1604. WriteParameter(param, category, "MQTT", "user", true);
  1605. WriteParameter(param, category, "MQTT", "password", true);
  1606. WriteParameter(param, category, "MQTT", "SetRetainFlag", true);
  1607. WriteParameter(param, category, "InfluxDB", "Uri", true);
  1608. WriteParameter(param, category, "InfluxDB", "Database", true);
  1609. WriteParameter(param, category, "InfluxDB", "Measurement", true);
  1610. WriteParameter(param, category, "InfluxDB", "user", true);
  1611. WriteParameter(param, category, "InfluxDB", "password", true);
  1612. WriteParameter(param, category, "GPIO", "IO0", true);
  1613. WriteParameter(param, category, "GPIO", "IO1", true);
  1614. WriteParameter(param, category, "GPIO", "IO3", true);
  1615. WriteParameter(param, category, "GPIO", "IO4", true);
  1616. WriteParameter(param, category, "GPIO", "IO12", true);
  1617. WriteParameter(param, category, "GPIO", "IO13", true);
  1618. WriteParameter(param, category, "GPIO", "LEDType", false);
  1619. WriteParameter(param, category, "GPIO", "LEDNumbers", false);
  1620. WriteParameter(param, category, "GPIO", "LEDColor", false);
  1621. WriteParameter(param, category, "AutoTimer", "AutoStart", false);
  1622. WriteParameter(param, category, "AutoTimer", "Intervall", false);
  1623. WriteParameter(param, category, "Debug", "Logfile", true);
  1624. WriteParameter(param, category, "Debug", "LogfileRetentionInDays", true);
  1625. WriteParameter(param, category, "System", "TimeZone", true);
  1626. WriteParameter(param, category, "System", "Hostname", true);
  1627. WriteParameter(param, category, "System", "TimeServer", true);
  1628. WriteModelFiles();
  1629. }
  1630. function WriteModelFiles()
  1631. {
  1632. list_tflite = getTFLITEList();
  1633. var _indexDig = document.getElementById("Digits_Model_value1");
  1634. var _indexAna = document.getElementById("Analog_Model_value1");
  1635. while (_indexDig.length)
  1636. _indexDig.remove(0);
  1637. while (_indexAna.length)
  1638. _indexAna.remove(0);
  1639. for (var i = 0; i < list_tflite.length; ++i){
  1640. var optionDig = document.createElement("option");
  1641. var optionAna = document.createElement("option");
  1642. var text = list_tflite[i].replace("/config/", "");
  1643. if (list_tflite[i].includes("/dig-")) { // Its a digital file, only show in the digital list box
  1644. optionDig.text = text;
  1645. optionDig.value = list_tflite[i];
  1646. _indexDig.add(optionDig);
  1647. }
  1648. else if (list_tflite[i].includes("/ana-")) { // Its a digital file, only show in the analog list box
  1649. optionAna.text = text;
  1650. optionAna.value = list_tflite[i];
  1651. _indexAna.add(optionAna);
  1652. }
  1653. else { // all other files, show in both list boxes
  1654. optionDig.text = text;
  1655. optionDig.value = list_tflite[i];
  1656. _indexDig.add(optionDig);
  1657. optionAna.text = text;
  1658. optionAna.value = list_tflite[i];
  1659. _indexAna.add(optionAna);
  1660. }
  1661. }
  1662. WriteParameter(param, category, "Analog", "Model", false);
  1663. WriteParameter(param, category, "Digits", "Model", false);
  1664. }
  1665. function ReadParameterAll()
  1666. {
  1667. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  1668. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  1669. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  1670. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  1671. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  1672. ReadParameter(param, "MakeImage", "LogImageLocation", true);
  1673. ReadParameter(param, "MakeImage", "LogfileRetentionInDays", true);
  1674. ReadParameter(param, "MakeImage", "WaitBeforeTakingPicture", false);
  1675. ReadParameter(param, "MakeImage", "ImageQuality", false);
  1676. ReadParameter(param, "MakeImage", "Brightness", false);
  1677. ReadParameter(param, "MakeImage", "Contrast", false);
  1678. ReadParameter(param, "MakeImage", "Saturation", false);
  1679. ReadParameter(param, "MakeImage", "LEDIntensity", false);
  1680. ReadParameter(param, "MakeImage", "ImageSize", false);
  1681. ReadParameter(param, "MakeImage", "FixedExposure", false);
  1682. ReadParameter(param, "Alignment", "SearchFieldX", false);
  1683. ReadParameter(param, "Alignment", "SearchFieldY", false);
  1684. ReadParameter(param, "Alignment", "AlignmentAlgo", true);
  1685. ReadParameter(param, "Digits", "Model", false);
  1686. ReadParameter(param, "Digits", "CNNGoodThreshold", true);
  1687. ReadParameter(param, "Digits", "LogImageLocation", true);
  1688. ReadParameter(param, "Digits", "LogfileRetentionInDays", true);
  1689. // ReadParameter(param, "Digits", "ModelInputSize", false);
  1690. ReadParameter(param, "Analog", "Model", false);
  1691. ReadParameter(param, "Analog", "LogImageLocation", true);
  1692. ReadParameter(param, "Analog", "LogfileRetentionInDays", true);
  1693. // ReadParameter(param, "Analog", "ModelInputSize", false);
  1694. ReadParameter(param, "PostProcessing", "PreValueUse", true);
  1695. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  1696. ReadParameter(param, "PostProcessing", "AllowNegativeRates", true);
  1697. ReadParameter(param, "PostProcessing", "ErrorMessage", true);
  1698. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", true);
  1699. ReadParameter(param, "MQTT", "Uri", true);
  1700. ReadParameter(param, "MQTT", "MainTopic", true);
  1701. ReadParameter(param, "MQTT", "ClientID", true);
  1702. ReadParameter(param, "MQTT", "user", true);
  1703. ReadParameter(param, "MQTT", "password", true);
  1704. ReadParameter(param, "MQTT", "SetRetainFlag", true);
  1705. ReadParameter(param, "InfluxDB", "Uri", true);
  1706. ReadParameter(param, "InfluxDB", "Database", true);
  1707. ReadParameter(param, "InfluxDB", "Measurement", true);
  1708. ReadParameter(param, "InfluxDB", "user", true);
  1709. ReadParameter(param, "InfluxDB", "password", true);
  1710. ReadParameter(param, "GPIO", "IO0", true);
  1711. ReadParameter(param, "GPIO", "IO1", true);
  1712. ReadParameter(param, "GPIO", "IO3", true);
  1713. ReadParameter(param, "GPIO", "IO4", true);
  1714. ReadParameter(param, "GPIO", "IO12", true);
  1715. ReadParameter(param, "GPIO", "IO13", true);
  1716. ReadParameter(param, "GPIO", "LEDType", false);
  1717. ReadParameter(param, "GPIO", "LEDNumbers", false);
  1718. ReadParameter(param, "GPIO", "LEDColor", false);
  1719. // Folgende Zeilen sind für Abwärtskompatibität < v9.0.0 notwendig (manchmal parameter auskommentiert)
  1720. param["GPIO"]["LEDType"]["enabled"] = true;
  1721. param["GPIO"]["LEDNumbers"]["enabled"] = true;
  1722. param["GPIO"]["LEDColor"]["enabled"] = true;
  1723. param["GPIO"]["LEDType"]["found"] = true;
  1724. param["GPIO"]["LEDNumbers"]["found"] = true;
  1725. param["GPIO"]["LEDColor"]["found"] = true;
  1726. ReadParameter(param, "AutoTimer", "AutoStart", false);
  1727. ReadParameter(param, "AutoTimer", "Intervall", false);
  1728. ReadParameter(param, "Debug", "Logfile", true);
  1729. ReadParameter(param, "Debug", "LogfileRetentionInDays", true);
  1730. ReadParameter(param, "System", "TimeZone", true);
  1731. ReadParameter(param, "System", "Hostname", true);
  1732. ReadParameter(param, "System", "TimeServer", true);
  1733. UpdateInputIndividual();
  1734. // FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  1735. }
  1736. function FormatDecimalValue(_param, _cat, _name) {
  1737. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1738. var _val = _param[_cat][_name]["value"+j];
  1739. _val = _val.replace(",", ".");
  1740. _param[_cat][_name]["value"+j] = _val;
  1741. }
  1742. }
  1743. function UpdateAfterCategoryCheck() {
  1744. ReadParameterAll();
  1745. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  1746. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  1747. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  1748. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  1749. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  1750. UpdateInput();
  1751. UpdateInputIndividual();
  1752. }
  1753. function UpdateExpertModus()
  1754. {
  1755. // var _style = 'display:none;';
  1756. var _style_pur = 'none';
  1757. var _hidden = true;
  1758. if (document.getElementById("ExpertModus_enabled").checked) {
  1759. // _style = '';
  1760. _style_pur = '';
  1761. _hidden = false;
  1762. document.getElementById("Edit_Config_Direct").style.display = "";
  1763. }
  1764. else
  1765. {
  1766. document.getElementById("Edit_Config_Direct").style.display = "none";
  1767. }
  1768. const expert = document.querySelectorAll(".expert");
  1769. for (var i = 0; i < expert.length; i++) {
  1770. expert[i].style.display = _style_pur;
  1771. // document.getElementById(expert[i].id).style = _style;
  1772. }
  1773. // 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
  1774. Array.from(document.querySelector("#GPIO_IO4_value1").options).forEach(function(option_element) {
  1775. if (option_element.value != "built-in-led")
  1776. option_element.hidden = _hidden;
  1777. });
  1778. Array.from(document.querySelector("#GPIO_IO12_value1").options).forEach(function(option_element) {
  1779. if (option_element.value != "external-flash-ws281x")
  1780. option_element.hidden = _hidden;
  1781. });
  1782. }
  1783. function saveTextAsFile()
  1784. {
  1785. ReadParameterAll();
  1786. if (document.getElementsByClassName("invalid-input").length > 0) {
  1787. alert("Settings cannot be saved. Please check your entries.");
  1788. return;
  1789. }
  1790. if (confirm("Are you sure you want to update \"config.ini\"?")) {
  1791. ReadParameterAll();
  1792. WriteConfigININew();
  1793. SaveConfigToServer(basepath);
  1794. alert("Config.ini is updated!")
  1795. }
  1796. }
  1797. function doReboot() {
  1798. if (confirm("Are you sure you want to reboot the ESP32?")) {
  1799. var stringota = "/reboot";
  1800. window.location = stringota;
  1801. window.location.href = stringota;
  1802. window.location.assign(stringota);
  1803. window.location.replace(stringota);
  1804. }
  1805. }
  1806. function editConfigDirect() {
  1807. if (confirm("Did you save your changes?")) {
  1808. var stringota = "/edit_config.html";
  1809. window.location = stringota;
  1810. window.location.href = stringota;
  1811. window.location.assign(stringota);
  1812. window.location.replace(stringota);
  1813. }
  1814. }
  1815. function numberChanged()
  1816. {
  1817. UpdateInputIndividual();
  1818. }
  1819. LoadConfigNeu();
  1820. </script>
  1821. </body>
  1822. </html>