edit_config_param.html 66 KB

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