edit_config_template.html 99 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646
  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. }
  1624. function LoadConfigNeu() {
  1625. domainname = getDomainname();
  1626. if (!loadConfig(domainname)) {
  1627. firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
  1628. return;
  1629. }
  1630. ParseConfig();
  1631. param = getConfigParameters();
  1632. category = getConfigCategory();
  1633. InitIndivParameter();
  1634. UpdateInput();
  1635. var sel = document.getElementById("Numbers_value1");
  1636. UpdateInputIndividual(sel);
  1637. UpdateExpertModus();
  1638. document.getElementById("divall").style.display = '';
  1639. }
  1640. function InitIndivParameter() {
  1641. NUMBERS = getNUMBERInfo();
  1642. var _index = document.getElementById("Numbers_value1");
  1643. while (_index.length) {
  1644. _index.remove(0);
  1645. }
  1646. var _indexInflux = document.getElementById("NumbersInfluxDBv2_value1");
  1647. while (_indexInflux.length) {
  1648. _indexInflux.remove(0);
  1649. }
  1650. var _indexInfluxv1 = document.getElementById("NumbersInfluxDB_value1");
  1651. while (_indexInfluxv1.length) {
  1652. _indexInfluxv1.remove(0);
  1653. }
  1654. for (var i = 0; i < NUMBERS.length; ++i) {
  1655. var option = document.createElement("option");
  1656. option.text = NUMBERS[i]["name"];
  1657. option.value = i;
  1658. _index.add(option);
  1659. var optionInflux = document.createElement("option");
  1660. optionInflux.text = NUMBERS[i]["name"];
  1661. optionInflux.value = i;
  1662. _indexInflux.add(optionInflux);
  1663. var optionInfluxv1 = document.createElement("option");
  1664. optionInfluxv1.text = NUMBERS[i]["name"];
  1665. optionInfluxv1.value = i;
  1666. _indexInfluxv1.add(optionInfluxv1);
  1667. }
  1668. _index.selectedIndex = 0;
  1669. _indexInflux.selectedIndex = 0;
  1670. _indexInfluxv1.selectedIndex = 0;
  1671. }
  1672. function getParameterByName(name, url = window.location.href) {
  1673. name = name.replace(/[\[\]]/g, '\\$&');
  1674. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  1675. results = regex.exec(url);
  1676. if (!results) {return null;}
  1677. if (!results[2]) {return '';}
  1678. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  1679. }
  1680. function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1) {
  1681. let anzpara;
  1682. try {
  1683. anzpara = _param[_cat][_name].anzParam;
  1684. }
  1685. catch (error) {
  1686. firework.launch("Parameter '" + _name + "' in category '" + _cat + "' is unknown!", 'danger', 30000);
  1687. return;
  1688. }
  1689. if (_number > -1) {
  1690. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined)) {
  1691. return;
  1692. }
  1693. if (_optional) {
  1694. document.getElementById(_cat+"_"+_name+"_enabled").checked = NUMBERS[_number][_cat][_name]["enabled"];
  1695. for (var j = 1; j <= anzpara; ++j) {
  1696. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !NUMBERS[_number][_cat][_name]["enabled"];
  1697. }
  1698. }
  1699. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  1700. setEnabled(_cat+"_"+_name, true);
  1701. for (var j = 1; j <= anzpara; ++j) {
  1702. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1703. if (element.tagName.toLowerCase() == "select") {
  1704. var textToFind = NUMBERS[_number][_cat][_name]["value"+j];
  1705. if (textToFind == undefined) {
  1706. continue;
  1707. }
  1708. _isFound = false;
  1709. element.selectedIndex = -1;
  1710. for (var i = 0; i < element.options.length; i++) {
  1711. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1712. element.selectedIndex = i;
  1713. _isFound = true;
  1714. break;
  1715. }
  1716. }
  1717. if (!_isFound) {
  1718. _zw_txt = "In the selected field the value '" + textToFind + "' in the parameter '";
  1719. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  1720. firework.launch(_zw_txt, 'warning', 10000);
  1721. }
  1722. }
  1723. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1724. element.checked = NUMBERS[_number][_cat][_name]["value"+j] == "true";
  1725. }
  1726. else {
  1727. element.value = NUMBERS[_number][_cat][_name]["value"+j];
  1728. }
  1729. }
  1730. }
  1731. else {
  1732. if (_optional) {
  1733. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  1734. for (var j = 1; j <= anzpara; ++j) {
  1735. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  1736. }
  1737. }
  1738. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  1739. setEnabled(_cat+"_"+_name, true);
  1740. for (var j = 1; j <= anzpara; ++j) {
  1741. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1742. if (element.tagName.toLowerCase() == "select") {
  1743. var textToFind = _param[_cat][_name]["value"+j];
  1744. if (textToFind == undefined) {
  1745. continue;
  1746. }
  1747. _isFound = false;
  1748. element.selectedIndex = -1;
  1749. for (var i = 0; i < element.options.length; i++) {
  1750. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1751. element.selectedIndex = i;
  1752. _isFound = true;
  1753. break;
  1754. }
  1755. }
  1756. if (!_isFound) {
  1757. _zw_txt = "In the selected field the value '" + textToFind + "' in the section '";
  1758. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  1759. firework.launch(_zw_txt, 'warning', 10000);
  1760. }
  1761. }
  1762. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1763. element.checked = _param[_cat][_name]["value"+j] == "true";
  1764. }
  1765. else {
  1766. element.value = _param[_cat][_name]["value"+j];
  1767. }
  1768. }
  1769. }
  1770. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  1771. if (_category[_cat]["enabled"] == false) {
  1772. if (_optional) {
  1773. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  1774. for (var j = 1; j <= anzpara; ++j) {
  1775. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  1776. }
  1777. }
  1778. document.getElementById(_cat+"_"+_name+"_text").style="color: gray;"
  1779. setEnabled(_cat+"_"+_name, false);
  1780. }
  1781. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional, _number);
  1782. }
  1783. function InvertEnableItem(_cat, _param) {
  1784. _zw = _cat + "_" + _param + "_enabled";
  1785. _isOn = document.getElementById(_zw).checked;
  1786. _color = "rgb(122, 122, 122)";
  1787. if (_isOn) {
  1788. _color = "black";
  1789. }
  1790. _zw = _cat + "_" + _param + "_text";
  1791. document.getElementById(_zw).disabled = !_isOn;
  1792. document.getElementById(_zw).style.color = _color;
  1793. setEnabled(_cat + "_" + _param, _isOn);
  1794. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  1795. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  1796. document.getElementById(_cat+"_"+_param+"_value"+j).style.color = _color;
  1797. }
  1798. }
  1799. function setEnabled(className, enabled) {
  1800. _color = "rgb(122, 122, 122)";
  1801. if (enabled) {
  1802. _color = "black";
  1803. }
  1804. let elements = document.getElementsByClassName(className);
  1805. for (i = 0; i < elements.length; i++) {
  1806. if (enabled) {
  1807. elements[i].classList.remove("disabled");
  1808. }
  1809. else {
  1810. elements[i].classList.add("disabled");
  1811. }
  1812. let inputs = elements[i].getElementsByTagName("input");
  1813. for (j = 0; j < inputs.length; j++) {
  1814. if (inputs[j].id.endsWith("_enabled")) {
  1815. continue;
  1816. }
  1817. inputs[j].style.color = _color;
  1818. if (enabled) {
  1819. inputs[j].removeAttribute("disabled");
  1820. }
  1821. else {
  1822. inputs[j].setAttribute("disabled", "disabled");
  1823. }
  1824. }
  1825. }
  1826. }
  1827. function setVisible(className, visible) {
  1828. let elements = document.getElementsByClassName(className);
  1829. for (i = 0; i < elements.length; i++) {
  1830. if (visible) {
  1831. elements[i].classList.remove("hidden");
  1832. }
  1833. else {
  1834. elements[i].classList.add("hidden");
  1835. }
  1836. }
  1837. }
  1838. function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1) {
  1839. _status = _category[_cat]["enabled"];
  1840. _color = "rgb(122, 122, 122)";
  1841. if (_status) {
  1842. _color = "black";
  1843. }
  1844. if (_optional) {
  1845. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  1846. document.getElementById(_cat+"_"+_name+"_enabled").style.color = _color;
  1847. }
  1848. if (_number == -1) {
  1849. if (!_param[_cat][_name]["enabled"]) {
  1850. _status = false;
  1851. _color = "rgb(122, 122, 122)";
  1852. }
  1853. }
  1854. else {
  1855. if (!NUMBERS[_number][_cat][_name]["enabled"]) {
  1856. _status = false;
  1857. _color = "rgb(122, 122, 122)";
  1858. }
  1859. }
  1860. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  1861. document.getElementById(_cat+"_"+_name+"_text").style.color = _color;
  1862. setEnabled(_cat+"_"+_name, _status);
  1863. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1864. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  1865. document.getElementById(_cat+"_"+_name+"_value"+j).style.color = _color;
  1866. }
  1867. }
  1868. function ReadParameter(_param, _cat, _name, _optional, _number = -1) {
  1869. if (_number > -1) {
  1870. if (_cat == "Digits") {
  1871. _cat = "digit";
  1872. }
  1873. if (_cat == "Analog") {
  1874. _cat = "analog";
  1875. }
  1876. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined)) {
  1877. return;
  1878. }
  1879. if (_optional) {
  1880. NUMBERS[_number][_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1881. }
  1882. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1883. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1884. if (element.tagName.toLowerCase() == "select") {
  1885. NUMBERS[_number][_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1886. }
  1887. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1888. NUMBERS[_number][_cat][_name]["value"+j] = element.checked;
  1889. }
  1890. else {
  1891. if ((NUMBERS[_number][_cat][_name].checkRegExList != null) && (NUMBERS[_number][_cat][_name].checkRegExList[j-1] != null)) {
  1892. if (!element.value.match(NUMBERS[_cat][_name].checkRegExList[j-1])) {
  1893. element.classList.add("invalid-input");
  1894. }
  1895. else {
  1896. element.classList.remove("invalid-input");
  1897. }
  1898. }
  1899. NUMBERS[_number][_cat][_name]["value"+j] = element.value;
  1900. }
  1901. }
  1902. }
  1903. else
  1904. {
  1905. if (_optional) {
  1906. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1907. }
  1908. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1909. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1910. if (element.tagName.toLowerCase() == "select") {
  1911. _param[_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1912. }
  1913. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1914. _param[_cat][_name]["value"+j] = element.checked;
  1915. }
  1916. else {
  1917. if ((_param[_cat][_name].checkRegExList != null) && (_param[_cat][_name].checkRegExList[j-1] != null)) {
  1918. if (!element.value.match(_param[_cat][_name].checkRegExList[j-1])) {
  1919. element.classList.add("invalid-input");
  1920. }
  1921. else {
  1922. element.classList.remove("invalid-input");
  1923. }
  1924. }
  1925. _param[_cat][_name]["value"+j] = element.value;
  1926. }
  1927. }
  1928. }
  1929. }
  1930. function UpdateInputIndividual(sel) {
  1931. if (NUNBERSAkt != -1) {
  1932. ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1933. ReadParameter(param, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1934. ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1935. ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1936. ReadParameter(param, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1937. ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1938. ReadParameter(param, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1939. ReadParameter(param, "InfluxDB", "Field", true, NUNBERSAkt);
  1940. ReadParameter(param, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1941. ReadParameter(param, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1942. ReadParameter(param, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1943. }
  1944. // var sel = document.getElementById("Numbers_value1");
  1945. NUNBERSAkt = sel.selectedIndex;
  1946. WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1947. WriteParameter(param, category, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1948. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1949. WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1950. WriteParameter(param, category, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1951. WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1952. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1953. WriteParameter(param, category, "InfluxDB", "Field", true, NUNBERSAkt);
  1954. WriteParameter(param, category, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1955. WriteParameter(param, category, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1956. WriteParameter(param, category, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1957. }
  1958. function UpdateInput() {
  1959. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  1960. setVisible("DigitItem", category["Digits"]["enabled"]);
  1961. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  1962. setVisible("AnalogItem", category["Analog"]["enabled"]);
  1963. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  1964. setVisible("MQTTItem", category["MQTT"]["enabled"]);
  1965. document.getElementById("Category_GPIO_enabled").checked = category["GPIO"]["enabled"];
  1966. setVisible("GPIO_item", category["GPIO"]["enabled"]);
  1967. document.getElementById("Category_InfluxDB_enabled").checked = category["InfluxDB"]["enabled"];
  1968. setVisible("InfluxDBv1Item", category["InfluxDB"]["enabled"]);
  1969. document.getElementById("Category_InfluxDBv2_enabled").checked = category["InfluxDBv2"]["enabled"];
  1970. setVisible("InfluxDBv2Item", category["InfluxDBv2"]["enabled"]);
  1971. WriteParameter(param, category, "TakeImage", "RawImagesLocation", true);
  1972. WriteParameter(param, category, "TakeImage", "RawImagesRetention", true);
  1973. WriteParameter(param, category, "TakeImage", "Demo", false);
  1974. WriteParameter(param, category, "TakeImage", "WaitBeforeTakingPicture", false);
  1975. WriteParameter(param, category, "TakeImage", "ImageQuality", false);
  1976. WriteParameter(param, category, "TakeImage", "Brightness", false);
  1977. WriteParameter(param, category, "TakeImage", "Contrast", false);
  1978. WriteParameter(param, category, "TakeImage", "Saturation", false);
  1979. WriteParameter(param, category, "TakeImage", "Sharpness", false);
  1980. WriteParameter(param, category, "TakeImage", "LEDIntensity", false);
  1981. WriteParameter(param, category, "TakeImage", "ImageSize", false);
  1982. WriteParameter(param, category, "TakeImage", "Zoom", false);
  1983. WriteParameter(param, category, "TakeImage", "ZoomMode", false);
  1984. WriteParameter(param, category, "TakeImage", "ZoomOffsetX", false);
  1985. WriteParameter(param, category, "TakeImage", "ZoomOffsetY", false);
  1986. WriteParameter(param, category, "TakeImage", "Grayscale", false);
  1987. WriteParameter(param, category, "TakeImage", "Negative", false);
  1988. WriteParameter(param, category, "TakeImage", "Aec2", false);
  1989. WriteParameter(param, category, "TakeImage", "AutoExposureLevel", false);
  1990. WriteParameter(param, category, "TakeImage", "FixedExposure", false);
  1991. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  1992. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  1993. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true);
  1994. WriteParameter(param, category, "Alignment", "FlipImageSize", false);
  1995. WriteParameter(param, category, "Alignment", "InitialMirror", false);
  1996. WriteParameter(param, category, "Alignment", "InitialRotate", false);
  1997. WriteParameter(param, category, "Digits", "CNNGoodThreshold", true);
  1998. WriteParameter(param, category, "Digits", "ROIImagesLocation", true);
  1999. WriteParameter(param, category, "Digits", "ROIImagesRetention", true);
  2000. WriteParameter(param, category, "Analog", "ROIImagesLocation", true);
  2001. WriteParameter(param, category, "Analog", "ROIImagesRetention", true);
  2002. WriteParameter(param, category, "PostProcessing", "PreValueUse", false);
  2003. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  2004. // WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true);
  2005. WriteParameter(param, category, "PostProcessing", "ErrorMessage", false);
  2006. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  2007. WriteParameter(param, category, "MQTT", "Uri", true);
  2008. WriteParameter(param, category, "MQTT", "MainTopic", true);
  2009. WriteParameter(param, category, "MQTT", "ClientID", true);
  2010. WriteParameter(param, category, "MQTT", "user", true);
  2011. WriteParameter(param, category, "MQTT", "password", true);
  2012. WriteParameter(param, category, "MQTT", "RetainMessages", false);
  2013. WriteParameter(param, category, "MQTT", "HomeassistantDiscovery", false);
  2014. WriteParameter(param, category, "MQTT", "MeterType", true);
  2015. WriteParameter(param, category, "MQTT", "CACert", true);
  2016. WriteParameter(param, category, "MQTT", "ClientCert", true);
  2017. WriteParameter(param, category, "MQTT", "ClientKey", true);
  2018. WriteParameter(param, category, "InfluxDB", "Uri", true);
  2019. WriteParameter(param, category, "InfluxDB", "Database", true);
  2020. // WriteParameter(param, category, "InfluxDB", "Measurement", true);
  2021. WriteParameter(param, category, "InfluxDB", "user", true);
  2022. WriteParameter(param, category, "InfluxDB", "password", true);
  2023. // WriteParameter(param, category, "InfluxDB", "Field", true);
  2024. WriteParameter(param, category, "InfluxDBv2", "Uri", true);
  2025. WriteParameter(param, category, "InfluxDBv2", "Bucket", true);
  2026. // WriteParameter(param, category, "InfluxDBv2", "Measurement", true);
  2027. WriteParameter(param, category, "InfluxDBv2", "Org", true);
  2028. WriteParameter(param, category, "InfluxDBv2", "Token", true);
  2029. // WriteParameter(param, category, "InfluxDBv2", "Field", true);
  2030. WriteParameter(param, category, "GPIO", "IO0", true);
  2031. WriteParameter(param, category, "GPIO", "IO1", true);
  2032. WriteParameter(param, category, "GPIO", "IO3", true);
  2033. WriteParameter(param, category, "GPIO", "IO4", true);
  2034. WriteParameter(param, category, "GPIO", "IO12", true);
  2035. WriteParameter(param, category, "GPIO", "IO13", true);
  2036. WriteParameter(param, category, "GPIO", "LEDType", false);
  2037. WriteParameter(param, category, "GPIO", "LEDNumbers", false);
  2038. WriteParameter(param, category, "GPIO", "LEDColor", false);
  2039. WriteParameter(param, category, "AutoTimer", "AutoStart", false);
  2040. WriteParameter(param, category, "AutoTimer", "Interval", false);
  2041. WriteParameter(param, category, "DataLogging", "DataLogActive", false);
  2042. WriteParameter(param, category, "DataLogging", "DataFilesRetention", false);
  2043. WriteParameter(param, category, "Debug", "LogLevel", false);
  2044. WriteParameter(param, category, "Debug", "LogfilesRetention", false);
  2045. WriteParameter(param, category, "System", "TimeZone", true);
  2046. WriteParameter(param, category, "System", "Hostname", true);
  2047. WriteParameter(param, category, "System", "TimeServer", true);
  2048. WriteParameter(param, category, "System", "RSSIThreshold", true);
  2049. WriteParameter(param, category, "System", "CPUFrequency", true);
  2050. WriteModelFiles();
  2051. }
  2052. function WriteModelFiles() {
  2053. list_tflite = getTFLITEList();
  2054. var _indexDig = document.getElementById("Digits_Model_value1");
  2055. var _indexAna = document.getElementById("Analog_Model_value1");
  2056. while (_indexDig.length) {
  2057. _indexDig.remove(0);
  2058. }
  2059. while (_indexAna.length) {
  2060. _indexAna.remove(0);
  2061. }
  2062. for (var i = 0; i < list_tflite.length; ++i) {
  2063. var optionDig = document.createElement("option");
  2064. var optionAna = document.createElement("option");
  2065. var text = list_tflite[i].replace("/config/", "");
  2066. if (list_tflite[i].includes("/dig")) { // Its a digital file, only show in the digital list box
  2067. optionDig.text = text;
  2068. optionDig.value = list_tflite[i];
  2069. _indexDig.add(optionDig);
  2070. }
  2071. else if (list_tflite[i].includes("/ana")) { // Its a digital file, only show in the analog list box
  2072. optionAna.text = text;
  2073. optionAna.value = list_tflite[i];
  2074. _indexAna.add(optionAna);
  2075. }
  2076. else { // all other files, show in both list boxes
  2077. optionDig.text = text;
  2078. optionDig.value = list_tflite[i];
  2079. _indexDig.add(optionDig);
  2080. optionAna.text = text;
  2081. optionAna.value = list_tflite[i];
  2082. _indexAna.add(optionAna);
  2083. }
  2084. }
  2085. WriteParameter(param, category, "Analog", "Model", false);
  2086. WriteParameter(param, category, "Digits", "Model", false);
  2087. }
  2088. function ReadParameterAll() {
  2089. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  2090. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  2091. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  2092. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  2093. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  2094. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  2095. ReadParameter(param, "TakeImage", "RawImagesLocation", true);
  2096. ReadParameter(param, "TakeImage", "RawImagesRetention", true);
  2097. ReadParameter(param, "TakeImage", "Demo", false);
  2098. ReadParameter(param, "TakeImage", "WaitBeforeTakingPicture", false);
  2099. ReadParameter(param, "TakeImage", "ImageQuality", false);
  2100. ReadParameter(param, "TakeImage", "Brightness", false);
  2101. ReadParameter(param, "TakeImage", "Contrast", false);
  2102. ReadParameter(param, "TakeImage", "Saturation", false);
  2103. ReadParameter(param, "TakeImage", "Sharpness", false);
  2104. ReadParameter(param, "TakeImage", "LEDIntensity", false);
  2105. ReadParameter(param, "TakeImage", "ImageSize", false);
  2106. ReadParameter(param, "TakeImage", "Zoom", false);
  2107. ReadParameter(param, "TakeImage", "ZoomMode", false);
  2108. ReadParameter(param, "TakeImage", "ZoomOffsetX", false);
  2109. ReadParameter(param, "TakeImage", "ZoomOffsetY", false);
  2110. ReadParameter(param, "TakeImage", "Grayscale", false);
  2111. ReadParameter(param, "TakeImage", "Negative", false);
  2112. ReadParameter(param, "TakeImage", "Aec2", false);
  2113. ReadParameter(param, "TakeImage", "AutoExposureLevel", false);
  2114. ReadParameter(param, "TakeImage", "FixedExposure", false);
  2115. ReadParameter(param, "Alignment", "SearchFieldX", false);
  2116. ReadParameter(param, "Alignment", "SearchFieldY", false);
  2117. ReadParameter(param, "Alignment", "AlignmentAlgo", true);
  2118. ReadParameter(param, "Alignment", "FlipImageSize", false);
  2119. ReadParameter(param, "Alignment", "InitialMirror", false);
  2120. ReadParameter(param, "Alignment", "InitialRotate", false);
  2121. ReadParameter(param, "Digits", "Model", false);
  2122. ReadParameter(param, "Digits", "CNNGoodThreshold", true);
  2123. ReadParameter(param, "Digits", "ROIImagesLocation", true);
  2124. ReadParameter(param, "Digits", "ROIImagesRetention", true);
  2125. ReadParameter(param, "Analog", "Model", false);
  2126. ReadParameter(param, "Analog", "ROIImagesLocation", true);
  2127. ReadParameter(param, "Analog", "ROIImagesRetention", true);
  2128. ReadParameter(param, "PostProcessing", "PreValueUse", false);
  2129. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  2130. ReadParameter(param, "PostProcessing", "ErrorMessage", false);
  2131. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  2132. ReadParameter(param, "MQTT", "Uri", true);
  2133. ReadParameter(param, "MQTT", "MainTopic", true);
  2134. ReadParameter(param, "MQTT", "ClientID", true);
  2135. ReadParameter(param, "MQTT", "user", true);
  2136. ReadParameter(param, "MQTT", "password", true);
  2137. ReadParameter(param, "MQTT", "RetainMessages", false);
  2138. ReadParameter(param, "MQTT", "HomeassistantDiscovery", false);
  2139. ReadParameter(param, "MQTT", "MeterType", true);
  2140. ReadParameter(param, "MQTT", "CACert", true);
  2141. ReadParameter(param, "MQTT", "ClientCert", true);
  2142. ReadParameter(param, "MQTT", "ClientKey", true);
  2143. ReadParameter(param, "InfluxDB", "Uri", true);
  2144. ReadParameter(param, "InfluxDB", "Database", true);
  2145. ReadParameter(param, "InfluxDB", "Measurement", true);
  2146. ReadParameter(param, "InfluxDB", "user", true);
  2147. ReadParameter(param, "InfluxDB", "password", true);
  2148. ReadParameter(param, "InfluxDBv2", "Uri", true);
  2149. ReadParameter(param, "InfluxDBv2", "Bucket", true);
  2150. ReadParameter(param, "InfluxDBv2", "Measurement", true);
  2151. ReadParameter(param, "InfluxDBv2", "Org", true);
  2152. ReadParameter(param, "InfluxDBv2", "Token", true);
  2153. // ReadParameter(param, "InfluxDB", "Field", true);
  2154. ReadParameter(param, "GPIO", "IO0", true);
  2155. ReadParameter(param, "GPIO", "IO1", true);
  2156. ReadParameter(param, "GPIO", "IO3", true);
  2157. ReadParameter(param, "GPIO", "IO4", true);
  2158. ReadParameter(param, "GPIO", "IO12", true);
  2159. ReadParameter(param, "GPIO", "IO13", true);
  2160. ReadParameter(param, "GPIO", "LEDType", false);
  2161. ReadParameter(param, "GPIO", "LEDNumbers", false);
  2162. ReadParameter(param, "GPIO", "LEDColor", false);
  2163. // Folgende Zeilen sind für Abwärtskompatibität < v9.0.0 notwendig (manchmal parameter auskommentiert)
  2164. param["GPIO"]["LEDType"]["enabled"] = true;
  2165. param["GPIO"]["LEDNumbers"]["enabled"] = true;
  2166. param["GPIO"]["LEDColor"]["enabled"] = true;
  2167. param["GPIO"]["LEDType"]["found"] = true;
  2168. param["GPIO"]["LEDNumbers"]["found"] = true;
  2169. param["GPIO"]["LEDColor"]["found"] = true;
  2170. ReadParameter(param, "AutoTimer", "AutoStart", false);
  2171. ReadParameter(param, "AutoTimer", "Interval", false);
  2172. ReadParameter(param, "DataLogging", "DataLogActive", false);
  2173. ReadParameter(param, "DataLogging", "DataFilesRetention", false);
  2174. ReadParameter(param, "Debug", "LogLevel", false);
  2175. ReadParameter(param, "Debug", "LogfilesRetention", false);
  2176. ReadParameter(param, "System", "TimeZone", true);
  2177. ReadParameter(param, "System", "Hostname", true);
  2178. ReadParameter(param, "System", "TimeServer", true);
  2179. ReadParameter(param, "System", "RSSIThreshold", true);
  2180. ReadParameter(param, "System", "CPUFrequency", true);
  2181. var sel = document.getElementById("Numbers_value1");
  2182. UpdateInputIndividual(sel);
  2183. // FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  2184. }
  2185. function FormatDecimalValue(_param, _cat, _name) {
  2186. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  2187. var _val = _param[_cat][_name]["value"+j];
  2188. _val = _val.replace(",", ".");
  2189. _param[_cat][_name]["value"+j] = _val;
  2190. }
  2191. }
  2192. function UpdateAfterCategoryCheck() {
  2193. ReadParameterAll();
  2194. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  2195. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  2196. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  2197. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  2198. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  2199. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  2200. UpdateInput();
  2201. var sel = document.getElementById("Numbers_value1");
  2202. UpdateInputIndividual(sel);
  2203. }
  2204. function UpdateExpertModus() {
  2205. // var _style = 'display:none;';
  2206. var _style_pur = 'none';
  2207. var _hidden = true;
  2208. if (document.getElementById("ExpertModus_enabled").checked) {
  2209. // _style = '';
  2210. _style_pur = '';
  2211. _hidden = false;
  2212. document.getElementById("Button_Edit_Config_Raw").style.display = "";
  2213. firework.launch("Expert view activated. Please use carefully", 'warning', 5000);
  2214. }
  2215. else {
  2216. document.getElementById("Button_Edit_Config_Raw").style.display = "none";
  2217. }
  2218. const expert = document.querySelectorAll(".expert");
  2219. for (var i = 0; i < expert.length; i++) {
  2220. expert[i].style.display = _style_pur;
  2221. // document.getElementById(expert[i].id).style = _style;
  2222. }
  2223. // 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
  2224. Array.from(document.querySelector("#GPIO_IO4_value1").options).forEach(function(option_element) {
  2225. if (option_element.value != "built-in-led") {
  2226. option_element.hidden = _hidden;
  2227. }
  2228. });
  2229. Array.from(document.querySelector("#GPIO_IO12_value1").options).forEach(function(option_element) {
  2230. if (option_element.value != "external-flash-ws281x") {
  2231. option_element.hidden = _hidden;
  2232. }
  2233. });
  2234. }
  2235. function saveTextAsFile() {
  2236. ReadParameterAll();
  2237. if (document.getElementsByClassName("invalid-input").length > 0) {
  2238. firework.launch("Settings cannot be saved. Please check your entries!", 'danger', 30000);
  2239. return;
  2240. }
  2241. if (confirm("Are you sure you want to save the configuration?")) {
  2242. ReadParameterAll();
  2243. WriteConfigININew();
  2244. SaveConfigToServer(domainname);
  2245. firework.launch('Configuration saved. It will get applied after the next reboot!', 'success', 5000);
  2246. if (changeCamValue == 1) {
  2247. firework.launch('You have changed the camera settings, so creating a new reference image and updating the alignment marks is mandatory!', 'success', 10000);
  2248. }
  2249. }
  2250. }
  2251. function doReboot() {
  2252. if (confirm("Are you sure you want to reboot?")) {
  2253. var stringota = getDomainname() + "/reboot";
  2254. window.location = stringota;
  2255. window.location.href = stringota;
  2256. window.location.assign(stringota);
  2257. window.location.replace(stringota);
  2258. }
  2259. }
  2260. function editConfigRaw() {
  2261. if (confirm("Proceed to switch to raw edit mode? Unsaved changes will get lost")) {
  2262. var stringota = getDomainname() + "/edit_config_raw.html?v=$COMMIT_HASH";
  2263. window.location = stringota;
  2264. window.location.href = stringota;
  2265. window.location.assign(stringota);
  2266. window.location.replace(stringota);
  2267. }
  2268. }
  2269. function numberChanged() {
  2270. var sel = document.getElementById("Numbers_value1");
  2271. _neu = sel.selectedIndex;
  2272. UpdateInputIndividual(sel);
  2273. var _selInflux = document.getElementById("NumbersInfluxDBv2_value1");
  2274. if (_selInflux.selectedIndex != _neu) {
  2275. _selInflux.selectedIndex = _neu
  2276. }
  2277. }
  2278. function numberInfluxDBv2Changed() {
  2279. var sel = document.getElementById("NumbersInfluxDBv2_value1");
  2280. _neu = sel.selectedIndex;
  2281. UpdateInputIndividual(sel);
  2282. var _sel2 = document.getElementById("Numbers_value1");
  2283. if (_sel2.selectedIndex != _neu) {
  2284. _sel2.selectedIndex = _neu
  2285. }
  2286. var _sel3 = document.getElementById("NumbersInfluxDB_value1");
  2287. if (_sel3.selectedIndex != _neu) {
  2288. _sel3.selectedIndex = _neu
  2289. }
  2290. }
  2291. function numberInfluxDBChanged() {
  2292. var sel = document.getElementById("NumbersInfluxDB_value1");
  2293. _neu = sel.selectedIndex;
  2294. UpdateInputIndividual(sel);
  2295. var _sel2 = document.getElementById("Numbers_value1");
  2296. if (_sel2.selectedIndex != _neu) {
  2297. _sel2.selectedIndex = _neu
  2298. }
  2299. var _sel3 = document.getElementById("NumbersInfluxDBv2_value1");
  2300. if (_sel3.selectedIndex != _neu) {
  2301. _sel3.selectedIndex = _neu
  2302. }
  2303. }
  2304. /* hash #description open the details part of the page */
  2305. function openDescription() {
  2306. if(window.location.hash) {
  2307. var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
  2308. if(hash == 'description') {
  2309. document.getElementById("desc_details").open = true;
  2310. document.getElementById("reboot").style.display = "none";
  2311. document.getElementById("reboot_text").style.display = "none";
  2312. }
  2313. }
  2314. }
  2315. openDescription();
  2316. LoadConfigNeu();
  2317. </script>
  2318. </body>
  2319. </html>