edit_config_param.html 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858
  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. <tr class="expert" id="ex10">
  346. <td width="20px" style="padding-left: 40px;"> </td>
  347. <td> <class id="Analog_ModelInputSize_text" style="color:black;">ModelInputSize</class> </td>
  348. <td>
  349. x: <input type="number" id="Analog_ModelInputSize_value1" class="smallSelect" min="1" step="1">
  350. y: <input type="number" id="Analog_ModelInputSize_value2" class="smallSelect" min="1" step="1">
  351. </td>
  352. <td style="font-size: 80%;"> Size of the input image for the CNN model </td>
  353. </tr>
  354. <tr>
  355. <td colspan="4" style="padding-left: 20px;"><h4>PostProcessing</h4></td>
  356. </tr>
  357. <tr>
  358. <td width="20px" style="padding-left: 40px;">
  359. <input type="checkbox" id="PostProcessing_PreValueUse_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "PreValueUse")' unchecked >
  360. </td>
  361. <td width="200px">
  362. <class id="PostProcessing_PreValueUse_text" style="color:black;">PreValueUse</class>
  363. </td>
  364. <td>
  365. <select id="PostProcessing_PreValueUse_value1">
  366. <option value="true" selected>true</option>
  367. <option value="false" >false</option>
  368. </select>
  369. </td>
  370. <td style="font-size: 80%;">
  371. Enable to use the previous read value for consistency checks - also on reboots
  372. </td>
  373. </tr>
  374. <tr class="expert" id="ex11">
  375. <td width="20px" style="padding-left: 40px;">
  376. <input type="checkbox" id="PostProcessing_PreValueAgeStartup_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "PreValueAgeStartup")' unchecked >
  377. </td>
  378. <td width="200px">
  379. <class id="PostProcessing_PreValueAgeStartup_text" style="color:black;">PreValueAgeStartup</class>
  380. </td>
  381. <td>
  382. <input type="number" id="PostProcessing_PreValueAgeStartup_value1" size="13" min="0">
  383. </td>
  384. <td style="font-size: 80%;">
  385. Time (in minutes), how long a previous read value is valid after reboot (default = 720 min)
  386. </td>
  387. </tr>
  388. <tr>
  389. <td width="20px" style="padding-left: 40px;">
  390. <input type="checkbox" id="PostProcessing_AllowNegativeRates_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "AllowNegativeRates")' unchecked >
  391. </td>
  392. <td width="200px">
  393. <class id="PostProcessing_AllowNegativeRates_text" style="color:black;">AllowNegativeRates</class>
  394. </td>
  395. <td>
  396. <select id="PostProcessing_AllowNegativeRates_value1">
  397. <option value="true" selected>true</option>
  398. <option value="false" >false</option>
  399. </select>
  400. </td>
  401. <td style="font-size: 80%;">
  402. Set on "false" to ensure, that only positive changes are accepted (typically for counter)
  403. </td>
  404. </tr>
  405. <tr class="expert" id="ex12">
  406. <td width="20px" style="padding-left: 40px;">
  407. <input type="checkbox" id="PostProcessing_ErrorMessage_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "ErrorMessage")' unchecked >
  408. </td>
  409. <td width="200px">
  410. <class id="PostProcessing_ErrorMessage_text" style="color:black;">ErrorMessage</class>
  411. </td>
  412. <td>
  413. <select id="PostProcessing_ErrorMessage_value1">
  414. <option value="true" selected>true</option>
  415. <option value="false" >false</option>
  416. </select>
  417. </td>
  418. <td style="font-size: 80%;">
  419. Do not show error message in return value - in error case, the last valid number will be send out
  420. </td>
  421. </tr>
  422. <tr>
  423. <td width="20px" style="padding-left: 40px;">
  424. <input type="checkbox" id="PostProcessing_CheckDigitIncreaseConsistency_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "CheckDigitIncreaseConsistency")' unchecked >
  425. </td>
  426. <td width="200px">
  427. <class id="PostProcessing_CheckDigitIncreaseConsistency_text" style="color:black;">CheckDigitIncreaseConsistency</class>
  428. </td>
  429. <td>
  430. <select id="PostProcessing_CheckDigitIncreaseConsistency_value1">
  431. <option value="true" selected>true</option>
  432. <option value="false" >false</option>
  433. </select>
  434. </td>
  435. <td style="font-size: 80%;">
  436. Activate to enalbe additional consistency check - especially zero crossing check between digits
  437. </td>
  438. </tr>
  439. <tr>
  440. <td style="padding-left: 40px;" colspan="4">
  441. <br>
  442. <b>Postprocessing Individual Paramters:
  443. <select id="Numbers_value1" onchange="numberChanged()">
  444. <option value="0" selected>default</option>
  445. <option value="1" >NT</option>
  446. <option value="2" >HT</option>
  447. </select></b>
  448. </td>
  449. </tr>
  450. <tr>
  451. <td width="20px" style="padding-left: 40px;">
  452. <input type="checkbox" id="PostProcessing_DecimalShift_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "DecimalShift")' unchecked >
  453. </td>
  454. <td width="200px">
  455. <class id="PostProcessing_DecimalShift_text" style="color:black;">DecimalShift</class>
  456. </td>
  457. <td>
  458. <input type="number" id="PostProcessing_DecimalShift_value1" step="1">
  459. </td>
  460. <td style="font-size: 80%;">
  461. shift the digit separator within the digital digits (positiv and negativ)
  462. </td>
  463. </tr>
  464. <tr>
  465. <td width="20px" style="padding-left: 40px;">
  466. <input type="checkbox" id="PostProcessing_MaxRateValue_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateValue")' unchecked >
  467. </td>
  468. <td width="200px">
  469. <class id="PostProcessing_MaxRateValue_text" style="color:black;">MaxRateValue</class>
  470. </td>
  471. <td>
  472. <input type="number" id="PostProcessing_MaxRateValue_value1" size="13" min="0" step="any">
  473. </td>
  474. <td style="font-size: 80%;">
  475. Maximum change of reading from one to the next readout
  476. </td>
  477. </tr>
  478. <tr>
  479. <td colspan="4" style="padding-left: 20px;"><h4><input type="checkbox" id="Category_MQTT_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked > MQTT</h4></td>
  480. </tr>
  481. <tr>
  482. <td width="20px" style="padding-left: 40px;">
  483. <input type="checkbox" id="MQTT_Uri_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Uri")' unchecked >
  484. </td>
  485. <td width="200px">
  486. <class id="MQTT_Uri_text" style="color:black;">Uri</class>
  487. </td>
  488. <td>
  489. <input type="text" id="MQTT_Uri_value1">
  490. </td>
  491. <td style="font-size: 80%;">
  492. URI to the MQTT broker including port e.g.: mqtt://IP-Address:Port
  493. </td>
  494. </tr>
  495. <tr>
  496. <td width="20px" style="padding-left: 40px;">
  497. <input type="checkbox" id="MQTT_MainTopic_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MainTopic")' unchecked >
  498. </td>
  499. <td width="200px">
  500. <class id="MQTT_MainTopic_text" style="color:black;">MainTopic</class>
  501. </td>
  502. <td>
  503. <input type="text" id="MQTT_MainTopic_value1">
  504. </td>
  505. <td style="font-size: 80%;">
  506. MQTT main topic, under which the counters are published. The single value will be published with the following key: MAINTOPIC/VALUE_NAME/PARAMTER <br>
  507. where parameters are: value, rate, timestamp, error<br>
  508. The general connection status can be found in MAINTOPiC"/CONNECTION
  509. </td>
  510. </tr>
  511. <tr>
  512. <td width="20px" style="padding-left: 40px;">
  513. <input type="checkbox" id="MQTT_ClientID_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientID")' unchecked >
  514. </td>
  515. <td width="200px">
  516. <class id="MQTT_ClientID_text" style="color:black;">ClientID</class>
  517. </td>
  518. <td>
  519. <input type="text" id="MQTT_ClientID_value1">
  520. </td>
  521. <td style="font-size: 80%;">
  522. ClientID to connect to the MQTT broker
  523. </td>
  524. </tr>
  525. <tr>
  526. <td width="20px" style="padding-left: 40px;">
  527. <input type="checkbox" id="MQTT_user_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "user")' unchecked >
  528. </td>
  529. <td width="200px">
  530. <class id="MQTT_user_text" style="color:black;">user</class>
  531. </td>
  532. <td>
  533. <input type="text" id="MQTT_user_value1">
  534. </td>
  535. <td style="font-size: 80%;">
  536. user for MQTT authentication
  537. </td>
  538. </tr>
  539. <tr>
  540. <td width="20px" style="padding-left: 40px;">
  541. <input type="checkbox" id="MQTT_password_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "password")' unchecked >
  542. </td>
  543. <td width="200px">
  544. <class id="MQTT_password_text" style="color:black;">password</class>
  545. </td>
  546. <td>
  547. <input type="text" id="MQTT_password_value1">
  548. </td>
  549. <td style="font-size: 80%;">
  550. password for MQTT authentication
  551. </td>
  552. </tr>
  553. <tr>
  554. <td colspan="4" style="padding-left: 20px;"><h4>AutoTimer</h4></td>
  555. </tr>
  556. <tr class="expert" id="ex13">
  557. <td width="20px" style="padding-left: 40px;">
  558. </td>
  559. <td width="200px">
  560. <class id="AutoTimer_AutoStart_text" style="color:black;">AutoStart</class>
  561. </td>
  562. <td>
  563. <select id="AutoTimer_AutoStart_value1">
  564. <option value="true" selected>true</option>
  565. <option value="false" >false</option>
  566. </select>
  567. </td>
  568. <td style="font-size: 80%;">
  569. Start the image recognition immediatly after power up. false is basically for debugging.
  570. </td>
  571. </tr>
  572. <tr>
  573. <td width="20px" style="padding-left: 40px;">
  574. </td>
  575. <td width="200px">
  576. <class id="AutoTimer_Intervall_text" style="color:black;">Intervall</class>
  577. </td>
  578. <td>
  579. <input type="number" id="AutoTimer_Intervall_value1" size="13" min="3" step="any">
  580. </td>
  581. <td style="font-size: 80%;">
  582. Intervall in which the counter is read (in minutes). Number must be greater than 3 minutes.
  583. </td>
  584. </tr>
  585. <tr>
  586. <td colspan="4" style="padding-left: 20px;">
  587. <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='UpdateAfterCategoryCheck()' unchecked >
  588. GPIO Settings
  589. <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>
  590. </h4>
  591. </td>
  592. </tr>
  593. <tr class="GPIO_item">
  594. <td width="20px" style="padding-left: 40px;">
  595. <input type="checkbox" id="GPIO_MainTopicMQTT_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "MainTopicMQTT")' unchecked >
  596. </td>
  597. <td width="200px">
  598. <class id="GPIO_MainTopicMQTT_text" style="color:black;">MainTopicMQTT</class>
  599. </td>
  600. <td>
  601. <input type="text" id="GPIO_MainTopicMQTT_value1">
  602. </td>
  603. <td style="font-size: 80%;">
  604. MQTT main topic for GPIO
  605. </td>
  606. </tr>
  607. <!------------- GPIO0 begin ------------------>
  608. <tr class="GPIO_IO0 GPIO_item">
  609. <td width="20px" style="padding-left: 40px;">
  610. <input type="checkbox" id="GPIO_IO0_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO0")' unchecked>
  611. </td>
  612. <td>
  613. <span id="GPIO_IO0_text">GPIO 0 state</span>
  614. </td>
  615. <td>
  616. <td">
  617. <select id="GPIO_IO0_value1">
  618. <option value="input">input</option>
  619. <option value="input-pullup">input pullup</option>
  620. <option value="input-pulldown">input pulldown</option>
  621. <option value="output">output</option>
  622. <option value="output-pwm" disabled>output pwm (not implemented)</option>
  623. <option value="external-flash-pwm" disabled>external flash light pwm controlled (not implemented)</option>
  624. <option value="external-flash-ws281x" disabled>external flash light ws281x controlled (not implemented)</option>
  625. </select>
  626. </td>
  627. </td>
  628. <td class="description">
  629. GPIO 0 Usable with restrictions.<br>
  630. <span style="color: red">Must be disabled when camera is used.</span><br>
  631. <span style="color: red">Pin is used to activate flash mode and must therefore be HIGH when booting.</span>
  632. </td>
  633. </tr>
  634. <tr class="GPIO_IO0 GPIO_item">
  635. <td width="20px" style="padding-left: 40px;"></td>
  636. <td>
  637. <span>GPIO 0 use interrupt</span>
  638. </td>
  639. <td>
  640. <td">
  641. <select id="GPIO_IO0_value2">
  642. <option value="disabled">disabled</option>
  643. <option value="rising-edge">rising edge</option>
  644. <option value="falling-edge">falling edge</option>
  645. <option value="rising-and-falling">rising and falling</option>
  646. <option value="low-level-trigger">low level trigger</option>
  647. <option value="high-level-trigger">high level trigger</option>
  648. </select>
  649. </td>
  650. </td>
  651. <td class="description">
  652. GPIO 0 enable interrupt trigger
  653. </td>
  654. </tr>
  655. <tr class="GPIO_IO0 GPIO_item">
  656. <td width="20px" style="padding-left: 40px;"></td>
  657. <td>
  658. <span>GPIO 0 PWM duty resolution</span>
  659. </td>
  660. <td>
  661. <td"><input type="number" id="GPIO_IO0_value3" min="1" max="20"></td>
  662. </td>
  663. <td class="description">
  664. GPIO 0 LEDC PWM duty resolution in bit
  665. </td>
  666. </tr>
  667. <tr class="GPIO_IO0 GPIO_item">
  668. <td width="20px" style="padding-left: 40px;"></td>
  669. <td>
  670. <span>GPIO 0 enable MQTT</span>
  671. </td>
  672. <td>
  673. <td"><input type="checkbox" id="GPIO_IO0_value4"></td>
  674. </td>
  675. <td class="description">
  676. GPIO 0 enable MQTT publishing/subscribing
  677. </td>
  678. </tr>
  679. <tr class="GPIO_IO0 GPIO_item">
  680. <td width="20px" style="padding-left: 40px;"></td>
  681. <td>
  682. <span>GPIO 0 enable HTTP</span>
  683. </td>
  684. <td>
  685. <td"><input type="checkbox" id="GPIO_IO0_value5"></td>
  686. </td>
  687. <td class="description">
  688. GPIO 0 enable HTTP write/read
  689. </td>
  690. </tr>
  691. <tr class="GPIO_IO0 GPIO_item">
  692. <td width="20px" style="padding-left: 40px;"></td>
  693. <td>
  694. <span>GPIO 0 name</span>
  695. </td>
  696. <td>
  697. <td"><input type="text" id="GPIO_IO0_value6"></td>
  698. </td>
  699. <td class="description">
  700. GPIO 0 MQTT topic name (empty = GPIO0). Allowed characters (a-z, A-Z, 0-9, _, -)
  701. </td>
  702. </tr>
  703. <!------------- GPIO0 end ------------------>
  704. <!------------- GPIO1 begin ------------------>
  705. <tr class="GPIO_IO1 GPIO_item">
  706. <td width="20px" style="padding-left: 40px;">
  707. <input type="checkbox" id="GPIO_IO1_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO1")' unchecked>
  708. </td>
  709. <td>
  710. <span id="GPIO_IO1_text">GPIO 1 state</span>
  711. </td>
  712. <td>
  713. <td">
  714. <select id="GPIO_IO1_value1">
  715. <option value="input">input</option>
  716. <option value="input-pullup">input pullup</option>
  717. <option value="input-pulldown">input pulldown</option>
  718. <option value="output">output</option>
  719. <option value="output-pwm" disabled>output pwm (not implemented)</option>
  720. <option value="external-flash-pwm" disabled>external flash light pwm controlled (not implemented)</option>
  721. <option value="external-flash-ws281x" disabled>external flash light ws281x controlled (not implemented)</option>
  722. </select>
  723. </td>
  724. </td>
  725. <td class="description">
  726. GPIO 1 <br><span style="color: blue">Used by default for serial communication as TX pin.<br>Required for seriales monitor.</span>
  727. </td>
  728. </tr>
  729. <tr class="GPIO_IO1 GPIO_item">
  730. <td width="20px" style="padding-left: 40px;"></td>
  731. <td>
  732. <span>GPIO 1 use interrupt</span>
  733. </td>
  734. <td>
  735. <td">
  736. <select id="GPIO_IO1_value2">
  737. <option value="disabled">disabled</option>
  738. <option value="rising-edge" disabled>rising edge</option>
  739. <option value="falling-edge" disabled>falling edge</option>
  740. <option value="rising-and-falling">rising and falling</option>
  741. <option value="low-level-trigger">low level trigger</option>
  742. <option value="high-level-trigger">high level trigger</option>
  743. </select>
  744. </td>
  745. </td>
  746. <td class="description">
  747. GPIO 1 enable interrupt trigger
  748. </td>
  749. </tr>
  750. <tr class="GPIO_IO1 GPIO_item">
  751. <td width="20px" style="padding-left: 40px;"></td>
  752. <td>
  753. <span>GPIO 1 PWM duty resolution</span>
  754. </td>
  755. <td>
  756. <td"><input type="number" id="GPIO_IO1_value3" min="1" max="20"></td>
  757. </td>
  758. <td class="description">
  759. GPIO 1 LEDC PWM duty resolution in bit
  760. </td>
  761. </tr>
  762. <tr class="GPIO_IO1 GPIO_item">
  763. <td width="20px" style="padding-left: 40px;"></td>
  764. <td>
  765. <span>GPIO 1 enable MQTT</span>
  766. </td>
  767. <td>
  768. <td"><input type="checkbox" id="GPIO_IO1_value4"></td>
  769. </td>
  770. <td class="description">
  771. GPIO 1 enable MQTT publishing/subscribing
  772. </td>
  773. </tr>
  774. <tr class="GPIO_IO1 GPIO_item">
  775. <td width="20px" style="padding-left: 40px;"></td>
  776. <td>
  777. <span>GPIO 1 enable HTTP</span>
  778. </td>
  779. <td>
  780. <td"><input type="checkbox" id="GPIO_IO1_value5"></td>
  781. </td>
  782. <td class="description">
  783. GPIO 1 enable HTTP write/read
  784. </td>
  785. </tr>
  786. <tr class="GPIO_IO1 GPIO_item">
  787. <td width="20px" style="padding-left: 40px;"></td>
  788. <td>
  789. <span>GPIO 1 name</span>
  790. </td>
  791. <td>
  792. <td"><input type="text" id="GPIO_IO1_value6"></td>
  793. </td>
  794. <td class="description">
  795. GPIO 1 MQTT topic name (empty = GPIO1). Allowed characters (a-z, A-Z, 0-9, _, -)
  796. </td>
  797. </tr>
  798. <!------------- GPIO1 end ------------------>
  799. <!------------- GPIO3 begin ------------------>
  800. <tr class="GPIO_IO3 GPIO_item">
  801. <td width="20px" style="padding-left: 40px;">
  802. <input type="checkbox" id="GPIO_IO3_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO3")' unchecked>
  803. </td>
  804. <td>
  805. <span id="GPIO_IO3_text">GPIO 3 state</span>
  806. </td>
  807. <td>
  808. <td">
  809. <select id="GPIO_IO3_value1">
  810. <option value="input">input</option>
  811. <option value="input-pullup">input pullup</option>
  812. <option value="input-pulldown">input pulldown</option>
  813. <option value="output">output</option>
  814. <option value="output-pwm" disabled>output pwm (not implemented)</option>
  815. <option value="external-flash-pwm" disabled>external flash light pwm controlled (not implemented)</option>
  816. <option value="external-flash-ws281x" disabled>external flash light ws281x controlled (not implemented)</option>
  817. </select>
  818. </td>
  819. </td>
  820. <td class="description">
  821. GPIO 3 <span style="color: blue">Used by default for serial communication as RX pin.</span>
  822. </td>
  823. </tr>
  824. <tr class="GPIO_IO3 GPIO_item">
  825. <td width="20px" style="padding-left: 40px;"></td>
  826. <td>
  827. <span>GPIO 3 use interrupt</span>
  828. </td>
  829. <td>
  830. <td">
  831. <select id="GPIO_IO3_value2">
  832. <option value="disabled">disabled</option>
  833. <option value="rising-edge" disabled>rising edge</option>
  834. <option value="falling-edge" disabled>falling edge</option>
  835. <option value="rising-and-falling">rising and falling</option>
  836. <option value="low-level-trigger">low level trigger</option>
  837. <option value="high-level-trigger">high level trigger</option>
  838. </select>
  839. </td>
  840. </td>
  841. <td class="description">
  842. GPIO 3 Used by default for serial communication as RX pin.
  843. </td>
  844. </tr>
  845. <tr class="GPIO_IO3 GPIO_item">
  846. <td width="20px" style="padding-left: 40px;"></td>
  847. <td>
  848. <span>GPIO 3 PWM duty resolution</span>
  849. </td>
  850. <td>
  851. <td"><input type="number" id="GPIO_IO3_value3" min="1" max="20"></td>
  852. </td>
  853. <td class="description">
  854. GPIO 3 LEDC PWM duty resolution in bit
  855. </td>
  856. </tr>
  857. <tr class="GPIO_IO3 GPIO_item">
  858. <td width="20px" style="padding-left: 40px;"></td>
  859. <td>
  860. <span>GPIO 3 enable MQTT</span>
  861. </td>
  862. <td>
  863. <td"><input type="checkbox" id="GPIO_IO3_value4"></td>
  864. </td>
  865. <td class="description">
  866. GPIO 3 enable MQTT publishing/subscribing
  867. </td>
  868. </tr>
  869. <tr class="GPIO_IO3 GPIO_item">
  870. <td width="20px" style="padding-left: 40px;"></td>
  871. <td>
  872. <span>GPIO 3 enable HTTP</span>
  873. </td>
  874. <td>
  875. <td"><input type="checkbox" id="GPIO_IO3_value5"></td>
  876. </td>
  877. <td class="description">
  878. GPIO 3 enable HTTP write/read
  879. </td>
  880. </tr>
  881. <tr class="GPIO_IO3 GPIO_item">
  882. <td width="20px" style="padding-left: 40px;"></td>
  883. <td>
  884. <span>GPIO 3 name</span>
  885. </td>
  886. <td>
  887. <td"><input type="text" id="GPIO_IO3_value6"></td>
  888. </td>
  889. <td class="description">
  890. GPIO 3 MQTT topic name (empty = GPIO3). Allowed characters (a-z, A-Z, 0-9, _, -)
  891. </td>
  892. </tr>
  893. <!------------- GPIO3 end ------------------>
  894. <!------------- GPIO4 begin ------------------>
  895. <tr class="GPIO_IO4 GPIO_item">
  896. <td width="20px" style="padding-left: 40px;">
  897. <input type="checkbox" id="GPIO_IO4_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO4")' unchecked>
  898. </td>
  899. <td>
  900. <span id="GPIO_IO4_text">GPIO 4 state</span>
  901. </td>
  902. <td>
  903. <td">
  904. <select id="GPIO_IO4_value1">
  905. <option value="input">input</option>
  906. <option value="input-pullup">input pullup</option>
  907. <option value="input-pulldown">input pulldown</option>
  908. <option value="output">output</option>
  909. <option value="built-in-led">built-in led flash light</option>
  910. <option value="output-pwm" disabled>output pwm (not implemented)</option>
  911. <option value="external-flash-pwm" disabled>external flash light pwm controlled (not implemented)</option>
  912. <option value="external-flash-ws281x" disabled>external flash light ws281x controlled (not implemented)</option>
  913. </select>
  914. </td>
  915. </td>
  916. <td class="description">
  917. GPIO 4 Usable with restrictions.<br>
  918. <span style="color: red">Pin is used for build-in flash light.</span>
  919. </td>
  920. </tr>
  921. <tr class="GPIO_IO4 GPIO_item">
  922. <td width="20px" style="padding-left: 40px;"></td>
  923. <td>
  924. <span>GPIO 4 use interrupt</span>
  925. </td>
  926. <td>
  927. <td">
  928. <select id="GPIO_IO4_value2">
  929. <option value="disabled">disabled</option>
  930. <option value="rising-edge">rising edge</option>
  931. <option value="falling-edge">falling edge</option>
  932. <option value="rising-and-falling">rising and falling</option>
  933. <option value="low-level-trigger">low level trigger</option>
  934. <option value="high-level-trigger">high level trigger</option>
  935. </select>
  936. </td>
  937. </td>
  938. <td class="description">
  939. GPIO 4 enable interrupt trigger
  940. </td>
  941. </tr>
  942. <tr class="GPIO_IO4 GPIO_item">
  943. <td width="20px" style="padding-left: 40px;"></td>
  944. <td>
  945. <span>GPIO 4 PWM duty resolution</span>
  946. </td>
  947. <td>
  948. <td"><input type="number" id="GPIO_IO4_value3" min="1" max="20"></td>
  949. </td>
  950. <td class="description">
  951. GPIO 4 LEDC PWM duty resolution in bit
  952. </td>
  953. </tr>
  954. <tr class="GPIO_IO4 GPIO_item">
  955. <td width="20px" style="padding-left: 40px;"></td>
  956. <td>
  957. <span>GPIO 4 enable MQTT</span>
  958. </td>
  959. <td>
  960. <td"><input type="checkbox" id="GPIO_IO4_value4"></td>
  961. </td>
  962. <td class="description">
  963. GPIO 4 enable MQTT publishing/subscribing
  964. </td>
  965. </tr>
  966. <tr class="GPIO_IO4 GPIO_item">
  967. <td width="20px" style="padding-left: 40px;"></td>
  968. <td>
  969. <span>GPIO 4 enable HTTP</span>
  970. </td>
  971. <td>
  972. <td"><input type="checkbox" id="GPIO_IO4_value5"></td>
  973. </td>
  974. <td class="description">
  975. GPIO 4 enable HTTP write/read
  976. </td>
  977. </tr>
  978. <tr class="GPIO_IO4 GPIO_item">
  979. <td width="20px" style="padding-left: 40px;"></td>
  980. <td>
  981. <span>GPIO 4 name</span>
  982. </td>
  983. <td>
  984. <td"><input type="text" id="GPIO_IO4_value6"></td>
  985. </td>
  986. <td class="description">
  987. GPIO 4 MQTT topic name (empty = GPIO4). Allowed characters (a-z, A-Z, 0-9, _, -)
  988. </td>
  989. </tr>
  990. <!------------- GPIO4 end ------------------>
  991. <!------------- GPIO12 begin ------------------>
  992. <tr class="GPIO_IO12 GPIO_item">
  993. <td width="20px" style="padding-left: 40px;">
  994. <input type="checkbox" id="GPIO_IO12_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO12")' unchecked>
  995. </td>
  996. <td>
  997. <span id="GPIO_IO12_text">GPIO 12 state</span>
  998. </td>
  999. <td>
  1000. <td">
  1001. <select id="GPIO_IO12_value1">
  1002. <option value="input">input</option>
  1003. <option value="input-pullup">input pullup</option>
  1004. <option value="input-pulldown">input pulldown</option>
  1005. <option value="output">output</option>
  1006. <option value="output-pwm" disabled>output pwm (not implemented)</option>
  1007. <option value="external-flash-pwm" disabled>external flash light pwm controlled (not implemented)</option>
  1008. <option value="external-flash-ws281x" disabled>external flash light ws281x controlled (not implemented)</option>
  1009. </select>
  1010. </td>
  1011. </td>
  1012. <td class="description">
  1013. GPIO 12 is usable without restrictions
  1014. </td>
  1015. </tr>
  1016. <tr class="GPIO_IO12 GPIO_item">
  1017. <td width="20px" style="padding-left: 40px;"></td>
  1018. <td>
  1019. <span>GPIO 12 use interrupt</span>
  1020. </td>
  1021. <td>
  1022. <td">
  1023. <select id="GPIO_IO12_value2">
  1024. <option value="disabled">disabled</option>
  1025. <option value="rising-edge">rising edge</option>
  1026. <option value="falling-edge">falling edge</option>
  1027. <option value="rising-and-falling">rising and falling</option>
  1028. <option value="low-level-trigger">low level trigger</option>
  1029. <option value="high-level-trigger">high level trigger</option>
  1030. </select>
  1031. </td>
  1032. </td>
  1033. <td class="description">
  1034. GPIO 12 enable interrupt trigger
  1035. </td>
  1036. </tr>
  1037. <tr class="GPIO_IO12 GPIO_item">
  1038. <td width="20px" style="padding-left: 40px;"></td>
  1039. <td>
  1040. <span>GPIO 12 PWM duty resolution</span>
  1041. </td>
  1042. <td>
  1043. <td"><input type="number" id="GPIO_IO12_value3" min="1" max="20"></td>
  1044. </td>
  1045. <td class="description">
  1046. GPIO 12 LEDC PWM duty resolution in bit
  1047. </td>
  1048. </tr>
  1049. <tr class="GPIO_IO12 GPIO_item">
  1050. <td width="20px" style="padding-left: 40px;"></td>
  1051. <td>
  1052. <span>GPIO 12 enable MQTT</span>
  1053. </td>
  1054. <td>
  1055. <td"><input type="checkbox" id="GPIO_IO12_value4"></td>
  1056. </td>
  1057. <td class="description">
  1058. GPIO 12 enable MQTT publishing/subscribing
  1059. </td>
  1060. </tr>
  1061. <tr class="GPIO_IO12 GPIO_item">
  1062. <td width="20px" style="padding-left: 40px;"></td>
  1063. <td>
  1064. <span>GPIO 12 enable HTTP</span>
  1065. </td>
  1066. <td>
  1067. <td"><input type="checkbox" id="GPIO_IO12_value5"></td>
  1068. </td>
  1069. <td class="description">
  1070. GPIO 12 enable HTTP write/read
  1071. </td>
  1072. </tr>
  1073. <tr class="GPIO_IO12 GPIO_item">
  1074. <td width="20px" style="padding-left: 40px;"></td>
  1075. <td>
  1076. <span>GPIO 12 name</span>
  1077. </td>
  1078. <td>
  1079. <td"><input type="text" id="GPIO_IO12_value6"></td>
  1080. </td>
  1081. <td class="description">
  1082. GPIO 12 MQTT topic name (empty = GPIO12). Allowed characters (a-z, A-Z, 0-9, _, -)
  1083. </td>
  1084. </tr>
  1085. <!------------- GPIO12 end ------------------>
  1086. <!------------- GPIO13 begin ------------------>
  1087. <tr class="GPIO_IO13 GPIO_item">
  1088. <td width="20px" style="padding-left: 40px;">
  1089. <input type="checkbox" id="GPIO_IO13_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO13")' unchecked>
  1090. </td>
  1091. <td>
  1092. <span id="GPIO_IO13_text">GPIO 13 state</span>
  1093. </td>
  1094. <td>
  1095. <td">
  1096. <select id="GPIO_IO13_value1">
  1097. <option value="input">input</option>
  1098. <option value="input-pullup">input pullup</option>
  1099. <option value="input-pulldown">input pulldown</option>
  1100. <option value="output">output</option>
  1101. <option value="output-pwm" disabled>output pwm (not implemented)</option>
  1102. <option value="external-flash-pwm" disabled>external flash light pwm controlled (not implemented)</option>
  1103. <option value="external-flash-ws281x" disabled>external flash light ws281x controlled (not implemented)</option>
  1104. </select>
  1105. </td>
  1106. </td>
  1107. <td class="description">
  1108. GPIO 13 is usable without restrictions
  1109. </td>
  1110. </tr>
  1111. <tr class="GPIO_IO13 GPIO_item">
  1112. <td width="20px" style="padding-left: 40px;"></td>
  1113. <td>
  1114. <span>GPIO 13 use interrupt</span>
  1115. </td>
  1116. <td>
  1117. <td">
  1118. <select id="GPIO_IO13_value2">
  1119. <option value="disabled">disabled</option>
  1120. <option value="rising-edge" disabled>rising edge</option>
  1121. <option value="falling-edge" disabled>falling edge</option>
  1122. <option value="rising-and-falling">rising and falling</option>
  1123. <option value="low-level-trigger">low level trigger</option>
  1124. <option value="high-level-trigger">high level trigger</option>
  1125. </select>
  1126. </td>
  1127. </td>
  1128. <td class="description">
  1129. GPIO 13 enable interrupt trigger
  1130. </td>
  1131. </tr>
  1132. <tr class="GPIO_IO13 GPIO_item">
  1133. <td width="20px" style="padding-left: 40px;"></td>
  1134. <td>
  1135. <span>GPIO 13 PWM duty resolution</span>
  1136. </td>
  1137. <td>
  1138. <td"><input type="number" id="GPIO_IO13_value3" min="1" max="20"></td>
  1139. </td>
  1140. <td class="description">
  1141. GPIO 13 LEDC PWM duty resolution in bit
  1142. </td>
  1143. </tr>
  1144. <tr class="GPIO_IO13 GPIO_item">
  1145. <td width="20px" style="padding-left: 40px;"></td>
  1146. <td>
  1147. <span>GPIO 13 enable MQTT</span>
  1148. </td>
  1149. <td>
  1150. <td"><input type="checkbox" id="GPIO_IO13_value4"></td>
  1151. </td>
  1152. <td class="description">
  1153. GPIO 13 enable MQTT publishing/subscribing
  1154. </td>
  1155. </tr>
  1156. <tr class="GPIO_IO13 GPIO_item">
  1157. <td width="20px" style="padding-left: 40px;"></td>
  1158. <td>
  1159. <span>GPIO 13 enable HTTP</span>
  1160. </td>
  1161. <td>
  1162. <td"><input type="checkbox" id="GPIO_IO13_value5"></td>
  1163. </td>
  1164. <td class="description">
  1165. GPIO 13 enable HTTP write/read
  1166. </td>
  1167. </tr>
  1168. <tr class="GPIO_IO13 GPIO_item">
  1169. <td width="20px" style="padding-left: 40px;"></td>
  1170. <td>
  1171. <span>GPIO 13 name</span>
  1172. </td>
  1173. <td>
  1174. <td"><input type="text" id="GPIO_IO13_value6"></td>
  1175. </td>
  1176. <td class="description">
  1177. GPIO 13 MQTT topic name (empty = GPIO13). Allowed characters (a-z, A-Z, 0-9, _, -)
  1178. </td>
  1179. </tr>
  1180. <!------------- GPIO13 end ------------------>
  1181. <tr>
  1182. <td colspan="4" style="padding-left: 20px;"><h4>Debug</h4></td>
  1183. </tr>
  1184. <tr>
  1185. <td width="20px" style="padding-left: 40px;">
  1186. <input type="checkbox" id="Debug_Logfile_enabled" value="1" onclick = 'InvertEnableItem("Debug", "Logfile")' unchecked >
  1187. </td>
  1188. <td width="200px">
  1189. <class id="Debug_Logfile_text" style="color:black;">Logfile</class>
  1190. </td>
  1191. <td>
  1192. <select id="Debug_Logfile_value1">
  1193. <option value="true" selected>true</option>
  1194. <option value="false" >false</option>
  1195. </select>
  1196. </td>
  1197. <td class="description">
  1198. Turn on/off the extended logging
  1199. </td>
  1200. </tr>
  1201. <tr>
  1202. <td width="20px" style="padding-left: 40px;">
  1203. <td"><input type="checkbox" id="Debug_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("Debug", "LogfileRetentionInDays")' unchecked ></td>
  1204. </td>
  1205. <td>
  1206. <class id="Debug_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class>
  1207. </td>
  1208. <td>
  1209. <input type="number" id="Debug_LogfileRetentionInDays_value1" size="13" min="0" step="1">
  1210. </td>
  1211. <td class="description">
  1212. Time to keep the log files (in days - "0" = forever)
  1213. </td>
  1214. </tr>
  1215. <tr>
  1216. <td colspan="4" style="padding-left: 20px;"><h4>System</h4></td>
  1217. </tr>
  1218. <tr>
  1219. <td width="20px" style="padding-left: 40px;">
  1220. <td"><input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeZone")' unchecked ></td>
  1221. </td>
  1222. <td>
  1223. <class id="System_TimeZone_text" style="color:black;">TimeZone</class>
  1224. </td>
  1225. <td>
  1226. <input type="text" id="System_TimeZone_value1">
  1227. </td>
  1228. <td class="description">
  1229. Time zone in POSIX syntax (Europe/Berlin = "CET-1CEST,M3.5.0,M10.5.0/3" - incl. daylight saving)
  1230. </td>
  1231. </tr>
  1232. <tr class="expert" id="ex16">
  1233. <td width="20px" style="padding-left: 40px;">
  1234. <td"><input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeServer")' unchecked ></td>
  1235. </td>
  1236. <td>
  1237. <class id="System_TimeServer_text" style="color:black;">TimeServer</class>
  1238. </td>
  1239. <td>
  1240. <input type="text" id="System_TimeServer_value1">
  1241. </td>
  1242. <td class="description">
  1243. Time server to synchronize system time (default: "pool.ntp.org" - used if nothing is specified)
  1244. </td>
  1245. </tr>
  1246. <tr class="expert" id="System_Hostname">
  1247. <td width="20px" style="padding-left: 40px;">
  1248. <td"><input type="checkbox" id="System_Hostname_enabled" value="1" onclick = 'InvertEnableItem("System", "Hostname")' unchecked ></td>
  1249. </td>
  1250. <td>
  1251. <class id="System_Hostname_text" style="color:black;">Hostname</class>
  1252. </td>
  1253. <td>
  1254. <input type="text" id="System_Hostname_value1">
  1255. </td>
  1256. <td class="description">
  1257. Hostname for server - will be transfered to wlan.ini at next startup)
  1258. </td>
  1259. </tr>
  1260. </table>
  1261. <p>
  1262. <button class="button" onclick="saveTextAsFile()">Update Config.ini</button>
  1263. </p>
  1264. <p>
  1265. </p>
  1266. <div id="doreboot">
  1267. <p>
  1268. <button class="button" id="Edit_Config_Direct" onclick="editConfigDirect()" style="display:none">Edit Config.ini direct</button>
  1269. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
  1270. </p>
  1271. </div>
  1272. </div>
  1273. <script type="text/javascript" src="./gethost.js"></script>
  1274. <script type="text/javascript" src="./readconfigcommon.js"></script>
  1275. <script type="text/javascript" src="./readconfigparam.js"></script>
  1276. <script type="text/javascript">
  1277. var canvas = document.getElementById('canvas'),
  1278. basepath = "http://192.168.178.22";
  1279. param;
  1280. category;
  1281. NUNBERSAkt = -1;
  1282. NUMBERS;
  1283. function LoadConfigNeu() {
  1284. var isInitialSetup = getParameterByName('InitialSetup');
  1285. if (isInitialSetup === 'true')
  1286. {
  1287. document.getElementById("reboot").style.display = "none";
  1288. }
  1289. basepath = getbasepath();
  1290. if (!loadConfig(basepath)) {
  1291. alert("Config.ini could not be loaded!\nPlease reload the page.");
  1292. return;
  1293. }
  1294. ParseConfig();
  1295. param = getConfigParameters();
  1296. category = getConfigCategory();
  1297. InitIndivParameter();
  1298. UpdateInput();
  1299. UpdateInputIndividual();
  1300. UpdateExpertModus();
  1301. document.getElementById("divall").style.display = '';
  1302. }
  1303. function InitIndivParameter()
  1304. {
  1305. NUMBERS = getNUMBERInfo();
  1306. var _index = document.getElementById("Numbers_value1");
  1307. while (_index.length)
  1308. _index.remove(0);
  1309. for (var i = 0; i < NUMBERS.length; ++i){
  1310. var option = document.createElement("option");
  1311. option.text = NUMBERS[i]["name"];
  1312. option.value = i;
  1313. _index.add(option);
  1314. }
  1315. _index.selectedIndex = 0;
  1316. }
  1317. function getParameterByName(name, url = window.location.href) {
  1318. name = name.replace(/[\[\]]/g, '\\$&');
  1319. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  1320. results = regex.exec(url);
  1321. if (!results) return null;
  1322. if (!results[2]) return '';
  1323. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  1324. }
  1325. function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1){
  1326. let anzpara = _param[_cat][_name].anzParam;
  1327. if (_number > -1) {
  1328. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1329. return;
  1330. if (_optional) {
  1331. document.getElementById(_cat+"_"+_name+"_enabled").checked = NUMBERS[_number][_cat][_name]["enabled"];
  1332. for (var j = 1; j <= anzpara; ++j) {
  1333. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !NUMBERS[_number][_cat][_name]["enabled"];
  1334. }
  1335. }
  1336. document.getElementById(_cat+"_"+_name+"_text").style="color:black;"
  1337. setEnabled(_cat+"_"+_name, true);
  1338. for (var j = 1; j <= anzpara; ++j) {
  1339. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1340. if (element.tagName.toLowerCase() == "select") {
  1341. var textToFind = NUMBERS[_number][_cat][_name]["value"+j];
  1342. if (textToFind == undefined)
  1343. continue;
  1344. for (var i = 0; i < element.options.length; i++) {
  1345. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1346. element.selectedIndex = i;
  1347. break;
  1348. }
  1349. }
  1350. }
  1351. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1352. element.checked = NUMBERS[_number][_cat][_name]["value"+j] == "true";
  1353. }
  1354. else {
  1355. element.value = NUMBERS[_number][_cat][_name]["value"+j];
  1356. }
  1357. }
  1358. }
  1359. else {
  1360. if (_optional) {
  1361. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  1362. for (var j = 1; j <= anzpara; ++j) {
  1363. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  1364. }
  1365. }
  1366. document.getElementById(_cat+"_"+_name+"_text").style="color:black;"
  1367. setEnabled(_cat+"_"+_name, true);
  1368. for (var j = 1; j <= anzpara; ++j) {
  1369. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1370. if (element.tagName.toLowerCase() == "select") {
  1371. var textToFind = _param[_cat][_name]["value"+j];
  1372. if (textToFind == undefined)
  1373. continue;
  1374. for (var i = 0; i < element.options.length; i++) {
  1375. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1376. element.selectedIndex = i;
  1377. break;
  1378. }
  1379. }
  1380. }
  1381. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1382. element.checked = _param[_cat][_name]["value"+j] == "true";
  1383. }
  1384. else {
  1385. element.value = _param[_cat][_name]["value"+j];
  1386. }
  1387. }
  1388. }
  1389. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  1390. if (_category[_cat]["enabled"] == false)
  1391. {
  1392. if (_optional) {
  1393. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  1394. for (var j = 1; j <= anzpara; ++j) {
  1395. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  1396. }
  1397. }
  1398. document.getElementById(_cat+"_"+_name+"_text").style="color:lightgrey;"
  1399. setEnabled(_cat+"_"+_name, false);
  1400. }
  1401. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional);
  1402. }
  1403. function InvertEnableItem(_cat, _param)
  1404. {
  1405. _zw = _cat + "_" + _param + "_enabled";
  1406. _isOn = document.getElementById(_zw).checked;
  1407. _color = "color:lightgrey;";
  1408. if (_isOn) {
  1409. _color = "color:black;";
  1410. }
  1411. _zw = _cat + "_" + _param + "_text";
  1412. document.getElementById(_zw).disabled = !_isOn;
  1413. document.getElementById(_zw).style = _color;
  1414. setEnabled(_cat + "_" + _param, _isOn);
  1415. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  1416. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  1417. document.getElementById(_cat+"_"+_param+"_value"+j).style=_color;
  1418. }
  1419. }
  1420. function setEnabled(className, enabled) {
  1421. let elements = document.getElementsByClassName(className);
  1422. for (i = 0; i < elements.length; i++) {
  1423. if (enabled) {
  1424. elements[i].classList.remove("disabled");
  1425. } else {
  1426. elements[i].classList.add("disabled");
  1427. }
  1428. let inputs = elements[i].getElementsByTagName("input");
  1429. for (j = 0; j < inputs.length; j++) {
  1430. if (inputs[j].id.endsWith("_enabled"))
  1431. continue;
  1432. if (enabled) {
  1433. inputs[j].removeAttribute("disabled");
  1434. } else {
  1435. inputs[j].setAttribute("disabled", "disabled");
  1436. }
  1437. }
  1438. }
  1439. }
  1440. function setVisible(className, visible) {
  1441. let elements = document.getElementsByClassName(className);
  1442. for (i = 0; i < elements.length; i++) {
  1443. if (visible) {
  1444. elements[i].classList.remove("hidden");
  1445. } else {
  1446. elements[i].classList.add("hidden");
  1447. }
  1448. }
  1449. }
  1450. function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1)
  1451. {
  1452. _status = _category[_cat]["enabled"];
  1453. _color = "color:lightgrey;";
  1454. if (_status) {
  1455. _color = "color:black;";
  1456. }
  1457. if (_optional) {
  1458. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  1459. document.getElementById(_cat+"_"+_name+"_enabled").style=_color;
  1460. }
  1461. if (_number == -1){
  1462. if (!_param[_cat][_name]["enabled"]) {
  1463. _status = false;
  1464. _color = "color:lightgrey;";
  1465. }
  1466. }
  1467. else
  1468. if (!NUMBERS[_number][_cat][_name]["enabled"]) {
  1469. _status = false;
  1470. _color = "color:lightgrey;";
  1471. }
  1472. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  1473. document.getElementById(_cat+"_"+_name+"_text").style = _color;
  1474. setEnabled(_cat+"_"+_name, _status);
  1475. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1476. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  1477. document.getElementById(_cat+"_"+_name+"_value"+j).style=_color;
  1478. }
  1479. }
  1480. function ReadParameter(_param, _cat, _name, _optional, _number = -1){
  1481. if (_number > -1) {
  1482. if (_cat == "Digits")
  1483. _cat = "digit";
  1484. if (_cat == "Analog")
  1485. _cat = "analog";
  1486. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1487. return;
  1488. if (_optional) {
  1489. NUMBERS[_number][_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1490. }
  1491. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1492. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1493. if (element.tagName.toLowerCase() == "select") {
  1494. NUMBERS[_number][_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1495. }
  1496. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1497. NUMBERS[_number][_cat][_name]["value"+j] = element.checked;
  1498. }
  1499. else {
  1500. if ((NUMBERS[_number][_cat][_name].checkRegExList != null) && (NUMBERS[_number][_cat][_name].checkRegExList[j-1] != null)) {
  1501. if (!element.value.match(NUMBERS[_cat][_name].checkRegExList[j-1])) {
  1502. element.classList.add("invalid-input");
  1503. } else {
  1504. element.classList.remove("invalid-input");
  1505. }
  1506. }
  1507. NUMBERS[_number][_cat][_name]["value"+j] = element.value;
  1508. }
  1509. }
  1510. }
  1511. else
  1512. {
  1513. if (_optional) {
  1514. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1515. }
  1516. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1517. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1518. if (element.tagName.toLowerCase() == "select") {
  1519. _param[_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1520. }
  1521. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1522. _param[_cat][_name]["value"+j] = element.checked;
  1523. }
  1524. else {
  1525. if ((_param[_cat][_name].checkRegExList != null) && (_param[_cat][_name].checkRegExList[j-1] != null)) {
  1526. if (!element.value.match(_param[_cat][_name].checkRegExList[j-1])) {
  1527. element.classList.add("invalid-input");
  1528. } else {
  1529. element.classList.remove("invalid-input");
  1530. }
  1531. }
  1532. _param[_cat][_name]["value"+j] = element.value;
  1533. }
  1534. }
  1535. }
  1536. }
  1537. function UpdateInputIndividual()
  1538. {
  1539. if (NUNBERSAkt != -1)
  1540. {
  1541. ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt)
  1542. ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt)
  1543. }
  1544. var sel = document.getElementById("Numbers_value1");
  1545. NUNBERSAkt = sel.selectedIndex;
  1546. WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1547. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1548. }
  1549. function UpdateInput() {
  1550. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  1551. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  1552. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  1553. document.getElementById("Category_GPIO_enabled").checked = category["GPIO"]["enabled"];
  1554. setVisible("GPIO_item", category["GPIO"]["enabled"]);
  1555. WriteParameter(param, category, "MakeImage", "LogImageLocation", true);
  1556. WriteParameter(param, category, "MakeImage", "LogfileRetentionInDays", true);
  1557. WriteParameter(param, category, "MakeImage", "WaitBeforeTakingPicture", false);
  1558. WriteParameter(param, category, "MakeImage", "ImageQuality", false);
  1559. WriteParameter(param, category, "MakeImage", "Brightness", false);
  1560. // WriteParameter(param, category, "MakeImage", "Contrast", false);
  1561. // WriteParameter(param, category, "MakeImage", "Saturation", false);
  1562. WriteParameter(param, category, "MakeImage", "ImageSize", false);
  1563. WriteParameter(param, category, "MakeImage", "FixedExposure", false);
  1564. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  1565. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  1566. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true);
  1567. WriteParameter(param, category, "Digits", "Model", false);
  1568. WriteParameter(param, category, "Digits", "LogImageLocation", true);
  1569. WriteParameter(param, category, "Digits", "LogfileRetentionInDays", true);
  1570. WriteParameter(param, category, "Digits", "ModelInputSize", false);
  1571. WriteParameter(param, category, "Analog", "Model", false);
  1572. WriteParameter(param, category, "Analog", "LogImageLocation", true);
  1573. WriteParameter(param, category, "Analog", "LogfileRetentionInDays", true);
  1574. WriteParameter(param, category, "Analog", "ExtendedResolution", true);
  1575. WriteParameter(param, category, "Analog", "ModelInputSize", false);
  1576. WriteParameter(param, category, "PostProcessing", "PreValueUse", true);
  1577. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  1578. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true);
  1579. // WriteParameter(param, category, "PostProcessing", "MaxRateValue", true);
  1580. WriteParameter(param, category, "PostProcessing", "ErrorMessage", true);
  1581. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", true);
  1582. WriteParameter(param, category, "MQTT", "Uri", true);
  1583. WriteParameter(param, category, "MQTT", "MainTopic", true);
  1584. WriteParameter(param, category, "MQTT", "ClientID", true);
  1585. WriteParameter(param, category, "MQTT", "user", true);
  1586. WriteParameter(param, category, "MQTT", "password", true);
  1587. WriteParameter(param, category, "GPIO", "MainTopicMQTT", true);
  1588. WriteParameter(param, category, "GPIO", "IO0", true);
  1589. WriteParameter(param, category, "GPIO", "IO1", true);
  1590. WriteParameter(param, category, "GPIO", "IO3", true);
  1591. WriteParameter(param, category, "GPIO", "IO4", true);
  1592. WriteParameter(param, category, "GPIO", "IO12", true);
  1593. WriteParameter(param, category, "GPIO", "IO13", true);
  1594. WriteParameter(param, category, "AutoTimer", "AutoStart", false);
  1595. WriteParameter(param, category, "AutoTimer", "Intervall", false);
  1596. WriteParameter(param, category, "Debug", "Logfile", true);
  1597. WriteParameter(param, category, "Debug", "LogfileRetentionInDays", true);
  1598. WriteParameter(param, category, "System", "TimeZone", true);
  1599. WriteParameter(param, category, "System", "Hostname", true);
  1600. WriteParameter(param, category, "System", "TimeServer", true);
  1601. }
  1602. function ReadParameterAll()
  1603. {
  1604. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  1605. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  1606. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  1607. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  1608. ReadParameter(param, "MakeImage", "LogImageLocation", true);
  1609. ReadParameter(param, "MakeImage", "LogfileRetentionInDays", true);
  1610. ReadParameter(param, "MakeImage", "WaitBeforeTakingPicture", false);
  1611. ReadParameter(param, "MakeImage", "ImageQuality", false);
  1612. ReadParameter(param, "MakeImage", "Brightness", false);
  1613. // ReadParameter(param, "MakeImage", "Contrast", false);
  1614. // ReadParameter(param, "MakeImage", "Saturation", false);
  1615. ReadParameter(param, "MakeImage", "ImageSize", false);
  1616. ReadParameter(param, "MakeImage", "FixedExposure", false);
  1617. ReadParameter(param, "Alignment", "SearchFieldX", false);
  1618. ReadParameter(param, "Alignment", "SearchFieldY", false);
  1619. ReadParameter(param, "Alignment", "AlignmentAlgo", true);
  1620. ReadParameter(param, "Digits", "Model", false);
  1621. ReadParameter(param, "Digits", "LogImageLocation", true);
  1622. ReadParameter(param, "Digits", "LogfileRetentionInDays", true);
  1623. ReadParameter(param, "Digits", "ModelInputSize", false);
  1624. ReadParameter(param, "Analog", "Model", false);
  1625. ReadParameter(param, "Analog", "LogImageLocation", true);
  1626. ReadParameter(param, "Analog", "LogfileRetentionInDays", true);
  1627. ReadParameter(param, "Analog", "ExtendedResolution", true);
  1628. ReadParameter(param, "Analog", "ModelInputSize", false);
  1629. ReadParameter(param, "PostProcessing", "PreValueUse", true);
  1630. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  1631. ReadParameter(param, "PostProcessing", "AllowNegativeRates", true);
  1632. ReadParameter(param, "PostProcessing", "MaxRateValue", true);
  1633. ReadParameter(param, "PostProcessing", "ErrorMessage", true);
  1634. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", true);
  1635. ReadParameter(param, "MQTT", "Uri", true);
  1636. ReadParameter(param, "MQTT", "MainTopic", true);
  1637. ReadParameter(param, "MQTT", "ClientID", true);
  1638. ReadParameter(param, "MQTT", "user", true);
  1639. ReadParameter(param, "MQTT", "password", true);
  1640. ReadParameter(param, "GPIO", "MainTopicMQTT", true);
  1641. ReadParameter(param, "GPIO", "IO0", true);
  1642. ReadParameter(param, "GPIO", "IO1", true);
  1643. ReadParameter(param, "GPIO", "IO3", true);
  1644. ReadParameter(param, "GPIO", "IO4", true);
  1645. ReadParameter(param, "GPIO", "IO12", true);
  1646. ReadParameter(param, "GPIO", "IO13", true);
  1647. ReadParameter(param, "AutoTimer", "AutoStart", false);
  1648. ReadParameter(param, "AutoTimer", "Intervall", false);
  1649. ReadParameter(param, "Debug", "Logfile", true);
  1650. ReadParameter(param, "Debug", "LogfileRetentionInDays", true);
  1651. ReadParameter(param, "System", "TimeZone", true);
  1652. ReadParameter(param, "System", "Hostname", true);
  1653. ReadParameter(param, "System", "TimeServer", true);
  1654. UpdateInputIndividual();
  1655. // FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  1656. }
  1657. function FormatDecimalValue(_param, _cat, _name) {
  1658. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1659. var _val = _param[_cat][_name]["value"+j];
  1660. _val = _val.replace(",", ".");
  1661. _param[_cat][_name]["value"+j] = _val;
  1662. }
  1663. }
  1664. function UpdateAfterCategoryCheck() {
  1665. ReadParameterAll();
  1666. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  1667. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  1668. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  1669. UpdateInput();
  1670. UpdateInputIndividual();
  1671. }
  1672. function UpdateExpertModus()
  1673. {
  1674. var _style = 'display:none;';
  1675. if (document.getElementById("ExpertModus_enabled").checked) {
  1676. _style = '';
  1677. document.getElementById("Edit_Config_Direct").style.display = "";
  1678. }
  1679. else
  1680. {
  1681. document.getElementById("Edit_Config_Direct").style.display = "none";
  1682. }
  1683. const expert = document.querySelectorAll(".expert");
  1684. for (var i = 0; i < expert.length; i++) {
  1685. document.getElementById(expert[i].id).style = _style;
  1686. }
  1687. }
  1688. function saveTextAsFile()
  1689. {
  1690. ReadParameterAll();
  1691. if (document.getElementsByClassName("invalid-input").length > 0) {
  1692. alert("Settings cannot be saved. Please check your entries.");
  1693. return;
  1694. }
  1695. if (confirm("Are you sure you want to update \"config.ini\"?")) {
  1696. ReadParameterAll();
  1697. WriteConfigININew();
  1698. SaveConfigToServer(basepath);
  1699. }
  1700. }
  1701. function doReboot() {
  1702. if (confirm("Are you sure you want to reboot the ESP32?")) {
  1703. var stringota = "/reboot";
  1704. window.location = stringota;
  1705. window.location.href = stringota;
  1706. window.location.assign(stringota);
  1707. window.location.replace(stringota);
  1708. }
  1709. }
  1710. function editConfigDirect() {
  1711. if (confirm("Did you save your changes?")) {
  1712. var stringota = "/edit_config.html";
  1713. window.location = stringota;
  1714. window.location.href = stringota;
  1715. window.location.assign(stringota);
  1716. window.location.replace(stringota);
  1717. }
  1718. }
  1719. function numberChanged()
  1720. {
  1721. UpdateInputIndividual();
  1722. }
  1723. LoadConfigNeu();
  1724. </script>
  1725. </body>
  1726. </html>