edit_config_param.html 68 KB

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