edit_config_param.html 60 KB

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