edit_config_param.html 72 KB

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