edit_config_param.html 73 KB

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