edit_config_param.html 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216
  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. </style>
  20. </head>
  21. <body style="font-family: arial; padding: 0px 10px;">
  22. <table style="width:100%">
  23. <tr>
  24. <td>
  25. <h2>Config.ini:</h2>
  26. </td>
  27. <td>
  28. <button class="button" id="Edit_Config_Direct" onclick="editConfigDirect()" style="display:none">Edit Config.ini direct</button>
  29. <input type="checkbox" id="ExpertModus_enabled" value="1" onclick = 'UpdateExpertModus()' unchecked><label for="ExpertModus_enabled"> Expertenmodus </label>
  30. </td>
  31. </tr>
  32. </table>
  33. <br>
  34. <div id = "divall" style="display:none">
  35. <table>
  36. <tr>
  37. <th width="20px" style="text-align: left;">
  38. Enable
  39. </th>
  40. <th width="200px" style="text-align: left;">
  41. Parameter
  42. </th>
  43. <th style="text-align: left;">
  44. Value
  45. </th>
  46. <th style="text-align: left;">
  47. Information
  48. </th>
  49. </tr>
  50. <tr>
  51. <td colspan="4" style="padding-left: 20px;"><h4>MakeImage</h4></td>
  52. </tr>
  53. <tr>
  54. <td width="20px" style="padding-left: 40px;">
  55. <input type="checkbox" id="MakeImage_LogImageLocation_enabled" value="1" onclick = 'InvertEnableItem("MakeImage", "LogImageLocation")' unchecked >
  56. </td>
  57. <td width="200px">
  58. <class id="MakeImage_LogImageLocation_text" style="color:black;">LogImageLocation</class>
  59. </td>
  60. <td>
  61. <input type="text" name="name" id="MakeImage_LogImageLocation_value1">
  62. </td>
  63. <td style="font-size: 80%;">
  64. Location to store raw images for logging
  65. </td>
  66. </tr>
  67. <tr>
  68. <td width="20px" style="padding-left: 40px;">
  69. <td"><input type="checkbox" id="MakeImage_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("MakeImage", "LogfileRetentionInDays")' unchecked ></td>
  70. </td>
  71. <td>
  72. <class id="MakeImage_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class>
  73. </td>
  74. <td>
  75. <input type="number" id="MakeImage_LogfileRetentionInDays_value1" size="13" min="0" step="1">
  76. </td>
  77. <td style="font-size: 80%;">
  78. Time to keep the raw image (in days -"0" = forever)
  79. </td>
  80. </tr>
  81. <tr class="expert" id="ex1">
  82. <td width="20px" style="padding-left: 40px;">
  83. </td>
  84. <td>
  85. <class id="MakeImage_WaitBeforeTakingPicture_text" style="color:black;">WaitBeforeTakingPicture</class>
  86. </td>
  87. <td>
  88. <input type="number" id="MakeImage_WaitBeforeTakingPicture_value1" size="13" min="0" step="any">
  89. </td>
  90. <td style="font-size: 80%;">
  91. Wait time between illumination switch on and take the picture (in seconds)
  92. </td>
  93. </tr>
  94. <tr class="expert" id="ex2">
  95. <td width="20px" style="padding-left: 40px;">
  96. </td>
  97. <td>
  98. <class id="MakeImage_ImageQuality_text" style="color:black;">ImageQuality</class>
  99. </td>
  100. <td>
  101. <input type="number" id="MakeImage_ImageQuality_value1" size="13" min="0" max="63">
  102. </td>
  103. <td style="font-size: 80%;">
  104. Quality index for picture (default = "5" - "0" high ... "63" low)
  105. </td>
  106. </tr>
  107. <tr class="expert" id="ex3">
  108. <td width="20px" style="padding-left: 40px;">
  109. </td>
  110. <td>
  111. <class id="MakeImage_ImageSize_text" style="color:black;">ImageSize</class>
  112. </td>
  113. <td>
  114. <select id="MakeImage_ImageSize_value1">
  115. <option value="0" selected>VGA</option>
  116. <option value="1" >QVGA</option>
  117. </select>
  118. </td>
  119. <td style="font-size: 80%;">
  120. Picture size camera (default = "VGA")
  121. </td>
  122. </tr>
  123. <tr class="expert" id="Brightness_ex3">
  124. <td width="20px" style="padding-left: 40px;">
  125. </td>
  126. <td>
  127. <class id="MakeImage_Brightness_text" style="color:black;">Brightness</class>
  128. </td>
  129. <td>
  130. <input type="number" id="MakeImage_Brightness_value1" size="13" min="-2" max="2">
  131. </td>
  132. <td style="font-size: 80%;">
  133. Image Brightness (-2 .. 2 - default = "0")
  134. </td>
  135. </tr>
  136. <tr class="expert" id="MakeImage_FixedExposure_ex10">
  137. <td width="20px" style="padding-left: 40px;">
  138. </td>
  139. <td width="200px">
  140. <class id="MakeImage_FixedExposure_text" style="color:black;">FixedExposure</class>
  141. </td>
  142. <td>
  143. <select id="MakeImage_FixedExposure_value1">
  144. <option value="0" selected>true</option>
  145. <option value="1" >false</option>
  146. </select>
  147. </td>
  148. <td style="font-size: 80%;">
  149. Fixes the illumination setting of camera at the startup and uses this later --> individual round is faster
  150. </td>
  151. </tr>
  152. <!--
  153. <tr class="expert" id="Contrast_ex3">
  154. <td width="20px" style="padding-left: 40px;">
  155. </td>
  156. <td>
  157. <class id="MakeImage_Contrast_text" style="color:black;">Contrast</class>
  158. </td>
  159. <td>
  160. <input type="number" id="MakeImage_Contrast_value1" size="13" min="-2" max="2">
  161. </td>
  162. <td style="font-size: 80%;">
  163. Image Contrast (-2 .. 2 - default = "0")
  164. </td>
  165. </tr>
  166. <tr class="expert" id="Saturation_ex3">
  167. <td width="20px" style="padding-left: 40px;">
  168. </td>
  169. <td>
  170. <class id="MakeImage_Saturation_text" style="color:black;">Saturation</class>
  171. </td>
  172. <td>
  173. <input type="number" id="MakeImage_Saturation_value1" size="13" min="-2" max="2">
  174. </td>
  175. <td style="font-size: 80%;">
  176. Image Saturation (-2 .. 2 - default = "0")
  177. </td>
  178. </tr>
  179. -->
  180. <tr class="expert" id="ex4">
  181. <td colspan="4" style="padding-left: 20px;"><h4>Alignment</h4></td>
  182. </tr>
  183. <tr class="expert" id="ex6">
  184. <td width="20px" style="padding-left: 40px;">
  185. </td>
  186. <td width="200px">
  187. <class id="Alignment_SearchFieldX_text" style="color:black;">SearchFieldX</class>
  188. </td>
  189. <td>
  190. <input type="number" name="name" id="Alignment_SearchFieldX_value1" size="13" min="1" step="1">
  191. </td>
  192. <td style="font-size: 80%;">
  193. x size (width) in which the reference is searched (default = "20")
  194. </td>
  195. </tr>
  196. <tr class="expert" id="ex8">
  197. <td width="20px" style="padding-left: 40px;">
  198. </td>
  199. <td>
  200. <class id="Alignment_SearchFieldY_text" style="color:black;">SearchFieldY</class>
  201. </td>
  202. <td>
  203. <input type="number" name="name" id="Alignment_SearchFieldY_value1" size="13" min="1">
  204. </td>
  205. <td style="font-size: 80%;">
  206. y size (height) in which the reference is searched (default = "20")
  207. </td>
  208. </tr>
  209. <tr class="expert" id="AlignmentAlgo_ex8">
  210. <td width="20px" style="padding-left: 40px;">
  211. <input type="checkbox" id="Alignment_AlignmentAlgo_enabled" value="1" onclick = 'InvertEnableItem("Alignment", "AlignmentAlgo")' unchecked >
  212. </td>
  213. <td>
  214. <class id="Alignment_AlignmentAlgo_text" style="color:black;">AlignmentAlgo</class>
  215. </td>
  216. <td>
  217. <select id="Alignment_AlignmentAlgo_value1">
  218. <option value="0" selected>Default</option>
  219. <option value="1" >HighAccurity</option>
  220. <option value="2" >Fast</option>
  221. </select>
  222. </td>
  223. <td style="font-size: 80%;">
  224. "Default" = use only R-Channel, "HighAccurity" = use all Channels (RGB, 3x slower), <br> "Fast" (First time RGB, then only check if image is shifted)
  225. </td>
  226. </tr>
  227. <tr id="Category_Digits_ex4">
  228. <td colspan="4" style="padding-left: 20px;">
  229. <h4><input type="checkbox" id="Category_Digits_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >Digits</h4></td>
  230. </tr>
  231. <tr>
  232. <td width="20px" style="padding-left: 40px;">
  233. </td>
  234. <td width="200px">
  235. <class id="Digits_Model_text" style="color:black;">Model</class>
  236. </td>
  237. <td>
  238. <input type="text" id="Digits_Model_value1">
  239. </td>
  240. <td style="font-size: 80%;">
  241. path to CNN model file for image recognition
  242. </td>
  243. </tr>
  244. <tr>
  245. <td width="20px" style="padding-left: 40px;">
  246. <input type="checkbox" id="Digits_LogImageLocation_enabled" value="1" onclick = 'InvertEnableItem("Digits", "LogImageLocation")' unchecked >
  247. </td>
  248. <td>
  249. <class id="Digits_LogImageLocation_text" style="color:black;">LogImageLocation</class>
  250. </td>
  251. <td>
  252. <input type="text" name="name" id="Digits_LogImageLocation_value1">
  253. </td>
  254. <td style="font-size: 80%;">
  255. Location to store separated digits for logging
  256. </td>
  257. </tr>
  258. <tr>
  259. <td width="20px" style="padding-left: 40px;">
  260. <td"><input type="checkbox" id="Digits_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("Digits", "LogfileRetentionInDays")' unchecked ></td>
  261. </td>
  262. <td>
  263. <class id="Digits_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class>
  264. </td>
  265. <td>
  266. <input type="number" id="Digits_LogfileRetentionInDays_value1" min="0" step="1">
  267. </td>
  268. <td style="font-size: 80%;">
  269. Time to keep the separated digit images (in days -"0" = forever)
  270. </td>
  271. </tr>
  272. <tr class="expert" id="ex9">
  273. <td width="20px" style="padding-left: 40px;">
  274. </td>
  275. <td>
  276. <class id="Digits_ModelInputSize_text" style="color:black;">ModelInputSize</class>
  277. </td>
  278. <td>
  279. x: <input type="number" id="Digits_ModelInputSize_value1" style="width: 30px;" min="1" step="1">
  280. y: <input type="number" id="Digits_ModelInputSize_value2" style="width: 30px;" min="1" step="1">
  281. </td>
  282. <td style="font-size: 80%;">
  283. Size of the input image for the CNN model
  284. </td>
  285. </tr>
  286. <tr class="expert" id="ex4">
  287. <td colspan="4" style="padding-left: 20px;">
  288. <h4><input type="checkbox" id="Category_Analog_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked > Analog</h4></td>
  289. </tr>
  290. <tr>
  291. <td width="20px" style="padding-left: 40px;"> </td>
  292. <td width="200px"> <class id="Analog_Model_text" style="color:black;">Model</class> </td>
  293. <td> <input type="text" id="Analog_Model_value1"> </td>
  294. <td style="font-size: 80%;"> path to CNN model file for image recognition</td>
  295. </tr>
  296. <tr>
  297. <td width="20px" style="padding-left: 40px;">
  298. <input type="checkbox" id="Analog_LogImageLocation_enabled" value="1" onclick = 'InvertEnableItem("Analog", "LogImageLocation")' unchecked >
  299. </td>
  300. <td> <class id="Analog_LogImageLocation_text" style="color:black;">LogImageLocation</class> </td>
  301. <td> <input type="text" name="name" id="Analog_LogImageLocation_value1"> </td>
  302. <td style="font-size: 80%;"> Location to store separated digits for logging </td>
  303. </tr>
  304. <tr>
  305. <td width="20px" style="padding-left: 40px;">
  306. <td"><input type="checkbox" id="Analog_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("Analog", "LogfileRetentionInDays")' unchecked ></td>
  307. </td>
  308. <td> <class id="Analog_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class> </td>
  309. <td> <input type="number" id="Analog_LogfileRetentionInDays_value1" min="0" step="1"> </td>
  310. <td style="font-size: 80%;"> Time to keep the separated digit images (in days -"0" = forever) </td>
  311. </tr>
  312. <tr class="expert" id="Analog_ExtendedResolution_ex10">
  313. <td width="20px" style="padding-left: 40px;">
  314. <input type="checkbox" id="Analog_ExtendedResolution_enabled" value="1" onclick = 'InvertEnableItem("Analog", "ExtendedResolution")' unchecked >
  315. </td>
  316. <td width="200px">
  317. <class id="Analog_ExtendedResolution_text" style="color:black;">ExtendedResolution</class>
  318. </td>
  319. <td>
  320. <select id="Analog_ExtendedResolution_value1">
  321. <option value="0" selected>true</option>
  322. <option value="1" >false</option>
  323. </select>
  324. </td>
  325. <td style="font-size: 80%;">
  326. Enable to use the after point resolution for the last analog counter
  327. </td>
  328. </tr>
  329. ExtendedResolution
  330. <tr class="expert" id="ex10">
  331. <td width="20px" style="padding-left: 40px;"> </td>
  332. <td> <class id="Analog_ModelInputSize_text" style="color:black;">ModelInputSize</class> </td>
  333. <td>
  334. x: <input type="number" id="Analog_ModelInputSize_value1" style="width: 30px;" min="1" step="1">
  335. y: <input type="number" id="Analog_ModelInputSize_value2" style="width: 30px;" min="1" step="1">
  336. </td>
  337. <td style="font-size: 80%;"> Size of the input image for the CNN model </td>
  338. </tr>
  339. <tr>
  340. <td colspan="4" style="padding-left: 20px;"><h4>PostProcessing</h4></td>
  341. </tr>
  342. <tr>
  343. <td width="20px" style="padding-left: 40px;">
  344. <input type="checkbox" id="PostProcessing_PreValueUse_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "PreValueUse")' unchecked >
  345. </td>
  346. <td width="200px">
  347. <class id="PostProcessing_PreValueUse_text" style="color:black;">PreValueUse</class>
  348. </td>
  349. <td>
  350. <select id="PostProcessing_PreValueUse_value1">
  351. <option value="0" selected>true</option>
  352. <option value="1" >false</option>
  353. </select>
  354. </td>
  355. <td style="font-size: 80%;">
  356. Enable to use the previous read value for consistency checks - also on reboots
  357. </td>
  358. </tr>
  359. <tr class="expert" id="ex11">
  360. <td width="20px" style="padding-left: 40px;">
  361. <input type="checkbox" id="PostProcessing_PreValueAgeStartup_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "PreValueAgeStartup")' unchecked >
  362. </td>
  363. <td width="200px">
  364. <class id="PostProcessing_PreValueAgeStartup_text" style="color:black;">PreValueAgeStartup</class>
  365. </td>
  366. <td>
  367. <input type="number" id="PostProcessing_PreValueAgeStartup_value1" size="13" min="0">
  368. </td>
  369. <td style="font-size: 80%;">
  370. Time (in minutes), how long a previous read value is valid after reboot (default = 720 min)
  371. </td>
  372. </tr>
  373. <tr>
  374. <td width="20px" style="padding-left: 40px;">
  375. <input type="checkbox" id="PostProcessing_AllowNegativeRates_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "AllowNegativeRates")' unchecked >
  376. </td>
  377. <td width="200px">
  378. <class id="PostProcessing_AllowNegativeRates_text" style="color:black;">AllowNegativeRates</class>
  379. </td>
  380. <td>
  381. <select id="PostProcessing_AllowNegativeRates_value1">
  382. <option value="0" selected>true</option>
  383. <option value="1" >false</option>
  384. </select>
  385. </td>
  386. <td style="font-size: 80%;">
  387. Set on "false" to ensure, that only positive changes are accepted (typically for counter)
  388. </td>
  389. </tr>
  390. <tr>
  391. <td width="20px" style="padding-left: 40px;">
  392. <input type="checkbox" id="PostProcessing_MaxRateValue_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateValue")' unchecked >
  393. </td>
  394. <td width="200px">
  395. <class id="PostProcessing_MaxRateValue_text" style="color:black;">MaxRateValue</class>
  396. </td>
  397. <td>
  398. <input type="number" id="PostProcessing_MaxRateValue_value1" size="13" min="0" step="any">
  399. </td>
  400. <td style="font-size: 80%;">
  401. Maximum change of reading from one to the next readout
  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="0" selected>true</option>
  414. <option value="1" >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>
  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="0" selected>true</option>
  431. <option value="1" >false</option>
  432. </select>
  433. </td>
  434. <td style="font-size: 80%;">
  435. Activate to enalbe 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 colspan="4" style="padding-left: 20px;"><h4><input type="checkbox" id="Category_MQTT_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked > MQTT</h4></td>
  465. </tr>
  466. <tr>
  467. <td width="20px" style="padding-left: 40px;">
  468. <input type="checkbox" id="MQTT_Uri_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Uri")' unchecked >
  469. </td>
  470. <td width="200px">
  471. <class id="MQTT_Uri_text" style="color:black;">Uri</class>
  472. </td>
  473. <td>
  474. <input type="text" id="MQTT_Uri_value1">
  475. </td>
  476. <td style="font-size: 80%;">
  477. URI to the MQTT broker including port e.g.: mqtt://IP-Address:Port
  478. </td>
  479. </tr>
  480. <tr>
  481. <td width="20px" style="padding-left: 40px;">
  482. <input type="checkbox" id="MQTT_Topic_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Topic")' unchecked >
  483. </td>
  484. <td width="200px">
  485. <class id="MQTT_Topic_text" style="color:black;">Topic</class>
  486. </td>
  487. <td>
  488. <input type="text" id="MQTT_Topic_value1">
  489. </td>
  490. <td style="font-size: 80%;">
  491. MQTT topic, in which the value is registered
  492. </td>
  493. </tr>
  494. <tr>
  495. <td width="20px" style="padding-left: 40px;">
  496. <input type="checkbox" id="MQTT_TopicError_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "TopicError")' unchecked >
  497. </td>
  498. <td width="200px">
  499. <class id="MQTT_TopicError_text" style="color:black;">TopicError</class>
  500. </td>
  501. <td>
  502. <input type="text" id="MQTT_TopicError_value1">
  503. </td>
  504. <td style="font-size: 80%;">
  505. MQTT topic, in which the error status is reported (empty = no error)
  506. </td>
  507. </tr>
  508. <tr>
  509. <td width="20px" style="padding-left: 40px;">
  510. <input type="checkbox" id="MQTT_TopicRate_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "TopicRate")' unchecked >
  511. </td>
  512. <td width="200px">
  513. <class id="MQTT_TopicRate_text" style="color:black;">TopicRate</class>
  514. </td>
  515. <td>
  516. <input type="text" id="MQTT_TopicRate_value1">
  517. </td>
  518. <td style="font-size: 80%;">
  519. MQTT topic, in which the flow rate [units / minute] is reported
  520. </td>
  521. </tr>
  522. <tr>
  523. <td width="20px" style="padding-left: 40px;">
  524. <input type="checkbox" id="MQTT_TopicTimeStamp_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "TopicTimeStamp")' unchecked >
  525. </td>
  526. <td width="200px">
  527. <class id="MQTT_TopicTimeStamp_text" style="color:black;">TopicTimeStamp</class>
  528. </td>
  529. <td>
  530. <input type="text" id="MQTT_TopicTimeStamp_value1">
  531. </td>
  532. <td style="font-size: 80%;">
  533. MQTT topic, reporting the last correct readout
  534. </td>
  535. </tr>
  536. <tr>
  537. <td width="20px" style="padding-left: 40px;">
  538. <input type="checkbox" id="MQTT_ClientID_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientID")' unchecked >
  539. </td>
  540. <td width="200px">
  541. <class id="MQTT_ClientID_text" style="color:black;">ClientID</class>
  542. </td>
  543. <td>
  544. <input type="text" id="MQTT_ClientID_value1">
  545. </td>
  546. <td style="font-size: 80%;">
  547. ClientID to connect to the MQTT broker
  548. </td>
  549. </tr>
  550. <tr>
  551. <td width="20px" style="padding-left: 40px;">
  552. <input type="checkbox" id="MQTT_user_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "user")' unchecked >
  553. </td>
  554. <td width="200px">
  555. <class id="MQTT_user_text" style="color:black;">user</class>
  556. </td>
  557. <td>
  558. <input type="text" id="MQTT_user_value1">
  559. </td>
  560. <td style="font-size: 80%;">
  561. user for MQTT authentication
  562. </td>
  563. </tr>
  564. <tr>
  565. <td width="20px" style="padding-left: 40px;">
  566. <input type="checkbox" id="MQTT_password_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "password")' unchecked >
  567. </td>
  568. <td width="200px">
  569. <class id="MQTT_password_text" style="color:black;">password</class>
  570. </td>
  571. <td>
  572. <input type="text" id="MQTT_password_value1">
  573. </td>
  574. <td style="font-size: 80%;">
  575. password for MQTT authentication
  576. </td>
  577. </tr>
  578. <tr>
  579. <td colspan="4" style="padding-left: 20px;"><h4>AutoTimer</h4></td>
  580. </tr>
  581. <tr class="expert" id="ex13">
  582. <td width="20px" style="padding-left: 40px;">
  583. </td>
  584. <td width="200px">
  585. <class id="AutoTimer_AutoStart_text" style="color:black;">AutoStart</class>
  586. </td>
  587. <td>
  588. <select id="AutoTimer_AutoStart_value1">
  589. <option value="0" selected>true</option>
  590. <option value="1" >false</option>
  591. </select>
  592. </td>
  593. <td style="font-size: 80%;">
  594. Start the image recognition immediatly after power up. false is basically for debugging.
  595. </td>
  596. </tr>
  597. <tr>
  598. <td width="20px" style="padding-left: 40px;">
  599. </td>
  600. <td width="200px">
  601. <class id="AutoTimer_Intervall_text" style="color:black;">Intervall</class>
  602. </td>
  603. <td>
  604. <input type="number" id="AutoTimer_Intervall_value1" size="13" min="3" step="any">
  605. </td>
  606. <td style="font-size: 80%;">
  607. Intervall in which the counter is read (in minutes). Number must be greater than 3 minutes.
  608. </td>
  609. </tr>
  610. <tr>
  611. <td colspan="4" style="padding-left: 20px;"><h4>Debug</h4></td>
  612. </tr>
  613. <tr>
  614. <td width="20px" style="padding-left: 40px;">
  615. <input type="checkbox" id="Debug_Logfile_enabled" value="1" onclick = 'InvertEnableItem("Debug", "Logfile")' unchecked >
  616. </td>
  617. <td width="200px">
  618. <class id="Debug_Logfile_text" style="color:black;">Logfile</class>
  619. </td>
  620. <td>
  621. <select id="Debug_Logfile_value1">
  622. <option value="0" selected>true</option>
  623. <option value="1" >false</option>
  624. </select>
  625. </td>
  626. <td style="font-size: 80%;">
  627. Turn on/off the extended logging
  628. </td>
  629. </tr>
  630. <tr>
  631. <td width="20px" style="padding-left: 40px;">
  632. <td"><input type="checkbox" id="Debug_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("Debug", "LogfileRetentionInDays")' unchecked ></td>
  633. </td>
  634. <td>
  635. <class id="Debug_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class>
  636. </td>
  637. <td>
  638. <input type="number" id="Debug_LogfileRetentionInDays_value1" size="13" min="0" step="1">
  639. </td>
  640. <td style="font-size: 80%;">
  641. Time to keep the log files (in days - "0" = forever)
  642. </td>
  643. </tr>
  644. <tr>
  645. <td colspan="4" style="padding-left: 20px;"><h4>System</h4></td>
  646. </tr>
  647. <tr>
  648. <td width="20px" style="padding-left: 40px;">
  649. <td"><input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeZone")' unchecked ></td>
  650. </td>
  651. <td>
  652. <class id="System_TimeZone_text" style="color:black;">TimeZone</class>
  653. </td>
  654. <td>
  655. <input type="text" id="System_TimeZone_value1">
  656. </td>
  657. <td style="font-size: 80%;">
  658. Time zone in POSIX syntax (Europe/Berlin = "CET-1CEST,M3.5.0,M10.5.0/3" - incl. daylight saving)
  659. </td>
  660. </tr>
  661. <tr class="expert" id="ex16">
  662. <td width="20px" style="padding-left: 40px;">
  663. <td"><input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeServer")' unchecked ></td>
  664. </td>
  665. <td>
  666. <class id="System_TimeServer_text" style="color:black;">TimeServer</class>
  667. </td>
  668. <td>
  669. <input type="text" id="System_TimeServer_value1">
  670. </td>
  671. <td style="font-size: 80%;">
  672. Time server to synchronize system time (default: "pool.ntp.org" - used if nothing is specified)
  673. </td>
  674. </tr>
  675. <tr class="expert" id="System_Hostname">
  676. <td width="20px" style="padding-left: 40px;">
  677. <td"><input type="checkbox" id="System_Hostname_enabled" value="1" onclick = 'InvertEnableItem("System", "Hostname")' unchecked ></td>
  678. </td>
  679. <td>
  680. <class id="System_Hostname_text" style="color:black;">Hostname</class>
  681. </td>
  682. <td>
  683. <input type="text" id="System_Hostname_value1">
  684. </td>
  685. <td style="font-size: 80%;">
  686. Hostname for server - will be transfered to wlan.ini at next startup)
  687. </td>
  688. </tr>
  689. </table>
  690. <p>
  691. <button class="button" onclick="saveTextAsFile()">Update Config.ini</button>
  692. </p>
  693. <p>
  694. </p>
  695. <div id="doreboot">
  696. <p>
  697. <button class="button" id="Edit_Config_Direct" onclick="editConfigDirect()" style="display:none">Edit Config.ini direct</button>
  698. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
  699. </p>
  700. </div>
  701. </div>
  702. <script type="text/javascript" src="./gethost.js"></script>
  703. <script type="text/javascript" src="./readconfigcommon.js"></script>
  704. <script type="text/javascript" src="./readconfigparam.js"></script>
  705. <script type="text/javascript">
  706. var canvas = document.getElementById('canvas'),
  707. basepath = "http://192.168.178.22";
  708. param;
  709. category;
  710. NUNBERSAkt = -1;
  711. NUMBERS;
  712. function LoadConfigNeu() {
  713. var isInitialSetup = getParameterByName('InitialSetup');
  714. if (isInitialSetup === 'true')
  715. {
  716. document.getElementById("reboot").style.display = "none";
  717. }
  718. basepath = getbasepath();
  719. if (!loadConfig(basepath)) {
  720. alert("Config.ini could not be loaded!\nPlease reload the page.");
  721. return;
  722. }
  723. loadConfig(basepath);
  724. ParseConfig();
  725. param = getConfigParameters();
  726. category = getConfigCategory();
  727. InitIndivParameter();
  728. UpdateInput();
  729. UpdateInputIndividual();
  730. UpdateExpertModus();
  731. document.getElementById("divall").style.display = '';
  732. }
  733. function InitIndivParameter()
  734. {
  735. NUMBERS = getNUMBERInfo();
  736. var _index = document.getElementById("Numbers_value1");
  737. while (_index.length)
  738. _index.remove(0);
  739. for (var i = 0; i < NUMBERS.length; ++i){
  740. var option = document.createElement("option");
  741. option.text = NUMBERS[i]["name"];
  742. option.value = i;
  743. _index.add(option);
  744. }
  745. _index.selectedIndex = 0;
  746. }
  747. function getParameterByName(name, url = window.location.href) {
  748. name = name.replace(/[\[\]]/g, '\\$&');
  749. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  750. results = regex.exec(url);
  751. if (!results) return null;
  752. if (!results[2]) return '';
  753. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  754. }
  755. function WriteParameter(_param, _category, _cat, _name, _optional, _select = false, _anzpara = 1, _number = -1){
  756. if (_number > -1)
  757. {
  758. if (NUMBERS[_number][_cat][_name]["found"]){
  759. if (_optional) {
  760. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  761. for (var j = 1; j <= _anzpara; ++j)
  762. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = NUMBERS[_number][_cat][_name]["enabled"];
  763. }
  764. document.getElementById(_cat+"_"+_name+"_text").style="color:black;"
  765. if (_select) {
  766. var textToFind;
  767. textToFind = NUMBERS[_number][_cat][_name]["value1"];
  768. var dd = document.getElementById(_cat+"_"+_name+"_value1");
  769. for (var i = 0; i < dd.options.length; i++) {
  770. if (dd.options[i].text.toLowerCase() === textToFind.toLowerCase()) {
  771. dd.selectedIndex = i;
  772. break;
  773. }
  774. }
  775. }
  776. else {
  777. for (var j = 1; j <= _anzpara; ++j)
  778. document.getElementById(_cat+"_"+_name+"_value"+j).value = NUMBERS[_number][_cat][_name]["value"+j];
  779. }
  780. }
  781. else {
  782. if (_optional) {
  783. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  784. for (var j = 1; j <= _anzpara; ++j) {
  785. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  786. }
  787. }
  788. document.getElementById(_cat+"_"+_name+"_text").style="color:lightgrey;"
  789. }
  790. }
  791. else
  792. {
  793. if (_param[_cat][_name]["found"]){
  794. if (_optional) {
  795. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  796. for (var j = 1; j <= _anzpara; ++j)
  797. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  798. }
  799. document.getElementById(_cat+"_"+_name+"_text").style="color:black;"
  800. if (_select) {
  801. var textToFind;
  802. textToFind = _param[_cat][_name]["value1"];
  803. var dd = document.getElementById(_cat+"_"+_name+"_value1");
  804. for (var i = 0; i < dd.options.length; i++) {
  805. if (dd.options[i].text.toLowerCase() === textToFind.toLowerCase()) {
  806. dd.selectedIndex = i;
  807. break;
  808. }
  809. }
  810. }
  811. else {
  812. for (var j = 1; j <= _anzpara; ++j)
  813. document.getElementById(_cat+"_"+_name+"_value"+j).value = _param[_cat][_name]["value"+j];
  814. }
  815. }
  816. else {
  817. if (_optional) {
  818. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  819. for (var j = 1; j <= _anzpara; ++j) {
  820. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  821. }
  822. }
  823. document.getElementById(_cat+"_"+_name+"_text").style="color:lightgrey;"
  824. }
  825. }
  826. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  827. if (_category[_cat]["enabled"] == false)
  828. {
  829. if (_optional) {
  830. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  831. for (var j = 1; j <= _anzpara; ++j) {
  832. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  833. }
  834. }
  835. document.getElementById(_cat+"_"+_name+"_text").style="color:lightgrey;"
  836. }
  837. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional);
  838. }
  839. function InvertEnableItem(_cat, _param)
  840. {
  841. _zw = _cat + "_" + _param + "_enabled";
  842. _isOn = document.getElementById(_zw).checked;
  843. _color = "color:lightgrey;";
  844. if (_isOn) {
  845. _color = "color:black;";
  846. }
  847. _zw = _cat + "_" + _param + "_text";
  848. document.getElementById(_zw).disabled = !_isOn;
  849. document.getElementById(_zw).style = _color;
  850. if (param[_cat][_param]["anzParam"] == 2) {
  851. _color = "width: 30px;" + _color;
  852. }
  853. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  854. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  855. document.getElementById(_cat+"_"+_param+"_value"+j).style=_color;
  856. }
  857. }
  858. function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1)
  859. {
  860. _status = _param[_cat][_name]["found"] && _category[_cat]["enabled"];
  861. _color = "color:lightgrey;";
  862. if (_status) {
  863. _color = "color:black;";
  864. }
  865. if (_optional) {
  866. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  867. document.getElementById(_cat+"_"+_name+"_enabled").style=_color;
  868. }
  869. if (_number == -1){
  870. if (!_param[_cat][_name]["enabled"]) {
  871. _status = false;
  872. _color = "color:lightgrey;";
  873. }
  874. }
  875. else
  876. if (!NUMBERS[_number][_cat][_name]["enabled"]) {
  877. _status = false;
  878. _color = "color:lightgrey;";
  879. }
  880. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  881. document.getElementById(_cat+"_"+_name+"_text").style = _color;
  882. if (_param[_cat][_name]["anzParam"] == 2) {
  883. _color = "width: 30px;" + _color;
  884. }
  885. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  886. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  887. document.getElementById(_cat+"_"+_name+"_value"+j).style=_color;
  888. }
  889. }
  890. function ReadParameter(_param, _cat, _name, _optional, _select = false, _number = -1){
  891. if (_number > -1)
  892. {
  893. if (_cat == "Digits")
  894. _cat = "digit"
  895. if (_cat == "Analog")
  896. _cat = "analog"
  897. if (NUMBERS[_number][_cat][_name]["found"]){
  898. if (_optional) {
  899. NUMBERS[_number][_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  900. }
  901. if (_select) {
  902. var sel = document.getElementById(_cat+"_"+_name+"_value1");
  903. NUMBERS[_number][_cat][_name]["value1"] = sel.options[sel.selectedIndex].text;
  904. }
  905. else {
  906. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  907. NUMBERS[_number][_cat][_name]["value"+j] = document.getElementById(_cat+"_"+_name+"_value"+j).value;
  908. }
  909. }
  910. }
  911. }
  912. else
  913. {
  914. if (_param[_cat][_name]["found"]){
  915. if (_optional) {
  916. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  917. }
  918. if (_select) {
  919. var sel = document.getElementById(_cat+"_"+_name+"_value1");
  920. _param[_cat][_name]["value1"] = sel.options[sel.selectedIndex].text;
  921. }
  922. else {
  923. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  924. _param[_cat][_name]["value"+j] = document.getElementById(_cat+"_"+_name+"_value"+j).value;
  925. }
  926. }
  927. }
  928. }
  929. }
  930. function UpdateInputIndividual()
  931. {
  932. if (NUNBERSAkt != -1)
  933. {
  934. ReadParameter(param, "PostProcessing", "DecimalShift", true, false, NUNBERSAkt)
  935. }
  936. var sel = document.getElementById("Numbers_value1");
  937. NUNBERSAkt = sel.selectedIndex;
  938. WriteParameter(param, category, "PostProcessing", "DecimalShift", true, false, 1, NUNBERSAkt);
  939. }
  940. function UpdateInput() {
  941. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  942. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  943. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  944. WriteParameter(param, category, "MakeImage", "LogImageLocation", true);
  945. WriteParameter(param, category, "MakeImage", "LogfileRetentionInDays", true);
  946. WriteParameter(param, category, "MakeImage", "WaitBeforeTakingPicture", false);
  947. WriteParameter(param, category, "MakeImage", "ImageQuality", false);
  948. WriteParameter(param, category, "MakeImage", "Brightness", false);
  949. // WriteParameter(param, category, "MakeImage", "Contrast", false);
  950. // WriteParameter(param, category, "MakeImage", "Saturation", false);
  951. WriteParameter(param, category, "MakeImage", "ImageSize", false, true, true);
  952. WriteParameter(param, category, "MakeImage", "FixedExposure", false, true, true);
  953. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  954. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  955. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true, true, true);
  956. WriteParameter(param, category, "Digits", "Model", false);
  957. WriteParameter(param, category, "Digits", "LogImageLocation", true);
  958. WriteParameter(param, category, "Digits", "LogfileRetentionInDays", true);
  959. WriteParameter(param, category, "Digits", "ModelInputSize", false, false, 2);
  960. WriteParameter(param, category, "Analog", "Model", false);
  961. WriteParameter(param, category, "Analog", "LogImageLocation", true);
  962. WriteParameter(param, category, "Analog", "LogfileRetentionInDays", true);
  963. WriteParameter(param, category, "Analog", "ExtendedResolution", true, true);
  964. WriteParameter(param, category, "Analog", "ModelInputSize", false, false, 2);
  965. WriteParameter(param, category, "PostProcessing", "PreValueUse", true, true);
  966. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  967. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true, true);
  968. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true);
  969. WriteParameter(param, category, "PostProcessing", "ErrorMessage", true, true);
  970. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", true, true);
  971. WriteParameter(param, category, "MQTT", "Uri", true);
  972. WriteParameter(param, category, "MQTT", "Topic", true);
  973. WriteParameter(param, category, "MQTT", "TopicError", true);
  974. WriteParameter(param, category, "MQTT", "TopicRate", true);
  975. WriteParameter(param, category, "MQTT", "TopicTimeStamp", true);
  976. WriteParameter(param, category, "MQTT", "ClientID", true);
  977. WriteParameter(param, category, "MQTT", "user", true);
  978. WriteParameter(param, category, "MQTT", "password", true);
  979. WriteParameter(param, category, "AutoTimer", "AutoStart", false, true);
  980. WriteParameter(param, category, "AutoTimer", "Intervall", false);
  981. WriteParameter(param, category, "Debug", "Logfile", true, true);
  982. WriteParameter(param, category, "Debug", "LogfileRetentionInDays", true);
  983. WriteParameter(param, category, "System", "TimeZone", true);
  984. WriteParameter(param, category, "System", "Hostname", true);
  985. WriteParameter(param, category, "System", "TimeServer", true);
  986. }
  987. function ReadParameterAll()
  988. {
  989. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  990. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  991. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  992. ReadParameter(param, "MakeImage", "LogImageLocation", true);
  993. ReadParameter(param, "MakeImage", "LogfileRetentionInDays", true);
  994. ReadParameter(param, "MakeImage", "WaitBeforeTakingPicture", false);
  995. ReadParameter(param, "MakeImage", "ImageQuality", false);
  996. ReadParameter(param, "MakeImage", "Brightness", false);
  997. // ReadParameter(param, "MakeImage", "Contrast", false);
  998. // ReadParameter(param, "MakeImage", "Saturation", false);
  999. ReadParameter(param, "MakeImage", "ImageSize", false, true);
  1000. ReadParameter(param, "MakeImage", "FixedExposure", false, true);
  1001. ReadParameter(param, "Alignment", "SearchFieldX", false);
  1002. ReadParameter(param, "Alignment", "SearchFieldY", false);
  1003. ReadParameter(param, "Alignment", "AlignmentAlgo", true, true);
  1004. ReadParameter(param, "Digits", "Model", false);
  1005. ReadParameter(param, "Digits", "LogImageLocation", true);
  1006. ReadParameter(param, "Digits", "LogfileRetentionInDays", true);
  1007. ReadParameter(param, "Digits", "ModelInputSize", false, false);
  1008. ReadParameter(param, "Analog", "Model", false);
  1009. ReadParameter(param, "Analog", "LogImageLocation", true);
  1010. ReadParameter(param, "Analog", "LogfileRetentionInDays", true);
  1011. ReadParameter(param, "Analog", "ExtendedResolution", true, true);
  1012. ReadParameter(param, "Analog", "ModelInputSize", false, false);
  1013. ReadParameter(param, "PostProcessing", "PreValueUse", true, true);
  1014. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  1015. ReadParameter(param, "PostProcessing", "AllowNegativeRates", true, true);
  1016. ReadParameter(param, "PostProcessing", "MaxRateValue", true);
  1017. ReadParameter(param, "PostProcessing", "ErrorMessage", true, true);
  1018. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", true, true);
  1019. ReadParameter(param, "MQTT", "Uri", true);
  1020. ReadParameter(param, "MQTT", "Topic", true);
  1021. ReadParameter(param, "MQTT", "TopicError", true);
  1022. ReadParameter(param, "MQTT", "TopicRate", true);
  1023. ReadParameter(param, "MQTT", "TopicTimeStamp", true);
  1024. ReadParameter(param, "MQTT", "ClientID", true);
  1025. ReadParameter(param, "MQTT", "user", true);
  1026. ReadParameter(param, "MQTT", "password", true);
  1027. ReadParameter(param, "AutoTimer", "AutoStart", false, true);
  1028. ReadParameter(param, "AutoTimer", "Intervall", false);
  1029. ReadParameter(param, "Debug", "Logfile", true, true);
  1030. ReadParameter(param, "Debug", "LogfileRetentionInDays", true);
  1031. ReadParameter(param, "System", "TimeZone", true);
  1032. ReadParameter(param, "System", "Hostname", true);
  1033. ReadParameter(param, "System", "TimeServer", true);
  1034. UpdateInputIndividual();
  1035. FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  1036. }
  1037. function WriteConfig(){
  1038. ReadParameterAll();
  1039. return setConfigParameters(param, category);
  1040. }
  1041. function FormatDecimalValue(_param, _cat, _name) {
  1042. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1043. var _val = _param[_cat][_name]["value"+j];
  1044. _val = _val.replace(",", ".");
  1045. _param[_cat][_name]["value"+j] = _val;
  1046. }
  1047. }
  1048. function UpdateAfterCategoryCheck() {
  1049. ReadParameterAll();
  1050. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  1051. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  1052. UpdateInput();
  1053. UpdateInputIndividual();
  1054. }
  1055. function UpdateExpertModus()
  1056. {
  1057. var _style = 'display:none;';
  1058. if (document.getElementById("ExpertModus_enabled").checked) {
  1059. _style = '';
  1060. document.getElementById("Edit_Config_Direct").style.display = "";
  1061. }
  1062. else
  1063. {
  1064. document.getElementById("Edit_Config_Direct").style.display = "none";
  1065. }
  1066. const expert = document.querySelectorAll(".expert");
  1067. for (var i = 0; i < expert.length; i++) {
  1068. document.getElementById(expert[i].id).style = _style;
  1069. }
  1070. }
  1071. function saveTextAsFile()
  1072. {
  1073. if (confirm("Are you sure you want to update \"config.ini\"?")) {
  1074. ReadParameterAll();
  1075. WriteConfigININew();
  1076. SaveConfigToServer(basepath);
  1077. // var textToSave = WriteConfig();
  1078. // FileDeleteOnServer("/config/config.ini", basepath);
  1079. // FileSendContent(textToSave, "/config/config.ini", basepath);
  1080. }
  1081. }
  1082. function doReboot() {
  1083. if (confirm("Are you sure you want to reboot the ESP32?")) {
  1084. var stringota = "/reboot";
  1085. window.location = stringota;
  1086. window.location.href = stringota;
  1087. window.location.assign(stringota);
  1088. window.location.replace(stringota);
  1089. }
  1090. }
  1091. function editConfigDirect() {
  1092. if (confirm("Did you save your changes?")) {
  1093. var stringota = "/edit_config.html";
  1094. window.location = stringota;
  1095. window.location.href = stringota;
  1096. window.location.assign(stringota);
  1097. window.location.replace(stringota);
  1098. }
  1099. }
  1100. function numberChanged()
  1101. {
  1102. UpdateInputIndividual();
  1103. }
  1104. LoadConfigNeu();
  1105. </script>
  1106. </body>
  1107. </html>