edit_config_param.html 61 KB

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