edit_config_param.html 62 KB

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