edit_config_param.html 60 KB

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