edit_config_param.html 62 KB

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