edit_config_param.html 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089
  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_DecimalShift_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "DecimalShift")' unchecked >
  345. </td>
  346. <td width="200px">
  347. <class id="PostProcessing_DecimalShift_text" style="color:black;">DecimalShift</class>
  348. </td>
  349. <td>
  350. <input type="number" id="PostProcessing_DecimalShift_value1" step="1">
  351. </td>
  352. <td style="font-size: 80%;">
  353. shift the digit separator within the digital digits (positiv and negativ)
  354. </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="0" selected>true</option>
  366. <option value="1" >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="0" selected>true</option>
  397. <option value="1" >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>
  405. <td width="20px" style="padding-left: 40px;">
  406. <input type="checkbox" id="PostProcessing_MaxRateValue_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateValue")' unchecked >
  407. </td>
  408. <td width="200px">
  409. <class id="PostProcessing_MaxRateValue_text" style="color:black;">MaxRateValue</class>
  410. </td>
  411. <td>
  412. <input type="number" id="PostProcessing_MaxRateValue_value1" size="13" min="0" step="any">
  413. </td>
  414. <td style="font-size: 80%;">
  415. Maximum change of reading from one to the next readout
  416. </td>
  417. </tr>
  418. <tr class="expert" id="ex12">
  419. <td width="20px" style="padding-left: 40px;">
  420. <input type="checkbox" id="PostProcessing_ErrorMessage_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "ErrorMessage")' unchecked >
  421. </td>
  422. <td width="200px">
  423. <class id="PostProcessing_ErrorMessage_text" style="color:black;">ErrorMessage</class>
  424. </td>
  425. <td>
  426. <select id="PostProcessing_ErrorMessage_value1">
  427. <option value="0" selected>true</option>
  428. <option value="1" >false</option>
  429. </select>
  430. </td>
  431. <td style="font-size: 80%;">
  432. Do not show error message in return value - in error case, the last valid number will be send out
  433. </td>
  434. </tr>
  435. <tr>
  436. <td width="20px" style="padding-left: 40px;">
  437. <input type="checkbox" id="PostProcessing_CheckDigitIncreaseConsistency_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "CheckDigitIncreaseConsistency")' unchecked >
  438. </td>
  439. <td width="200px">
  440. <class id="PostProcessing_CheckDigitIncreaseConsistency_text" style="color:black;">CheckDigitIncreaseConsistency</class>
  441. </td>
  442. <td>
  443. <select id="PostProcessing_CheckDigitIncreaseConsistency_value1">
  444. <option value="0" selected>true</option>
  445. <option value="1" >false</option>
  446. </select>
  447. </td>
  448. <td style="font-size: 80%;">
  449. Activate to enalbe additional consistency check - especially zero crossing check between digits
  450. </td>
  451. </tr>
  452. <tr>
  453. <td colspan="4" style="padding-left: 20px;"><h4><input type="checkbox" id="Category_MQTT_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked > MQTT</h4></td>
  454. </tr>
  455. <tr>
  456. <td width="20px" style="padding-left: 40px;">
  457. <input type="checkbox" id="MQTT_Uri_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Uri")' unchecked >
  458. </td>
  459. <td width="200px">
  460. <class id="MQTT_Uri_text" style="color:black;">Uri</class>
  461. </td>
  462. <td>
  463. <input type="text" id="MQTT_Uri_value1">
  464. </td>
  465. <td style="font-size: 80%;">
  466. URI to the MQTT broker including port e.g.: mqtt://IP-Address:Port
  467. </td>
  468. </tr>
  469. <tr>
  470. <td width="20px" style="padding-left: 40px;">
  471. <input type="checkbox" id="MQTT_Topic_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Topic")' unchecked >
  472. </td>
  473. <td width="200px">
  474. <class id="MQTT_Topic_text" style="color:black;">Topic</class>
  475. </td>
  476. <td>
  477. <input type="text" id="MQTT_Topic_value1">
  478. </td>
  479. <td style="font-size: 80%;">
  480. MQTT topic, in which the value is registered
  481. </td>
  482. </tr>
  483. <tr>
  484. <td width="20px" style="padding-left: 40px;">
  485. <input type="checkbox" id="MQTT_TopicError_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "TopicError")' unchecked >
  486. </td>
  487. <td width="200px">
  488. <class id="MQTT_TopicError_text" style="color:black;">TopicError</class>
  489. </td>
  490. <td>
  491. <input type="text" id="MQTT_TopicError_value1">
  492. </td>
  493. <td style="font-size: 80%;">
  494. MQTT topic, in which the error status is reported (empty = no error)
  495. </td>
  496. </tr>
  497. <tr>
  498. <td width="20px" style="padding-left: 40px;">
  499. <input type="checkbox" id="MQTT_TopicRate_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "TopicRate")' unchecked >
  500. </td>
  501. <td width="200px">
  502. <class id="MQTT_TopicRate_text" style="color:black;">TopicRate</class>
  503. </td>
  504. <td>
  505. <input type="text" id="MQTT_TopicRate_value1">
  506. </td>
  507. <td style="font-size: 80%;">
  508. MQTT topic, in which the flow rate [units / minute] is reported
  509. </td>
  510. </tr>
  511. <tr>
  512. <td width="20px" style="padding-left: 40px;">
  513. <input type="checkbox" id="MQTT_TopicTimeStamp_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "TopicTimeStamp")' unchecked >
  514. </td>
  515. <td width="200px">
  516. <class id="MQTT_TopicTimeStamp_text" style="color:black;">TopicTimeStamp</class>
  517. </td>
  518. <td>
  519. <input type="text" id="MQTT_TopicTimeStamp_value1">
  520. </td>
  521. <td style="font-size: 80%;">
  522. MQTT topic, reporting the last correct readout
  523. </td>
  524. </tr>
  525. <tr>
  526. <td width="20px" style="padding-left: 40px;">
  527. <input type="checkbox" id="MQTT_ClientID_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientID")' unchecked >
  528. </td>
  529. <td width="200px">
  530. <class id="MQTT_ClientID_text" style="color:black;">ClientID</class>
  531. </td>
  532. <td>
  533. <input type="text" id="MQTT_ClientID_value1">
  534. </td>
  535. <td style="font-size: 80%;">
  536. ClientID to connect to the MQTT broker
  537. </td>
  538. </tr>
  539. <tr>
  540. <td width="20px" style="padding-left: 40px;">
  541. <input type="checkbox" id="MQTT_user_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "user")' unchecked >
  542. </td>
  543. <td width="200px">
  544. <class id="MQTT_user_text" style="color:black;">user</class>
  545. </td>
  546. <td>
  547. <input type="text" id="MQTT_user_value1">
  548. </td>
  549. <td style="font-size: 80%;">
  550. user for MQTT authentication
  551. </td>
  552. </tr>
  553. <tr>
  554. <td width="20px" style="padding-left: 40px;">
  555. <input type="checkbox" id="MQTT_password_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "password")' unchecked >
  556. </td>
  557. <td width="200px">
  558. <class id="MQTT_password_text" style="color:black;">password</class>
  559. </td>
  560. <td>
  561. <input type="text" id="MQTT_password_value1">
  562. </td>
  563. <td style="font-size: 80%;">
  564. password for MQTT authentication
  565. </td>
  566. </tr>
  567. <tr>
  568. <td colspan="4" style="padding-left: 20px;"><h4>AutoTimer</h4></td>
  569. </tr>
  570. <tr class="expert" id="ex13">
  571. <td width="20px" style="padding-left: 40px;">
  572. </td>
  573. <td width="200px">
  574. <class id="AutoTimer_AutoStart_text" style="color:black;">AutoStart</class>
  575. </td>
  576. <td>
  577. <select id="AutoTimer_AutoStart_value1">
  578. <option value="0" selected>true</option>
  579. <option value="1" >false</option>
  580. </select>
  581. </td>
  582. <td style="font-size: 80%;">
  583. Start the image recognition immediatly after power up. false is basically for debugging.
  584. </td>
  585. </tr>
  586. <tr>
  587. <td width="20px" style="padding-left: 40px;">
  588. </td>
  589. <td width="200px">
  590. <class id="AutoTimer_Intervall_text" style="color:black;">Intervall</class>
  591. </td>
  592. <td>
  593. <input type="number" id="AutoTimer_Intervall_value1" size="13" min="3" step="any">
  594. </td>
  595. <td style="font-size: 80%;">
  596. Intervall in which the counter is read (in minutes). Number must be greater than 3 minutes.
  597. </td>
  598. </tr>
  599. <tr>
  600. <td colspan="4" style="padding-left: 20px;"><h4>Debug</h4></td>
  601. </tr>
  602. <tr>
  603. <td width="20px" style="padding-left: 40px;">
  604. <input type="checkbox" id="Debug_Logfile_enabled" value="1" onclick = 'InvertEnableItem("Debug", "Logfile")' unchecked >
  605. </td>
  606. <td width="200px">
  607. <class id="Debug_Logfile_text" style="color:black;">Logfile</class>
  608. </td>
  609. <td>
  610. <select id="Debug_Logfile_value1">
  611. <option value="0" selected>true</option>
  612. <option value="1" >false</option>
  613. </select>
  614. </td>
  615. <td style="font-size: 80%;">
  616. Turn on/off the extended logging
  617. </td>
  618. </tr>
  619. <tr>
  620. <td width="20px" style="padding-left: 40px;">
  621. <td"><input type="checkbox" id="Debug_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("Debug", "LogfileRetentionInDays")' unchecked ></td>
  622. </td>
  623. <td>
  624. <class id="Debug_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class>
  625. </td>
  626. <td>
  627. <input type="number" id="Debug_LogfileRetentionInDays_value1" size="13" min="0" step="1">
  628. </td>
  629. <td style="font-size: 80%;">
  630. Time to keep the log files (in days - "0" = forever)
  631. </td>
  632. </tr>
  633. <tr>
  634. <td colspan="4" style="padding-left: 20px;"><h4>System</h4></td>
  635. </tr>
  636. <tr>
  637. <td width="20px" style="padding-left: 40px;">
  638. <td"><input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeZone")' unchecked ></td>
  639. </td>
  640. <td>
  641. <class id="System_TimeZone_text" style="color:black;">TimeZone</class>
  642. </td>
  643. <td>
  644. <input type="text" id="System_TimeZone_value1">
  645. </td>
  646. <td style="font-size: 80%;">
  647. Time zone in POSIX syntax (Europe/Berlin = "CET-1CEST,M3.5.0,M10.5.0/3" - incl. daylight saving)
  648. </td>
  649. </tr>
  650. <tr class="expert" id="ex16">
  651. <td width="20px" style="padding-left: 40px;">
  652. <td"><input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeServer")' unchecked ></td>
  653. </td>
  654. <td>
  655. <class id="System_TimeServer_text" style="color:black;">TimeServer</class>
  656. </td>
  657. <td>
  658. <input type="text" id="System_TimeServer_value1">
  659. </td>
  660. <td style="font-size: 80%;">
  661. Time server to synchronize system time (default: "pool.ntp.org" - used if nothing is specified)
  662. </td>
  663. </tr>
  664. <tr class="expert" id="System_Hostname">
  665. <td width="20px" style="padding-left: 40px;">
  666. <td"><input type="checkbox" id="System_Hostname_enabled" value="1" onclick = 'InvertEnableItem("System", "Hostname")' unchecked ></td>
  667. </td>
  668. <td>
  669. <class id="System_Hostname_text" style="color:black;">Hostname</class>
  670. </td>
  671. <td>
  672. <input type="text" id="System_Hostname_value1">
  673. </td>
  674. <td style="font-size: 80%;">
  675. Hostname for server - will be transfered to wlan.ini at next startup)
  676. </td>
  677. </tr>
  678. </table>
  679. <p>
  680. <button class="button" onclick="saveTextAsFile()">Update Config.ini</button>
  681. </p>
  682. <p>
  683. </p>
  684. <div id="doreboot">
  685. <p>
  686. <button class="button" id="Edit_Config_Direct" onclick="editConfigDirect()" style="display:none">Edit Config.ini direct</button>
  687. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
  688. </p>
  689. </div>
  690. </div>
  691. <script type="text/javascript" src="./gethost.js"></script>
  692. <script type="text/javascript" src="./readconfigcommon.js"></script>
  693. <script type="text/javascript" src="./readconfigparam.js"></script>
  694. <script type="text/javascript">
  695. var canvas = document.getElementById('canvas'),
  696. basepath = "http://192.168.178.22";
  697. param;
  698. category;
  699. function LoadConfigNeu() {
  700. var isInitialSetup = getParameterByName('InitialSetup');
  701. if (isInitialSetup === 'true')
  702. {
  703. document.getElementById("reboot").style.display = "none";
  704. }
  705. basepath = getbasepath();
  706. if (!loadConfig(basepath)) {
  707. alert("Config.ini could not be loaded!\nPlease reload the page.");
  708. return;
  709. }
  710. loadConfig(basepath);
  711. ParseConfig();
  712. param = getConfigParameters();
  713. category = getConfigCategory();
  714. UpdateInput();
  715. UpdateExpertModus();
  716. document.getElementById("divall").style.display = '';
  717. }
  718. function getParameterByName(name, url = window.location.href) {
  719. name = name.replace(/[\[\]]/g, '\\$&');
  720. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  721. results = regex.exec(url);
  722. if (!results) return null;
  723. if (!results[2]) return '';
  724. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  725. }
  726. function WriteParameter(_param, _category, _cat, _name, _optional, _select = false, _anzpara = 1){
  727. if (_param[_cat][_name]["found"]){
  728. if (_optional) {
  729. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  730. for (var j = 1; j <= _anzpara; ++j) {
  731. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  732. }
  733. }
  734. document.getElementById(_cat+"_"+_name+"_text").style="color:black;"
  735. if (_select) {
  736. var textToFind = _param[_cat][_name]["value1"];
  737. var dd = document.getElementById(_cat+"_"+_name+"_value1");
  738. for (var i = 0; i < dd.options.length; i++) {
  739. if (dd.options[i].text.toLowerCase() === textToFind.toLowerCase()) {
  740. dd.selectedIndex = i;
  741. break;
  742. }
  743. }
  744. }
  745. else {
  746. for (var j = 1; j <= _anzpara; ++j) {
  747. document.getElementById(_cat+"_"+_name+"_value"+j).value = _param[_cat][_name]["value"+j];
  748. }
  749. }
  750. }
  751. else {
  752. if (_optional) {
  753. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  754. for (var j = 1; j <= _anzpara; ++j) {
  755. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  756. }
  757. }
  758. document.getElementById(_cat+"_"+_name+"_text").style="color:lightgrey;"
  759. }
  760. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  761. if (_category[_cat]["enabled"] == false)
  762. {
  763. if (_optional) {
  764. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  765. for (var j = 1; j <= _anzpara; ++j) {
  766. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  767. }
  768. }
  769. document.getElementById(_cat+"_"+_name+"_text").style="color:lightgrey;"
  770. }
  771. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional);
  772. }
  773. function InvertEnableItem(_cat, _param)
  774. {
  775. _zw = _cat + "_" + _param + "_enabled";
  776. _isOn = document.getElementById(_zw).checked;
  777. _color = "color:lightgrey;";
  778. if (_isOn) {
  779. _color = "color:black;";
  780. }
  781. _zw = _cat + "_" + _param + "_text";
  782. document.getElementById(_zw).disabled = !_isOn;
  783. document.getElementById(_zw).style = _color;
  784. if (param[_cat][_param]["anzParam"] == 2) {
  785. _color = "width: 30px;" + _color;
  786. }
  787. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  788. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  789. document.getElementById(_cat+"_"+_param+"_value"+j).style=_color;
  790. }
  791. }
  792. function EnDisableItem(_status, _param, _category, _cat, _name, _optional)
  793. {
  794. _status = _param[_cat][_name]["found"] && _category[_cat]["enabled"];
  795. _color = "color:lightgrey;";
  796. if (_status) {
  797. _color = "color:black;";
  798. }
  799. if (_optional) {
  800. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  801. document.getElementById(_cat+"_"+_name+"_enabled").style=_color;
  802. }
  803. if (!_param[_cat][_name]["enabled"]) {
  804. _status = false;
  805. _color = "color:lightgrey;";
  806. }
  807. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  808. document.getElementById(_cat+"_"+_name+"_text").style = _color;
  809. if (_param[_cat][_name]["anzParam"] == 2) {
  810. _color = "width: 30px;" + _color;
  811. }
  812. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  813. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  814. document.getElementById(_cat+"_"+_name+"_value"+j).style=_color;
  815. }
  816. }
  817. function ReadParameter(_param, _cat, _name, _optional, _select = false){
  818. if (_param[_cat][_name]["found"]){
  819. if (_optional) {
  820. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  821. }
  822. if (_select) {
  823. var sel = document.getElementById(_cat+"_"+_name+"_value1");
  824. _param[_cat][_name]["value1"] = sel.options[sel.selectedIndex].text;
  825. }
  826. else {
  827. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  828. _param[_cat][_name]["value"+j] = document.getElementById(_cat+"_"+_name+"_value"+j).value;
  829. }
  830. }
  831. }
  832. }
  833. function UpdateInput() {
  834. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  835. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  836. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  837. WriteParameter(param, category, "MakeImage", "LogImageLocation", true);
  838. WriteParameter(param, category, "MakeImage", "LogfileRetentionInDays", true);
  839. WriteParameter(param, category, "MakeImage", "WaitBeforeTakingPicture", false);
  840. WriteParameter(param, category, "MakeImage", "ImageQuality", false);
  841. WriteParameter(param, category, "MakeImage", "Brightness", false);
  842. // WriteParameter(param, category, "MakeImage", "Contrast", false);
  843. // WriteParameter(param, category, "MakeImage", "Saturation", false);
  844. WriteParameter(param, category, "MakeImage", "ImageSize", false, true, true);
  845. WriteParameter(param, category, "MakeImage", "FixedExposure", false, true, true);
  846. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  847. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  848. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true, true, true);
  849. WriteParameter(param, category, "Digits", "Model", false);
  850. WriteParameter(param, category, "Digits", "LogImageLocation", true);
  851. WriteParameter(param, category, "Digits", "LogfileRetentionInDays", true);
  852. WriteParameter(param, category, "Digits", "ModelInputSize", false, false, 2);
  853. WriteParameter(param, category, "Analog", "Model", false);
  854. WriteParameter(param, category, "Analog", "LogImageLocation", true);
  855. WriteParameter(param, category, "Analog", "LogfileRetentionInDays", true);
  856. WriteParameter(param, category, "Analog", "ExtendedResolution", true, true);
  857. WriteParameter(param, category, "Analog", "ModelInputSize", false, false, 2);
  858. WriteParameter(param, category, "PostProcessing", "DecimalShift", true);
  859. WriteParameter(param, category, "PostProcessing", "PreValueUse", true, true);
  860. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  861. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true, true);
  862. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true);
  863. WriteParameter(param, category, "PostProcessing", "ErrorMessage", true, true);
  864. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", true, true);
  865. WriteParameter(param, category, "MQTT", "Uri", true);
  866. WriteParameter(param, category, "MQTT", "Topic", true);
  867. WriteParameter(param, category, "MQTT", "TopicError", true);
  868. WriteParameter(param, category, "MQTT", "TopicRate", true);
  869. WriteParameter(param, category, "MQTT", "TopicTimeStamp", true);
  870. WriteParameter(param, category, "MQTT", "ClientID", true);
  871. WriteParameter(param, category, "MQTT", "user", true);
  872. WriteParameter(param, category, "MQTT", "password", true);
  873. WriteParameter(param, category, "AutoTimer", "AutoStart", false, true);
  874. WriteParameter(param, category, "AutoTimer", "Intervall", false);
  875. WriteParameter(param, category, "Debug", "Logfile", true, true);
  876. WriteParameter(param, category, "Debug", "LogfileRetentionInDays", true);
  877. WriteParameter(param, category, "System", "TimeZone", true);
  878. WriteParameter(param, category, "System", "Hostname", true);
  879. WriteParameter(param, category, "System", "TimeServer", true);
  880. }
  881. function ReadParameterAll()
  882. {
  883. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  884. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  885. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  886. ReadParameter(param, "MakeImage", "LogImageLocation", true);
  887. ReadParameter(param, "MakeImage", "LogfileRetentionInDays", true);
  888. ReadParameter(param, "MakeImage", "WaitBeforeTakingPicture", false);
  889. ReadParameter(param, "MakeImage", "ImageQuality", false);
  890. ReadParameter(param, "MakeImage", "Brightness", false);
  891. // ReadParameter(param, "MakeImage", "Contrast", false);
  892. // ReadParameter(param, "MakeImage", "Saturation", false);
  893. ReadParameter(param, "MakeImage", "ImageSize", false, true);
  894. ReadParameter(param, "MakeImage", "FixedExposure", false, true);
  895. ReadParameter(param, "Alignment", "SearchFieldX", false);
  896. ReadParameter(param, "Alignment", "SearchFieldY", false);
  897. ReadParameter(param, "Alignment", "AlignmentAlgo", true, true);
  898. ReadParameter(param, "Digits", "Model", false);
  899. ReadParameter(param, "Digits", "LogImageLocation", true);
  900. ReadParameter(param, "Digits", "LogfileRetentionInDays", true);
  901. ReadParameter(param, "Digits", "ModelInputSize", false, false, 2);
  902. ReadParameter(param, "Analog", "Model", false);
  903. ReadParameter(param, "Analog", "LogImageLocation", true);
  904. ReadParameter(param, "Analog", "LogfileRetentionInDays", true);
  905. ReadParameter(param, "Analog", "ExtendedResolution", true, true);
  906. ReadParameter(param, "Analog", "ModelInputSize", false, false, 2);
  907. ReadParameter(param, "PostProcessing", "DecimalShift", true);
  908. ReadParameter(param, "PostProcessing", "PreValueUse", true, true);
  909. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  910. ReadParameter(param, "PostProcessing", "AllowNegativeRates", true, true);
  911. ReadParameter(param, "PostProcessing", "MaxRateValue", true);
  912. ReadParameter(param, "PostProcessing", "ErrorMessage", true, true);
  913. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", true, true);
  914. ReadParameter(param, "MQTT", "Uri", true);
  915. ReadParameter(param, "MQTT", "Topic", true);
  916. ReadParameter(param, "MQTT", "TopicError", true);
  917. ReadParameter(param, "MQTT", "TopicRate", true);
  918. ReadParameter(param, "MQTT", "TopicTimeStamp", true);
  919. ReadParameter(param, "MQTT", "ClientID", true);
  920. ReadParameter(param, "MQTT", "user", true);
  921. ReadParameter(param, "MQTT", "password", true);
  922. ReadParameter(param, "AutoTimer", "AutoStart", false, true);
  923. ReadParameter(param, "AutoTimer", "Intervall", false);
  924. ReadParameter(param, "Debug", "Logfile", true, true);
  925. ReadParameter(param, "Debug", "LogfileRetentionInDays", true);
  926. ReadParameter(param, "System", "TimeZone", true);
  927. ReadParameter(param, "System", "Hostname", true);
  928. ReadParameter(param, "System", "TimeServer", true);
  929. FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  930. }
  931. function WriteConfig(){
  932. ReadParameterAll();
  933. return setConfigParameters(param, category);
  934. }
  935. function FormatDecimalValue(_param, _cat, _name) {
  936. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  937. var _val = _param[_cat][_name]["value"+j];
  938. _val = _val.replace(",", ".");
  939. _param[_cat][_name]["value"+j] = _val;
  940. }
  941. }
  942. function UpdateAfterCategoryCheck() {
  943. ReadParameterAll();
  944. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  945. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  946. UpdateInput();
  947. }
  948. function UpdateExpertModus()
  949. {
  950. var _style = 'display:none;';
  951. if (document.getElementById("ExpertModus_enabled").checked) {
  952. _style = '';
  953. document.getElementById("Edit_Config_Direct").style.display = "";
  954. }
  955. else
  956. {
  957. document.getElementById("Edit_Config_Direct").style.display = "none";
  958. }
  959. const expert = document.querySelectorAll(".expert");
  960. for (var i = 0; i < expert.length; i++) {
  961. document.getElementById(expert[i].id).style = _style;
  962. }
  963. }
  964. function saveTextAsFile()
  965. {
  966. if (confirm("Are you sure you want to update \"config.ini\"?")) {
  967. var textToSave = WriteConfig();
  968. FileDeleteOnServer("/config/config.ini", basepath);
  969. FileSendContent(textToSave, "/config/config.ini", basepath);
  970. }
  971. }
  972. function doReboot() {
  973. if (confirm("Are you sure you want to reboot the ESP32?")) {
  974. var stringota = "/reboot";
  975. window.location = stringota;
  976. window.location.href = stringota;
  977. window.location.assign(stringota);
  978. window.location.replace(stringota);
  979. }
  980. }
  981. function editConfigDirect() {
  982. if (confirm("Did you save your changes?")) {
  983. var stringota = "/edit_config.html";
  984. window.location = stringota;
  985. window.location.href = stringota;
  986. window.location.assign(stringota);
  987. window.location.replace(stringota);
  988. }
  989. }
  990. LoadConfigNeu();
  991. </script>
  992. </body>
  993. </html>