edit_config_param.html 74 KB

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