edit_config_param.html 73 KB

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