edit_config_template.html 102 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711
  1. <!DOCTYPE html>
  2. <html lang="en" xml:lang="en">
  3. <head>
  4. <title>Configuration</title>
  5. <meta charset="UTF-8" />
  6. <style>
  7. h1 {font-size: 2em;}
  8. h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
  9. h3 {font-size: 1.2em;}
  10. h4 {font-size: 1.05em; margin-bottom: 0;}
  11. h5 {font-size: 0.83em; margin-top: 0.2em; margin-bottom: 0;}
  12. p {font-size: 1em;}
  13. .table {
  14. border: 0pt;
  15. border-collapse: collapse;
  16. table-layout: fixed;
  17. width:100%;
  18. }
  19. td {
  20. padding: 10px;
  21. vertical-align: middle;
  22. }
  23. .button {
  24. padding: 5px 10px;
  25. width: 220px;
  26. font-size: 16px;
  27. }
  28. input[type=number] {
  29. width: 60px;
  30. min-width: 60px;
  31. max-width: 60px;
  32. margin-right: 10px;
  33. padding: 3px 5px;
  34. display: inline-block;
  35. border: 1px solid #ccc;
  36. font-size: 16px;
  37. vertical-align: middle;
  38. }
  39. input[type=text] {
  40. width: 96%;
  41. min-width:240px;
  42. max-width:96%;
  43. margin-right: 10px;
  44. padding: 3px 5px;
  45. display: inline-block;
  46. border: 1px solid #ccc;
  47. font-size: 16px;
  48. vertical-align: middle;
  49. }
  50. select {
  51. min-width: 72px;
  52. max-width: 100%;
  53. padding: 3px 5px;
  54. display: inline-block;
  55. border: 1px solid #ccc;
  56. font-size: 16px;
  57. margin-right: 10px;
  58. vertical-align: middle;
  59. }
  60. .select_large {
  61. width: 100%;
  62. min-width: 250px;
  63. max-width: 100%;
  64. padding: 3px 5px;
  65. display: inline-block;
  66. border: 1px solid #ccc;
  67. font-size: 16px;
  68. margin-right: 10px;
  69. vertical-align: middle;
  70. }
  71. textarea {
  72. font-size: 14px;
  73. }
  74. .description {
  75. color: black;
  76. font-size: 80%;
  77. }
  78. .disabled {
  79. color:rgb(122, 122, 122);
  80. }
  81. #GPIO_LEDColor_value1 #GPIO_LEDColor_value2 #GPIO_LEDColor_value3 {
  82. width: 30px;
  83. font-size: 16px;
  84. }
  85. .invalid-input {
  86. background-color: #FFAA00;
  87. }
  88. input:out-of-range {
  89. background-color: rgba(255, 0, 0, 0.25);
  90. border: 1px solid red;
  91. }
  92. input:invalid {
  93. background-color: rgba(255, 0, 0, 0.25);
  94. border: 1px solid red;
  95. }
  96. .hidden {
  97. display: none;
  98. }
  99. .expert {
  100. background-color: #ffefef;
  101. font-size: 16px;
  102. }
  103. .indent1 {
  104. padding-left: 25px;
  105. font-size: 16px;
  106. }
  107. .indent2 {
  108. padding-left: 50px;
  109. font-size: 16px;
  110. }
  111. .tooltip {
  112. position: relative;
  113. display: inline-block;
  114. }
  115. .tooltip .tooltiptext {
  116. visibility: hidden;
  117. width: 600px;
  118. background-color: #fcfcfc;
  119. padding: 5px;
  120. padding-bottom: 0;
  121. border: solid black 2px;
  122. /* Position the tooltip */
  123. position: absolute;
  124. z-index: 1;
  125. top: 100%;
  126. left: 100%;
  127. margin-left: -600px;
  128. }
  129. .tooltip:hover .tooltiptext {
  130. visibility: visible;
  131. }
  132. .tooltip-content {
  133. width: calc(100% - 2px);
  134. height: calc(100% - 2px);
  135. padding: 1px;
  136. }
  137. </style>
  138. <link rel="stylesheet" href="mkdocs_theme.css?v=$COMMIT_HASH" />
  139. <link rel="stylesheet" href="mkdocs_theme_extra.css?v=$COMMIT_HASH" />
  140. <link rel="stylesheet" href="github.min.css?v=$COMMIT_HASH" />
  141. <link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
  142. <script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
  143. <script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
  144. </head>
  145. <body style="font-family: arial; padding: 0px 10px;">
  146. <h2>Configuration</h2>
  147. <details id="desc_details">
  148. <summary><b>CLICK HERE</b> for usage description. More infos in documentation:
  149. <a href="https://jomjol.github.io/AI-on-the-edge-device-docs/Parameters" target="_blank">Parameter</a>
  150. </summary>
  151. <p>
  152. This page lists all available configuration parameters of the device.<br>
  153. The description of each parameter can be shown by hovering over or by clicking the <img src="help.png" width="16px"> icon.
  154. </p>
  155. <p>
  156. The page gets opened with the default view which should be sufficient for regular configuration tasks. Enabling the <b>"Show Expert Parameters"</b>
  157. some expert parameters (light red background color) will be added to the parameter list. Additionally the button <b>"Edit "Config.ini" File"</b>
  158. to edit the underlaying configuration file (config.ini) manually is now shown on top of the page. This function should be only used for special cases.
  159. </p>
  160. <p>
  161. Sections (entire functionality) or single parameters having a checkbox can be enabled or disabled.
  162. Disabling a complete section results in a disabled functionality. Whenever only a single parameter of a section is disabled
  163. the hard-coded default value is used for the disabled parameter.
  164. </p>
  165. <p>
  166. Don't forget to save the changes with the button <b>"Save Config"</b> at the bottom of this page.<br>
  167. <label id="reboot_text" name="reboot_text">
  168. To apply the new configuration a restart of the device is neccessary: <b>"Reboot to apply changes"</b>
  169. </label>
  170. </p>
  171. </details>
  172. <hr />
  173. <div id="divall" style="display:none">
  174. <table class="table">
  175. <colgroup>
  176. <col span="1" style="width:290px">
  177. <col span="1" style="width:300px;">
  178. <col span="1">
  179. </colgroup>
  180. <tr style="border-bottom: 2px solid lightgray;">
  181. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Configuration View</h4></td>
  182. </tr>
  183. <tr>
  184. <td class="indent1">
  185. <input style="margin-top:12px;margin-bottom:12px" type="checkbox" id="ExpertModus_enabled" value="1" onclick='UpdateExpertModus()' unchecked>
  186. <label for="ExpertModus_enabled">Show Expert Parameters</label>
  187. </td>
  188. <td>
  189. <button style="display:none;" class="button" id="Button_Edit_Config_Raw" onclick="editConfigRaw()">Edit Config file in raw mode</button>
  190. </td>
  191. </tr>
  192. <!------------- Take Image ------------------>
  193. <tr style="border-bottom: 2px solid lightgray;">
  194. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Take Image</h4></td>
  195. </tr>
  196. <tr>
  197. <td class="indent1">
  198. <input type="checkbox" id="TakeImage_RawImagesLocation_enabled" value="1" onclick='InvertEnableItem("TakeImage", "RawImagesLocation")' unchecked >
  199. <label for=TakeImage_RawImagesLocation_enabled><class id="TakeImage_RawImagesLocation_text" style="color:black;">Raw Images Location</class></label>
  200. </td>
  201. <td>
  202. <input required type="text" name="name" id="TakeImage_RawImagesLocation_value1">
  203. </td>
  204. <td>$TOOLTIP_TakeImage_RawImagesLocation</td>
  205. </tr>
  206. <tr>
  207. <td class="indent1">
  208. <input type="checkbox" id="TakeImage_RawImagesRetention_enabled" value="1" onclick='InvertEnableItem("TakeImage", "RawImagesRetention")' unchecked >
  209. <label for=TakeImage_RawImagesRetention_enabled><class id="TakeImage_RawImagesRetention_text" style="color:black;">Raw Images Retention</class></label>
  210. </td>
  211. <td>
  212. <input required type="number" id="TakeImage_RawImagesRetention_value1" size="13" min="0" step="1"
  213. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  214. </td>
  215. <td>$TOOLTIP_TakeImage_RawImagesRetention</td>
  216. </tr>
  217. <tr class="expert" unused_id="ex1">
  218. <td class="indent1">
  219. <label><class id="TakeImage_Demo_text" style="color:black;">Demo Mode</class></label>
  220. </td>
  221. <td>
  222. <select id="TakeImage_Demo_value1">
  223. <option value="true">true</option>
  224. <option value="false" selected>false</option>
  225. </select>
  226. </td>
  227. <td>$TOOLTIP_TakeImage_Demo</td>
  228. </tr>
  229. <tr class="expert" unused_id="ex1">
  230. <td class="indent1">
  231. <class id="TakeImage_WaitBeforeTakingPicture_text" style="color:black;">Wait Before Taking Picture</class>
  232. </td>
  233. <td>
  234. <input required type="number" id="TakeImage_WaitBeforeTakingPicture_value1" size="13" min="0" step="any"
  235. oninput="(!validity.rangeUnderflow||(value=0));">Seconds
  236. </td>
  237. <td>$TOOLTIP_TakeImage_WaitBeforeTakingPicture</td>
  238. </tr>
  239. <tr unused_id="Brightness_ex3">
  240. <td class="indent1">
  241. <class id="TakeImage_Brightness_text" style="color:black;">Brightness</class>
  242. </td>
  243. <td>
  244. <input required type="number" id="TakeImage_Brightness_value1" size="13" min="-2" max="2" onchange="cameraParameterChanged()"
  245. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) &&
  246. (!validity.stepMismatch||(value=parseInt(this.value)));">
  247. </td>
  248. <td>$TOOLTIP_TakeImage_Brightness</td>
  249. </tr>
  250. <tr unused_id="Contrast_ex3">
  251. <td class="indent1">
  252. <class id="TakeImage_Contrast_text" style="color:black;">Contrast</class>
  253. </td>
  254. <td>
  255. <input required type="number" id="TakeImage_Contrast_value1" size="13" min="-2" max="2" onchange="cameraParameterChanged()"
  256. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) &&
  257. (!validity.stepMismatch||(value=parseInt(this.value)));">
  258. </td>
  259. <td>$TOOLTIP_TakeImage_Contrast</td>
  260. </tr>
  261. <tr unused_id="Saturation_ex3">
  262. <td class="indent1">
  263. <class id="TakeImage_Saturation_text" style="color:black;">Saturation</class>
  264. </td>
  265. <td>
  266. <input required type="number" id="TakeImage_Saturation_value1" size="13" min="-2" max="2" onchange="cameraParameterChanged()"
  267. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) &&
  268. (!validity.stepMismatch||(value=parseInt(this.value)));">
  269. </td>
  270. <td>$TOOLTIP_TakeImage_Saturation</td>
  271. </tr>
  272. <tr class="expert" unused_id="TakeImage_Sharpness_ex3">
  273. <td class="indent1">
  274. <class id="TakeImage_Sharpness_text" style="color:black;">Sharpness</class>
  275. </td>
  276. <td>
  277. <input required type="number" id="TakeImage_Sharpness_value1" size="13" min="-4" max="3" onchange="cameraParameterChanged()"
  278. oninput="(!validity.rangeUnderflow||(value=-4)) && (!validity.rangeOverflow||(value=3)) &&
  279. (!validity.stepMismatch||(value=parseInt(this.value)));">
  280. </td>
  281. <td>$TOOLTIP_TakeImage_Sharpness</td>
  282. </tr>
  283. <tr unused_id="LEDIntensity_ex3">
  284. <td class="indent1">
  285. <class id="TakeImage_LEDIntensity_text" style="color:black;">LED Intensity</class>
  286. </td>
  287. <td>
  288. <input required type="number" id="TakeImage_LEDIntensity_value1" size="13" min="0" max="100" onchange="cameraParameterChanged()"
  289. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=100)) &&
  290. (!validity.stepMismatch||(value=parseInt(this.value)));">
  291. </td>
  292. <td>$TOOLTIP_TakeImage_LEDIntensity</td>
  293. </tr>
  294. <tr class="expert" unused_id="ex2">
  295. <td class="indent1">
  296. <class id="TakeImage_ImageQuality_text" style="color:black;">Image Quality</class>
  297. </td>
  298. <td>
  299. <input required type="number" id="TakeImage_ImageQuality_value1" size="13" min="8" max="63" onchange="cameraParameterChanged()"
  300. oninput="(!validity.rangeUnderflow||(value=8)) && (!validity.rangeOverflow||(value=63)) &&
  301. (!validity.stepMismatch||(value=parseInt(this.value)));">
  302. </td>
  303. <td>$TOOLTIP_TakeImage_ImageQuality</td>
  304. </tr>
  305. <tr class="expert" unused_id="ex3">
  306. <td class="indent1">
  307. <class id="TakeImage_ImageSize_text" style="color:black;">Image Size</class>
  308. </td>
  309. <td>
  310. <select id="TakeImage_ImageSize_value1" onchange="cameraParameterChanged()">
  311. <option value="VGA" selected>VGA</option>
  312. <option value="QVGA" >QVGA</option>
  313. </select>
  314. </td>
  315. <td>$TOOLTIP_TakeImage_ImageSize</td>
  316. </tr>
  317. <tr class="expert" unused_id="TakeImage_Zoom_ex10">
  318. <td class="indent1">
  319. <class id="TakeImage_Zoom_text" style="color:black;">Zoom</class>
  320. </td>
  321. <td>
  322. <select id="TakeImage_Zoom_value1" onchange="cameraParameterChanged()">
  323. <option value="true">true</option>
  324. <option value="false" selected>false</option>
  325. </select>
  326. </td>
  327. <td>$TOOLTIP_TakeImage_Zoom</td>
  328. </tr>
  329. <tr class="expert" unused_id="TakeImage_ZoomMode_ex10">
  330. <td class="indent1">
  331. <class id="TakeImage_ZoomMode_text" style="color:black;">Zoom Mode</class>
  332. </td>
  333. <td>
  334. <select id="TakeImage_ZoomMode_value1" onchange="cameraParameterChanged()">
  335. <option value="1">1</option>
  336. <option value="0" selected>0</option>
  337. </select>
  338. </td>
  339. <td>$TOOLTIP_TakeImage_ZoomMode</td>
  340. </tr>
  341. <tr class="expert" unused_id="ex1">
  342. <td class="indent1">
  343. <class id="TakeImage_ZoomOffsetX_text" style="color:black;">Zoom Offset X</class>
  344. </td>
  345. <td>
  346. <input required type="number" id="TakeImage_ZoomOffsetX_value1" size="13" min="0" step="any" onchange="cameraParameterChanged()"
  347. oninput="(!validity.rangeUnderflow||(value=0));">Pixel
  348. </td>
  349. <td>$TOOLTIP_TakeImage_ZoomOffsetX</td>
  350. </tr>
  351. <tr class="expert" unused_id="ex1">
  352. <td class="indent1">
  353. <class id="TakeImage_ZoomOffsetY_text" style="color:black;">Zoom Offset Y</class>
  354. </td>
  355. <td>
  356. <input required type="number" id="TakeImage_ZoomOffsetY_value1" size="13" min="0" step="any" onchange="cameraParameterChanged()"
  357. oninput="(!validity.rangeUnderflow||(value=0));">Pixel
  358. </td>
  359. <td>$TOOLTIP_TakeImage_ZoomOffsetY</td>
  360. </tr>
  361. <tr class="expert" unused_id="TakeImage_Grayscale_ex10">
  362. <td class="indent1">
  363. <class id="TakeImage_Grayscale_text" style="color:black;">Grayscale</class>
  364. </td>
  365. <td>
  366. <select id="TakeImage_Grayscale_value1" onchange="cameraParameterChanged()">
  367. <option value="true">true</option>
  368. <option value="false" selected>false</option>
  369. </select>
  370. </td>
  371. <td>$TOOLTIP_TakeImage_Grayscale</td>
  372. </tr>
  373. <tr class="expert" unused_id="TakeImage_Negative_ex10">
  374. <td class="indent1">
  375. <class id="TakeImage_Negative_text" style="color:black;">Negative</class>
  376. </td>
  377. <td>
  378. <select id="TakeImage_Negative_value1" onchange="cameraParameterChanged()">
  379. <option value="true">true</option>
  380. <option value="false" selected>false</option>
  381. </select>
  382. </td>
  383. <td>$TOOLTIP_TakeImage_Negative</td>
  384. </tr>
  385. <tr class="expert" unused_id="TakeImage_Aec2_ex10">
  386. <td class="indent1">
  387. <class id="TakeImage_Aec2_text" style="color:black;">Auto-exposure Control 2</class>
  388. </td>
  389. <td>
  390. <select id="TakeImage_Aec2_value1" onchange="cameraParameterChanged()">
  391. <option value="true">true</option>
  392. <option value="false" selected>false</option>
  393. </select>
  394. </td>
  395. <td>$TOOLTIP_TakeImage_Aec2</td>
  396. </tr>
  397. <tr class="expert" unused_id="TakeImage_AutoExposureLevel_ex3">
  398. <td class="indent1">
  399. <class id="TakeImage_AutoExposureLevel_text" style="color:black;">Auto Exposure Level</class>
  400. </td>
  401. <td>
  402. <input required type="number" id="TakeImage_AutoExposureLevel_value1" size="13" min="-2" max="2" onchange="cameraParameterChanged()"
  403. oninput="(!validity.rangeUnderflow||(value=-2)) && (!validity.rangeOverflow||(value=2)) &&
  404. (!validity.stepMismatch||(value=parseInt(this.value)));">
  405. </td>
  406. <td>$TOOLTIP_TakeImage_AutoExposureLevel</td>
  407. </tr>
  408. <tr class="expert" unused_id="TakeImage_FixedExposure_ex10">
  409. <td class="indent1">
  410. <class id="TakeImage_FixedExposure_text" style="color:black;">Fixed Exposure</class>
  411. </td>
  412. <td>
  413. <select id="TakeImage_FixedExposure_value1" onchange="cameraParameterChanged()">
  414. <option value="true">true</option>
  415. <option value="false" selected>false</option>
  416. </select>
  417. </td>
  418. <td>$TOOLTIP_TakeImage_FixedExposure</td>
  419. </tr>
  420. <!------------- Alignment ------------------>
  421. <tr style="border-bottom: 2px solid lightgray;" id="ex4">
  422. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Alignment</h4></td>
  423. </tr>
  424. <tr class="expert" unused_id="ex6">
  425. <td class="indent1">
  426. <class id="Alignment_SearchFieldX_text" style="color:black;">Search Field X</class>
  427. </td>
  428. <td>
  429. <input required type="number" name="name" id="Alignment_SearchFieldX_value1" size="13" min="1" step="1"
  430. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Pixel
  431. </td>
  432. <td>$TOOLTIP_Alignment_SearchFieldX</td>
  433. </tr>
  434. <tr class="expert" unused_id="ex8">
  435. <td class="indent1">
  436. <class id="Alignment_SearchFieldY_text" style="color:black;">Search Field Y</class>
  437. </td>
  438. <td>
  439. <input required type="number" name="name" id="Alignment_SearchFieldY_value1" size="13" min="1"
  440. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Pixel
  441. </td>
  442. <td>$TOOLTIP_Alignment_SearchFieldY</td>
  443. </tr>
  444. <tr class="expert" unused_id="AlignmentAlgo_ex8">
  445. <td class="indent1">
  446. <input type="checkbox" id="Alignment_AlignmentAlgo_enabled" value="1" onclick = 'InvertEnableItem("Alignment", "AlignmentAlgo")' unchecked >
  447. <label for=Alignment_AlignmentAlgo_enabled><class id="Alignment_AlignmentAlgo_text" style="color:black;">Alignment Algorithm</class></label>
  448. </td>
  449. <td>
  450. <select id="Alignment_AlignmentAlgo_value1">
  451. <option value="default" selected>Default</option>
  452. <option value="highAccuracy" >HighAccuracy</option>
  453. <option value="fast" >Fast</option>
  454. <option value="off" >Off</option><!-- add disable aligment algo |01.2023 -->
  455. </select>
  456. </td>
  457. <td>$TOOLTIP_Alignment_AlignmentAlgo</td>
  458. </tr>
  459. <tr unused_id="ex13">
  460. <td class="indent1">
  461. <class id="Alignment_FlipImageSize_text" style="color:black;">Flip Image Size</class>
  462. </td>
  463. <td>
  464. <select id="Alignment_FlipImageSize_value1">
  465. <option value="true">true</option>
  466. <option value="false" selected>false</option>
  467. </select>
  468. </td>
  469. <td>$TOOLTIP_Alignment_FlipImageSize</td>
  470. </tr>
  471. <tr unused_id="ex13">
  472. <td class="indent1">
  473. <class id="Alignment_InitialMirror_text" style="color:black;">Initial Mirror</class>
  474. </td>
  475. <td>
  476. <select id="Alignment_InitialMirror_value1">
  477. <option value="true">true</option>
  478. <option value="false" selected>false</option>
  479. </select>
  480. </td>
  481. <td>$TOOLTIP_Alignment_InitialMirror</td>
  482. </tr>
  483. <tr>
  484. <td class="indent1">
  485. <class id="Alignment_InitialRotate_text" style="color:black;">Rotation angle</class>
  486. </td>
  487. <td>
  488. <input required type="number" name="name" id="Alignment_InitialRotate_value1" size="13" min="-360" max="+360" step="0.1"
  489. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">degree
  490. </td>
  491. <td>$TOOLTIP_Alignment_InitialRotate</td>
  492. </tr>
  493. <!------------- Digit ROIs ------------------>
  494. <tr style="border-bottom: 2px solid lightgray;" id="Category_Digits_ex4">
  495. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  496. <h4><input type="checkbox" id="Category_Digits_enabled" value="1" onclick ='UpdateAfterCategoryCheck()' unchecked >
  497. <label for=Category_Digits_enabled>Digit ROI Processing</label></h4>
  498. </td>
  499. </tr>
  500. <tr class="DigitItem">
  501. <td class="indent1" >
  502. <class id="Digits_Model_text" style="color:black;">Model</class>
  503. </td>
  504. <td>
  505. <select required class="select_large" id="Digits_Model_value1">
  506. </select>
  507. </td>
  508. <td>$TOOLTIP_Digits_Model</td>
  509. </tr>
  510. <tr class="DigitItem expert" unused_id="ex91">
  511. <td class="indent1">
  512. <input type="checkbox" id="Digits_CNNGoodThreshold_enabled" value="1" onclick = 'InvertEnableItem("Digits", "CNNGoodThreshold")' unchecked >
  513. <label for=Digits_CNNGoodThreshold_enabled><class id="Digits_CNNGoodThreshold_text" style="color:black;">CNN Good Threshold</class></label>
  514. </td>
  515. <td>
  516. <input required type="number" id="Digits_CNNGoodThreshold_value1" min="0" max="1" step="0.1"
  517. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=1)) &&
  518. (!validity.stepMismatch||(value=parseInt(this.value)));">
  519. </td>
  520. <td>$TOOLTIP_Digits_CNNGoodThreshold</td>
  521. </tr>
  522. <tr class="DigitItem">
  523. <td class="indent1">
  524. <input type="checkbox" id="Digits_ROIImagesLocation_enabled" value="1" onclick = 'InvertEnableItem("Digits", "ROIImagesLocation")' unchecked >
  525. <label for=Digits_ROIImagesLocation_enabled><class id="Digits_ROIImagesLocation_text" style="color:black;">ROI Images Location</class></label>
  526. </td>
  527. <td>
  528. <input required type="text" name="name" id="Digits_ROIImagesLocation_value1">
  529. </td>
  530. <td>$TOOLTIP_Digits_ROIImagesLocation</td>
  531. </tr>
  532. <tr class="DigitItem">
  533. <td class="indent1">
  534. <input type="checkbox" id="Digits_ROIImagesRetention_enabled" value="1" onclick = 'InvertEnableItem("Digits", "ROIImagesRetention")' unchecked >
  535. <label for=Digits_ROIImagesRetention_enabled><class id="Digits_ROIImagesRetention_text" style="color:black;">ROI Images Retention</class></label>
  536. </td>
  537. <td>
  538. <input required type="number" id="Digits_ROIImagesRetention_value1" min="0" step="1"
  539. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  540. </td>
  541. <td>$TOOLTIP_Digits_ROIImagesRetention</td>
  542. </tr>
  543. <!------------- Ananlog ROIs ------------------>
  544. <tr style="border-bottom: 2px solid lightgray;" id="Category_Analog_ex4">
  545. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  546. <h4><input type="checkbox" id="Category_Analog_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  547. <label for=Category_Analog_enabled>Analog ROI Processing</label></h4>
  548. </td>
  549. </tr>
  550. <tr class="AnalogItem">
  551. <td class="indent1">
  552. <class id="Analog_Model_text" style="color:black;">Model</class>
  553. </td>
  554. <td>
  555. <select required class="select_large" id="Analog_Model_value1">
  556. </select>
  557. </td>
  558. <td>$TOOLTIP_Analog_Model</td>
  559. </tr>
  560. <tr class="AnalogItem">
  561. <td class="indent1">
  562. <input type="checkbox" id="Analog_ROIImagesLocation_enabled" value="1" onclick = 'InvertEnableItem("Analog", "ROIImagesLocation")' unchecked >
  563. <label for=Analog_ROIImagesLocation_enabled><class id="Analog_ROIImagesLocation_text" style="color:black;">ROI Images Location</class>
  564. </label>
  565. </td>
  566. <td> <input required type="text" name="name" id="Analog_ROIImagesLocation_value1"> </td>
  567. <td>$TOOLTIP_Analog_ROIImagesLocation</td>
  568. </tr>
  569. <tr class="AnalogItem">
  570. <td class="indent1">
  571. <input type="checkbox" id="Analog_ROIImagesRetention_enabled" value="1" onclick = 'InvertEnableItem("Analog", "ROIImagesRetention")' unchecked >
  572. <label for=Analog_ROIImagesRetention_enabled><class id="Analog_ROIImagesRetention_text" style="color:black;">ROI Images Retention</class></label></td>
  573. <td>
  574. <input required type="number" id="Analog_ROIImagesRetention_value1" min="0" step="1"
  575. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  576. </td>
  577. <td>$TOOLTIP_Analog_ROIImagesRetention</td>
  578. </tr>
  579. <!------------- Post-Processing ------------------>
  580. <tr style="border-bottom: 2px solid lightgray;">
  581. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Post-Processing</h4></td>
  582. </tr>
  583. <tr>
  584. <td class="indent1">
  585. <label><class id="PostProcessing_PreValueUse_text" style="color:black;">Previous Value</class></label>
  586. </td>
  587. <td>
  588. <select id="PostProcessing_PreValueUse_value1">
  589. <option value="true" selected>true</option>
  590. <option value="false" >false</option>
  591. </select>
  592. </td>
  593. <td>$TOOLTIP_PostProcessing_PreValueUse</td>
  594. </tr>
  595. <tr class="expert" unused_id="ex11">
  596. <td class="indent1">
  597. <input type="checkbox" id="PostProcessing_PreValueAgeStartup_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "PreValueAgeStartup")' unchecked >
  598. <label for=PostProcessing_PreValueAgeStartup_enabled><class id="PostProcessing_PreValueAgeStartup_text" style="color:black;">Maximum Age of Previous Value after Startup</class></label>
  599. </td>
  600. <td>
  601. <input required type="number" id="PostProcessing_PreValueAgeStartup_value1" size="13" min="0"
  602. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Minutes
  603. </td>
  604. <td>$TOOLTIP_PostProcessing_PreValueAgeStartup</td>
  605. </tr>
  606. <tr class="expert" unused_id="ex12">
  607. <td class="indent1">
  608. <label><class id="PostProcessing_ErrorMessage_text" style="color:black;">Skip Messages on Error</class></label>
  609. </td>
  610. <td>
  611. <select id="PostProcessing_ErrorMessage_value1">
  612. <option value="true" selected>true</option>
  613. <option value="false" >false</option>
  614. </select>
  615. </td>
  616. <td>$TOOLTIP_PostProcessing_ErrorMessage</td>
  617. </tr>
  618. <tr class="expert" unused_id="ex1dddd">
  619. <td class="indent1">
  620. <label><class id="PostProcessing_CheckDigitIncreaseConsistency_text" style="color:black;">Check Digit Increase Consistency</class></label>
  621. </td>
  622. <td>
  623. <select id="PostProcessing_CheckDigitIncreaseConsistency_value1">
  624. <option value="true" selected>true</option>
  625. <option value="false" >false</option>
  626. </select>
  627. </td>
  628. <td>$TOOLTIP_PostProcessing_CheckDigitIncreaseConsistency</td>
  629. </tr>
  630. <tr style="margin-top:12px">
  631. <td class="indent1" style="padding-top:25px" colspan="3">
  632. <b>Parameter per number sequence:</b>
  633. <select
  634. style="font-weight: bold; margin-left:17px" id="Numbers_value1" onchange="numberChanged()">
  635. </select>
  636. </td>
  637. </tr>
  638. <tr>
  639. <td class="indent2">
  640. <label><class id="PostProcessing_AllowNegativeRates_text" style="color:black;">Allow Negative Rates</class></label>
  641. </td>
  642. <td>
  643. <select id="PostProcessing_AllowNegativeRates_value1">
  644. <option value="true" selected>true</option>
  645. <option value="false" >false</option>
  646. </select>
  647. </td>
  648. <td>$TOOLTIP_PostProcessing_NUMBER.AllowNegativeRates</td>
  649. </tr>
  650. <tr>
  651. <td class="indent2">
  652. <input type="checkbox" id="PostProcessing_DecimalShift_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "DecimalShift")' unchecked >
  653. <label for=PostProcessing_DecimalShift_enabled><class id="PostProcessing_DecimalShift_text" style="color:black;">Decimal Shift</class></label>
  654. </td>
  655. <td>
  656. <input required type="number" id="PostProcessing_DecimalShift_value1" value="0" step="1" min="-9" max="9"
  657. oninput="(!validity.rangeUnderflow||(value=-9)) && (!validity.rangeOverflow||(value=9)) &&
  658. (!validity.stepMismatch||(value=parseInt(this.value)));">
  659. </td>
  660. <td>$TOOLTIP_PostProcessing_NUMBER.DecimalShift</td>
  661. </tr>
  662. <tr>
  663. <td class="indent2">
  664. <input type="checkbox" id="PostProcessing_AnalogDigitalTransitionStart_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "AnalogDigitalTransitionStart")' unchecked >
  665. <label for=PostProcessing_AnalogDigitalTransitionStart_enabled><class id="PostProcessing_AnalogDigitalTransitionStart_text" style="color:black;">Analog/Digital Transition Start</class></label>
  666. </td>
  667. <td>
  668. <input required type="number" id="PostProcessing_AnalogDigitalTransitionStart_value1" step="0.1" min="6.0" max="9.9" value="9.2"
  669. oninput="(!validity.rangeUnderflow||(value=6.0)) && (!validity.rangeOverflow||(value=9.9)) &&
  670. (!validity.stepMismatch||(value=parseInt(this.value)));">
  671. </td>
  672. <td>$TOOLTIP_PostProcessing_NUMBER.AnalogDigitalTransitionStart</td>
  673. </tr>
  674. <tr>
  675. <td class="indent2">
  676. <input type="checkbox" id="PostProcessing_MaxRateValue_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateValue")' unchecked >
  677. <label for=PostProcessing_MaxRateValue_enabled><class id="PostProcessing_MaxRateValue_text" style="color:black;">Maximum Rate Value</class></label>
  678. </td>
  679. <td>
  680. <input required type="number" id="PostProcessing_MaxRateValue_value1" size="13" min="0" step="any"
  681. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  682. </td>
  683. <td>$TOOLTIP_PostProcessing_NUMBER.MaxRateValue</td>
  684. </tr>
  685. <tr>
  686. <td class="indent2">
  687. <input type="checkbox" id="PostProcessing_MaxRateType_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateType")' unchecked >
  688. <label for=PostProcessing_MaxRateType_enabled><class id="PostProcessing_MaxRateType_text" style="color:black;">Maximum Rate Type</class></label>
  689. </td>
  690. <td>
  691. <select id="PostProcessing_MaxRateType_value1">
  692. <option value="AbsoluteChange" >AbsoluteChange</option>
  693. <option value="RateChange" selected>RateChange</option>
  694. </select>
  695. </td>
  696. <td>$TOOLTIP_PostProcessing_NUMBER.MaxRateType</td>
  697. </tr>
  698. <tr>
  699. <td class="indent2">
  700. <label><class id="PostProcessing_ExtendedResolution_text" style="color:black;">Extended Resolution</class></label>
  701. </td>
  702. <td>
  703. <select id="PostProcessing_ExtendedResolution_value1">
  704. <option value="true" >true</option>
  705. <option value="false" selected>false</option>
  706. </select>
  707. </td>
  708. <td>$TOOLTIP_PostProcessing_NUMBER.ExtendedResolution</td>
  709. </tr>
  710. <tr>
  711. <td id="ex121" class="indent2">
  712. <label><class id="PostProcessing_IgnoreLeadingNaN_text" style="color:black;">Ignore Leading NaNs</class></label>
  713. </td>
  714. <td>
  715. <select id="PostProcessing_IgnoreLeadingNaN_value1">
  716. <option value="true" >true</option>
  717. <option value="false" selected>false</option>
  718. </select>
  719. </td>
  720. <td>$TOOLTIP_PostProcessing_NUMBER.IgnoreLeadingNaN</td>
  721. </tr>
  722. <!------------- MQTT ------------------>
  723. <tr style="border-bottom: 2px solid lightgray;">
  724. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  725. <h4>
  726. <input type="checkbox" id="Category_MQTT_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  727. <label for=Category_MQTT_enabled>MQTT</label>
  728. </h4>
  729. </td>
  730. </tr>
  731. <tr class="MQTTItem">
  732. <td class="indent1">
  733. <input type="checkbox" id="MQTT_Uri_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Uri")' unchecked >
  734. <label for=MQTT_Uri_enabled><class id="MQTT_Uri_text" style="color:black;">URI</class></label>
  735. </td>
  736. <td>
  737. <input required type="text" id="MQTT_Uri_value1">
  738. </td>
  739. <td>$TOOLTIP_MQTT_Uri</td>
  740. </tr>
  741. <tr class="MQTTItem">
  742. <td class="indent1">
  743. <input type="checkbox" id="MQTT_MainTopic_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MainTopic")' unchecked >
  744. <label for=MQTT_MainTopic_enabled><class id="MQTT_MainTopic_text" style="color:black;">Main Topic</class></label>
  745. </td>
  746. <td>
  747. <input required type="text" id="MQTT_MainTopic_value1">
  748. </td>
  749. <td>$TOOLTIP_MQTT_MainTopic</td>
  750. </tr>
  751. <tr class="MQTTItem">
  752. <td class="indent1">
  753. <input type="checkbox" id="MQTT_ClientID_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientID")' unchecked >
  754. <label for=MQTT_ClientID_enabled><class id="MQTT_ClientID_text" style="color:black;">Client ID</class></label>
  755. </td>
  756. <td>
  757. <input required type="text" id="MQTT_ClientID_value1">
  758. </td>
  759. <td>$TOOLTIP_MQTT_ClientID</td>
  760. </tr>
  761. <tr class="MQTTItem">
  762. <td class="indent1">
  763. <input type="checkbox" id="MQTT_user_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "user")' unchecked >
  764. <label for=MQTT_user_enabled><class id="MQTT_user_text" style="color:black;">Username</class></label>
  765. </td>
  766. <td>
  767. <input type="text" id="MQTT_user_value1">
  768. </td>
  769. <td>$TOOLTIP_MQTT_user</td>
  770. </tr>
  771. <tr class="MQTTItem">
  772. <td class="indent1">
  773. <input type="checkbox" id="MQTT_password_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "password")' unchecked >
  774. <label for=MQTT_password_enabled><class id="MQTT_password_text" style="color:black;">Password</class></label>
  775. </td>
  776. <td>
  777. <input type="text" id="MQTT_password_value1">
  778. </td>
  779. <td>$TOOLTIP_MQTT_password</td>
  780. </tr>
  781. <tr class="MQTTItem expert" unused_id="exMqtt">
  782. <td class="indent1">
  783. <input type="checkbox" id="MQTT_CACert_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "CACert")' unchecked >
  784. <label for=MQTT_CACert_enabled><class id="MQTT_CACert_text" style="color:black;">Root CA Certificate file</class></label>
  785. </td>
  786. <td>
  787. <input type="text" id="MQTT_CACert_value1">
  788. </td>
  789. <td>$TOOLTIP_MQTT_CACert</td>
  790. </tr>
  791. <tr class="MQTTItem expert" unused_id="exMqtt">
  792. <td class="indent1">
  793. <input type="checkbox" id="MQTT_ClientCert_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientCert")' unchecked >
  794. <label for=MQTT_ClientCert_enabled><class id="MQTT_ClientCert_text" style="color:black;">Client Certificate file</class></label>
  795. </td>
  796. <td>
  797. <input type="text" id="MQTT_ClientCert_value1">
  798. </td>
  799. <td>$TOOLTIP_MQTT_ClientCert</td>
  800. </tr>
  801. <tr class="MQTTItem expert" unused_id="exMqtt">
  802. <td class="indent1">
  803. <input type="checkbox" id="MQTT_ClientKey_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientKey")' unchecked >
  804. <label for=MQTT_ClientKey_enabled><class id="MQTT_ClientKey_text" style="color:black;">Client Key file</class></label>
  805. </td>
  806. <td>
  807. <input type="text" id="MQTT_ClientKey_value1">
  808. </td>
  809. <td>$TOOLTIP_MQTT_ClientKey</td>
  810. </tr>
  811. <tr class="MQTTItem">
  812. <td class="indent1">
  813. <label><class id="MQTT_RetainMessages_text" style="color:black;">Retain Messages</class></label>
  814. </td>
  815. <td>
  816. <select id="MQTT_RetainMessages_value1">
  817. <option value="true" selected>true</option>
  818. <option value="false" >false</option>
  819. </select>
  820. </td>
  821. <td>$TOOLTIP_MQTT_RetainMessages</td>
  822. </tr>
  823. <tr class="MQTTItem">
  824. <td class="indent1" style="padding-top:25px" colspan="2">
  825. <b>Homeassistant Discovery (using MQTT)</b><br>
  826. If activated, the discovery topics gets automatically scheduled to sent once after device startup during state "Publish to MQTT".
  827. To schedule a retransmission: Use "Manual Control > Resend HA Discovery" or call REST API:
  828. <a href=mqtt_publish_discovery target="_blank">http://&lt;IP&gt;/mqtt_publish_discovery</a>
  829. </td>
  830. </tr>
  831. <tr class="MQTTItem">
  832. <td class="indent2">
  833. <label><class id="MQTT_HomeassistantDiscovery_text" style="color:black;">Homeassistant Discovery</class></label>
  834. </td>
  835. <td>
  836. <select id="MQTT_HomeassistantDiscovery_value1">
  837. <option value="true" selected>true</option>
  838. <option value="false" >false</option>
  839. </select>
  840. </td>
  841. <td>$TOOLTIP_MQTT_HomeassistantDiscovery</td>
  842. </tr>
  843. <tr class="MQTTItem">
  844. <td class="indent2">
  845. <input type="checkbox" id="MQTT_MeterType_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MeterType")' unchecked >
  846. <label for=MQTT_MeterType_enabled><class id="MQTT_MeterType_text" style="color:black;">Meter Type</class></label>
  847. </td>
  848. <td>
  849. <select class="select_large" id="MQTT_MeterType_value1"> <!-- See https://developers.home-assistant.io/docs/core/entity/sensor/#available-device-classes -->
  850. <option value="other" selected>Other (no Units)</option>
  851. <option value="water_m3">Watermeter (Value: m³, Rate: m³/h)</option>
  852. <option value="water_l">Watermeter (Value: l, Rate: l/h)</option>
  853. <option value="water_gal">Watermeter (Value: gal, Rate: gal/h)</option>
  854. <option value="water_ft3">Watermeter (Value: ft³, Rate: ft³/m)</option>
  855. <option value="gas_m3">Gasmeter (Value: m³, Rate: m³/h)</option>
  856. <option value="gas_ft3">Gasmeter (Value: ft³, Rate: ft³/m)</option>
  857. <option value="energy_wh">Energymeter (Value: Wh, Rate: W)</option>
  858. <option value="energy_kwh">Energymeter (Value: kWh, Rate: kW)</option>
  859. <option value="energy_mwh">Energymeter (Value: MWh, Rate: MW)</option>
  860. <option value="energy_gj">Energymeter (Value: GJ, Rate: GJ/h)</option>
  861. </select>
  862. </td>
  863. <td>$TOOLTIP_MQTT_MeterType</td>
  864. </tr>
  865. <!------------- INFLUXDB v1 ------------------>
  866. <tr style="border-bottom: 2px solid lightgray;">
  867. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  868. <h4>
  869. <input type="checkbox" id="Category_InfluxDB_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  870. <label for=Category_InfluxDB_enabled>InfluxDB v1.x</label></h4>
  871. </td>
  872. </tr>
  873. <tr class="InfluxDBv1Item">
  874. <td class="indent1">
  875. <input type="checkbox" id="InfluxDB_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Uri")' unchecked >
  876. <label for=InfluxDB_Uri_enabled><class id="InfluxDB_Uri_text" style="color:black;">URI</class></label>
  877. </td>
  878. <td>
  879. <input required type="text" id="InfluxDB_Uri_value1">
  880. </td>
  881. <td>$TOOLTIP_InfluxDB_Uri</td>
  882. </tr>
  883. <tr class="InfluxDBv1Item">
  884. <td class="indent1">
  885. <input type="checkbox" id="InfluxDB_Database_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Database")' unchecked >
  886. <label for=InfluxDB_Database_enabled><class id="InfluxDB_Database_text" style="color:black;">Database</class></label>
  887. </td>
  888. <td>
  889. <input required type="text" id="InfluxDB_Database_value1">
  890. </td>
  891. <td>$TOOLTIP_InfluxDB_Database</td>
  892. </tr>
  893. <tr class="InfluxDBv1Item">
  894. <td class="indent1">
  895. <input type="checkbox" id="InfluxDB_user_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "user")' unchecked >
  896. <label for=InfluxDB_user_enabled><class id="InfluxDB_user_text" style="color:black;">Username</class></label>
  897. </td>
  898. <td>
  899. <input type="text" id="InfluxDB_user_value1">
  900. </td>
  901. <td>$TOOLTIP_InfluxDB_user</td>
  902. </tr>
  903. <tr class="InfluxDBv1Item">
  904. <td class="indent1">
  905. <input type="checkbox" id="InfluxDB_password_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "password")' unchecked >
  906. <label for=InfluxDB_password_enabled><class id="InfluxDB_password_text" style="color:black;">Password</class></label>
  907. </td>
  908. <td>
  909. <input type="text" id="InfluxDB_password_value1">
  910. </td>
  911. <td>$TOOLTIP_InfluxDB_password</td>
  912. </tr>
  913. <tr class="InfluxDBv1Item" style="margin-top:12px">
  914. <td class="indent1" style="padding-top:25px" colspan="3">
  915. <b>Parameter per number sequence:</b>
  916. <select
  917. style="font-weight: bold; margin-left:17px" id="NumbersInfluxDB_value1" onchange="numberInfluxDBChanged()">
  918. </select>
  919. </td>
  920. </tr>
  921. <tr class="InfluxDBv1Item">
  922. <td class="indent2">
  923. <input type="checkbox" id="InfluxDB_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Measurement")' unchecked >
  924. <label for=InfluxDB_Measurement_enabled><class id="InfluxDB_Measurement_text" style="color:black;">Measurement</class></label>
  925. </td>
  926. <td>
  927. <input required type="text" id="InfluxDB_Measurement_value1">
  928. </td>
  929. <td>$TOOLTIP_InfluxDB_NUMBER.Measurement</td>
  930. </tr>
  931. <tr class="InfluxDBv1Item">
  932. <td class="indent2">
  933. <input type="checkbox" id="InfluxDB_Field_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Field")' unchecked >
  934. <label for=InfluxDB_Field_enabled><class id="InfluxDB_Field_text" style="color:black;">Field</class></label>
  935. </td>
  936. <td>
  937. <input required type="text" id="InfluxDB_Field_value1">
  938. </td>
  939. <td>$TOOLTIP_InfluxDB_NUMBER.Field</td>
  940. </tr>
  941. <!------------- INFLUXDB v2 ------------------>
  942. <tr style="border-bottom: 2px solid lightgray;">
  943. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  944. <h4>
  945. <input type="checkbox" id="Category_InfluxDBv2_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  946. <label for=Category_InfluxDBv2_enabled>InfluxDB v2.x</label></h4>
  947. </td>
  948. </tr>
  949. <tr class="InfluxDBv2Item">
  950. <td class="indent1">
  951. <input type="checkbox" id="InfluxDBv2_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Uri")' unchecked >
  952. <label for=InfluxDBv2_Uri_enabled><class id="InfluxDBv2_Uri_text" style="color:black;">URI</class></label>
  953. </td>
  954. <td>
  955. <input required type="text" id="InfluxDBv2_Uri_value1">
  956. </td>
  957. <td>$TOOLTIP_InfluxDBv2_Uri</td>
  958. </tr>
  959. <tr class="InfluxDBv2Item">
  960. <td class="indent1">
  961. <input type="checkbox" id="InfluxDBv2_Bucket_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Bucket")' unchecked >
  962. <label for=InfluxDBv2_Bucket_enabled><class id="InfluxDBv2_Bucket_text" style="color:black;">Bucket</class></label>
  963. </td>
  964. <td>
  965. <input required type="text" id="InfluxDBv2_Bucket_value1">
  966. </td>
  967. <td>$TOOLTIP_InfluxDBv2_Bucket</td>
  968. </tr>
  969. <tr class="InfluxDBv2Item">
  970. <td class="indent1">
  971. <input type="checkbox" id="InfluxDBv2_Org_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Org")' unchecked >
  972. <label for=InfluxDBv2_Org_enabled><class id="InfluxDBv2_Org_text" style="color:black;">Organization (Org)</class></label>
  973. </td>
  974. <td>
  975. <input type="text" id="InfluxDBv2_Org_value1">
  976. </td>
  977. <td>$TOOLTIP_InfluxDBv2_Org</td>
  978. </tr>
  979. <tr class="InfluxDBv2Item">
  980. <td class="indent1">
  981. <input type="checkbox" id="InfluxDBv2_Token_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Token")' unchecked >
  982. <label for=InfluxDBv2_Token_enabled><class id="InfluxDBv2_Token_text" style="color:black;">Token</class></label>
  983. </td>
  984. <td>
  985. <input type="text" id="InfluxDBv2_Token_value1">
  986. </td>
  987. <td>$TOOLTIP_InfluxDBv2_Token</td>
  988. </tr>
  989. <tr class="InfluxDBv2Item" style="margin-top:12px">
  990. <td class="indent1" style="padding-top:25px" colspan="3">
  991. <b>Parameter per number sequence:</b>
  992. <select
  993. style="font-weight: bold; margin-left:17px" id="NumbersInfluxDBv2_value1" onchange="numberInfluxDBv2Changed()">
  994. </select>
  995. </td>
  996. </tr>
  997. <tr class="InfluxDBv2Item">
  998. <td class="indent2">
  999. <input type="checkbox" id="InfluxDBv2_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Measurement")' unchecked >
  1000. <label for=InfluxDBv2_Measurement_enabled><class id="InfluxDBv2_Measurement_text" style="color:black;">Measurement</class></label>
  1001. </td>
  1002. <td>
  1003. <input required type="text" id="InfluxDBv2_Measurement_value1">
  1004. </td>
  1005. <td>$TOOLTIP_InfluxDBv2_NUMBER.Measurement</td>
  1006. </tr>
  1007. <tr class="InfluxDBv2Item">
  1008. <td class="indent2">
  1009. <input type="checkbox" id="InfluxDBv2_Field_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Field")' unchecked >
  1010. <label for=InfluxDBv2_Field_enabled><class id="InfluxDBv2_Field_text" style="color:black;">Field</class></label>
  1011. </td>
  1012. <td>
  1013. <input required type="text" id="InfluxDBv2_Field_value1">
  1014. </td>
  1015. <td>$TOOLTIP_InfluxDBv2_NUMBER.Field</td>
  1016. </tr>
  1017. <!------------- GPIO ------------------>
  1018. <tr style="border-bottom: 2px solid lightgray;">
  1019. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  1020. <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='UpdateAfterCategoryCheck()' unchecked >
  1021. <label for=Category_GPIO_enabled>GPIO (General Purpose Input / Output)</label></h4>
  1022. </td>
  1023. </tr>
  1024. <!------------- GPIO0 begin ------------------>
  1025. <tr class="GPIO_IO0 GPIO_item expert">
  1026. <td class="indent1">
  1027. <input type="checkbox" id="GPIO_IO0_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO0")' unchecked>
  1028. <label for=GPIO_IO0_enabled><span id="GPIO_IO0_text">GPIO0 Configuration</span></label>
  1029. </td>
  1030. <td>
  1031. <select id="GPIO_IO0_value1">
  1032. <option value="input">input</option>
  1033. <option value="input-pullup">input pullup</option>
  1034. <option value="input-pulldown">input pulldown</option>
  1035. <option value="output">output</option>
  1036. </select>
  1037. </td>
  1038. <td>$TOOLTIP_GPIO_IO0</td>
  1039. </tr>
  1040. <tr class="GPIO_IO0 GPIO_item expert">
  1041. <td class="indent2">
  1042. <span id="GPIO_IO0_text" class="GPIO_IO0 GPIO_item">GPIO0 Use Interrupt</span>
  1043. </td>
  1044. <td>
  1045. <select id="GPIO_IO0_value2">
  1046. <option value="disabled">disabled</option>
  1047. <option value="rising-edge">rising edge</option>
  1048. <option value="falling-edge">falling edge</option>
  1049. <option value="rising-and-falling">rising and falling</option>
  1050. <option value="low-level-trigger">low level trigger</option>
  1051. <option value="high-level-trigger">high level trigger</option>
  1052. </select>
  1053. </td>
  1054. <td></td>
  1055. </tr>
  1056. <tr class="GPIO_IO0 GPIO_item expert">
  1057. <td class="indent2">
  1058. <span class="GPIO_IO0 GPIO_item">GPIO0 PWM Duty Cycle Resolution</span>
  1059. </td>
  1060. <td>
  1061. <input required type="number" id="GPIO_IO0_value3" min="1" max="20"
  1062. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1063. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO0 GPIO_item">Bits</span>
  1064. </td>
  1065. <td></td>
  1066. </tr>
  1067. <tr class="GPIO_IO0 GPIO_item expert">
  1068. <td class="indent2">
  1069. <span class="GPIO_IO0 GPIO_item">GPIO0 Enable MQTT</span>
  1070. </td>
  1071. <td><input type="checkbox" id="GPIO_IO0_value4"></td>
  1072. <td></td>
  1073. </tr>
  1074. <tr class="GPIO_IO0 GPIO_item expert">
  1075. <td class="indent2">
  1076. <span class="GPIO_IO0 GPIO_item">GPIO0 Enable REST API</span>
  1077. </td>
  1078. <td><input type="checkbox" id="GPIO_IO0_value5"></td>
  1079. <td></td>
  1080. </tr>
  1081. <tr class="GPIO_IO0 GPIO_item expert">
  1082. <td class="indent2">
  1083. <span class="GPIO_IO0 GPIO_item">GPIO0 Name</span>
  1084. </td>
  1085. <td><input type="text" id="GPIO_IO0_value6"></td>
  1086. <td></td>
  1087. </tr>
  1088. <!------------- GPIO0 end ------------------>
  1089. <!------------- GPIO1 begin ------------------>
  1090. <tr class="GPIO_IO1 GPIO_item expert">
  1091. <td class="indent1">
  1092. <input type="checkbox" id="GPIO_IO1_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO1")' unchecked>
  1093. <label for=GPIO_IO1_enabled><span id="GPIO_IO1_text">GPIO1 Configuration</span></label>
  1094. </td>
  1095. <td>
  1096. <select id="GPIO_IO1_value1">
  1097. <option value="input">input</option>
  1098. <option value="input-pullup">input pullup</option>
  1099. <option value="input-pulldown">input pulldown</option>
  1100. <option value="output">output</option>
  1101. </select>
  1102. </td>
  1103. <td>$TOOLTIP_GPIO_IO1</td>
  1104. </tr>
  1105. <tr class="GPIO_IO1 GPIO_item expert">
  1106. <td class="indent2">
  1107. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO1 Use Interrupt</span>
  1108. </td>
  1109. <td>
  1110. <select id="GPIO_IO1_value2">
  1111. <option value="disabled">disabled</option>
  1112. <option value="rising-edge" disabled>rising edge</option>
  1113. <option value="falling-edge" disabled>falling edge</option>
  1114. <option value="rising-and-falling">rising and falling</option>
  1115. <option value="low-level-trigger">low level trigger</option>
  1116. <option value="high-level-trigger">high level trigger</option>
  1117. </select>
  1118. </td>
  1119. <td></td>
  1120. </tr>
  1121. <tr class="GPIO_IO1 GPIO_item expert">
  1122. <td class="indent2">
  1123. <span class="GPIO_IO1 GPIO_item">GPIO1 PWM Duty Cycle Resolution</span>
  1124. </td>
  1125. <td><input required type="number" id="GPIO_IO1_value3" min="1" max="20"
  1126. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1127. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO1 GPIO_item">Bits</span>
  1128. </td>
  1129. <td></td>
  1130. </tr>
  1131. <tr class="GPIO_IO1 GPIO_item expert">
  1132. <td class="indent2">
  1133. <span class="GPIO_IO1 GPIO_item">GPIO1 Enable MQTT</span>
  1134. </td>
  1135. <td><input type="checkbox" id="GPIO_IO1_value4"></td>
  1136. <td></td>
  1137. </tr>
  1138. <tr class="GPIO_IO1 GPIO_item expert">
  1139. <td class="indent2">
  1140. <span class="GPIO_IO1 GPIO_item">GPIO1 Enable REST API</span>
  1141. </td>
  1142. <td><input type="checkbox" id="GPIO_IO1_value5"></td>
  1143. <td></td>
  1144. </tr>
  1145. <tr class="GPIO_IO1 GPIO_item expert">
  1146. <td class="indent2">
  1147. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO1 Name</span>
  1148. </td>
  1149. <td><input type="text" id="GPIO_IO1_value6"></td>
  1150. <td></td>
  1151. </tr>
  1152. <!------------- GPIO1 end ------------------>
  1153. <!------------- GPIO3 begin ------------------>
  1154. <tr class="GPIO_IO3 GPIO_item expert">
  1155. <td class="indent1">
  1156. <input type="checkbox" id="GPIO_IO3_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO3")' unchecked>
  1157. <label for=GPIO_IO3_enabled><span id="GPIO_IO3_text">GPIO3 Configuration</span></label>
  1158. </td>
  1159. <td>
  1160. <select id="GPIO_IO3_value1">
  1161. <option value="input">input</option>
  1162. <option value="input-pullup">input pullup</option>
  1163. <option value="input-pulldown">input pulldown</option>
  1164. <option value="output">output</option>
  1165. </select>
  1166. </td>
  1167. <td>$TOOLTIP_GPIO_IO3</td>
  1168. </tr>
  1169. <tr class="GPIO_IO3 GPIO_item expert">
  1170. <td class="indent2">
  1171. <span class="GPIO_IO3 GPIO_item">GPIO3 Use Interrupt</span>
  1172. </td>
  1173. <td>
  1174. <select id="GPIO_IO3_value2">
  1175. <option value="disabled">disabled</option>
  1176. <option value="rising-edge" disabled>rising edge</option>
  1177. <option value="falling-edge" disabled>falling edge</option>
  1178. <option value="rising-and-falling">rising and falling</option>
  1179. <option value="low-level-trigger">low level trigger</option>
  1180. <option value="high-level-trigger">high level trigger</option>
  1181. </select>
  1182. </td>
  1183. <td></td>
  1184. </tr>
  1185. <tr class="GPIO_IO3 GPIO_item expert">
  1186. <td class="indent2">
  1187. <span class="GPIO_IO3 GPIO_item">GPIO3 PWM Duty Cycle Resolution</span>
  1188. </td>
  1189. <td><input required type="number" id="GPIO_IO3_value3" min="1" max="20"
  1190. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1191. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO3 GPIO_item">Bits</span>
  1192. </td>
  1193. <td></td>
  1194. </tr>
  1195. <tr class="GPIO_IO3 GPIO_item expert">
  1196. <td class="indent2">
  1197. <span class="GPIO_IO3 GPIO_item">GPIO3 Enable MQTT</span>
  1198. </td>
  1199. <td><input type="checkbox" id="GPIO_IO3_value4"></td>
  1200. <td></td>
  1201. </tr>
  1202. <tr class="GPIO_IO3 GPIO_item expert">
  1203. <td class="indent2">
  1204. <span class="GPIO_IO3 GPIO_item">GPIO3 Enable REST API</span>
  1205. </td>
  1206. <td><input type="checkbox" id="GPIO_IO3_value5"></td>
  1207. <td></td>
  1208. </tr>
  1209. <tr class="GPIO_IO3 GPIO_item expert">
  1210. <td class="indent2">
  1211. <span class="GPIO_IO3 GPIO_item">GPIO3 Name</span>
  1212. </td>
  1213. <td><input type="text" id="GPIO_IO3_value6"></td>
  1214. <td></td>
  1215. </tr>
  1216. <!------------- GPIO3 end ------------------>
  1217. <!------------- GPIO4 begin ------------------>
  1218. <tr class="GPIO_item" style="border-bottom: 0px;">
  1219. <td class="indent1">
  1220. <input type="checkbox" id="GPIO_IO4_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO4")' checked>
  1221. <label for=GPIO_IO4_enabled><span id="GPIO_IO4_text">GPIO4 Configuration</span></label>
  1222. </td>
  1223. <td>
  1224. <select id="GPIO_IO4_value1">
  1225. <option value="input">input</option>
  1226. <option value="input-pullup">input pullup</option>
  1227. <option value="input-pulldown">input pulldown</option>
  1228. <option value="output">output</option>
  1229. <option value="built-in-led" select>built-in led flash light</option>
  1230. </select>
  1231. </td>
  1232. <td>$TOOLTIP_GPIO_IO4</td>
  1233. </tr>
  1234. <tr class="GPIO_item" style="border-top: 0px;">
  1235. <td colspan="2" style="padding-left:28px">
  1236. <b>IMPORTANT NOTE:</b><br>
  1237. If you'd like to use the built-in flash LED in parallel with other GPIO functionality,
  1238. you have to explicitely activate the "built-in LED flash light" option on GPIO4. The light
  1239. intensity control (PWM) of the LED flash light is not functional anymore (only 100%).
  1240. </td>
  1241. </tr>
  1242. <tr class="GPIO_IO4 GPIO_item expert">
  1243. <td class="indent2">
  1244. <span class="GPIO_IO4 GPIO_item">GPIO4 Use Interrupt</span>
  1245. </td>
  1246. <td>
  1247. <select id="GPIO_IO4_value2">
  1248. <option value="disabled">disabled</option>
  1249. <option value="rising-edge">rising edge</option>
  1250. <option value="falling-edge">falling edge</option>
  1251. <option value="rising-and-falling">rising and falling</option>
  1252. <option value="low-level-trigger">low level trigger</option>
  1253. <option value="high-level-trigger">high level trigger</option>
  1254. </select>
  1255. </td>
  1256. <td></td>
  1257. </tr>
  1258. <tr class="GPIO_IO4 GPIO_item expert">
  1259. <td class="indent2">
  1260. <span class="GPIO_IO4 GPIO_item">GPIO4 PWM Duty Cycle Resolution</span>
  1261. </td>
  1262. <td><input required type="number" id="GPIO_IO4_value3" min="1" max="20"
  1263. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1264. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO4 GPIO_item">Bits</span>
  1265. </td>
  1266. <td></td>
  1267. </tr>
  1268. <tr class="GPIO_IO4 GPIO_item expert">
  1269. <td class="indent2">
  1270. <span class="GPIO_IO4 GPIO_item">GPIO4 Enable MQTT</span>
  1271. </td>
  1272. <td><input type="checkbox" id="GPIO_IO4_value4"></td>
  1273. <td></td>
  1274. </tr>
  1275. <tr class="GPIO_IO4 GPIO_item expert">
  1276. <td class="indent2">
  1277. <span class="GPIO_IO4 GPIO_item">GPIO4 Enable REST API</span>
  1278. </td>
  1279. <td><input type="checkbox" id="GPIO_IO4_value5"></td>
  1280. <td></td>
  1281. </tr>
  1282. <tr class="GPIO_IO4 GPIO_item expert">
  1283. <td class="indent2">
  1284. <span class="GPIO_IO4 GPIO_item">GPIO4 Name</span>
  1285. </td>
  1286. <td><input type="text" id="GPIO_IO4_value6"></td>
  1287. <td></td>
  1288. </tr>
  1289. <!------------- GPIO4 end ------------------>
  1290. <!------------- GPIO12 begin ------------------>
  1291. <tr class="GPIO_item">
  1292. <td class="indent1">
  1293. <input type="checkbox" id="GPIO_IO12_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO12")' unchecked>
  1294. <label for=GPIO_IO12_enabled><span id="GPIO_IO12_text">GPIO12 Configuration</span></label>
  1295. </td>
  1296. <td>
  1297. <select id="GPIO_IO12_value1">
  1298. <option value="input">input</option>
  1299. <option value="input-pullup">input pullup</option>
  1300. <option value="input-pulldown">input pulldown</option>
  1301. <option value="output">output</option>
  1302. <option value="external-flash-ws281x">external flash light ws281x controlled</option>
  1303. </select>
  1304. </td>
  1305. <td>$TOOLTIP_GPIO_IO12</td>
  1306. </tr>
  1307. <tr class="GPIO_IO12 GPIO_item expert">
  1308. <td class="indent2">
  1309. <span class="GPIO_IO12 GPIO_item">GPIO12 Use Interrupt</span>
  1310. </td>
  1311. <td>
  1312. <select class="GPIO_IO12 GPIO_item" id="GPIO_IO12_value2">
  1313. <option value="disabled">disabled</option>
  1314. <option value="rising-edge">rising edge</option>
  1315. <option value="falling-edge">falling edge</option>
  1316. <option value="rising-and-falling">rising and falling</option>
  1317. <option value="low-level-trigger">low level trigger</option>
  1318. <option value="high-level-trigger">high level trigger</option>
  1319. </select>
  1320. </td>
  1321. <td></td>
  1322. </tr>
  1323. <tr class="GPIO_IO12 GPIO_item expert">
  1324. <td class="indent2">
  1325. <span class="GPIO_IO12 GPIO_item">GPIO12 PWM Duty Cycle Resolution</span>
  1326. </td>
  1327. <td><input required type="number" id="GPIO_IO12_value3" min="1" max="20"
  1328. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1329. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO12 GPIO_item">Bits</span>
  1330. </td>
  1331. <td></td>
  1332. </tr>
  1333. <tr class="GPIO_IO12 GPIO_item expert">
  1334. <td class="indent2">
  1335. <span class="GPIO_IO12 GPIO_item">GPIO12 Enable MQTT</span>
  1336. </td>
  1337. <td><input type="checkbox" id="GPIO_IO12_value4"></td>
  1338. <td></td>
  1339. </tr>
  1340. <tr class="GPIO_IO12 GPIO_item expert">
  1341. <td class="indent2">
  1342. <span class="GPIO_IO12 GPIO_item">GPIO12 Enable REST API</span>
  1343. </td>
  1344. <td><input type="checkbox" id="GPIO_IO12_value5"></td>
  1345. <td></td>
  1346. </tr>
  1347. <tr class="GPIO_IO12 GPIO_item expert">
  1348. <td class="indent2">
  1349. <span class="GPIO_IO12 GPIO_item">GPIO12 Name</span>
  1350. </td>
  1351. <td><input type="text" id="GPIO_IO12_value6"></td>
  1352. <td></td>
  1353. </tr>
  1354. <tr class="GPIO_item" unused_id="wstypeex3">
  1355. <td class="indent1">
  1356. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDType_text">LED Type (NeoPixel)</span>
  1357. </td>
  1358. <td class="GPIO_item">
  1359. <select class="GPIO_item" id="GPIO_LEDType_value1">
  1360. <option value="WS2812" selected>WS2812</option>
  1361. <option value="WS2812B">WS2812B</option>
  1362. <option value="SK6812">SK6812</option>
  1363. <option value="WS2813">WS2813 (not tested)</option>
  1364. </select>
  1365. </td>
  1366. <td>$TOOLTIP_GPIO_LEDType</td>
  1367. </tr>
  1368. <tr class="GPIO_item" unused_id="LEDANZex8" >
  1369. <td class="indent1">
  1370. <span class="GPIO_item" id="GPIO_LEDNumbers_text">Numbers of LEDs</span>
  1371. </td>
  1372. <td>
  1373. <input required type="number" name="name" id="GPIO_LEDNumbers_value1" size="13" min="1"
  1374. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  1375. </td>
  1376. <td>$TOOLTIP_GPIO_LEDNumbers</td>
  1377. </tr>
  1378. <tr class="GPIO_item" unused_id="LEDRGBex9">
  1379. <td class="indent1">
  1380. <span class="GPIO_item" id="GPIO_LEDColor_text">LED Color</span>
  1381. </td>
  1382. <td class="GPIO_item">
  1383. R <input required style="min-width:35px;width:35px;" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value1"
  1384. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1385. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1386. G <input required style="min-width:35px;width:35px" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value2"
  1387. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1388. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1389. B <input required style="min-width:35px;width:35px" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value3"
  1390. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1391. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1392. </td>
  1393. <td>$TOOLTIP_GPIO_LEDColor</td>
  1394. </tr>
  1395. <!------------- GPIO12 end ------------------>
  1396. <!------------- GPIO13 begin ------------------>
  1397. <tr class="GPIO_IO13 GPIO_item expert">
  1398. <td class="indent1">
  1399. <input type="checkbox" id="GPIO_IO13_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO13")' unchecked>
  1400. <label for=GPIO_IO13_enabled><span id="GPIO_IO13_text">GPIO13 Configuration</span></label>
  1401. </td>
  1402. <td>
  1403. <select id="GPIO_IO13_value1">
  1404. <option value="input">input</option>
  1405. <option value="input-pullup">input pullup</option>
  1406. <option value="input-pulldown">input pulldown</option>
  1407. <option value="output">output</option>
  1408. </select>
  1409. </td>
  1410. <td>$TOOLTIP_GPIO_IO13</td>
  1411. </tr>
  1412. <tr class="GPIO_IO13 GPIO_item expert">
  1413. <td class="indent2">
  1414. <span class="GPIO_IO13 GPIO_item">GPIO13 Use Interrupt</span>
  1415. </td>
  1416. <td>
  1417. <select id="GPIO_IO13_value2">
  1418. <option value="disabled">disabled</option>
  1419. <option value="rising-edge" disabled>rising edge</option>
  1420. <option value="falling-edge" disabled>falling edge</option>
  1421. <option value="rising-and-falling">rising and falling</option>
  1422. <option value="low-level-trigger">low level trigger</option>
  1423. <option value="high-level-trigger">high level trigger</option>
  1424. </select>
  1425. </td>
  1426. <td></td>
  1427. </tr>
  1428. <tr class="GPIO_IO13 GPIO_item expert">
  1429. <td class="indent2">
  1430. <span class="GPIO_IO13 GPIO_item">GPIO13 PWM Duty Cycle Resolution</span>
  1431. </td>
  1432. <td><input required type="number" id="GPIO_IO13_value3" min="1" max="20"
  1433. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1434. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO13 GPIO_item">Bits</span></td>
  1435. <td></td>
  1436. </tr>
  1437. <tr class="GPIO_IO13 GPIO_item expert">
  1438. <td class="indent2">
  1439. <span class="GPIO_IO13 GPIO_item">GPIO13 Enable MQTT</span>
  1440. </td>
  1441. <td><input type="checkbox" id="GPIO_IO13_value4"></td>
  1442. <td></td>
  1443. </tr>
  1444. <tr class="GPIO_IO13 GPIO_item expert">
  1445. <td class="indent2">
  1446. <span class="GPIO_IO13 GPIO_item">GPIO13 Enable REST API</span>
  1447. </td>
  1448. <td><input type="checkbox" id="GPIO_IO13_value5"></td>
  1449. <td></td>
  1450. </tr>
  1451. <tr class="GPIO_IO13 GPIO_item expert">
  1452. <td class="indent2">
  1453. <span class="GPIO_IO13 GPIO_item">GPIO13 Name</span>
  1454. </td>
  1455. <td><input type="text" id="GPIO_IO13_value6"></td>
  1456. <td></td>
  1457. </tr>
  1458. <!------------- GPIO13 end ------------------>
  1459. <!------------- Autotimer ------------------>
  1460. <tr style="border-bottom: 2px solid lightgray;">
  1461. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Auto Timer</h4></td>
  1462. </tr>
  1463. <tr class="expert" unused_id="ex13">
  1464. <td class="indent1">
  1465. <class id="AutoTimer_AutoStart_text" style="color:black;">Automatic Round Start</class>
  1466. </td>
  1467. <td>
  1468. <select id="AutoTimer_AutoStart_value1">
  1469. <option value="true" selected>true</option>
  1470. <option value="false" >false</option>
  1471. </select>
  1472. </td>
  1473. <td>$TOOLTIP_AutoTimer_AutoStart</td>
  1474. </tr>
  1475. <tr>
  1476. <td class="indent1">
  1477. <class id="AutoTimer_Interval_text" style="color:black;">Round Interval</class>
  1478. </td>
  1479. <td>
  1480. <input required type="number" id="AutoTimer_Interval_value1" size="13" min="1" step="any"
  1481. oninput="(!validity.rangeUnderflow||(value=1));">Minutes
  1482. </td>
  1483. <td>$TOOLTIP_AutoTimer_Interval</td>
  1484. </tr>
  1485. <!------------- Data Logging ------------------>
  1486. <tr style="border-bottom: 2px solid lightgray;">
  1487. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Data Logging</h4></td>
  1488. </tr>
  1489. <tr>
  1490. <td class="indent1">
  1491. <class id="DataLogging_DataLogActive_text" style="color:black;">Data Logging</class>
  1492. </td>
  1493. <td>
  1494. <select id="DataLogging_DataLogActive_value1">
  1495. <option value="true" selected>true</option>
  1496. <option value="false" >false</option>
  1497. </select>
  1498. </td>
  1499. <td>$TOOLTIP_DataLogging_DataLogActive</td>
  1500. </tr>
  1501. <tr>
  1502. <td class="indent1">
  1503. <class id="DataLogging_DataFilesRetention_text" style="color:black;">Data Files Retention</class>
  1504. </td>
  1505. <td>
  1506. <input required type="number" id="DataLogging_DataFilesRetention_value1" size="13" min="0" step="1"
  1507. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  1508. </td>
  1509. <td>$TOOLTIP_DataLogging_DataFilesRetention</td>
  1510. </tr>
  1511. <!------------- Debug Logging ------------------>
  1512. <tr style="border-bottom: 2px solid lightgray;">
  1513. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Debug</h4></td>
  1514. </tr>
  1515. <tr>
  1516. <td class="indent1">
  1517. <class id="Debug_LogLevel_text" style="color:black;">Logfile Log Level</class>
  1518. </td>
  1519. <td>
  1520. <select id="Debug_LogLevel_value1">
  1521. <option value="1" selected>ERROR</option> <!-- matches esp_log_level_t -->
  1522. <option value="2">WARNING</option>
  1523. <option value="3">INFO</option>
  1524. <option value="4">DEBUG</option>
  1525. </select>
  1526. </td>
  1527. <td>$TOOLTIP_Debug_LogLevel</td>
  1528. </tr>
  1529. <tr>
  1530. <td class="indent1">
  1531. <class id="Debug_LogfilesRetention_text" style="color:black;">Logfiles Retention</class>
  1532. </td>
  1533. <td>
  1534. <input required type="number" id="Debug_LogfilesRetention_value1" size="13" min="0" step="1"
  1535. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  1536. </td>
  1537. <td>$TOOLTIP_Debug_LogfilesRetention</td>
  1538. </tr>
  1539. <!------------- System ------------------>
  1540. <tr style="border-bottom: 2px solid lightgray;">
  1541. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>System</h4></td>
  1542. </tr>
  1543. <tr>
  1544. <td class="indent1">
  1545. <input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeZone")' unchecked >
  1546. <label for=System_TimeZone_enabled><class id="System_TimeZone_text" style="color:black;">Time Zone</class></label>
  1547. <p></p><p></p>
  1548. </td>
  1549. <td>
  1550. <input type="text" id="System_TimeZone_value1">
  1551. <p>Use <a href="timezones.html" target="_blank">timezones</a> to find your settings</p>
  1552. </td>
  1553. <td>$TOOLTIP_System_TimeZone</td>
  1554. </tr>
  1555. <tr class="expert" unused_id="ex16">
  1556. <td class="indent1">
  1557. <input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeServer")' unchecked >
  1558. <label for=System_TimeServer_enabled><class id="System_TimeServer_text" style="color:black;">Time Server (NTP)</class></label>
  1559. </td>
  1560. <td>
  1561. <input type="text" id="System_TimeServer_value1">
  1562. </td>
  1563. <td>$TOOLTIP_System_TimeServer</td>
  1564. </tr>
  1565. <tr class="expert" unused_id="System_Hostname">
  1566. <td class="indent1">
  1567. <input type="checkbox" id="System_Hostname_enabled" value="1" onclick = 'InvertEnableItem("System", "Hostname")' unchecked >
  1568. <label for=System_Hostname_enabled><class id="System_Hostname_text" style="color:black;">Hostname</class></label>
  1569. </td>
  1570. <td>
  1571. <input type="text" id="System_Hostname_value1">
  1572. </td>
  1573. <td>$TOOLTIP_System_Hostname</td>
  1574. </tr>
  1575. <tr class="expert" unused_id="System_RSSIThreshold">
  1576. <td class="indent1">
  1577. <input type="checkbox" id="System_RSSIThreshold_enabled" value="1" onclick = 'InvertEnableItem("System", "RSSIThreshold")' unchecked >
  1578. <label for=System_RSSIThreshold_enabled><class id="System_RSSIThreshold_text" style="color:black;">RSSI Threshold</class></label>
  1579. </td>
  1580. <td>
  1581. <input required type="number" name="name" id="System_RSSIThreshold_value1" min="-100" max="0" step="1"
  1582. oninput="(!validity.rangeUnderflow||(value=-100)) && (!validity.rangeOverflow||(value=0)) &&
  1583. (!validity.stepMismatch||(value=parseInt(this.value)));">dBm
  1584. </td>
  1585. <td>$TOOLTIP_System_RSSIThreshold</td>
  1586. </tr>
  1587. <tr class="expert" unused_id="System_CPUFrequency">
  1588. <td class="indent1">
  1589. <input type="checkbox" id="System_CPUFrequency_enabled" value="1" onclick = 'InvertEnableItem("System", "CPUFrequency")' unchecked >
  1590. <label for=System_CPUFrequency_enabled><class id="System_CPUFrequency_text" style="color:black;">CPU Frequency</class></label>
  1591. </td>
  1592. <td>
  1593. <select id="System_CPUFrequency_value1">
  1594. <option value="160" selected>160 MHz</option>
  1595. <option value="240">240 MHz</option>
  1596. </select>
  1597. </td>
  1598. <td>$TOOLTIP_System_CPUFrequency</td>
  1599. </tr>
  1600. </table>
  1601. <table style="padding-top:10px">
  1602. <td>
  1603. <button class="button" onclick="saveTextAsFile()">Save Config</button>
  1604. </td>
  1605. <td>
  1606. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate changes</button>
  1607. </td>
  1608. </table>
  1609. </div>
  1610. <script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
  1611. <script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
  1612. <script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
  1613. <script type="text/javascript">
  1614. var canvas = document.getElementById('canvas'),
  1615. domainname = getDomainname(),
  1616. changeCamValue = 0,
  1617. param,
  1618. category,
  1619. NUNBERSAkt = -1,
  1620. NUMBERS;
  1621. function cameraParameterChanged() {
  1622. changeCamValue = 1;
  1623. if (document.getElementById("TakeImage_Zoom_value1").value == "false") {
  1624. document.getElementById("TakeImage_ZoomMode_value1").disabled = true;
  1625. document.getElementById("TakeImage_ZoomOffsetX_value1").disabled = true;
  1626. document.getElementById("TakeImage_ZoomOffsetY_value1").disabled = true;
  1627. }
  1628. else {
  1629. document.getElementById("TakeImage_ZoomMode_value1").disabled = false;
  1630. document.getElementById("TakeImage_ZoomOffsetX_value1").disabled = false;
  1631. document.getElementById("TakeImage_ZoomOffsetY_value1").disabled = false;
  1632. }
  1633. }
  1634. function LoadConfigNeu() {
  1635. domainname = getDomainname();
  1636. if (!loadConfig(domainname)) {
  1637. firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
  1638. return;
  1639. }
  1640. ParseConfig();
  1641. param = getConfigParameters();
  1642. category = getConfigCategory();
  1643. InitIndivParameter();
  1644. UpdateInput();
  1645. var sel = document.getElementById("Numbers_value1");
  1646. UpdateInputIndividual(sel);
  1647. UpdateExpertModus();
  1648. document.getElementById("divall").style.display = '';
  1649. if (document.getElementById("TakeImage_Zoom_value1").value == "false") {
  1650. document.getElementById("TakeImage_ZoomMode_value1").disabled = true;
  1651. document.getElementById("TakeImage_ZoomOffsetX_value1").disabled = true;
  1652. document.getElementById("TakeImage_ZoomOffsetY_value1").disabled = true;
  1653. }
  1654. else {
  1655. document.getElementById("TakeImage_ZoomMode_value1").disabled = false;
  1656. document.getElementById("TakeImage_ZoomOffsetX_value1").disabled = false;
  1657. document.getElementById("TakeImage_ZoomOffsetY_value1").disabled = false;
  1658. }
  1659. }
  1660. function InitIndivParameter() {
  1661. NUMBERS = getNUMBERInfo();
  1662. var _index = document.getElementById("Numbers_value1");
  1663. while (_index.length) {
  1664. _index.remove(0);
  1665. }
  1666. var _indexInflux = document.getElementById("NumbersInfluxDBv2_value1");
  1667. while (_indexInflux.length) {
  1668. _indexInflux.remove(0);
  1669. }
  1670. var _indexInfluxv1 = document.getElementById("NumbersInfluxDB_value1");
  1671. while (_indexInfluxv1.length) {
  1672. _indexInfluxv1.remove(0);
  1673. }
  1674. for (var i = 0; i < NUMBERS.length; ++i) {
  1675. var option = document.createElement("option");
  1676. option.text = NUMBERS[i]["name"];
  1677. option.value = i;
  1678. _index.add(option);
  1679. var optionInflux = document.createElement("option");
  1680. optionInflux.text = NUMBERS[i]["name"];
  1681. optionInflux.value = i;
  1682. _indexInflux.add(optionInflux);
  1683. var optionInfluxv1 = document.createElement("option");
  1684. optionInfluxv1.text = NUMBERS[i]["name"];
  1685. optionInfluxv1.value = i;
  1686. _indexInfluxv1.add(optionInfluxv1);
  1687. }
  1688. _index.selectedIndex = 0;
  1689. _indexInflux.selectedIndex = 0;
  1690. _indexInfluxv1.selectedIndex = 0;
  1691. }
  1692. function getParameterByName(name, url = window.location.href) {
  1693. name = name.replace(/[\[\]]/g, '\\$&');
  1694. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  1695. results = regex.exec(url);
  1696. if (!results) {return null;}
  1697. if (!results[2]) {return '';}
  1698. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  1699. }
  1700. function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1) {
  1701. let anzpara;
  1702. try {
  1703. anzpara = _param[_cat][_name].anzParam;
  1704. }
  1705. catch (error) {
  1706. firework.launch("Parameter '" + _name + "' in category '" + _cat + "' is unknown!", 'danger', 30000);
  1707. return;
  1708. }
  1709. if (_number > -1) {
  1710. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined)) {
  1711. return;
  1712. }
  1713. if (_optional) {
  1714. document.getElementById(_cat+"_"+_name+"_enabled").checked = NUMBERS[_number][_cat][_name]["enabled"];
  1715. for (var j = 1; j <= anzpara; ++j) {
  1716. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !NUMBERS[_number][_cat][_name]["enabled"];
  1717. }
  1718. }
  1719. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  1720. setEnabled(_cat+"_"+_name, true);
  1721. for (var j = 1; j <= anzpara; ++j) {
  1722. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1723. if (element.tagName.toLowerCase() == "select") {
  1724. var textToFind = NUMBERS[_number][_cat][_name]["value"+j];
  1725. if (textToFind == undefined) {
  1726. continue;
  1727. }
  1728. _isFound = false;
  1729. element.selectedIndex = -1;
  1730. for (var i = 0; i < element.options.length; i++) {
  1731. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1732. element.selectedIndex = i;
  1733. _isFound = true;
  1734. break;
  1735. }
  1736. }
  1737. if (!_isFound) {
  1738. _zw_txt = "In the selected field the value '" + textToFind + "' in the parameter '";
  1739. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  1740. firework.launch(_zw_txt, 'warning', 10000);
  1741. }
  1742. }
  1743. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1744. element.checked = NUMBERS[_number][_cat][_name]["value"+j] == "true";
  1745. }
  1746. else {
  1747. element.value = NUMBERS[_number][_cat][_name]["value"+j];
  1748. }
  1749. }
  1750. }
  1751. else {
  1752. if (_optional) {
  1753. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  1754. for (var j = 1; j <= anzpara; ++j) {
  1755. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  1756. }
  1757. }
  1758. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  1759. setEnabled(_cat+"_"+_name, true);
  1760. for (var j = 1; j <= anzpara; ++j) {
  1761. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1762. if (element.tagName.toLowerCase() == "select") {
  1763. var textToFind = _param[_cat][_name]["value"+j];
  1764. if (textToFind == undefined) {
  1765. continue;
  1766. }
  1767. _isFound = false;
  1768. element.selectedIndex = -1;
  1769. for (var i = 0; i < element.options.length; i++) {
  1770. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1771. element.selectedIndex = i;
  1772. _isFound = true;
  1773. break;
  1774. }
  1775. }
  1776. if (!_isFound) {
  1777. _zw_txt = "In the selected field the value '" + textToFind + "' in the section '";
  1778. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  1779. firework.launch(_zw_txt, 'warning', 10000);
  1780. }
  1781. }
  1782. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1783. element.checked = _param[_cat][_name]["value"+j] == "true";
  1784. }
  1785. else {
  1786. element.value = _param[_cat][_name]["value"+j];
  1787. }
  1788. }
  1789. }
  1790. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  1791. if (_category[_cat]["enabled"] == false) {
  1792. if (_optional) {
  1793. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  1794. for (var j = 1; j <= anzpara; ++j) {
  1795. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  1796. }
  1797. }
  1798. document.getElementById(_cat+"_"+_name+"_text").style="color: gray;"
  1799. setEnabled(_cat+"_"+_name, false);
  1800. }
  1801. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional, _number);
  1802. }
  1803. function InvertEnableItem(_cat, _param) {
  1804. _zw = _cat + "_" + _param + "_enabled";
  1805. _isOn = document.getElementById(_zw).checked;
  1806. _color = "rgb(122, 122, 122)";
  1807. if (_isOn) {
  1808. _color = "black";
  1809. }
  1810. _zw = _cat + "_" + _param + "_text";
  1811. document.getElementById(_zw).disabled = !_isOn;
  1812. document.getElementById(_zw).style.color = _color;
  1813. setEnabled(_cat + "_" + _param, _isOn);
  1814. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  1815. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  1816. document.getElementById(_cat+"_"+_param+"_value"+j).style.color = _color;
  1817. }
  1818. }
  1819. function setEnabled(className, enabled) {
  1820. _color = "rgb(122, 122, 122)";
  1821. if (enabled) {
  1822. _color = "black";
  1823. }
  1824. let elements = document.getElementsByClassName(className);
  1825. for (i = 0; i < elements.length; i++) {
  1826. if (enabled) {
  1827. elements[i].classList.remove("disabled");
  1828. }
  1829. else {
  1830. elements[i].classList.add("disabled");
  1831. }
  1832. let inputs = elements[i].getElementsByTagName("input");
  1833. for (j = 0; j < inputs.length; j++) {
  1834. if (inputs[j].id.endsWith("_enabled")) {
  1835. continue;
  1836. }
  1837. inputs[j].style.color = _color;
  1838. if (enabled) {
  1839. inputs[j].removeAttribute("disabled");
  1840. }
  1841. else {
  1842. inputs[j].setAttribute("disabled", "disabled");
  1843. }
  1844. }
  1845. }
  1846. }
  1847. function setVisible(className, visible) {
  1848. let elements = document.getElementsByClassName(className);
  1849. for (i = 0; i < elements.length; i++) {
  1850. if (visible) {
  1851. elements[i].classList.remove("hidden");
  1852. }
  1853. else {
  1854. elements[i].classList.add("hidden");
  1855. }
  1856. }
  1857. }
  1858. function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1) {
  1859. _status = _category[_cat]["enabled"];
  1860. _color = "rgb(122, 122, 122)";
  1861. if (_status) {
  1862. _color = "black";
  1863. }
  1864. if (_optional) {
  1865. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  1866. document.getElementById(_cat+"_"+_name+"_enabled").style.color = _color;
  1867. }
  1868. if (_number == -1) {
  1869. if (!_param[_cat][_name]["enabled"]) {
  1870. _status = false;
  1871. _color = "rgb(122, 122, 122)";
  1872. }
  1873. }
  1874. else {
  1875. if (!NUMBERS[_number][_cat][_name]["enabled"]) {
  1876. _status = false;
  1877. _color = "rgb(122, 122, 122)";
  1878. }
  1879. }
  1880. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  1881. document.getElementById(_cat+"_"+_name+"_text").style.color = _color;
  1882. setEnabled(_cat+"_"+_name, _status);
  1883. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1884. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  1885. document.getElementById(_cat+"_"+_name+"_value"+j).style.color = _color;
  1886. }
  1887. }
  1888. function ReadParameter(_param, _cat, _name, _optional, _number = -1) {
  1889. if (_number > -1) {
  1890. if (_cat == "Digits") {
  1891. _cat = "digit";
  1892. }
  1893. if (_cat == "Analog") {
  1894. _cat = "analog";
  1895. }
  1896. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined)) {
  1897. return;
  1898. }
  1899. if (_optional) {
  1900. NUMBERS[_number][_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1901. }
  1902. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1903. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1904. if (element.tagName.toLowerCase() == "select") {
  1905. NUMBERS[_number][_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1906. }
  1907. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1908. NUMBERS[_number][_cat][_name]["value"+j] = element.checked;
  1909. }
  1910. else {
  1911. if ((NUMBERS[_number][_cat][_name].checkRegExList != null) && (NUMBERS[_number][_cat][_name].checkRegExList[j-1] != null)) {
  1912. if (!element.value.match(NUMBERS[_cat][_name].checkRegExList[j-1])) {
  1913. element.classList.add("invalid-input");
  1914. }
  1915. else {
  1916. element.classList.remove("invalid-input");
  1917. }
  1918. }
  1919. NUMBERS[_number][_cat][_name]["value"+j] = element.value;
  1920. }
  1921. }
  1922. }
  1923. else
  1924. {
  1925. if (_optional) {
  1926. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1927. }
  1928. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1929. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1930. if (element.tagName.toLowerCase() == "select") {
  1931. _param[_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1932. }
  1933. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1934. _param[_cat][_name]["value"+j] = element.checked;
  1935. }
  1936. else {
  1937. if ((_param[_cat][_name].checkRegExList != null) && (_param[_cat][_name].checkRegExList[j-1] != null)) {
  1938. if (!element.value.match(_param[_cat][_name].checkRegExList[j-1])) {
  1939. element.classList.add("invalid-input");
  1940. }
  1941. else {
  1942. element.classList.remove("invalid-input");
  1943. }
  1944. }
  1945. _param[_cat][_name]["value"+j] = element.value;
  1946. }
  1947. }
  1948. }
  1949. }
  1950. function UpdateInputIndividual(sel) {
  1951. if (NUNBERSAkt != -1) {
  1952. ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1953. ReadParameter(param, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1954. ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1955. ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1956. ReadParameter(param, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1957. ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1958. ReadParameter(param, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1959. ReadParameter(param, "InfluxDB", "Field", true, NUNBERSAkt);
  1960. ReadParameter(param, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1961. ReadParameter(param, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1962. ReadParameter(param, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1963. }
  1964. // var sel = document.getElementById("Numbers_value1");
  1965. NUNBERSAkt = sel.selectedIndex;
  1966. WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1967. WriteParameter(param, category, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1968. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1969. WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1970. WriteParameter(param, category, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1971. WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1972. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1973. WriteParameter(param, category, "InfluxDB", "Field", true, NUNBERSAkt);
  1974. WriteParameter(param, category, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1975. WriteParameter(param, category, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1976. WriteParameter(param, category, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1977. }
  1978. function UpdateInput() {
  1979. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  1980. setVisible("DigitItem", category["Digits"]["enabled"]);
  1981. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  1982. setVisible("AnalogItem", category["Analog"]["enabled"]);
  1983. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  1984. setVisible("MQTTItem", category["MQTT"]["enabled"]);
  1985. document.getElementById("Category_GPIO_enabled").checked = category["GPIO"]["enabled"];
  1986. setVisible("GPIO_item", category["GPIO"]["enabled"]);
  1987. document.getElementById("Category_InfluxDB_enabled").checked = category["InfluxDB"]["enabled"];
  1988. setVisible("InfluxDBv1Item", category["InfluxDB"]["enabled"]);
  1989. document.getElementById("Category_InfluxDBv2_enabled").checked = category["InfluxDBv2"]["enabled"];
  1990. setVisible("InfluxDBv2Item", category["InfluxDBv2"]["enabled"]);
  1991. WriteParameter(param, category, "TakeImage", "RawImagesLocation", true);
  1992. WriteParameter(param, category, "TakeImage", "RawImagesRetention", true);
  1993. WriteParameter(param, category, "TakeImage", "Demo", false);
  1994. WriteParameter(param, category, "TakeImage", "WaitBeforeTakingPicture", false);
  1995. WriteParameter(param, category, "TakeImage", "ImageQuality", false);
  1996. WriteParameter(param, category, "TakeImage", "Brightness", false);
  1997. WriteParameter(param, category, "TakeImage", "Contrast", false);
  1998. WriteParameter(param, category, "TakeImage", "Saturation", false);
  1999. WriteParameter(param, category, "TakeImage", "Sharpness", false);
  2000. WriteParameter(param, category, "TakeImage", "LEDIntensity", false);
  2001. WriteParameter(param, category, "TakeImage", "ImageSize", false);
  2002. WriteParameter(param, category, "TakeImage", "Zoom", false);
  2003. WriteParameter(param, category, "TakeImage", "ZoomMode", false);
  2004. WriteParameter(param, category, "TakeImage", "ZoomOffsetX", false);
  2005. WriteParameter(param, category, "TakeImage", "ZoomOffsetY", false);
  2006. WriteParameter(param, category, "TakeImage", "Grayscale", false);
  2007. WriteParameter(param, category, "TakeImage", "Negative", false);
  2008. WriteParameter(param, category, "TakeImage", "Aec2", false);
  2009. WriteParameter(param, category, "TakeImage", "AutoExposureLevel", false);
  2010. WriteParameter(param, category, "TakeImage", "FixedExposure", false);
  2011. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  2012. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  2013. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true);
  2014. WriteParameter(param, category, "Alignment", "FlipImageSize", false);
  2015. WriteParameter(param, category, "Alignment", "InitialMirror", false);
  2016. WriteParameter(param, category, "Alignment", "InitialRotate", false);
  2017. WriteParameter(param, category, "Digits", "CNNGoodThreshold", true);
  2018. WriteParameter(param, category, "Digits", "ROIImagesLocation", true);
  2019. WriteParameter(param, category, "Digits", "ROIImagesRetention", true);
  2020. WriteParameter(param, category, "Analog", "ROIImagesLocation", true);
  2021. WriteParameter(param, category, "Analog", "ROIImagesRetention", true);
  2022. WriteParameter(param, category, "PostProcessing", "PreValueUse", false);
  2023. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  2024. // WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true);
  2025. WriteParameter(param, category, "PostProcessing", "ErrorMessage", false);
  2026. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  2027. WriteParameter(param, category, "MQTT", "Uri", true);
  2028. WriteParameter(param, category, "MQTT", "MainTopic", true);
  2029. WriteParameter(param, category, "MQTT", "ClientID", true);
  2030. WriteParameter(param, category, "MQTT", "user", true);
  2031. WriteParameter(param, category, "MQTT", "password", true);
  2032. WriteParameter(param, category, "MQTT", "RetainMessages", false);
  2033. WriteParameter(param, category, "MQTT", "HomeassistantDiscovery", false);
  2034. WriteParameter(param, category, "MQTT", "MeterType", true);
  2035. WriteParameter(param, category, "MQTT", "CACert", true);
  2036. WriteParameter(param, category, "MQTT", "ClientCert", true);
  2037. WriteParameter(param, category, "MQTT", "ClientKey", true);
  2038. WriteParameter(param, category, "InfluxDB", "Uri", true);
  2039. WriteParameter(param, category, "InfluxDB", "Database", true);
  2040. // WriteParameter(param, category, "InfluxDB", "Measurement", true);
  2041. WriteParameter(param, category, "InfluxDB", "user", true);
  2042. WriteParameter(param, category, "InfluxDB", "password", true);
  2043. // WriteParameter(param, category, "InfluxDB", "Field", true);
  2044. WriteParameter(param, category, "InfluxDBv2", "Uri", true);
  2045. WriteParameter(param, category, "InfluxDBv2", "Bucket", true);
  2046. // WriteParameter(param, category, "InfluxDBv2", "Measurement", true);
  2047. WriteParameter(param, category, "InfluxDBv2", "Org", true);
  2048. WriteParameter(param, category, "InfluxDBv2", "Token", true);
  2049. // WriteParameter(param, category, "InfluxDBv2", "Field", true);
  2050. WriteParameter(param, category, "GPIO", "IO0", true);
  2051. WriteParameter(param, category, "GPIO", "IO1", true);
  2052. WriteParameter(param, category, "GPIO", "IO3", true);
  2053. WriteParameter(param, category, "GPIO", "IO4", true);
  2054. WriteParameter(param, category, "GPIO", "IO12", true);
  2055. WriteParameter(param, category, "GPIO", "IO13", true);
  2056. WriteParameter(param, category, "GPIO", "LEDType", false);
  2057. WriteParameter(param, category, "GPIO", "LEDNumbers", false);
  2058. WriteParameter(param, category, "GPIO", "LEDColor", false);
  2059. WriteParameter(param, category, "AutoTimer", "AutoStart", false);
  2060. WriteParameter(param, category, "AutoTimer", "Interval", false);
  2061. WriteParameter(param, category, "DataLogging", "DataLogActive", false);
  2062. WriteParameter(param, category, "DataLogging", "DataFilesRetention", false);
  2063. WriteParameter(param, category, "Debug", "LogLevel", false);
  2064. WriteParameter(param, category, "Debug", "LogfilesRetention", false);
  2065. WriteParameter(param, category, "System", "TimeZone", true);
  2066. WriteParameter(param, category, "System", "Hostname", true);
  2067. WriteParameter(param, category, "System", "TimeServer", true);
  2068. WriteParameter(param, category, "System", "RSSIThreshold", true);
  2069. WriteParameter(param, category, "System", "CPUFrequency", true);
  2070. WriteModelFiles();
  2071. }
  2072. function WriteModelFiles() {
  2073. list_tflite = getTFLITEList();
  2074. var _indexDig = document.getElementById("Digits_Model_value1");
  2075. var _indexAna = document.getElementById("Analog_Model_value1");
  2076. while (_indexDig.length) {
  2077. _indexDig.remove(0);
  2078. }
  2079. while (_indexAna.length) {
  2080. _indexAna.remove(0);
  2081. }
  2082. for (var i = 0; i < list_tflite.length; ++i) {
  2083. var optionDig = document.createElement("option");
  2084. var optionAna = document.createElement("option");
  2085. var text = list_tflite[i].replace("/config/", "");
  2086. if (list_tflite[i].includes("/dig")) { // Its a digital file, only show in the digital list box
  2087. optionDig.text = text;
  2088. optionDig.value = list_tflite[i];
  2089. _indexDig.add(optionDig);
  2090. }
  2091. else if (list_tflite[i].includes("/ana")) { // Its a digital file, only show in the analog list box
  2092. optionAna.text = text;
  2093. optionAna.value = list_tflite[i];
  2094. _indexAna.add(optionAna);
  2095. }
  2096. else { // all other files, show in both list boxes
  2097. optionDig.text = text;
  2098. optionDig.value = list_tflite[i];
  2099. _indexDig.add(optionDig);
  2100. optionAna.text = text;
  2101. optionAna.value = list_tflite[i];
  2102. _indexAna.add(optionAna);
  2103. }
  2104. }
  2105. WriteParameter(param, category, "Analog", "Model", false);
  2106. WriteParameter(param, category, "Digits", "Model", false);
  2107. }
  2108. function ReadParameterAll() {
  2109. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  2110. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  2111. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  2112. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  2113. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  2114. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  2115. ReadParameter(param, "TakeImage", "RawImagesLocation", true);
  2116. ReadParameter(param, "TakeImage", "RawImagesRetention", true);
  2117. ReadParameter(param, "TakeImage", "Demo", false);
  2118. ReadParameter(param, "TakeImage", "WaitBeforeTakingPicture", false);
  2119. ReadParameter(param, "TakeImage", "ImageQuality", false);
  2120. ReadParameter(param, "TakeImage", "Brightness", false);
  2121. ReadParameter(param, "TakeImage", "Contrast", false);
  2122. ReadParameter(param, "TakeImage", "Saturation", false);
  2123. ReadParameter(param, "TakeImage", "Sharpness", false);
  2124. ReadParameter(param, "TakeImage", "LEDIntensity", false);
  2125. ReadParameter(param, "TakeImage", "ImageSize", false);
  2126. ReadParameter(param, "TakeImage", "Zoom", false);
  2127. ReadParameter(param, "TakeImage", "ZoomMode", false);
  2128. ReadParameter(param, "TakeImage", "ZoomOffsetX", false);
  2129. ReadParameter(param, "TakeImage", "ZoomOffsetY", false);
  2130. ReadParameter(param, "TakeImage", "Grayscale", false);
  2131. ReadParameter(param, "TakeImage", "Negative", false);
  2132. ReadParameter(param, "TakeImage", "Aec2", false);
  2133. ReadParameter(param, "TakeImage", "AutoExposureLevel", false);
  2134. ReadParameter(param, "TakeImage", "FixedExposure", false);
  2135. ReadParameter(param, "Alignment", "SearchFieldX", false);
  2136. ReadParameter(param, "Alignment", "SearchFieldY", false);
  2137. ReadParameter(param, "Alignment", "AlignmentAlgo", true);
  2138. ReadParameter(param, "Alignment", "FlipImageSize", false);
  2139. ReadParameter(param, "Alignment", "InitialMirror", false);
  2140. ReadParameter(param, "Alignment", "InitialRotate", false);
  2141. ReadParameter(param, "Digits", "Model", false);
  2142. ReadParameter(param, "Digits", "CNNGoodThreshold", true);
  2143. ReadParameter(param, "Digits", "ROIImagesLocation", true);
  2144. ReadParameter(param, "Digits", "ROIImagesRetention", true);
  2145. ReadParameter(param, "Analog", "Model", false);
  2146. ReadParameter(param, "Analog", "ROIImagesLocation", true);
  2147. ReadParameter(param, "Analog", "ROIImagesRetention", true);
  2148. ReadParameter(param, "PostProcessing", "PreValueUse", false);
  2149. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  2150. ReadParameter(param, "PostProcessing", "ErrorMessage", false);
  2151. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  2152. ReadParameter(param, "MQTT", "Uri", true);
  2153. ReadParameter(param, "MQTT", "MainTopic", true);
  2154. ReadParameter(param, "MQTT", "ClientID", true);
  2155. ReadParameter(param, "MQTT", "user", true);
  2156. ReadParameter(param, "MQTT", "password", true);
  2157. ReadParameter(param, "MQTT", "RetainMessages", false);
  2158. ReadParameter(param, "MQTT", "HomeassistantDiscovery", false);
  2159. ReadParameter(param, "MQTT", "MeterType", true);
  2160. ReadParameter(param, "MQTT", "CACert", true);
  2161. ReadParameter(param, "MQTT", "ClientCert", true);
  2162. ReadParameter(param, "MQTT", "ClientKey", true);
  2163. ReadParameter(param, "InfluxDB", "Uri", true);
  2164. ReadParameter(param, "InfluxDB", "Database", true);
  2165. ReadParameter(param, "InfluxDB", "Measurement", true);
  2166. ReadParameter(param, "InfluxDB", "user", true);
  2167. ReadParameter(param, "InfluxDB", "password", true);
  2168. ReadParameter(param, "InfluxDBv2", "Uri", true);
  2169. ReadParameter(param, "InfluxDBv2", "Bucket", true);
  2170. ReadParameter(param, "InfluxDBv2", "Measurement", true);
  2171. ReadParameter(param, "InfluxDBv2", "Org", true);
  2172. ReadParameter(param, "InfluxDBv2", "Token", true);
  2173. // ReadParameter(param, "InfluxDB", "Field", true);
  2174. ReadParameter(param, "GPIO", "IO0", true);
  2175. ReadParameter(param, "GPIO", "IO1", true);
  2176. ReadParameter(param, "GPIO", "IO3", true);
  2177. ReadParameter(param, "GPIO", "IO4", true);
  2178. ReadParameter(param, "GPIO", "IO12", true);
  2179. ReadParameter(param, "GPIO", "IO13", true);
  2180. ReadParameter(param, "GPIO", "LEDType", false);
  2181. ReadParameter(param, "GPIO", "LEDNumbers", false);
  2182. ReadParameter(param, "GPIO", "LEDColor", false);
  2183. // Folgende Zeilen sind für Abwärtskompatibität < v9.0.0 notwendig (manchmal parameter auskommentiert)
  2184. param["GPIO"]["LEDType"]["enabled"] = true;
  2185. param["GPIO"]["LEDNumbers"]["enabled"] = true;
  2186. param["GPIO"]["LEDColor"]["enabled"] = true;
  2187. param["GPIO"]["LEDType"]["found"] = true;
  2188. param["GPIO"]["LEDNumbers"]["found"] = true;
  2189. param["GPIO"]["LEDColor"]["found"] = true;
  2190. ReadParameter(param, "AutoTimer", "AutoStart", false);
  2191. ReadParameter(param, "AutoTimer", "Interval", false);
  2192. ReadParameter(param, "DataLogging", "DataLogActive", false);
  2193. ReadParameter(param, "DataLogging", "DataFilesRetention", false);
  2194. ReadParameter(param, "Debug", "LogLevel", false);
  2195. ReadParameter(param, "Debug", "LogfilesRetention", false);
  2196. ReadParameter(param, "System", "TimeZone", true);
  2197. ReadParameter(param, "System", "Hostname", true);
  2198. ReadParameter(param, "System", "TimeServer", true);
  2199. ReadParameter(param, "System", "RSSIThreshold", true);
  2200. ReadParameter(param, "System", "CPUFrequency", true);
  2201. var sel = document.getElementById("Numbers_value1");
  2202. UpdateInputIndividual(sel);
  2203. // FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  2204. }
  2205. function FormatDecimalValue(_param, _cat, _name) {
  2206. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  2207. var _val = _param[_cat][_name]["value"+j];
  2208. _val = _val.replace(",", ".");
  2209. _param[_cat][_name]["value"+j] = _val;
  2210. }
  2211. }
  2212. function UpdateAfterCategoryCheck() {
  2213. ReadParameterAll();
  2214. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  2215. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  2216. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  2217. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  2218. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  2219. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  2220. UpdateInput();
  2221. var sel = document.getElementById("Numbers_value1");
  2222. UpdateInputIndividual(sel);
  2223. }
  2224. function UpdateExpertModus() {
  2225. // var _style = 'display:none;';
  2226. var _style_pur = 'none';
  2227. var _hidden = true;
  2228. if (document.getElementById("ExpertModus_enabled").checked) {
  2229. // _style = '';
  2230. _style_pur = '';
  2231. _hidden = false;
  2232. document.getElementById("Button_Edit_Config_Raw").style.display = "";
  2233. firework.launch("Expert view activated. Please use carefully", 'warning', 5000);
  2234. }
  2235. else {
  2236. document.getElementById("Button_Edit_Config_Raw").style.display = "none";
  2237. }
  2238. const expert = document.querySelectorAll(".expert");
  2239. for (var i = 0; i < expert.length; i++) {
  2240. expert[i].style.display = _style_pur;
  2241. // document.getElementById(expert[i].id).style = _style;
  2242. }
  2243. // 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
  2244. Array.from(document.querySelector("#GPIO_IO4_value1").options).forEach(function(option_element) {
  2245. if (option_element.value != "built-in-led") {
  2246. option_element.hidden = _hidden;
  2247. }
  2248. });
  2249. Array.from(document.querySelector("#GPIO_IO12_value1").options).forEach(function(option_element) {
  2250. if (option_element.value != "external-flash-ws281x") {
  2251. option_element.hidden = _hidden;
  2252. }
  2253. });
  2254. }
  2255. function saveTextAsFile() {
  2256. ReadParameterAll();
  2257. if (document.getElementsByClassName("invalid-input").length > 0) {
  2258. firework.launch("Settings cannot be saved. Please check your entries!", 'danger', 30000);
  2259. return;
  2260. }
  2261. if (confirm("Are you sure you want to save the configuration?")) {
  2262. ReadParameterAll();
  2263. WriteConfigININew();
  2264. SaveConfigToServer(domainname);
  2265. firework.launch('Configuration saved. It will get applied after the next reboot!', 'success', 5000);
  2266. if (changeCamValue == 1) {
  2267. camSettingsSet(param);
  2268. firework.launch('You have changed the camera settings, so creating a new reference image and updating the alignment marks is mandatory!', 'success', 10000);
  2269. }
  2270. }
  2271. }
  2272. function camSettingsSet(_param) {
  2273. var domainname = getDomainname();
  2274. var xhttp = new XMLHttpRequest();
  2275. var _grayscale = _param["TakeImage"]["Grayscale"].value1;
  2276. var _negative = _param["TakeImage"]["Negative"].value1;
  2277. var _aec2 = _param["TakeImage"]["Aec2"].value1;
  2278. var _FixedExposure = _param["TakeImage"]["FixedExposure"].value1;
  2279. var _zoom = _param["TakeImage"]["Zoom"].value1;
  2280. var _zm = _param["TakeImage"]["ZoomMode"].value1;
  2281. var _x = _param["TakeImage"]["ZoomOffsetX"].value1;
  2282. var _y = _param["TakeImage"]["ZoomOffsetY"].value1;
  2283. var _intensity = _param["TakeImage"]["LEDIntensity"].value1;
  2284. var _brightness = _param["TakeImage"]["Brightness"].value1;
  2285. var _contrast = _param["TakeImage"]["Contrast"].value1;
  2286. var _saturation = _param["TakeImage"]["Saturation"].value1;
  2287. var _sharpness = _param["TakeImage"]["Sharpness"].value1;
  2288. var _ae = _param["TakeImage"]["AutoExposureLevel"].value1;
  2289. var url = domainname + "/editflow?task=cam_settings";
  2290. url = url + "&bri=" + _brightness + "&con=" + _contrast + "&sat=" + _saturation + "&sh=" + _sharpness;
  2291. url = url + "&int=" + _intensity + "&gs=" + _grayscale + "&ne=" + _negative + "&z=" + _zoom;
  2292. if (_zoom != '0') {
  2293. url = url + "&zm=" + _zm + "&x=" + _x + "&y=" + _y;
  2294. }
  2295. else {
  2296. url = url + "&zm=0" + "&x=0" + "&y=0";
  2297. }
  2298. url = url + "&ae=" + _ae + "&a2=" + _aec2;
  2299. if (domainname.length > 0){
  2300. url = url + "&host=" + domainname;
  2301. }
  2302. xhttp.open("GET", url, true);
  2303. xhttp.send();
  2304. }
  2305. function doReboot() {
  2306. if (confirm("Are you sure you want to reboot?")) {
  2307. var stringota = getDomainname() + "/reboot";
  2308. window.location = stringota;
  2309. window.location.href = stringota;
  2310. window.location.assign(stringota);
  2311. window.location.replace(stringota);
  2312. }
  2313. }
  2314. function editConfigRaw() {
  2315. if (confirm("Proceed to switch to raw edit mode? Unsaved changes will get lost")) {
  2316. var stringota = getDomainname() + "/edit_config_raw.html?v=$COMMIT_HASH";
  2317. window.location = stringota;
  2318. window.location.href = stringota;
  2319. window.location.assign(stringota);
  2320. window.location.replace(stringota);
  2321. }
  2322. }
  2323. function numberChanged() {
  2324. var sel = document.getElementById("Numbers_value1");
  2325. _neu = sel.selectedIndex;
  2326. UpdateInputIndividual(sel);
  2327. var _selInflux = document.getElementById("NumbersInfluxDBv2_value1");
  2328. if (_selInflux.selectedIndex != _neu) {
  2329. _selInflux.selectedIndex = _neu
  2330. }
  2331. }
  2332. function numberInfluxDBv2Changed() {
  2333. var sel = document.getElementById("NumbersInfluxDBv2_value1");
  2334. _neu = sel.selectedIndex;
  2335. UpdateInputIndividual(sel);
  2336. var _sel2 = document.getElementById("Numbers_value1");
  2337. if (_sel2.selectedIndex != _neu) {
  2338. _sel2.selectedIndex = _neu
  2339. }
  2340. var _sel3 = document.getElementById("NumbersInfluxDB_value1");
  2341. if (_sel3.selectedIndex != _neu) {
  2342. _sel3.selectedIndex = _neu
  2343. }
  2344. }
  2345. function numberInfluxDBChanged() {
  2346. var sel = document.getElementById("NumbersInfluxDB_value1");
  2347. _neu = sel.selectedIndex;
  2348. UpdateInputIndividual(sel);
  2349. var _sel2 = document.getElementById("Numbers_value1");
  2350. if (_sel2.selectedIndex != _neu) {
  2351. _sel2.selectedIndex = _neu
  2352. }
  2353. var _sel3 = document.getElementById("NumbersInfluxDBv2_value1");
  2354. if (_sel3.selectedIndex != _neu) {
  2355. _sel3.selectedIndex = _neu
  2356. }
  2357. }
  2358. /* hash #description open the details part of the page */
  2359. function openDescription() {
  2360. if(window.location.hash) {
  2361. var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
  2362. if(hash == 'description') {
  2363. document.getElementById("desc_details").open = true;
  2364. document.getElementById("reboot").style.display = "none";
  2365. document.getElementById("reboot_text").style.display = "none";
  2366. }
  2367. }
  2368. }
  2369. openDescription();
  2370. LoadConfigNeu();
  2371. </script>
  2372. </body>
  2373. </html>