edit_config_param.html 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040
  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 a reading - if threated as absolute or relative change see next parameter.
  479. </td>
  480. </tr>
  481. <tr>
  482. <td width="20px" style="padding-left: 40px;">
  483. <input type="checkbox" id="PostProcessing_MaxRateType_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateType")' unchecked >
  484. </td>
  485. <td width="200px">
  486. <class id="PostProcessing_MaxRateType_text" style="color:black;">MaxRateType</class>
  487. </td>
  488. <td>
  489. <select id="PostProcessing_MaxRateType_value1">
  490. <option value="AbsoluteChange" >AbsoluteChange</option>
  491. <option value="RateChange" selected>RateChange</option>
  492. </select>
  493. </td>
  494. <td style="font-size: 80%;">
  495. Defines if the change rate compared to the previous value is calculated as absolute change (AbsoluteChange) or as rate normalized to the intervall (RateChange = change/minute).
  496. </td>
  497. </tr>
  498. <tr>
  499. <td width="20px" style="padding-left: 40px;">
  500. <input type="checkbox" id="PostProcessing_ExtendedResolution_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "ExtendedResolution")' unchecked >
  501. </td>
  502. <td width="200px">
  503. <class id="PostProcessing_ExtendedResolution_text" style="color:black;">ExtendedResolution</class>
  504. </td>
  505. <td>
  506. <select id="PostProcessing_ExtendedResolution_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. Enable to use the after point resolution for the last analog counter
  513. </td>
  514. </tr>
  515. <tr>
  516. <td id="ex121" width="20px" style="padding-left: 40px;">
  517. <input type="checkbox" id="PostProcessing_IgnoreLeadingNaN_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "IgnoreLeadingNaN")' unchecked >
  518. </td>
  519. <td width="200px">
  520. <class id="PostProcessing_IgnoreLeadingNaN_text" style="color:black;">IgnoreLeadingNaN</class>
  521. </td>
  522. <td>
  523. <select id="PostProcessing_IgnoreLeadingNaN_value1">
  524. <option value="true" >true</option>
  525. <option value="false" selected>false</option>
  526. </select>
  527. </td>
  528. <td style="font-size: 80%;">
  529. Leading "N"'s will be deleted before further processing
  530. </td>
  531. </tr>
  532. <tr>
  533. <td colspan="4" style="padding-left: 20px;"><h4><input type="checkbox" id="Category_MQTT_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked > MQTT</h4></td>
  534. </tr>
  535. <tr>
  536. <td width="20px" style="padding-left: 40px;">
  537. <input type="checkbox" id="MQTT_Uri_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Uri")' unchecked >
  538. </td>
  539. <td width="200px">
  540. <class id="MQTT_Uri_text" style="color:black;">Uri</class>
  541. </td>
  542. <td>
  543. <input type="text" id="MQTT_Uri_value1">
  544. </td>
  545. <td style="font-size: 80%;">
  546. URI to the MQTT broker including port e.g.: mqtt://IP-Address:Port
  547. </td>
  548. </tr>
  549. <tr>
  550. <td width="20px" style="padding-left: 40px;">
  551. <input type="checkbox" id="MQTT_MainTopic_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MainTopic")' unchecked >
  552. </td>
  553. <td width="200px">
  554. <class id="MQTT_MainTopic_text" style="color:black;">MainTopic</class>
  555. </td>
  556. <td>
  557. <input type="text" id="MQTT_MainTopic_value1">
  558. </td>
  559. <td style="font-size: 80%;">
  560. MQTT main topic, under which the counters are published. The single value will be published with the following key: MAINTOPIC/VALUE_NAME/PARAMETER <br>
  561. where parameters are: value, rate, timestamp, error<br>
  562. The general connection status can be found in MAINTOPIC/CONNECTION
  563. </td>
  564. </tr>
  565. <tr>
  566. <td width="20px" style="padding-left: 40px;">
  567. <input type="checkbox" id="MQTT_ClientID_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientID")' unchecked >
  568. </td>
  569. <td width="200px">
  570. <class id="MQTT_ClientID_text" style="color:black;">ClientID</class>
  571. </td>
  572. <td>
  573. <input type="text" id="MQTT_ClientID_value1">
  574. </td>
  575. <td style="font-size: 80%;">
  576. ClientID to connect to the MQTT broker
  577. </td>
  578. </tr>
  579. <tr>
  580. <td width="20px" style="padding-left: 40px;">
  581. <input type="checkbox" id="MQTT_user_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "user")' unchecked >
  582. </td>
  583. <td width="200px">
  584. <class id="MQTT_user_text" style="color:black;">user</class>
  585. </td>
  586. <td>
  587. <input type="text" id="MQTT_user_value1">
  588. </td>
  589. <td style="font-size: 80%;">
  590. User for MQTT authentication
  591. </td>
  592. </tr>
  593. <tr>
  594. <td width="20px" style="padding-left: 40px;">
  595. <input type="checkbox" id="MQTT_password_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "password")' unchecked >
  596. </td>
  597. <td width="200px">
  598. <class id="MQTT_password_text" style="color:black;">password</class>
  599. </td>
  600. <td>
  601. <input type="text" id="MQTT_password_value1">
  602. </td>
  603. <td style="font-size: 80%;">
  604. Password for MQTT authentication
  605. </td>
  606. </tr>
  607. <tr>
  608. <td width="20px" style="padding-left: 40px;">
  609. <input type="checkbox" id="MQTT_SetRetainFlag_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "SetRetainFlag")' unchecked >
  610. </td>
  611. <td width="200px">
  612. <class id="MQTT_SetRetainFlag_text" style="color:black;">Enable MQTT Retain Flag</class>
  613. </td>
  614. <td>
  615. <select id="MQTT_SetRetainFlag_value1">
  616. <option value="true" selected>true</option>
  617. <option value="false" >false</option>
  618. </select>
  619. </td>
  620. <td style="font-size: 80%;">
  621. Enable or disable the retain flag for all MQTT entries
  622. </td>
  623. </tr>
  624. <tr>
  625. <td colspan="4" style="padding-left: 20px;"><h4>AutoTimer</h4></td>
  626. </tr>
  627. <tr class="expert" id="ex13">
  628. <td width="20px" style="padding-left: 40px;">
  629. </td>
  630. <td width="200px">
  631. <class id="AutoTimer_AutoStart_text" style="color:black;">AutoStart</class>
  632. </td>
  633. <td>
  634. <select id="AutoTimer_AutoStart_value1">
  635. <option value="true" selected>true</option>
  636. <option value="false" >false</option>
  637. </select>
  638. </td>
  639. <td style="font-size: 80%;">
  640. Start the image recognition immediatly after power up. false is basically for debugging.
  641. </td>
  642. </tr>
  643. <tr>
  644. <td width="20px" style="padding-left: 40px;">
  645. </td>
  646. <td width="200px">
  647. <class id="AutoTimer_Intervall_text" style="color:black;">Intervall</class>
  648. </td>
  649. <td>
  650. <input type="number" id="AutoTimer_Intervall_value1" size="13" min="3" step="any">
  651. </td>
  652. <td style="font-size: 80%;">
  653. Intervall in which the counter is read (in minutes). Number must be greater than 3 minutes.
  654. </td>
  655. </tr>
  656. <tr>
  657. <td colspan="4" style="padding-left: 20px;">
  658. <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='UpdateAfterCategoryCheck()' unchecked >
  659. GPIO Settings
  660. <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>
  661. </h4>
  662. </td>
  663. </tr>
  664. <!------------- GPIO0 begin ------------------>
  665. <tr class="expert" class="GPIO_IO0 GPIO_item">
  666. <td width="20px" style="padding-left: 40px;">
  667. <input type="checkbox" id="GPIO_IO0_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO0")' unchecked>
  668. </td>
  669. <td>
  670. <span id="GPIO_IO0_text">GPIO 0 state</span>
  671. </td>
  672. <td>
  673. <td">
  674. <select id="GPIO_IO0_value1">
  675. <option value="input">input</option>
  676. <option value="input-pullup">input pullup</option>
  677. <option value="input-pulldown">input pulldown</option>
  678. <option value="output">output</option>
  679. </select>
  680. </td>
  681. </td>
  682. <td class="description">
  683. GPIO 0 Usable with restrictions.<br>
  684. <span style="color: red">Must be disabled when camera is used.</span><br>
  685. <span style="color: red">Pin is used to activate flash mode and must therefore be HIGH when booting.</span>
  686. </td>
  687. </tr>
  688. <tr class="expert" class="GPIO_IO0 GPIO_item">
  689. <td width="20px" style="padding-left: 40px;"></td>
  690. <td>
  691. <span id="GPIO_IO0_text" class="GPIO_IO0 GPIO_item">GPIO 0 use interrupt</span>
  692. </td>
  693. <td>
  694. <td">
  695. <select id="GPIO_IO0_value2">
  696. <option value="disabled">disabled</option>
  697. <option value="rising-edge">rising edge</option>
  698. <option value="falling-edge">falling edge</option>
  699. <option value="rising-and-falling">rising and falling</option>
  700. <option value="low-level-trigger">low level trigger</option>
  701. <option value="high-level-trigger">high level trigger</option>
  702. </select>
  703. </td>
  704. </td>
  705. <td class="description">
  706. GPIO 0 enable interrupt trigger
  707. </td>
  708. </tr>
  709. <tr class="expert" class="GPIO_IO0 GPIO_item">
  710. <td width="20px" style="padding-left: 40px;"></td>
  711. <td>
  712. <span class="GPIO_IO0 GPIO_item">GPIO 0 PWM duty resolution</span>
  713. </td>
  714. <td>
  715. <td"><input type="number" id="GPIO_IO0_value3" min="1" max="20"></td>
  716. </td>
  717. <td class="description">
  718. GPIO 0 LEDC PWM duty resolution in bit
  719. </td>
  720. </tr>
  721. <tr class="expert" class="GPIO_IO0 GPIO_item">
  722. <td width="20px" style="padding-left: 40px;"></td>
  723. <td>
  724. <span class="GPIO_IO0 GPIO_item">GPIO 0 enable MQTT</span>
  725. </td>
  726. <td>
  727. <td"><input type="checkbox" id="GPIO_IO0_value4"></td>
  728. </td>
  729. <td class="description">
  730. GPIO 0 enable MQTT publishing/subscribing
  731. </td>
  732. </tr>
  733. <tr class="expert" class="GPIO_IO0 GPIO_item">
  734. <td width="20px" style="padding-left: 40px;"></td>
  735. <td>
  736. <span class="GPIO_IO0 GPIO_item">GPIO 0 enable HTTP</span>
  737. </td>
  738. <td>
  739. <td"><input type="checkbox" id="GPIO_IO0_value5"></td>
  740. </td>
  741. <td class="description">
  742. GPIO 0 enable HTTP write/read
  743. </td>
  744. </tr>
  745. <tr class="expert" class="GPIO_IO0 GPIO_item">
  746. <td width="20px" style="padding-left: 40px;"></td>
  747. <td>
  748. <span class="GPIO_IO0 GPIO_item">GPIO 0 name</span>
  749. </td>
  750. <td>
  751. <td"><input type="text" id="GPIO_IO0_value6"></td>
  752. </td>
  753. <td class="description">
  754. GPIO 0 MQTT topic name (empty = GPIO0). Allowed characters (a-z, A-Z, 0-9, _, -)
  755. </td>
  756. </tr>
  757. <!------------- GPIO0 end ------------------>
  758. <!------------- GPIO1 begin ------------------>
  759. <tr class="expert" class="GPIO_IO1 GPIO_item">
  760. <td width="20px" style="padding-left: 40px;">
  761. <input type="checkbox" id="GPIO_IO1_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO1")' unchecked>
  762. </td>
  763. <td>
  764. <span id="GPIO_IO1_text" class="GPIO_IO1 GPIO_item">GPIO 1 state</span>
  765. </td>
  766. <td>
  767. <td">
  768. <select id="GPIO_IO1_value1">
  769. <option value="input">input</option>
  770. <option value="input-pullup">input pullup</option>
  771. <option value="input-pulldown">input pulldown</option>
  772. <option value="output">output</option>
  773. </select>
  774. </td>
  775. </td>
  776. <td class="description">
  777. GPIO 1 <br><span style="color: blue">Used by default for serial communication as TX pin.<br>Required for seriales monitor.</span>
  778. </td>
  779. </tr>
  780. <tr class="expert" class="GPIO_IO1 GPIO_item">
  781. <td width="20px" style="padding-left: 40px;"></td>
  782. <td>
  783. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO 1 use interrupt</span>
  784. </td>
  785. <td>
  786. <td">
  787. <select id="GPIO_IO1_value2">
  788. <option value="disabled">disabled</option>
  789. <option value="rising-edge" disabled>rising edge</option>
  790. <option value="falling-edge" disabled>falling edge</option>
  791. <option value="rising-and-falling">rising and falling</option>
  792. <option value="low-level-trigger">low level trigger</option>
  793. <option value="high-level-trigger">high level trigger</option>
  794. </select>
  795. </td>
  796. </td>
  797. <td class="description">
  798. GPIO 1 enable interrupt trigger
  799. </td>
  800. </tr>
  801. <tr class="expert" class="GPIO_IO1 GPIO_item">
  802. <td width="20px" style="padding-left: 40px;"></td>
  803. <td>
  804. <span class="GPIO_IO1 GPIO_item">GPIO 1 PWM duty resolution</span>
  805. </td>
  806. <td>
  807. <td"><input type="number" id="GPIO_IO1_value3" min="1" max="20"></td>
  808. </td>
  809. <td class="description">
  810. GPIO 1 LEDC PWM duty resolution in bit
  811. </td>
  812. </tr>
  813. <tr class="expert" class="GPIO_IO1 GPIO_item">
  814. <td width="20px" style="padding-left: 40px;"></td>
  815. <td>
  816. <span class="GPIO_IO1 GPIO_item">GPIO 1 enable MQTT</span>
  817. </td>
  818. <td>
  819. <td"><input type="checkbox" id="GPIO_IO1_value4"></td>
  820. </td>
  821. <td class="description">
  822. GPIO 1 enable MQTT publishing/subscribing
  823. </td>
  824. </tr>
  825. <tr class="expert" class="GPIO_IO1 GPIO_item">
  826. <td width="20px" style="padding-left: 40px;"></td>
  827. <td>
  828. <span class="GPIO_IO1 GPIO_item">GPIO 1 enable HTTP</span>
  829. </td>
  830. <td>
  831. <td"><input type="checkbox" id="GPIO_IO1_value5"></td>
  832. </td>
  833. <td class="description">
  834. GPIO 1 enable HTTP write/read
  835. </td>
  836. </tr>
  837. <tr class="expert" class="GPIO_IO1 GPIO_item">
  838. <td width="20px" style="padding-left: 40px;"></td>
  839. <td>
  840. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO 1 name</span>
  841. </td>
  842. <td>
  843. <td"><input type="text" id="GPIO_IO1_value6"></td>
  844. </td>
  845. <td class="description">
  846. GPIO 1 MQTT topic name (empty = GPIO1). Allowed characters (a-z, A-Z, 0-9, _, -)
  847. </td>
  848. </tr>
  849. <!------------- GPIO1 end ------------------>
  850. <!------------- GPIO3 begin ------------------>
  851. <tr class="expert" class="GPIO_IO3 GPIO_item">
  852. <td width="20px" style="padding-left: 40px;">
  853. <input type="checkbox" id="GPIO_IO3_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO3")' unchecked>
  854. </td>
  855. <td>
  856. <span id="GPIO_IO3_text" class="GPIO_IO3 GPIO_item">GPIO 3 state</span>
  857. </td>
  858. <td>
  859. <td">
  860. <select id="GPIO_IO3_value1">
  861. <option value="input">input</option>
  862. <option value="input-pullup">input pullup</option>
  863. <option value="input-pulldown">input pulldown</option>
  864. <option value="output">output</option>
  865. </select>
  866. </td>
  867. </td>
  868. <td class="description">
  869. GPIO 3 <span style="color: blue">Used by default for serial communication as RX pin.</span>
  870. </td>
  871. </tr>
  872. <tr class="expert" class="GPIO_IO3 GPIO_item">
  873. <td width="20px" style="padding-left: 40px;"></td>
  874. <td>
  875. <span class="GPIO_IO3 GPIO_item">GPIO 3 use interrupt</span>
  876. </td>
  877. <td>
  878. <td">
  879. <select id="GPIO_IO3_value2">
  880. <option value="disabled">disabled</option>
  881. <option value="rising-edge" disabled>rising edge</option>
  882. <option value="falling-edge" disabled>falling edge</option>
  883. <option value="rising-and-falling">rising and falling</option>
  884. <option value="low-level-trigger">low level trigger</option>
  885. <option value="high-level-trigger">high level trigger</option>
  886. </select>
  887. </td>
  888. </td>
  889. <td class="description">
  890. GPIO 3 Used by default for serial communication as RX pin.
  891. </td>
  892. </tr>
  893. <tr class="expert" class="GPIO_IO3 GPIO_item">
  894. <td width="20px" style="padding-left: 40px;"></td>
  895. <td>
  896. <span class="GPIO_IO3 GPIO_item">GPIO 3 PWM duty resolution</span>
  897. </td>
  898. <td>
  899. <td"><input type="number" id="GPIO_IO3_value3" min="1" max="20"></td>
  900. </td>
  901. <td class="description">
  902. GPIO 3 LEDC PWM duty resolution in bit
  903. </td>
  904. </tr>
  905. <tr class="expert" class="GPIO_IO3 GPIO_item">
  906. <td width="20px" style="padding-left: 40px;"></td>
  907. <td>
  908. <span class="GPIO_IO3 GPIO_item">GPIO 3 enable MQTT</span>
  909. </td>
  910. <td>
  911. <td"><input type="checkbox" id="GPIO_IO3_value4"></td>
  912. </td>
  913. <td class="description">
  914. GPIO 3 enable MQTT publishing/subscribing
  915. </td>
  916. </tr>
  917. <tr class="expert" class="GPIO_IO3 GPIO_item">
  918. <td width="20px" style="padding-left: 40px;"></td>
  919. <td>
  920. <span class="GPIO_IO3 GPIO_item">GPIO 3 enable HTTP</span>
  921. </td>
  922. <td>
  923. <td"><input type="checkbox" id="GPIO_IO3_value5"></td>
  924. </td>
  925. <td class="description">
  926. GPIO 3 enable HTTP write/read
  927. </td>
  928. </tr>
  929. <tr class="expert" class="GPIO_IO3 GPIO_item">
  930. <td width="20px" style="padding-left: 40px;"></td>
  931. <td>
  932. <span class="GPIO_IO3 GPIO_item">GPIO 3 name</span>
  933. </td>
  934. <td>
  935. <td"><input type="text" id="GPIO_IO3_value6"></td>
  936. </td>
  937. <td class="description">
  938. GPIO 3 MQTT topic name (empty = GPIO3). Allowed characters (a-z, A-Z, 0-9, _, -)
  939. </td>
  940. </tr>
  941. <!------------- GPIO3 end ------------------>
  942. <!------------- GPIO4 begin ------------------>
  943. <tr class="GPIO_IO4 GPIO_item">
  944. <td width="20px" style="padding-left: 40px;">
  945. <input type="checkbox" id="GPIO_IO4_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO4")' unchecked>
  946. </td>
  947. <td>
  948. <span id="GPIO_IO4_text" class="GPIO_IO4 GPIO_item">GPIO 4 state</span>
  949. </td>
  950. <td>
  951. <td">
  952. <select id="GPIO_IO4_value1">
  953. <option value="input">input</option>
  954. <option value="input-pullup">input pullup</option>
  955. <option value="input-pulldown">input pulldown</option>
  956. <option value="output">output</option>
  957. <option value="built-in-led">built-in led flash light</option>
  958. </select>
  959. </td>
  960. </td>
  961. <td class="description">
  962. GPIO 4 Usable with restrictions.<br>
  963. <span style="color: red">Pin is used for build-in flash light.</span>
  964. </td>
  965. </tr>
  966. <tr class="expert" class="GPIO_IO4 GPIO_item">
  967. <td width="20px" style="padding-left: 40px;"></td>
  968. <td>
  969. <span class="GPIO_IO4 GPIO_item">GPIO 4 use interrupt</span>
  970. </td>
  971. <td>
  972. <td">
  973. <select id="GPIO_IO4_value2">
  974. <option value="disabled">disabled</option>
  975. <option value="rising-edge">rising edge</option>
  976. <option value="falling-edge">falling edge</option>
  977. <option value="rising-and-falling">rising and falling</option>
  978. <option value="low-level-trigger">low level trigger</option>
  979. <option value="high-level-trigger">high level trigger</option>
  980. </select>
  981. </td>
  982. </td>
  983. <td class="description">
  984. GPIO 4 enable interrupt trigger
  985. </td>
  986. </tr>
  987. <tr class="expert" class="GPIO_IO4 GPIO_item">
  988. <td width="20px" style="padding-left: 40px;"></td>
  989. <td>
  990. <span class="GPIO_IO4 GPIO_item">GPIO 4 PWM duty resolution</span>
  991. </td>
  992. <td>
  993. <td"><input type="number" id="GPIO_IO4_value3" min="1" max="20"></td>
  994. </td>
  995. <td class="description">
  996. GPIO 4 LEDC PWM duty resolution in bit
  997. </td>
  998. </tr>
  999. <tr class="expert" class="GPIO_IO4 GPIO_item">
  1000. <td width="20px" style="padding-left: 40px;"></td>
  1001. <td>
  1002. <span class="GPIO_IO4 GPIO_item">GPIO 4 enable MQTT</span>
  1003. </td>
  1004. <td>
  1005. <td"><input type="checkbox" id="GPIO_IO4_value4"></td>
  1006. </td>
  1007. <td class="description">
  1008. GPIO 4 enable MQTT publishing/subscribing
  1009. </td>
  1010. </tr>
  1011. <tr class="expert" class="GPIO_IO4 GPIO_item">
  1012. <td width="20px" style="padding-left: 40px;"></td>
  1013. <td>
  1014. <span class="GPIO_IO4 GPIO_item">GPIO 4 enable HTTP</span>
  1015. </td>
  1016. <td>
  1017. <td"><input type="checkbox" id="GPIO_IO4_value5"></td>
  1018. </td>
  1019. <td class="description">
  1020. GPIO 4 enable HTTP write/read
  1021. </td>
  1022. </tr>
  1023. <tr class="expert" class="GPIO_IO4 GPIO_item">
  1024. <td width="20px" style="padding-left: 40px;"></td>
  1025. <td>
  1026. <span class="GPIO_IO4 GPIO_item">GPIO 4 name</span>
  1027. </td>
  1028. <td>
  1029. <td"><input type="text" id="GPIO_IO4_value6"></td>
  1030. </td>
  1031. <td class="description">
  1032. GPIO 4 MQTT topic name (empty = GPIO4). Allowed characters (a-z, A-Z, 0-9, _, -)
  1033. </td>
  1034. </tr>
  1035. <!------------- GPIO4 end ------------------>
  1036. <!------------- GPIO12 begin ------------------>
  1037. <tr class="GPIO_IO12 GPIO_item">
  1038. <td width="20px" style="padding-left: 40px;">
  1039. <input type="checkbox" id="GPIO_IO12_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO12")' unchecked>
  1040. </td>
  1041. <td>
  1042. <span class="GPIO_IO12 GPIO_item" id="GPIO_IO12_text">GPIO 12 state</span>
  1043. </td>
  1044. <td>
  1045. <td">
  1046. <select id="GPIO_IO12_value1">
  1047. <option value="input">input</option>
  1048. <option value="input-pullup">input pullup</option>
  1049. <option value="input-pulldown">input pulldown</option>
  1050. <option value="output">output</option>
  1051. <option value="external-flash-ws281x">external flash light ws281x controlled</option>
  1052. </select>
  1053. </td>
  1054. </td>
  1055. <td class="description">
  1056. GPIO 12 is usable without restrictions
  1057. </td>
  1058. </tr>
  1059. <tr class="expert" class="GPIO_IO12 GPIO_item">
  1060. <td width="20px" style="padding-left: 40px;"></td>
  1061. <td>
  1062. <span class="GPIO_IO12 GPIO_item">GPIO 12 use interrupt</span>
  1063. </td>
  1064. <td>
  1065. <td>
  1066. <select class="GPIO_IO12 GPIO_item" id="GPIO_IO12_value2">
  1067. <option value="disabled">disabled</option>
  1068. <option value="rising-edge">rising edge</option>
  1069. <option value="falling-edge">falling edge</option>
  1070. <option value="rising-and-falling">rising and falling</option>
  1071. <option value="low-level-trigger">low level trigger</option>
  1072. <option value="high-level-trigger">high level trigger</option>
  1073. </select>
  1074. </td>
  1075. </td>
  1076. <td class="description">
  1077. GPIO 12 enable interrupt trigger
  1078. </td>
  1079. </tr>
  1080. <tr class="expert" class="GPIO_IO12 GPIO_item">
  1081. <td width="20px" style="padding-left: 40px;"></td>
  1082. <td>
  1083. <span class="GPIO_IO12 GPIO_item">GPIO 12 PWM duty resolution</span>
  1084. </td>
  1085. <td>
  1086. <td"><input type="number" id="GPIO_IO12_value3" min="1" max="20"></td>
  1087. </td>
  1088. <td class="description">
  1089. GPIO 12 LEDC PWM duty resolution in bit
  1090. </td>
  1091. </tr>
  1092. <tr class="expert" class="GPIO_IO12 GPIO_item">
  1093. <td width="20px" style="padding-left: 40px;"></td>
  1094. <td>
  1095. <span class="GPIO_IO12 GPIO_item">GPIO 12 enable MQTT</span>
  1096. </td>
  1097. <td>
  1098. <td"><input type="checkbox" id="GPIO_IO12_value4"></td>
  1099. </td>
  1100. <td class="description">
  1101. GPIO 12 enable MQTT publishing/subscribing
  1102. </td>
  1103. </tr>
  1104. <tr class="expert" class="GPIO_IO12 GPIO_item">
  1105. <td width="20px" style="padding-left: 40px;"></td>
  1106. <td>
  1107. <span class="GPIO_IO12 GPIO_item">GPIO 12 enable HTTP</span>
  1108. </td>
  1109. <td>
  1110. <td"><input type="checkbox" id="GPIO_IO12_value5"></td>
  1111. </td>
  1112. <td class="description">
  1113. GPIO 12 enable HTTP write/read
  1114. </td>
  1115. </tr>
  1116. <tr class="expert" class="GPIO_IO12 GPIO_item">
  1117. <td width="20px" style="padding-left: 40px;"></td>
  1118. <td>
  1119. <span class="GPIO_IO12 GPIO_item">GPIO 12 name</span>
  1120. </td>
  1121. <td>
  1122. <td"><input type="text" id="GPIO_IO12_value6"></td>
  1123. </td>
  1124. <td class="description">
  1125. GPIO 12 MQTT topic name (empty = GPIO12). Allowed characters (a-z, A-Z, 0-9, _, -)
  1126. </td>
  1127. </tr>
  1128. <tr class="GPIO_IO12 GPIO_item" id="wstypeex3">
  1129. <td width="20px" style="padding-left: 40px;">
  1130. </td>
  1131. <td>
  1132. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDType_text">LED-Type</span>
  1133. </td>
  1134. <td class="GPIO_IO12 GPIO_item">
  1135. <select class="GPIO_IO12 GPIO_item" id="GPIO_LEDType_value1">
  1136. <option value="WS2812" selected>WS2812</option>
  1137. <option value="WS2812B">WS2812B</option>
  1138. <option value="SK6812">SK6812 (not tested)</option>
  1139. <option value="WS2813">WS2813 (not tested)</option>
  1140. </select>
  1141. </td>
  1142. <td class="description">
  1143. Type of WS2812x, that is connected to GPIO12
  1144. </td>
  1145. </tr>
  1146. <tr class="GPIO_IO12 GPIO_item" id="LEDANZex8" >
  1147. <td width="20px" style="padding-left: 40px;">
  1148. </td>
  1149. <td>
  1150. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDNumbers_text">Numbers of LEDs</span>
  1151. </td>
  1152. <td>
  1153. <input type="number" name="name" id="GPIO_LEDNumbers_value1" size="13" min="1">
  1154. </td>
  1155. <td style="font-size: 80%;">
  1156. Number of LEDs on the external LED-stripe
  1157. </td>
  1158. </tr>
  1159. <tr class="GPIO_IO12 GPIO_item" id="LEDRGBex9">
  1160. <td width="20px" style="padding-left: 40px;">
  1161. </td>
  1162. <td>
  1163. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_text">LED Color</span>
  1164. </td>
  1165. <td class="GPIO_IO12 GPIO_item">
  1166. R <input class="smallSelect" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value1" size="12">
  1167. G <input class="smallSelect" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value2" size="12">
  1168. B <input class="smallSelect" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value3" size="12">
  1169. </td>
  1170. <td style="font-size: 80%;">
  1171. Color of LEDs in (R)ed, (G)reen (B)lue from 0...255
  1172. </td>
  1173. </tr>
  1174. <!------------- GPIO12 end ------------------>
  1175. <!------------- GPIO13 begin ------------------>
  1176. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1177. <td width="20px" style="padding-left: 40px;">
  1178. <input type="checkbox" id="GPIO_IO13_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO13")' unchecked>
  1179. </td>
  1180. <td>
  1181. <span id="GPIO_IO13_text">GPIO 13 state</span>
  1182. </td>
  1183. <td>
  1184. <td">
  1185. <select id="GPIO_IO13_value1">
  1186. <option value="input">input</option>
  1187. <option value="input-pullup">input pullup</option>
  1188. <option value="input-pulldown">input pulldown</option>
  1189. <option value="output">output</option>
  1190. </select>
  1191. </td>
  1192. </td>
  1193. <td class="description">
  1194. GPIO 13 is usable without restrictions
  1195. </td>
  1196. </tr>
  1197. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1198. <td width="20px" style="padding-left: 40px;"></td>
  1199. <td>
  1200. <span class="GPIO_IO13 GPIO_item">GPIO 13 use interrupt</span>
  1201. </td>
  1202. <td>
  1203. <td">
  1204. <select id="GPIO_IO13_value2">
  1205. <option value="disabled">disabled</option>
  1206. <option value="rising-edge" disabled>rising edge</option>
  1207. <option value="falling-edge" disabled>falling edge</option>
  1208. <option value="rising-and-falling">rising and falling</option>
  1209. <option value="low-level-trigger">low level trigger</option>
  1210. <option value="high-level-trigger">high level trigger</option>
  1211. </select>
  1212. </td>
  1213. </td>
  1214. <td class="description">
  1215. GPIO 13 enable interrupt trigger
  1216. </td>
  1217. </tr>
  1218. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1219. <td width="20px" style="padding-left: 40px;"></td>
  1220. <td>
  1221. <span class="GPIO_IO13 GPIO_item">GPIO 13 PWM duty resolution</span>
  1222. </td>
  1223. <td>
  1224. <td"><input type="number" id="GPIO_IO13_value3" min="1" max="20"></td>
  1225. </td>
  1226. <td class="description">
  1227. GPIO 13 LEDC PWM duty resolution in bit
  1228. </td>
  1229. </tr>
  1230. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1231. <td width="20px" style="padding-left: 40px;"></td>
  1232. <td>
  1233. <span class="GPIO_IO13 GPIO_item">GPIO 13 enable MQTT</span>
  1234. </td>
  1235. <td>
  1236. <td"><input type="checkbox" id="GPIO_IO13_value4"></td>
  1237. </td>
  1238. <td class="description">
  1239. GPIO 13 enable MQTT publishing/subscribing
  1240. </td>
  1241. </tr>
  1242. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1243. <td width="20px" style="padding-left: 40px;"></td>
  1244. <td>
  1245. <span class="GPIO_IO13 GPIO_item">GPIO 13 enable HTTP</span>
  1246. </td>
  1247. <td>
  1248. <td"><input type="checkbox" id="GPIO_IO13_value5"></td>
  1249. </td>
  1250. <td class="description">
  1251. GPIO 13 enable HTTP write/read
  1252. </td>
  1253. </tr>
  1254. <tr class="expert" class="GPIO_IO13 GPIO_item">
  1255. <td width="20px" style="padding-left: 40px;"></td>
  1256. <td>
  1257. <span class="GPIO_IO13 GPIO_item">GPIO 13 name</span>
  1258. </td>
  1259. <td>
  1260. <td"><input type="text" id="GPIO_IO13_value6"></td>
  1261. </td>
  1262. <td class="description">
  1263. GPIO 13 MQTT topic name (empty = GPIO13). Allowed characters (a-z, A-Z, 0-9, _, -)
  1264. </td>
  1265. </tr>
  1266. <!------------- GPIO13 end ------------------>
  1267. <tr>
  1268. <td colspan="4" style="padding-left: 20px;"><h4>Debug</h4></td>
  1269. </tr>
  1270. <tr>
  1271. <td width="20px" style="padding-left: 40px;">
  1272. <input type="checkbox" id="Debug_Logfile_enabled" value="1" onclick = 'InvertEnableItem("Debug", "Logfile")' unchecked >
  1273. </td>
  1274. <td width="200px">
  1275. <class id="Debug_Logfile_text" style="color:black;">Logfile</class>
  1276. </td>
  1277. <td>
  1278. <select id="Debug_Logfile_value1">
  1279. <option value="true" selected>true</option>
  1280. <option value="false" >false</option>
  1281. </select>
  1282. </td>
  1283. <td class="description">
  1284. Turn on/off the extended logging
  1285. </td>
  1286. </tr>
  1287. <tr>
  1288. <td width="20px" style="padding-left: 40px;">
  1289. <td"><input type="checkbox" id="Debug_LogfileRetentionInDays_enabled" value="1" onclick = 'InvertEnableItem("Debug", "LogfileRetentionInDays")' unchecked ></td>
  1290. </td>
  1291. <td>
  1292. <class id="Debug_LogfileRetentionInDays_text" style="color:black;">LogfileRetentionInDays</class>
  1293. </td>
  1294. <td>
  1295. <input type="number" id="Debug_LogfileRetentionInDays_value1" size="13" min="0" step="1">
  1296. </td>
  1297. <td class="description">
  1298. Time to keep the log files (in days - "0" = forever)
  1299. </td>
  1300. </tr>
  1301. <tr>
  1302. <td colspan="4" style="padding-left: 20px;"><h4>System</h4></td>
  1303. </tr>
  1304. <tr>
  1305. <td width="20px" style="padding-left: 40px;">
  1306. <td"><input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeZone")' unchecked ></td>
  1307. </td>
  1308. <td>
  1309. <class id="System_TimeZone_text" style="color:black;">TimeZone</class>
  1310. </td>
  1311. <td>
  1312. <input type="text" id="System_TimeZone_value1">
  1313. </td>
  1314. <td class="description">
  1315. Time zone in POSIX syntax (Europe/Berlin = "CET-1CEST,M3.5.0,M10.5.0/3" - incl. daylight saving)
  1316. </td>
  1317. </tr>
  1318. <tr class="expert" id="ex16">
  1319. <td width="20px" style="padding-left: 40px;">
  1320. <td"><input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeServer")' unchecked ></td>
  1321. </td>
  1322. <td>
  1323. <class id="System_TimeServer_text" style="color:black;">TimeServer</class>
  1324. </td>
  1325. <td>
  1326. <input type="text" id="System_TimeServer_value1">
  1327. </td>
  1328. <td class="description">
  1329. Time server to synchronize system time (default: "pool.ntp.org" - used if nothing is specified)
  1330. </td>
  1331. </tr>
  1332. <tr class="expert" id="System_Hostname">
  1333. <td width="20px" style="padding-left: 40px;">
  1334. <td"><input type="checkbox" id="System_Hostname_enabled" value="1" onclick = 'InvertEnableItem("System", "Hostname")' unchecked ></td>
  1335. </td>
  1336. <td>
  1337. <class id="System_Hostname_text" style="color:black;">Hostname</class>
  1338. </td>
  1339. <td>
  1340. <input type="text" id="System_Hostname_value1">
  1341. </td>
  1342. <td class="description">
  1343. Hostname for server - will be transfered to wlan.ini at next startup)
  1344. </td>
  1345. </tr>
  1346. </table>
  1347. <p>
  1348. <button class="button" onclick="saveTextAsFile()">Update Config.ini</button>
  1349. </p>
  1350. <p>
  1351. </p>
  1352. <div id="doreboot">
  1353. <p>
  1354. <button class="button" id="Edit_Config_Direct" onclick="editConfigDirect()" style="display:none">Edit Config.ini direct</button>
  1355. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
  1356. </p>
  1357. </div>
  1358. </div>
  1359. <script type="text/javascript" src="./gethost.js"></script>
  1360. <script type="text/javascript" src="./readconfigcommon.js"></script>
  1361. <script type="text/javascript" src="./readconfigparam.js"></script>
  1362. <script type="text/javascript">
  1363. var canvas = document.getElementById('canvas'),
  1364. basepath = "http://192.168.178.22";
  1365. param;
  1366. category;
  1367. NUNBERSAkt = -1;
  1368. NUMBERS;
  1369. function LoadConfigNeu() {
  1370. var isInitialSetup = getParameterByName('InitialSetup');
  1371. if (isInitialSetup === 'true')
  1372. {
  1373. document.getElementById("reboot").style.display = "none";
  1374. }
  1375. basepath = getbasepath();
  1376. if (!loadConfig(basepath)) {
  1377. alert("Config.ini could not be loaded!\nPlease reload the page.");
  1378. return;
  1379. }
  1380. ParseConfig();
  1381. param = getConfigParameters();
  1382. category = getConfigCategory();
  1383. InitIndivParameter();
  1384. UpdateInput();
  1385. UpdateInputIndividual();
  1386. UpdateExpertModus();
  1387. document.getElementById("divall").style.display = '';
  1388. }
  1389. function InitIndivParameter()
  1390. {
  1391. NUMBERS = getNUMBERInfo();
  1392. var _index = document.getElementById("Numbers_value1");
  1393. while (_index.length)
  1394. _index.remove(0);
  1395. for (var i = 0; i < NUMBERS.length; ++i){
  1396. var option = document.createElement("option");
  1397. option.text = NUMBERS[i]["name"];
  1398. option.value = i;
  1399. _index.add(option);
  1400. }
  1401. _index.selectedIndex = 0;
  1402. }
  1403. function getParameterByName(name, url = window.location.href) {
  1404. name = name.replace(/[\[\]]/g, '\\$&');
  1405. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  1406. results = regex.exec(url);
  1407. if (!results) return null;
  1408. if (!results[2]) return '';
  1409. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  1410. }
  1411. function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1){
  1412. let anzpara = _param[_cat][_name].anzParam;
  1413. if (_number > -1) {
  1414. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1415. return;
  1416. if (_optional) {
  1417. document.getElementById(_cat+"_"+_name+"_enabled").checked = NUMBERS[_number][_cat][_name]["enabled"];
  1418. for (var j = 1; j <= anzpara; ++j) {
  1419. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !NUMBERS[_number][_cat][_name]["enabled"];
  1420. }
  1421. }
  1422. document.getElementById(_cat+"_"+_name+"_text").style="color:black;"
  1423. setEnabled(_cat+"_"+_name, true);
  1424. for (var j = 1; j <= anzpara; ++j) {
  1425. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1426. if (element.tagName.toLowerCase() == "select") {
  1427. var textToFind = NUMBERS[_number][_cat][_name]["value"+j];
  1428. if (textToFind == undefined)
  1429. continue;
  1430. _isFound = false;
  1431. element.selectedIndex = -1;
  1432. for (var i = 0; i < element.options.length; i++) {
  1433. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1434. element.selectedIndex = i;
  1435. _isFound = true;
  1436. break;
  1437. }
  1438. }
  1439. if (!_isFound)
  1440. {
  1441. _zw_txt = "In the selectd field the value '" + textToFind + "' in the parameter '";
  1442. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid.\nPLEASE CHECK BEFORE SAVING!";
  1443. alert(_zw_txt);
  1444. }
  1445. }
  1446. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1447. element.checked = NUMBERS[_number][_cat][_name]["value"+j] == "true";
  1448. }
  1449. else {
  1450. element.value = NUMBERS[_number][_cat][_name]["value"+j];
  1451. }
  1452. }
  1453. }
  1454. else {
  1455. if (_optional) {
  1456. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  1457. for (var j = 1; j <= anzpara; ++j) {
  1458. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  1459. }
  1460. }
  1461. document.getElementById(_cat+"_"+_name+"_text").style="color:black;"
  1462. setEnabled(_cat+"_"+_name, true);
  1463. for (var j = 1; j <= anzpara; ++j) {
  1464. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1465. if (element.tagName.toLowerCase() == "select") {
  1466. var textToFind = _param[_cat][_name]["value"+j];
  1467. if (textToFind == undefined)
  1468. continue;
  1469. _isFound = false;
  1470. element.selectedIndex = -1;
  1471. for (var i = 0; i < element.options.length; i++) {
  1472. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1473. element.selectedIndex = i;
  1474. _isFound = true;
  1475. break;
  1476. }
  1477. }
  1478. if (!_isFound)
  1479. {
  1480. _zw_txt = "In the selectd field the value '" + textToFind + "' in the section '";
  1481. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid.\nPLEASE CHECK BEFORE SAVING!";
  1482. alert(_zw_txt);
  1483. }
  1484. }
  1485. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1486. element.checked = _param[_cat][_name]["value"+j] == "true";
  1487. }
  1488. else {
  1489. element.value = _param[_cat][_name]["value"+j];
  1490. }
  1491. }
  1492. }
  1493. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  1494. if (_category[_cat]["enabled"] == false)
  1495. {
  1496. if (_optional) {
  1497. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  1498. for (var j = 1; j <= anzpara; ++j) {
  1499. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  1500. }
  1501. }
  1502. document.getElementById(_cat+"_"+_name+"_text").style="color:lightgrey;"
  1503. setEnabled(_cat+"_"+_name, false);
  1504. }
  1505. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional, _number);
  1506. }
  1507. function InvertEnableItem(_cat, _param)
  1508. {
  1509. _zw = _cat + "_" + _param + "_enabled";
  1510. _isOn = document.getElementById(_zw).checked;
  1511. _color = "color:lightgrey;";
  1512. if (_isOn) {
  1513. _color = "color:black;";
  1514. }
  1515. _zw = _cat + "_" + _param + "_text";
  1516. document.getElementById(_zw).disabled = !_isOn;
  1517. document.getElementById(_zw).style = _color;
  1518. setEnabled(_cat + "_" + _param, _isOn);
  1519. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  1520. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  1521. document.getElementById(_cat+"_"+_param+"_value"+j).style=_color;
  1522. }
  1523. }
  1524. function setEnabled(className, enabled) {
  1525. _color = "color:lightgrey;";
  1526. if (enabled) {
  1527. _color = "color:black;";
  1528. }
  1529. let elements = document.getElementsByClassName(className);
  1530. for (i = 0; i < elements.length; i++) {
  1531. if (enabled) {
  1532. elements[i].classList.remove("disabled");
  1533. } else {
  1534. elements[i].classList.add("disabled");
  1535. }
  1536. let inputs = elements[i].getElementsByTagName("input");
  1537. for (j = 0; j < inputs.length; j++) {
  1538. if (inputs[j].id.endsWith("_enabled"))
  1539. continue;
  1540. inputs[j].style = _color
  1541. if (enabled) {
  1542. inputs[j].removeAttribute("disabled");
  1543. } else {
  1544. inputs[j].setAttribute("disabled", "disabled");
  1545. }
  1546. }
  1547. }
  1548. }
  1549. function setVisible(className, visible) {
  1550. let elements = document.getElementsByClassName(className);
  1551. for (i = 0; i < elements.length; i++) {
  1552. if (visible) {
  1553. elements[i].classList.remove("hidden");
  1554. } else {
  1555. elements[i].classList.add("hidden");
  1556. }
  1557. }
  1558. }
  1559. function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1)
  1560. {
  1561. _status = _category[_cat]["enabled"];
  1562. _color = "color:lightgrey;";
  1563. if (_status) {
  1564. _color = "color:black;";
  1565. }
  1566. if (_optional) {
  1567. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  1568. document.getElementById(_cat+"_"+_name+"_enabled").style=_color;
  1569. }
  1570. if (_number == -1){
  1571. if (!_param[_cat][_name]["enabled"]) {
  1572. _status = false;
  1573. _color = "color:lightgrey;";
  1574. }
  1575. }
  1576. else
  1577. if (!NUMBERS[_number][_cat][_name]["enabled"]) {
  1578. _status = false;
  1579. _color = "color:lightgrey;";
  1580. }
  1581. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  1582. document.getElementById(_cat+"_"+_name+"_text").style = _color;
  1583. setEnabled(_cat+"_"+_name, _status);
  1584. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1585. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  1586. document.getElementById(_cat+"_"+_name+"_value"+j).style=_color;
  1587. }
  1588. }
  1589. function ReadParameter(_param, _cat, _name, _optional, _number = -1){
  1590. if (_number > -1) {
  1591. if (_cat == "Digits")
  1592. _cat = "digit";
  1593. if (_cat == "Analog")
  1594. _cat = "analog";
  1595. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1596. return;
  1597. if (_optional) {
  1598. NUMBERS[_number][_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1599. }
  1600. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1601. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1602. if (element.tagName.toLowerCase() == "select") {
  1603. NUMBERS[_number][_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1604. }
  1605. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1606. NUMBERS[_number][_cat][_name]["value"+j] = element.checked;
  1607. }
  1608. else {
  1609. if ((NUMBERS[_number][_cat][_name].checkRegExList != null) && (NUMBERS[_number][_cat][_name].checkRegExList[j-1] != null)) {
  1610. if (!element.value.match(NUMBERS[_cat][_name].checkRegExList[j-1])) {
  1611. element.classList.add("invalid-input");
  1612. } else {
  1613. element.classList.remove("invalid-input");
  1614. }
  1615. }
  1616. NUMBERS[_number][_cat][_name]["value"+j] = element.value;
  1617. }
  1618. }
  1619. }
  1620. else
  1621. {
  1622. if (_optional) {
  1623. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1624. }
  1625. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1626. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1627. if (element.tagName.toLowerCase() == "select") {
  1628. _param[_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1629. }
  1630. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1631. _param[_cat][_name]["value"+j] = element.checked;
  1632. }
  1633. else {
  1634. if ((_param[_cat][_name].checkRegExList != null) && (_param[_cat][_name].checkRegExList[j-1] != null)) {
  1635. if (!element.value.match(_param[_cat][_name].checkRegExList[j-1])) {
  1636. element.classList.add("invalid-input");
  1637. } else {
  1638. element.classList.remove("invalid-input");
  1639. }
  1640. }
  1641. _param[_cat][_name]["value"+j] = element.value;
  1642. }
  1643. }
  1644. }
  1645. }
  1646. function UpdateInputIndividual()
  1647. {
  1648. if (NUNBERSAkt != -1)
  1649. {
  1650. ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt)
  1651. ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt)
  1652. ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt)
  1653. ReadParameter(param, "PostProcessing", "ExtendedResolution", true, NUNBERSAkt)
  1654. ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", true, NUNBERSAkt)
  1655. }
  1656. var sel = document.getElementById("Numbers_value1");
  1657. NUNBERSAkt = sel.selectedIndex;
  1658. WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1659. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1660. WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1661. WriteParameter(param, category, "PostProcessing", "ExtendedResolution", true, NUNBERSAkt);
  1662. WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", true, NUNBERSAkt);
  1663. }
  1664. function UpdateInput() {
  1665. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  1666. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  1667. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  1668. document.getElementById("Category_GPIO_enabled").checked = category["GPIO"]["enabled"];
  1669. setVisible("GPIO_item", category["GPIO"]["enabled"]);
  1670. WriteParameter(param, category, "MakeImage", "LogImageLocation", true);
  1671. WriteParameter(param, category, "MakeImage", "LogfileRetentionInDays", true);
  1672. WriteParameter(param, category, "MakeImage", "WaitBeforeTakingPicture", false);
  1673. WriteParameter(param, category, "MakeImage", "ImageQuality", false);
  1674. WriteParameter(param, category, "MakeImage", "Brightness", false);
  1675. WriteParameter(param, category, "MakeImage", "Contrast", false);
  1676. WriteParameter(param, category, "MakeImage", "Saturation", false);
  1677. WriteParameter(param, category, "MakeImage", "LEDIntensity", false);
  1678. WriteParameter(param, category, "MakeImage", "ImageSize", false);
  1679. WriteParameter(param, category, "MakeImage", "FixedExposure", false);
  1680. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  1681. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  1682. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true);
  1683. // WriteParameter(param, category, "Digits", "Model", false);
  1684. WriteParameter(param, category, "Digits", "LogImageLocation", true);
  1685. WriteParameter(param, category, "Digits", "LogfileRetentionInDays", true);
  1686. WriteParameter(param, category, "Digits", "ModelInputSize", false);
  1687. // WriteParameter(param, category, "Analog", "Model", false);
  1688. WriteParameter(param, category, "Analog", "LogImageLocation", true);
  1689. WriteParameter(param, category, "Analog", "LogfileRetentionInDays", true);
  1690. // WriteParameter(param, category, "Analog", "ExtendedResolution", true);
  1691. WriteParameter(param, category, "Analog", "ModelInputSize", false);
  1692. WriteParameter(param, category, "PostProcessing", "PreValueUse", true);
  1693. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  1694. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true);
  1695. // WriteParameter(param, category, "PostProcessing", "MaxRateValue", true);
  1696. WriteParameter(param, category, "PostProcessing", "ErrorMessage", true);
  1697. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", true);
  1698. WriteParameter(param, category, "MQTT", "Uri", true);
  1699. WriteParameter(param, category, "MQTT", "MainTopic", true);
  1700. WriteParameter(param, category, "MQTT", "ClientID", true);
  1701. WriteParameter(param, category, "MQTT", "user", true);
  1702. WriteParameter(param, category, "MQTT", "password", true);
  1703. WriteParameter(param, category, "MQTT", "SetRetainFlag", true);
  1704. WriteParameter(param, category, "GPIO", "IO0", true);
  1705. WriteParameter(param, category, "GPIO", "IO1", true);
  1706. WriteParameter(param, category, "GPIO", "IO3", true);
  1707. WriteParameter(param, category, "GPIO", "IO4", true);
  1708. WriteParameter(param, category, "GPIO", "IO12", true);
  1709. WriteParameter(param, category, "GPIO", "IO13", true);
  1710. WriteParameter(param, category, "GPIO", "LEDType", false);
  1711. WriteParameter(param, category, "GPIO", "LEDNumbers", false);
  1712. WriteParameter(param, category, "GPIO", "LEDColor", false);
  1713. WriteParameter(param, category, "AutoTimer", "AutoStart", false);
  1714. WriteParameter(param, category, "AutoTimer", "Intervall", false);
  1715. WriteParameter(param, category, "Debug", "Logfile", true);
  1716. WriteParameter(param, category, "Debug", "LogfileRetentionInDays", true);
  1717. WriteParameter(param, category, "System", "TimeZone", true);
  1718. WriteParameter(param, category, "System", "Hostname", true);
  1719. WriteParameter(param, category, "System", "TimeServer", true);
  1720. WriteModelFiles();
  1721. }
  1722. function WriteModelFiles()
  1723. {
  1724. list_tflite = getTFLITEList();
  1725. var _index1 = document.getElementById("Digits_Model_value1");
  1726. var _index2 = document.getElementById("Analog_Model_value1");
  1727. while (_index1.length)
  1728. _index1.remove(0);
  1729. while (_index2.length)
  1730. _index2.remove(0);
  1731. for (var i = 0; i < list_tflite.length; ++i){
  1732. var option1 = document.createElement("option");
  1733. var option2 = document.createElement("option");
  1734. option1.text = list_tflite[i];
  1735. option1.value = list_tflite[i];
  1736. option2.text = list_tflite[i];
  1737. option2.value = list_tflite[i];
  1738. _index1.add(option1);
  1739. _index2.add(option2);
  1740. }
  1741. WriteParameter(param, category, "Analog", "Model", false);
  1742. WriteParameter(param, category, "Digits", "Model", false);
  1743. }
  1744. function ReadParameterAll()
  1745. {
  1746. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  1747. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  1748. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  1749. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  1750. ReadParameter(param, "MakeImage", "LogImageLocation", true);
  1751. ReadParameter(param, "MakeImage", "LogfileRetentionInDays", true);
  1752. ReadParameter(param, "MakeImage", "WaitBeforeTakingPicture", false);
  1753. ReadParameter(param, "MakeImage", "ImageQuality", false);
  1754. ReadParameter(param, "MakeImage", "Brightness", false);
  1755. ReadParameter(param, "MakeImage", "Contrast", false);
  1756. ReadParameter(param, "MakeImage", "Saturation", false);
  1757. ReadParameter(param, "MakeImage", "LEDIntensity", false);
  1758. ReadParameter(param, "MakeImage", "ImageSize", false);
  1759. ReadParameter(param, "MakeImage", "FixedExposure", false);
  1760. ReadParameter(param, "Alignment", "SearchFieldX", false);
  1761. ReadParameter(param, "Alignment", "SearchFieldY", false);
  1762. ReadParameter(param, "Alignment", "AlignmentAlgo", true);
  1763. ReadParameter(param, "Digits", "Model", false);
  1764. ReadParameter(param, "Digits", "LogImageLocation", true);
  1765. ReadParameter(param, "Digits", "LogfileRetentionInDays", true);
  1766. ReadParameter(param, "Digits", "ModelInputSize", false);
  1767. ReadParameter(param, "Analog", "Model", false);
  1768. ReadParameter(param, "Analog", "LogImageLocation", true);
  1769. ReadParameter(param, "Analog", "LogfileRetentionInDays", true);
  1770. ReadParameter(param, "Analog", "ModelInputSize", false);
  1771. ReadParameter(param, "PostProcessing", "PreValueUse", true);
  1772. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  1773. ReadParameter(param, "PostProcessing", "AllowNegativeRates", true);
  1774. ReadParameter(param, "PostProcessing", "ErrorMessage", true);
  1775. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", true);
  1776. ReadParameter(param, "MQTT", "Uri", true);
  1777. ReadParameter(param, "MQTT", "MainTopic", true);
  1778. ReadParameter(param, "MQTT", "ClientID", true);
  1779. ReadParameter(param, "MQTT", "user", true);
  1780. ReadParameter(param, "MQTT", "password", true);
  1781. ReadParameter(param, "MQTT", "SetRetainFlag", true);
  1782. ReadParameter(param, "GPIO", "IO0", true);
  1783. ReadParameter(param, "GPIO", "IO1", true);
  1784. ReadParameter(param, "GPIO", "IO3", true);
  1785. ReadParameter(param, "GPIO", "IO4", true);
  1786. ReadParameter(param, "GPIO", "IO12", true);
  1787. ReadParameter(param, "GPIO", "IO13", true);
  1788. ReadParameter(param, "GPIO", "LEDType", false);
  1789. ReadParameter(param, "GPIO", "LEDNumbers", false);
  1790. ReadParameter(param, "GPIO", "LEDColor", false);
  1791. // Folgende Zeilen sind für Abwärtskompatibität < v9.0.0 notwendig (manchmal parameter auskommentiert)
  1792. param["GPIO"]["LEDType"]["enabled"] = true;
  1793. param["GPIO"]["LEDNumbers"]["enabled"] = true;
  1794. param["GPIO"]["LEDColor"]["enabled"] = true;
  1795. param["GPIO"]["LEDType"]["found"] = true;
  1796. param["GPIO"]["LEDNumbers"]["found"] = true;
  1797. param["GPIO"]["LEDColor"]["found"] = true;
  1798. ReadParameter(param, "AutoTimer", "AutoStart", false);
  1799. ReadParameter(param, "AutoTimer", "Intervall", false);
  1800. ReadParameter(param, "Debug", "Logfile", true);
  1801. ReadParameter(param, "Debug", "LogfileRetentionInDays", true);
  1802. ReadParameter(param, "System", "TimeZone", true);
  1803. ReadParameter(param, "System", "Hostname", true);
  1804. ReadParameter(param, "System", "TimeServer", true);
  1805. UpdateInputIndividual();
  1806. // FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  1807. }
  1808. function FormatDecimalValue(_param, _cat, _name) {
  1809. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1810. var _val = _param[_cat][_name]["value"+j];
  1811. _val = _val.replace(",", ".");
  1812. _param[_cat][_name]["value"+j] = _val;
  1813. }
  1814. }
  1815. function UpdateAfterCategoryCheck() {
  1816. ReadParameterAll();
  1817. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  1818. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  1819. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  1820. UpdateInput();
  1821. UpdateInputIndividual();
  1822. }
  1823. function UpdateExpertModus()
  1824. {
  1825. // var _style = 'display:none;';
  1826. var _style_pur = 'none';
  1827. var _hidden = true;
  1828. if (document.getElementById("ExpertModus_enabled").checked) {
  1829. // _style = '';
  1830. _style_pur = '';
  1831. _hidden = false;
  1832. document.getElementById("Edit_Config_Direct").style.display = "";
  1833. }
  1834. else
  1835. {
  1836. document.getElementById("Edit_Config_Direct").style.display = "none";
  1837. }
  1838. const expert = document.querySelectorAll(".expert");
  1839. for (var i = 0; i < expert.length; i++) {
  1840. expert[i].style.display = _style_pur;
  1841. // document.getElementById(expert[i].id).style = _style;
  1842. }
  1843. // 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
  1844. Array.from(document.querySelector("#GPIO_IO4_value1").options).forEach(function(option_element) {
  1845. if (option_element.value != "built-in-led")
  1846. option_element.hidden = _hidden;
  1847. });
  1848. Array.from(document.querySelector("#GPIO_IO12_value1").options).forEach(function(option_element) {
  1849. if (option_element.value != "external-flash-ws281x")
  1850. option_element.hidden = _hidden;
  1851. });
  1852. }
  1853. function saveTextAsFile()
  1854. {
  1855. ReadParameterAll();
  1856. if (document.getElementsByClassName("invalid-input").length > 0) {
  1857. alert("Settings cannot be saved. Please check your entries.");
  1858. return;
  1859. }
  1860. if (confirm("Are you sure you want to update \"config.ini\"?")) {
  1861. ReadParameterAll();
  1862. WriteConfigININew();
  1863. SaveConfigToServer(basepath);
  1864. alert("Config.ini is updated!")
  1865. }
  1866. }
  1867. function doReboot() {
  1868. if (confirm("Are you sure you want to reboot the ESP32?")) {
  1869. var stringota = "/reboot";
  1870. window.location = stringota;
  1871. window.location.href = stringota;
  1872. window.location.assign(stringota);
  1873. window.location.replace(stringota);
  1874. }
  1875. }
  1876. function editConfigDirect() {
  1877. if (confirm("Did you save your changes?")) {
  1878. var stringota = "/edit_config.html";
  1879. window.location = stringota;
  1880. window.location.href = stringota;
  1881. window.location.assign(stringota);
  1882. window.location.replace(stringota);
  1883. }
  1884. }
  1885. function numberChanged()
  1886. {
  1887. UpdateInputIndividual();
  1888. }
  1889. LoadConfigNeu();
  1890. </script>
  1891. </body>
  1892. </html>