edit_config_param.html 39 KB

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