edit_config_param.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848
  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. <table>
  35. <tr>
  36. <th width="20px" style="text-align: left;">
  37. Enable
  38. </th>
  39. <th width="200px" style="text-align: left;">
  40. Parameter
  41. </th>
  42. <th style="text-align: left;">
  43. Value
  44. </th>
  45. <th style="text-align: left;">
  46. Information
  47. </th>
  48. </tr>
  49. <tr>
  50. <td colspan="4" style="padding-left: 20px;"><h4>MakeImage</h4></td>
  51. </tr>
  52. <tr>
  53. <td width="20px" style="padding-left: 40px;">
  54. <input type="checkbox" id="MakeImage_LogImageLocation_enabled" value="1" onclick = 'document.getElementById("MakeImage_LogImageLocation_value").disabled = !document.getElementById("MakeImage_LogImageLocation_value1").disabled' unchecked >
  55. </td>
  56. <td width="200px">
  57. <class id="MakeImage_LogImageLocation_text" style="color:black;">LogImageLocation</class>
  58. </td>
  59. <td>
  60. <input type="text" name="name" id="MakeImage_LogImageLocation_value1">
  61. </td>
  62. <td style="font-size: 80%;">
  63. Location to store raw images for logging
  64. </td>
  65. </tr>
  66. <tr>
  67. <td width="20px" style="padding-left: 40px;">
  68. <td"><input type="checkbox" id="MakeImage_LogfileRetentionInDays_enabled" value="1" onclick = 'document.getElementById("MakeImage_LogfileRetentionInDays_value").disabled = !document.getElementById("MakeImage_LogfileRetentionInDays_value1").disabled' unchecked ></td>
  69. </td>
  70. <td>
  71. <class id="MakeImage_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class>
  72. </td>
  73. <td>
  74. <input type="number" id="MakeImage_LogfileRetentionInDays_value1" size="13" min="0" step="1">
  75. </td>
  76. <td style="font-size: 80%;">
  77. Time to keep the raw image (in days -"0" = forever)
  78. </td>
  79. </tr>
  80. <tr class="expert" id="ex1">
  81. <td width="20px" style="padding-left: 40px;">
  82. </td>
  83. <td>
  84. <class id="MakeImage_WaitBeforeTakingPicture_text" style="color:black;">WaitBeforeTakingPicture</class>
  85. </td>
  86. <td>
  87. <input type="number" id="MakeImage_WaitBeforeTakingPicture_value1" size="13" min="0" step="any">
  88. </td>
  89. <td style="font-size: 80%;">
  90. Wait time between illumination switch on and take the picture (in seconds)
  91. </td>
  92. </tr>
  93. <tr class="expert" id="ex2">
  94. <td width="20px" style="padding-left: 40px;">
  95. </td>
  96. <td>
  97. <class id="MakeImage_ImageQuality_text" style="color:black;">ImageQuality</class>
  98. </td>
  99. <td>
  100. <input type="number" id="MakeImage_ImageQuality_value1" size="13" min="0" max="63">
  101. </td>
  102. <td style="font-size: 80%;">
  103. Quality index for picture (default = "5" - "0" high ... "63" low)
  104. </td>
  105. </tr>
  106. <tr class="expert" id="ex3">
  107. <td width="20px" style="padding-left: 40px;">
  108. </td>
  109. <td>
  110. <class id="MakeImage_ImageSize_text" style="color:black;">ImageSize</class>
  111. </td>
  112. <td>
  113. <select id="MakeImage_ImageSize_value1">
  114. <option value="0" selected>VGA</option>
  115. <option value="1" >SVGA</option>
  116. </select>
  117. </td>
  118. <td style="font-size: 80%;">
  119. Picture size camera (default = "VGA")
  120. </td>
  121. </tr>
  122. <tr class="expert" id="ex4">
  123. <td colspan="4" style="padding-left: 20px;"><h4>Alignment</h4></td>
  124. </tr>
  125. <tr class="expert" id="ex6">
  126. <td width="20px" style="padding-left: 40px;">
  127. </td>
  128. <td width="200px">
  129. <class id="Alignment_SearchFieldX_text" style="color:black;">SearchFieldX</class>
  130. </td>
  131. <td>
  132. <input type="number" name="name" id="Alignment_SearchFieldX_value1" size="13" min="1" step="1">
  133. </td>
  134. <td style="font-size: 80%;">
  135. x size (width) in which the reference is searched (default = "20")
  136. </td>
  137. </tr>
  138. <tr class="expert" id="ex8">
  139. <td width="20px" style="padding-left: 40px;">
  140. </td>
  141. <td>
  142. <class id="Alignment_SearchFieldY_text" style="color:black;">SearchFieldY</class>
  143. </td>
  144. <td>
  145. <input type="number" name="name" id="Alignment_SearchFieldY_value1" size="13" min="1">
  146. </td>
  147. <td style="font-size: 80%;">
  148. y size (height) in which the reference is searched (default = "20")
  149. </td>
  150. </tr>
  151. <tr class="expert" id="ex4">
  152. <td colspan="4" style="padding-left: 20px;"><h4>Digits</h4></td>
  153. </tr>
  154. <tr>
  155. <td width="20px" style="padding-left: 40px;">
  156. </td>
  157. <td width="200px">
  158. <class id="Digits_Model_text" style="color:black;">Model</class>
  159. </td>
  160. <td>
  161. <input type="text" id="Digits_Model_value1">
  162. </td>
  163. <td style="font-size: 80%;">
  164. path to CNN model file for image recognition (in seconds)
  165. </td>
  166. </tr>
  167. <tr>
  168. <td width="20px" style="padding-left: 40px;">
  169. <input type="checkbox" id="Digits_LogImageLocation_enabled" value="1" onclick = 'document.getElementById("Digits_LogImageLocation_value1").disabled = !document.getElementById("Digits_LogImageLocation_value1").disabled' unchecked >
  170. </td>
  171. <td>
  172. <class id="Digits_LogImageLocation_text" style="color:black;">LogImageLocation</class>
  173. </td>
  174. <td>
  175. <input type="text" name="name" id="Digits_LogImageLocation_value1">
  176. </td>
  177. <td style="font-size: 80%;">
  178. Location to store separated digits for logging
  179. </td>
  180. </tr>
  181. <tr>
  182. <td width="20px" style="padding-left: 40px;">
  183. <td"><input type="checkbox" id="Digits_LogfileRetentionInDays_enabled" value="1" onclick = 'document.getElementById("Digits_LogfileRetentionInDays_value1").disabled = !document.getElementById("Digits_LogfileRetentionInDays_value1").disabled' unchecked ></td>
  184. </td>
  185. <td>
  186. <class id="Digits_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class>
  187. </td>
  188. <td>
  189. <input type="number" id="Digits_LogfileRetentionInDays_value1" min="0" step="1">
  190. </td>
  191. <td style="font-size: 80%;">
  192. Time to keep the separated digit images (in days -"0" = forever)
  193. </td>
  194. </tr>
  195. <tr class="expert" id="ex9">
  196. <td width="20px" style="padding-left: 40px;">
  197. </td>
  198. <td>
  199. <class id="Digits_ModelInputSize_text" style="color:black;">ModelInputSize</class>
  200. </td>
  201. <td>
  202. x: <input type="number" id="Digits_ModelInputSize_value1" style="width: 30px;" min="1" step="1">
  203. y: <input type="number" id="Digits_ModelInputSize_value2" style="width: 30px;" min="1" step="1">
  204. </td>
  205. <td style="font-size: 80%;">
  206. Size of the input image for the CNN model
  207. </td>
  208. </tr>
  209. <tr class="expert" id="ex4">
  210. <td colspan="4" style="padding-left: 20px;"><h4>Analog</h4></td>
  211. </tr>
  212. <tr>
  213. <td width="20px" style="padding-left: 40px;">
  214. </td>
  215. <td width="200px">
  216. <class id="Analog_Model_text" style="color:black;">Model</class>
  217. </td>
  218. <td>
  219. <input type="text" id="Analog_Model_value1">
  220. </td>
  221. <td style="font-size: 80%;">
  222. path to CNN model file for image recognition (in seconds)
  223. </td>
  224. </tr>
  225. <tr>
  226. <td width="20px" style="padding-left: 40px;">
  227. <input type="checkbox" id="Analog_LogImageLocation_enabled" value="1" onclick = 'document.getElementById("Analog_LogImageLocation_value1").disabled = !document.getElementById("Analog_LogImageLocation_value1").disabled' unchecked >
  228. </td>
  229. <td>
  230. <class id="Analog_LogImageLocation_text" style="color:black;">LogImageLocation</class>
  231. </td>
  232. <td>
  233. <input type="text" name="name" id="Analog_LogImageLocation_value1">
  234. </td>
  235. <td style="font-size: 80%;">
  236. Location to store separated digits for logging
  237. </td>
  238. </tr>
  239. <tr>
  240. <td width="20px" style="padding-left: 40px;">
  241. <td"><input type="checkbox" id="Analog_LogfileRetentionInDays_enabled" value="1" onclick = 'document.getElementById("Analog_LogfileRetentionInDays_value1").disabled = !document.getElementById("Analog_LogfileRetentionInDays_value1").disabled' unchecked ></td>
  242. </td>
  243. <td>
  244. <class id="Analog_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class>
  245. </td>
  246. <td>
  247. <input type="number" id="Analog_LogfileRetentionInDays_value1" min="0" step="1">
  248. </td>
  249. <td style="font-size: 80%;">
  250. Time to keep the separated digit images (in days -"0" = forever)
  251. </td>
  252. </tr>
  253. <tr class="expert" id="ex10">
  254. <td width="20px" style="padding-left: 40px;">
  255. </td>
  256. <td>
  257. <class id="Analog_ModelInputSize_text" style="color:black;">ModelInputSize</class>
  258. </td>
  259. <td>
  260. x: <input type="number" id="Analog_ModelInputSize_value1" style="width: 30px;" min="1" step="1">
  261. y: <input type="number" id="Analog_ModelInputSize_value2" style="width: 30px;" min="1" step="1">
  262. </td>
  263. <td style="font-size: 80%;">
  264. Size of the input image for the CNN model
  265. </td>
  266. </tr>
  267. <tr>
  268. <td colspan="4" style="padding-left: 20px;"><h4>PostProcessing</h4></td>
  269. </tr>
  270. <tr>
  271. <td width="20px" style="padding-left: 40px;">
  272. <input type="checkbox" id="PostProcessing_DecimalShift_enabled" value="1" onclick = 'document.getElementById("PostProcessing_DecimalShift_value1").disabled = !document.getElementById("PostProcessing_DecimalShift_value1").disabled' unchecked >
  273. </td>
  274. <td width="200px">
  275. <class id="PostProcessing_DecimalShift_text" style="color:black;">DecimalShift</class>
  276. </td>
  277. <td>
  278. <input type="number" id="PostProcessing_DecimalShift_value1" step="1">
  279. </td>
  280. <td style="font-size: 80%;">
  281. shift the digit separator within the digital digits (positiv and negativ)
  282. </td>
  283. </tr>
  284. <tr>
  285. <td width="20px" style="padding-left: 40px;">
  286. <input type="checkbox" id="PostProcessing_PreValueUse_enabled" value="1" onclick = 'document.getElementById("PostProcessing_PreValueUse_value1").disabled = !document.getElementById("PostProcessing_PreValueUse_value1").disabled' unchecked >
  287. </td>
  288. <td width="200px">
  289. <class id="PostProcessing_PreValueUse_text" style="color:black;">PreValueUse</class>
  290. </td>
  291. <td>
  292. <select id="PostProcessing_PreValueUse_value1">
  293. <option value="0" selected>True</option>
  294. <option value="1" >False</option>
  295. </select>
  296. </td>
  297. <td style="font-size: 80%;">
  298. Enable to use the previous read value for consistency checks - also on reboots
  299. </td>
  300. </tr>
  301. <tr class="expert" id="ex11">
  302. <td width="20px" style="padding-left: 40px;">
  303. <input type="checkbox" id="PostProcessing_PreValueAgeStartup_enabled" value="1" onclick = 'document.getElementById("PostProcessing_PreValueAgeStartup_value1").disabled = !document.getElementById("PostProcessing_PreValueAgeStartup_value1").disabled' unchecked >
  304. </td>
  305. <td width="200px">
  306. <class id="PostProcessing_PreValueAgeStartup_text" style="color:black;">PreValueAgeStartup</class>
  307. </td>
  308. <td>
  309. <input type="number" id="PostProcessing_PreValueAgeStartup_value1" size="13" min="0">
  310. </td>
  311. <td style="font-size: 80%;">
  312. Time (in minutes), how long a previous read value is valid after reboot (default = 720 min)
  313. </td>
  314. </tr>
  315. <tr>
  316. <td width="20px" style="padding-left: 40px;">
  317. <input type="checkbox" id="PostProcessing_AllowNegativeRates_enabled" value="1" onclick = 'document.getElementById("PostProcessing_AllowNegativeRates_value1").disabled = !document.getElementById("PostProcessing_AllowNegativeRates_value1").disabled' unchecked >
  318. </td>
  319. <td width="200px">
  320. <class id="PostProcessing_AllowNegativeRates_text" style="color:black;">AllowNegativeRates</class>
  321. </td>
  322. <td>
  323. <select id="PostProcessing_AllowNegativeRates_value1">
  324. <option value="0" selected>True</option>
  325. <option value="1" >False</option>
  326. </select>
  327. </td>
  328. <td style="font-size: 80%;">
  329. Set on "False" to ensure, that only positive changes are accepted (typically for counter)
  330. </td>
  331. </tr>
  332. <tr>
  333. <td width="20px" style="padding-left: 40px;">
  334. <input type="checkbox" id="PostProcessing_MaxRateValue_enabled" value="1" onclick = 'document.getElementById("PostProcessing_MaxRateValue_value1").disabled = !document.getElementById("PostProcessing_MaxRateValue_value1").disabled' unchecked >
  335. </td>
  336. <td width="200px">
  337. <class id="PostProcessing_MaxRateValue_text" style="color:black;">MaxRateValue</class>
  338. </td>
  339. <td>
  340. <input type="number" id="PostProcessing_MaxRateValue_value1" size="13" min="0" step="any">
  341. </td>
  342. <td style="font-size: 80%;">
  343. Maximum change of reading from one to the next readout
  344. </td>
  345. </tr>
  346. <tr class="expert" id="ex12">
  347. <td width="20px" style="padding-left: 40px;">
  348. <input type="checkbox" id="PostProcessing_ErrorMessage_enabled" value="1" onclick = 'document.getElementById("PostProcessing_ErrorMessage_value1").disabled = !document.getElementById("PostProcessing_ErrorMessage_value1").disabled' unchecked >
  349. </td>
  350. <td width="200px">
  351. <class id="PostProcessing_ErrorMessage_text" style="color:black;">ErrorMessage</class>
  352. </td>
  353. <td>
  354. <select id="PostProcessing_ErrorMessage_value1">
  355. <option value="0" selected>True</option>
  356. <option value="1" >False</option>
  357. </select>
  358. </td>
  359. <td style="font-size: 80%;">
  360. Do not show error message in return value - in error case, the last valid number will be send out
  361. </td>
  362. </tr>
  363. <tr>
  364. <td width="20px" style="padding-left: 40px;">
  365. <input type="checkbox" id="PostProcessing_CheckDigitIncreaseConsistency_enabled" value="1" onclick = 'document.getElementById("PostProcessing_CheckDigitIncreaseConsistency_value1").disabled = !document.getElementById("PostProcessing_CheckDigitIncreaseConsistency_value1").disabled' unchecked >
  366. </td>
  367. <td width="200px">
  368. <class id="PostProcessing_CheckDigitIncreaseConsistency_text" style="color:black;">CheckDigitIncreaseConsistency</class>
  369. </td>
  370. <td>
  371. <select id="PostProcessing_CheckDigitIncreaseConsistency_value1">
  372. <option value="0" selected>True</option>
  373. <option value="1" >False</option>
  374. </select>
  375. </td>
  376. <td style="font-size: 80%;">
  377. Activate to enalbe additional consistency check - especially zero crossing check between digits
  378. </td>
  379. </tr>
  380. <tr>
  381. <td colspan="4" style="padding-left: 20px;"><h4>MQTT</h4></td>
  382. </tr>
  383. <tr>
  384. <td width="20px" style="padding-left: 40px;">
  385. <input type="checkbox" id="MQTT_Uri_enabled" value="1" onclick = 'document.getElementById("MQTT_Uri_value1").disabled = !document.getElementById("MQTT_Uri_value1").disabled' unchecked >
  386. </td>
  387. <td width="200px">
  388. <class id="MQTT_Uri_text" style="color:black;">Uri</class>
  389. </td>
  390. <td>
  391. <input type="text" id="MQTT_Uri_value1">
  392. </td>
  393. <td style="font-size: 80%;">
  394. URI to the MQTT broker including port: http:\\IP-ADRESS:port
  395. </td>
  396. </tr>
  397. <tr>
  398. <td width="20px" style="padding-left: 40px;">
  399. <input type="checkbox" id="MQTT_Topic_enabled" value="1" onclick = 'document.getElementById("MQTT_Topic_value1").disabled = !document.getElementById("MQTT_Topic_value1").disabled' unchecked >
  400. </td>
  401. <td width="200px">
  402. <class id="MQTT_Topic_text" style="color:black;">Topic</class>
  403. </td>
  404. <td>
  405. <input type="text" id="MQTT_Topic_value1">
  406. </td>
  407. <td style="font-size: 80%;">
  408. MQTT topic, in which the value is registered
  409. </td>
  410. </tr>
  411. <tr>
  412. <td width="20px" style="padding-left: 40px;">
  413. <input type="checkbox" id="MQTT_TopicError_enabled" value="1" onclick = 'document.getElementById("MQTT_TopicError_value1").disabled = !document.getElementById("MQTT_TopicError_value1").disabled' unchecked >
  414. </td>
  415. <td width="200px">
  416. <class id="MQTT_TopicError_text" style="color:black;">TopicError</class>
  417. </td>
  418. <td>
  419. <input type="text" id="MQTT_TopicError_value1">
  420. </td>
  421. <td style="font-size: 80%;">
  422. MQTT topic, in which the error status is reported (empty = no error)
  423. </td>
  424. </tr>
  425. <tr>
  426. <td width="20px" style="padding-left: 40px;">
  427. <input type="checkbox" id="MQTT_ClientID_enabled" value="1" onclick = 'document.getElementById("MQTT_ClientID_value1").disabled = !document.getElementById("MQTT_ClientID_value1").disabled' unchecked >
  428. </td>
  429. <td width="200px">
  430. <class id="MQTT_ClientID_text" style="color:black;">ClientID</class>
  431. </td>
  432. <td>
  433. <input type="text" id="MQTT_ClientID_value1">
  434. </td>
  435. <td style="font-size: 80%;">
  436. ClientID to connect to the MQTT broker
  437. </td>
  438. </tr>
  439. <tr>
  440. <td width="20px" style="padding-left: 40px;">
  441. <input type="checkbox" id="MQTT_user_enabled" value="1" onclick = 'document.getElementById("MQTT_user_value1").disabled = !document.getElementById("MQTT_user_value1").disabled' unchecked >
  442. </td>
  443. <td width="200px">
  444. <class id="MQTT_user_text" style="color:black;">user</class>
  445. </td>
  446. <td>
  447. <input type="text" id="MQTT_user_value1">
  448. </td>
  449. <td style="font-size: 80%;">
  450. user for MQTT authenficiation
  451. </td>
  452. </tr>
  453. <tr>
  454. <td width="20px" style="padding-left: 40px;">
  455. <input type="checkbox" id="MQTT_password_enabled" value="1" onclick = 'document.getElementById("MQTT_password_value1").disabled = !document.getElementById("MQTT_password_value1").disabled' checked >
  456. </td>
  457. <td width="200px">
  458. <class id="MQTT_password_text" style="color:black;">password</class>
  459. </td>
  460. <td>
  461. <input type="text" id="MQTT_password_value1">
  462. </td>
  463. <td style="font-size: 80%;">
  464. password for MQTT authenficiation
  465. </td>
  466. </tr>
  467. <tr>
  468. <td colspan="4" style="padding-left: 20px;"><h4>AutoTimer</h4></td>
  469. </tr>
  470. <tr class="expert" id="ex13">
  471. <td width="20px" style="padding-left: 40px;">
  472. <input type="checkbox" id="AutoTimer_AutoStart_enabled" value="1" onclick = 'document.getElementById("AutoTimer_AutoStart_value1").disabled = !document.getElementById("AutoTimer_AutoStart_value1").disabled' unchecked >
  473. </td>
  474. <td width="200px">
  475. <class id="AutoTimer_AutoStart_text" style="color:black;">AutoStart</class>
  476. </td>
  477. <td>
  478. <select id="AutoTimer_AutoStart_value1">
  479. <option value="0" selected>True</option>
  480. <option value="1" >False</option>
  481. </select>
  482. </td>
  483. <td style="font-size: 80%;">
  484. Start the image recognition immediatly after power up. False is basically for debugging.
  485. </td>
  486. </tr>
  487. <tr>
  488. <td width="20px" style="padding-left: 40px;">
  489. <input type="checkbox" id="AutoTimer_Intervall_enabled" value="1" onclick = 'document.getElementById("AutoTimer_Intervall_value1").disabled = !document.getElementById("AutoTimerg_Intervall_value1").disabled' unchecked >
  490. </td>
  491. <td width="200px">
  492. <class id="AutoTimer_Intervall_text" style="color:black;">Intervall</class>
  493. </td>
  494. <td>
  495. <input type="number" id="AutoTimer_Intervall_value1" size="13" min="3" step="any">
  496. </td>
  497. <td style="font-size: 80%;">
  498. Intervall in which the counter is read (in minutes). Number must be greater than 3 minutes.
  499. </td>
  500. </tr>
  501. <tr>
  502. <td colspan="4" style="padding-left: 20px;"><h4>Debug</h4></td>
  503. </tr>
  504. <tr>
  505. <td width="20px" style="padding-left: 40px;">
  506. <input type="checkbox" id="Debug_Logfile_enabled" value="1" onclick = 'document.getElementById("Debug_Logfile_value1").disabled = !document.getElementById("Debug_Logfile_value1").disabled' unchecked >
  507. </td>
  508. <td width="200px">
  509. <class id="Debug_Logfile_text" style="color:black;">Logfile</class>
  510. </td>
  511. <td>
  512. <select id="Debug_Logfile_value1">
  513. <option value="0" selected>True</option>
  514. <option value="1" >False</option>
  515. </select>
  516. </td>
  517. <td style="font-size: 80%;">
  518. Turn on/off the extended logging
  519. </td>
  520. </tr>
  521. <tr>
  522. <td width="20px" style="padding-left: 40px;">
  523. <td"><input type="checkbox" id="Debug_LogfileRetentionInDays_enabled" value="1" onclick = 'document.getElementById("Debug_LogfileRetentionInDays_value").disabled = !document.getElementById("Debug_LogfileRetentionInDays_value1").disabled' unchecked ></td>
  524. </td>
  525. <td>
  526. <class id="Debug_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class>
  527. </td>
  528. <td>
  529. <input type="number" id="Debug_LogfileRetentionInDays_value1" size="13" min="0" step="1">
  530. </td>
  531. <td style="font-size: 80%;">
  532. Time to keep the log files (in days - "0" = forever)
  533. </td>
  534. </tr>
  535. <tr>
  536. <td colspan="4" style="padding-left: 20px;"><h4>System</h4></td>
  537. </tr>
  538. <tr>
  539. <td width="20px" style="padding-left: 40px;">
  540. <td"><input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'document.getElementById("System_TimeZone_value").disabled = !document.getElementById("System_TimeZone_value1").disabled' unchecked ></td>
  541. </td>
  542. <td>
  543. <class id="System_TimeZone_text" style="color:black;">TimeZone</class>
  544. </td>
  545. <td>
  546. <input type="number" id="System_TimeZone_value1" size="13" min="-12" max="12" step="1">
  547. </td>
  548. <td style="font-size: 80%;">
  549. Adjustment of time zone relative to UTC (in hours)
  550. </td>
  551. </tr>
  552. <tr>
  553. <td width="20px" style="padding-left: 40px;">
  554. <input type="checkbox" id="System_AutoAdjustSummertime_enabled" value="1" onclick = 'document.getElementById("System_AutoAdjustSummertime_value1").disabled = !document.getElementById("System_AutoAdjustSummertime_value1").disabled' unchecked >
  555. </td>
  556. <td width="200px">
  557. <class id="System_AutoAdjustSummertime_text" style="color:black;">AutoAdjustSummertime</class>
  558. </td>
  559. <td>
  560. <select id="System_AutoAdjustSummertime_value1">
  561. <option value="0" selected>True</option>
  562. <option value="1" >False</option>
  563. </select>
  564. </td>
  565. <td style="font-size: 80%;">
  566. Autoadjust the summertime
  567. </td>
  568. </tr>
  569. <tr class="expert" id="ex16">
  570. <td width="20px" style="padding-left: 40px;">
  571. <input type="checkbox" id="System_TimeUpdateIntervall_enabled" value="1" onclick = 'document.getElementById("System_TimeUpdateIntervall_value1").disabled = !document.getElementById("System_TimeUpdateIntervall_value1").disabled' unchecked >
  572. </td>
  573. <td width="200px">
  574. <class id="System_TimeUpdateIntervall_text" style="color:black;">TimeUpdateIntervall</class>
  575. </td>
  576. <td>
  577. <input type="number" id="System_TimeUpdateIntervall_value1" size="13" min="0" step="1">
  578. </td>
  579. <td style="font-size: 80%;">
  580. Intervall for synchronizing the time with the time server (in hours)
  581. </td>
  582. </tr>
  583. </table>
  584. <p>
  585. <button class="button" onclick="saveTextAsFile()">Update Config.ini</button>
  586. </p>
  587. <p>
  588. </p>
  589. <p>
  590. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
  591. </p>
  592. <script type="text/javascript" src="./gethost.js"></script>
  593. <script type="text/javascript" src="./readconfigparam.js"></script>
  594. <script type="text/javascript">
  595. var canvas = document.getElementById('canvas'),
  596. basepath = "http://192.168.178.22";
  597. param;
  598. function LoadConfigNeu() {
  599. basepath = getbasepath();
  600. loadConfig(basepath);
  601. ParseConfig();
  602. UpdateInput();
  603. UpdateExpertModus();
  604. }
  605. function WriteParameter(_param, _cat, _name, _optional, _select = false, _anzpara = 1){
  606. if (_param[_cat][_name]["found"]){
  607. if (_optional) {
  608. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  609. for (var j = 1; j <= _anzpara; ++j) {
  610. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  611. }
  612. }
  613. document.getElementById(_cat+"_"+_name+"_text").style="color:black;"
  614. if (_select) {
  615. var textToFind = _param[_cat][_name]["value1"];
  616. var dd = document.getElementById(_cat+"_"+_name+"_value1");
  617. for (var i = 0; i < dd.options.length; i++) {
  618. if (dd.options[i].text === textToFind) {
  619. dd.selectedIndex = i;
  620. break;
  621. }
  622. }
  623. }
  624. else {
  625. for (var j = 1; j <= _anzpara; ++j) {
  626. document.getElementById(_cat+"_"+_name+"_value"+j).value = _param[_cat][_name]["value"+j];
  627. }
  628. }
  629. }
  630. else {
  631. if (_optional) {
  632. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  633. for (var j = 1; j <= _anzpara; ++j) {
  634. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  635. }
  636. }
  637. document.getElementById(_cat+"_"+_name+"_text").style="color:lightgrey;"
  638. }
  639. }
  640. function ReadParameter(_param, _cat, _name, _optional, _select = false){
  641. if (_param[_cat][_name]["found"]){
  642. if (_optional) {
  643. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  644. }
  645. if (_select) {
  646. var sel = document.getElementById(_cat+"_"+_name+"_value1");
  647. _param[_cat][_name]["value1"] = sel.options[sel.selectedIndex].text;
  648. }
  649. else {
  650. for (var j = 1; j <= _param[_cat][_name]["anzpara"]; ++j) {
  651. _param[_cat][_name]["value"+j] = document.getElementById(_cat+"_"+_name+"_value"+j).value;
  652. }
  653. }
  654. }
  655. }
  656. function UpdateInput() {
  657. param = getConfigParameters();
  658. WriteParameter(param, "MakeImage", "LogImageLocation", true);
  659. WriteParameter(param, "MakeImage", "LogfileRetentionInDays", true);
  660. WriteParameter(param, "MakeImage", "WaitBeforeTakingPicture", false);
  661. WriteParameter(param, "MakeImage", "ImageQuality", false);
  662. WriteParameter(param, "MakeImage", "ImageSize", false, true, true);
  663. WriteParameter(param, "Alignment", "SearchFieldX", false);
  664. WriteParameter(param, "Alignment", "SearchFieldY", false);
  665. WriteParameter(param, "Digits", "Model", false);
  666. WriteParameter(param, "Digits", "LogImageLocation", false);
  667. WriteParameter(param, "Digits", "LogfileRetentionInDays", false);
  668. WriteParameter(param, "Digits", "ModelInputSize", false, false, 2);
  669. WriteParameter(param, "Analog", "Model", false);
  670. WriteParameter(param, "Analog", "LogImageLocation", false);
  671. WriteParameter(param, "Analog", "LogfileRetentionInDays", false);
  672. WriteParameter(param, "Analog", "ModelInputSize", false, false, 2);
  673. WriteParameter(param, "PostProcessing", "DecimalShift", true);
  674. WriteParameter(param, "PostProcessing", "PreValueUse", true, true);
  675. WriteParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  676. WriteParameter(param, "PostProcessing", "AllowNegativeRates", true, true);
  677. WriteParameter(param, "PostProcessing", "MaxRateValue", true);
  678. WriteParameter(param, "PostProcessing", "ErrorMessage", true, true);
  679. WriteParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", true, true);
  680. WriteParameter(param, "MQTT", "Uri", true);
  681. WriteParameter(param, "MQTT", "Topic", true);
  682. WriteParameter(param, "MQTT", "TopicError", true);
  683. WriteParameter(param, "MQTT", "ClientID", true);
  684. WriteParameter(param, "MQTT", "user", true);
  685. WriteParameter(param, "MQTT", "password", true);
  686. WriteParameter(param, "AutoTimer", "AutoStart", true, true);
  687. WriteParameter(param, "AutoTimer", "Intervall", true);
  688. WriteParameter(param, "Debug", "Logfile", true, true);
  689. WriteParameter(param, "Debug", "LogfileRetentionInDays", true);
  690. WriteParameter(param, "System", "TimeZone", true);
  691. WriteParameter(param, "System", "AutoAdjustSummertime", true, true);
  692. WriteParameter(param, "System", "TimeUpdateIntervall", true);
  693. }
  694. function WriteConfig(){
  695. ReadParameter(param, "MakeImage", "LogImageLocation", true);
  696. ReadParameter(param, "MakeImage", "LogfileRetentionInDays", true);
  697. ReadParameter(param, "MakeImage", "WaitBeforeTakingPicture", false);
  698. ReadParameter(param, "MakeImage", "ImageQuality", false);
  699. ReadParameter(param, "MakeImage", "ImageSize", false, true);
  700. ReadParameter(param, "Alignment", "SearchFieldX", false);
  701. ReadParameter(param, "Alignment", "SearchFieldY", false);
  702. ReadParameter(param, "Digits", "Model", false);
  703. ReadParameter(param, "Digits", "LogImageLocation", false);
  704. ReadParameter(param, "Digits", "LogfileRetentionInDays", false);
  705. ReadParameter(param, "Digits", "ModelInputSize", false, false, 2);
  706. ReadParameter(param, "Analog", "Model", false);
  707. ReadParameter(param, "Analog", "LogImageLocation", false);
  708. ReadParameter(param, "Analog", "LogfileRetentionInDays", false);
  709. ReadParameter(param, "Analog", "ModelInputSize", false, false, 2);
  710. ReadParameter(param, "PostProcessing", "DecimalShift", true);
  711. ReadParameter(param, "PostProcessing", "PreValueUse", true, true);
  712. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  713. ReadParameter(param, "PostProcessing", "AllowNegativeRates", true, true);
  714. ReadParameter(param, "PostProcessing", "MaxRateValue", true);
  715. ReadParameter(param, "PostProcessing", "ErrorMessage", true, true);
  716. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", true, true);
  717. ReadParameter(param, "MQTT", "Uri", true);
  718. ReadParameter(param, "MQTT", "Topic", true);
  719. ReadParameter(param, "MQTT", "TopicError", true);
  720. ReadParameter(param, "MQTT", "ClientID", true);
  721. ReadParameter(param, "MQTT", "user", true);
  722. ReadParameter(param, "MQTT", "password", true);
  723. ReadParameter(param, "AutoTimer", "AutoStart", true, true);
  724. ReadParameter(param, "AutoTimer", "Intervall", true);
  725. ReadParameter(param, "Debug", "Logfile", true, true);
  726. ReadParameter(param, "Debug", "LogfileRetentionInDays", true);
  727. ReadParameter(param, "System", "TimeZone", true);
  728. ReadParameter(param, "System", "AutoAdjustSummertime", true, true);
  729. ReadParameter(param, "System", "TimeUpdateIntervall", true);
  730. FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  731. return setConfigParameters(param);
  732. }
  733. function FormatDecimalValue(_param, _cat, _name) {
  734. for (var j = 1; j <= _param[_cat][_name]["anzpara"]; ++j) {
  735. var _val = _param[_cat][_name]["value"+j];
  736. _val = _val.replace(",", ".");
  737. _param[_cat][_name]["value"+j] = _val;
  738. }
  739. }
  740. function UpdateExpertModus()
  741. {
  742. var _style = 'display:none;';
  743. if (document.getElementById("ExpertModus_enabled").checked) {
  744. _style = '';
  745. document.getElementById("Edit_Config_Direct").style.display = "";
  746. }
  747. else
  748. {
  749. document.getElementById("Edit_Config_Direct").style.display = "none";
  750. }
  751. const expert = document.querySelectorAll(".expert");
  752. for (var i = 0; i < expert.length; i++) {
  753. document.getElementById(expert[i].id).style = _style;
  754. }
  755. }
  756. function saveTextAsFile()
  757. {
  758. if (confirm("Are you sure you want to update \"config.ini\"?")) {
  759. var textToSave = WriteConfig();
  760. FileDeleteOnServer("/config/config.ini", basepath);
  761. FileSendContent(textToSave, "/config/config.ini", basepath);
  762. }
  763. }
  764. function doReboot() {
  765. if (confirm("Are you sure you want to reboot the ESP32?")) {
  766. var stringota = "/reboot";
  767. window.location = stringota;
  768. window.location.href = stringota;
  769. window.location.assign(stringota);
  770. window.location.replace(stringota);
  771. }
  772. }
  773. function editConfigDirect() {
  774. if (confirm("Did you save your changes?")) {
  775. var stringota = "/edit_config.html";
  776. window.location = stringota;
  777. window.location.href = stringota;
  778. window.location.assign(stringota);
  779. window.location.replace(stringota);
  780. }
  781. }
  782. LoadConfigNeu();
  783. </script>
  784. </body>
  785. </html>