edit_config_param.html 65 KB

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