edit_config_param.html 71 KB

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