edit_config_param_template.html 97 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611
  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>"Expert View"</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">Expert View</label>
  187. </td>
  188. <td>
  189. <button style="display:none;" class="button" id="Edit_Config_Direct" onclick="editConfigDirect()">Edit "Config.ini" File</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 class="expert" 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"
  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 class="expert" 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"
  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 class="expert" 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"
  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="-2" max="2"
  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 class="expert" 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"
  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"
  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">
  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">
  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">
  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"
  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"
  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">
  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">
  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">
  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"
  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">
  414. <option value="true" selected>true</option>
  415. <option value="false" >false</option>
  416. </select>
  417. </td>
  418. <td>$TOOLTIP_TakeImage_FixedExposure</td>
  419. </tr>
  420. <!------------- Alignment ------------------>
  421. <tr class="expert" 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 class="expert" 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 class="expert" 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. <!------------- Digit ROIs ------------------>
  484. <tr style="border-bottom: 2px solid lightgray;" id="Category_Digits_ex4">
  485. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  486. <h4><input type="checkbox" id="Category_Digits_enabled" value="1" onclick ='UpdateAfterCategoryCheck()' unchecked >
  487. <label for=Category_Digits_enabled>Digit ROI Processing</label></h4>
  488. </td>
  489. </tr>
  490. <tr class="DigitItem">
  491. <td class="indent1" >
  492. <class id="Digits_Model_text" style="color:black;">Model</class>
  493. </td>
  494. <td>
  495. <select required class="select_large" id="Digits_Model_value1">
  496. </select>
  497. </td>
  498. <td>$TOOLTIP_Digits_Model</td>
  499. </tr>
  500. <tr class="DigitItem expert" unused_id="ex91">
  501. <td class="indent1">
  502. <input type="checkbox" id="Digits_CNNGoodThreshold_enabled" value="1" onclick = 'InvertEnableItem("Digits", "CNNGoodThreshold")' unchecked >
  503. <label for=Digits_CNNGoodThreshold_enabled><class id="Digits_CNNGoodThreshold_text" style="color:black;">CNN Good Threshold</class></label>
  504. </td>
  505. <td>
  506. <input required type="number" id="Digits_CNNGoodThreshold_value1" min="0" max="1" step="0.1"
  507. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=1)) &&
  508. (!validity.stepMismatch||(value=parseInt(this.value)));">
  509. </td>
  510. <td>$TOOLTIP_Digits_CNNGoodThreshold</td>
  511. </tr>
  512. <tr class="DigitItem">
  513. <td class="indent1">
  514. <input type="checkbox" id="Digits_ROIImagesLocation_enabled" value="1" onclick = 'InvertEnableItem("Digits", "ROIImagesLocation")' unchecked >
  515. <label for=Digits_ROIImagesLocation_enabled><class id="Digits_ROIImagesLocation_text" style="color:black;">ROI Images Location</class></label>
  516. </td>
  517. <td>
  518. <input required type="text" name="name" id="Digits_ROIImagesLocation_value1">
  519. </td>
  520. <td>$TOOLTIP_Digits_ROIImagesLocation</td>
  521. </tr>
  522. <tr class="DigitItem">
  523. <td class="indent1">
  524. <input type="checkbox" id="Digits_ROIImagesRetention_enabled" value="1" onclick = 'InvertEnableItem("Digits", "ROIImagesRetention")' unchecked >
  525. <label for=Digits_ROIImagesRetention_enabled><class id="Digits_ROIImagesRetention_text" style="color:black;">ROI Images Retention</class></label>
  526. </td>
  527. <td>
  528. <input required type="number" id="Digits_ROIImagesRetention_value1" min="0" step="1"
  529. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  530. </td>
  531. <td>$TOOLTIP_Digits_ROIImagesRetention</td>
  532. </tr>
  533. <!------------- Ananlog ROIs ------------------>
  534. <tr style="border-bottom: 2px solid lightgray;" id="Category_Analog_ex4">
  535. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  536. <h4><input type="checkbox" id="Category_Analog_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  537. <label for=Category_Analog_enabled>Analog ROI Processing</label></h4>
  538. </td>
  539. </tr>
  540. <tr class="AnalogItem">
  541. <td class="indent1">
  542. <class id="Analog_Model_text" style="color:black;">Model</class>
  543. </td>
  544. <td>
  545. <select required class="select_large" id="Analog_Model_value1">
  546. </select>
  547. </td>
  548. <td>$TOOLTIP_Analog_Model</td>
  549. </tr>
  550. <tr class="AnalogItem">
  551. <td class="indent1">
  552. <input type="checkbox" id="Analog_ROIImagesLocation_enabled" value="1" onclick = 'InvertEnableItem("Analog", "ROIImagesLocation")' unchecked >
  553. <label for=Analog_ROIImagesLocation_enabled><class id="Analog_ROIImagesLocation_text" style="color:black;">ROI Images Location</class>
  554. </label>
  555. </td>
  556. <td> <input required type="text" name="name" id="Analog_ROIImagesLocation_value1"> </td>
  557. <td>$TOOLTIP_Analog_ROIImagesLocation</td>
  558. </tr>
  559. <tr class="AnalogItem">
  560. <td class="indent1">
  561. <input type="checkbox" id="Analog_ROIImagesRetention_enabled" value="1" onclick = 'InvertEnableItem("Analog", "ROIImagesRetention")' unchecked >
  562. <label for=Analog_ROIImagesRetention_enabled><class id="Analog_ROIImagesRetention_text" style="color:black;">ROI Images Retention</class></label></td>
  563. <td>
  564. <input required type="number" id="Analog_ROIImagesRetention_value1" min="0" step="1"
  565. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  566. </td>
  567. <td>$TOOLTIP_Analog_ROIImagesRetention</td>
  568. </tr>
  569. <!------------- Post-Processing ------------------>
  570. <tr style="border-bottom: 2px solid lightgray;">
  571. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Post-Processing</h4></td>
  572. </tr>
  573. <tr>
  574. <td class="indent1">
  575. <label><class id="PostProcessing_PreValueUse_text" style="color:black;">Previous Value</class></label>
  576. </td>
  577. <td>
  578. <select id="PostProcessing_PreValueUse_value1">
  579. <option value="true" selected>true</option>
  580. <option value="false" >false</option>
  581. </select>
  582. </td>
  583. <td>$TOOLTIP_PostProcessing_PreValueUse</td>
  584. </tr>
  585. <tr class="expert" unused_id="ex11">
  586. <td class="indent1">
  587. <input type="checkbox" id="PostProcessing_PreValueAgeStartup_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "PreValueAgeStartup")' unchecked >
  588. <label for=PostProcessing_PreValueAgeStartup_enabled><class id="PostProcessing_PreValueAgeStartup_text" style="color:black;">Maximum Age of Previous Value after Startup</class></label>
  589. </td>
  590. <td>
  591. <input required type="number" id="PostProcessing_PreValueAgeStartup_value1" size="13" min="0"
  592. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Minutes
  593. </td>
  594. <td>$TOOLTIP_PostProcessing_PreValueAgeStartup</td>
  595. </tr>
  596. <tr class="expert" unused_id="ex12">
  597. <td class="indent1">
  598. <label><class id="PostProcessing_ErrorMessage_text" style="color:black;">Skip Messages on Error</class></label>
  599. </td>
  600. <td>
  601. <select id="PostProcessing_ErrorMessage_value1">
  602. <option value="true" selected>true</option>
  603. <option value="false" >false</option>
  604. </select>
  605. </td>
  606. <td>$TOOLTIP_PostProcessing_ErrorMessage</td>
  607. </tr>
  608. <tr class="expert" unused_id="ex1dddd">
  609. <td class="indent1">
  610. <label><class id="PostProcessing_CheckDigitIncreaseConsistency_text" style="color:black;">Check Digit Increase Consistency</class></label>
  611. </td>
  612. <td>
  613. <select id="PostProcessing_CheckDigitIncreaseConsistency_value1">
  614. <option value="true" selected>true</option>
  615. <option value="false" >false</option>
  616. </select>
  617. </td>
  618. <td>$TOOLTIP_PostProcessing_CheckDigitIncreaseConsistency</td>
  619. </tr>
  620. <tr style="margin-top:12px">
  621. <td class="indent1" style="padding-top:25px" colspan="3">
  622. <b>Parameter per number sequence:</b>
  623. <select
  624. style="font-weight: bold; margin-left:17px" id="Numbers_value1" onchange="numberChanged()">
  625. </select>
  626. </td>
  627. </tr>
  628. <tr>
  629. <td class="indent2">
  630. <label><class id="PostProcessing_AllowNegativeRates_text" style="color:black;">Allow Negative Rates</class></label>
  631. </td>
  632. <td>
  633. <select id="PostProcessing_AllowNegativeRates_value1">
  634. <option value="true" selected>true</option>
  635. <option value="false" >false</option>
  636. </select>
  637. </td>
  638. <td>$TOOLTIP_PostProcessing_NUMBER.AllowNegativeRates</td>
  639. </tr>
  640. <tr>
  641. <td class="indent2">
  642. <input type="checkbox" id="PostProcessing_DecimalShift_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "DecimalShift")' unchecked >
  643. <label for=PostProcessing_DecimalShift_enabled><class id="PostProcessing_DecimalShift_text" style="color:black;">Decimal Shift</class></label>
  644. </td>
  645. <td>
  646. <input required type="number" id="PostProcessing_DecimalShift_value1" value="0" step="1" min="-9" max="9"
  647. oninput="(!validity.rangeUnderflow||(value=-9)) && (!validity.rangeOverflow||(value=9)) &&
  648. (!validity.stepMismatch||(value=parseInt(this.value)));">
  649. </td>
  650. <td>$TOOLTIP_PostProcessing_NUMBER.DecimalShift</td>
  651. </tr>
  652. <tr>
  653. <td class="indent2">
  654. <input type="checkbox" id="PostProcessing_AnalogDigitalTransitionStart_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "AnalogDigitalTransitionStart")' unchecked >
  655. <label for=PostProcessing_AnalogDigitalTransitionStart_enabled><class id="PostProcessing_AnalogDigitalTransitionStart_text" style="color:black;">Analog/Digital Transition Start</class></label>
  656. </td>
  657. <td>
  658. <input required type="number" id="PostProcessing_AnalogDigitalTransitionStart_value1" step="0.1" min="0.1" max="9.9" value="9.2"
  659. oninput="(!validity.rangeUnderflow||(value=0.1)) && (!validity.rangeOverflow||(value=9.9)) &&
  660. (!validity.stepMismatch||(value=parseInt(this.value)));">
  661. </td>
  662. <td>$TOOLTIP_PostProcessing_NUMBER.AnalogDigitalTransitionStart</td>
  663. </tr>
  664. <tr>
  665. <td class="indent2">
  666. <input type="checkbox" id="PostProcessing_MaxRateValue_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateValue")' unchecked >
  667. <label for=PostProcessing_MaxRateValue_enabled><class id="PostProcessing_MaxRateValue_text" style="color:black;">Maximum Rate Value</class></label>
  668. </td>
  669. <td>
  670. <input required type="number" id="PostProcessing_MaxRateValue_value1" size="13" min="0" step="any"
  671. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  672. </td>
  673. <td>$TOOLTIP_PostProcessing_NUMBER.MaxRateValue</td>
  674. </tr>
  675. <tr>
  676. <td class="indent2">
  677. <input type="checkbox" id="PostProcessing_MaxRateType_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "MaxRateType")' unchecked >
  678. <label for=PostProcessing_MaxRateType_enabled><class id="PostProcessing_MaxRateType_text" style="color:black;">Maximum Rate Type</class></label>
  679. </td>
  680. <td>
  681. <select id="PostProcessing_MaxRateType_value1">
  682. <option value="AbsoluteChange" >AbsoluteChange</option>
  683. <option value="RateChange" selected>RateChange</option>
  684. </select>
  685. </td>
  686. <td>$TOOLTIP_PostProcessing_NUMBER.MaxRateType</td>
  687. </tr>
  688. <tr>
  689. <td class="indent2">
  690. <label><class id="PostProcessing_ExtendedResolution_text" style="color:black;">Extended Resolution</class></label>
  691. </td>
  692. <td>
  693. <select id="PostProcessing_ExtendedResolution_value1">
  694. <option value="true" >true</option>
  695. <option value="false" selected>false</option>
  696. </select>
  697. </td>
  698. <td>$TOOLTIP_PostProcessing_NUMBER.ExtendedResolution</td>
  699. </tr>
  700. <tr>
  701. <td id="ex121" class="indent2">
  702. <label><class id="PostProcessing_IgnoreLeadingNaN_text" style="color:black;">Ignore Leading NaNs</class></label>
  703. </td>
  704. <td>
  705. <select id="PostProcessing_IgnoreLeadingNaN_value1">
  706. <option value="true" >true</option>
  707. <option value="false" selected>false</option>
  708. </select>
  709. </td>
  710. <td>$TOOLTIP_PostProcessing_NUMBER.IgnoreLeadingNaN</td>
  711. </tr>
  712. <!------------- MQTT ------------------>
  713. <tr style="border-bottom: 2px solid lightgray;">
  714. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  715. <h4>
  716. <input type="checkbox" id="Category_MQTT_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  717. <label for=Category_MQTT_enabled>MQTT</label>
  718. </h4>
  719. </td>
  720. </tr>
  721. <tr class="MQTTItem">
  722. <td class="indent1">
  723. <input type="checkbox" id="MQTT_Uri_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "Uri")' unchecked >
  724. <label for=MQTT_Uri_enabled><class id="MQTT_Uri_text" style="color:black;">URI</class></label>
  725. </td>
  726. <td>
  727. <input required type="text" id="MQTT_Uri_value1">
  728. </td>
  729. <td>$TOOLTIP_MQTT_Uri</td>
  730. </tr>
  731. <tr class="MQTTItem">
  732. <td class="indent1">
  733. <input type="checkbox" id="MQTT_MainTopic_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MainTopic")' unchecked >
  734. <label for=MQTT_MainTopic_enabled><class id="MQTT_MainTopic_text" style="color:black;">Main Topic</class></label>
  735. </td>
  736. <td>
  737. <input required type="text" id="MQTT_MainTopic_value1">
  738. </td>
  739. <td>$TOOLTIP_MQTT_MainTopic</td>
  740. </tr>
  741. <tr class="MQTTItem">
  742. <td class="indent1">
  743. <input type="checkbox" id="MQTT_ClientID_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientID")' unchecked >
  744. <label for=MQTT_ClientID_enabled><class id="MQTT_ClientID_text" style="color:black;">Client ID</class></label>
  745. </td>
  746. <td>
  747. <input required type="text" id="MQTT_ClientID_value1">
  748. </td>
  749. <td>$TOOLTIP_MQTT_ClientID</td>
  750. </tr>
  751. <tr class="MQTTItem">
  752. <td class="indent1">
  753. <input type="checkbox" id="MQTT_user_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "user")' unchecked >
  754. <label for=MQTT_user_enabled><class id="MQTT_user_text" style="color:black;">Username</class></label>
  755. </td>
  756. <td>
  757. <input type="text" id="MQTT_user_value1">
  758. </td>
  759. <td>$TOOLTIP_MQTT_user</td>
  760. </tr>
  761. <tr class="MQTTItem">
  762. <td class="indent1">
  763. <input type="checkbox" id="MQTT_password_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "password")' unchecked >
  764. <label for=MQTT_password_enabled><class id="MQTT_password_text" style="color:black;">Password</class></label>
  765. </td>
  766. <td>
  767. <input type="text" id="MQTT_password_value1">
  768. </td>
  769. <td>$TOOLTIP_MQTT_password</td>
  770. </tr>
  771. <tr class="MQTTItem expert" unused_id="exMqtt">
  772. <td class="indent1">
  773. <input type="checkbox" id="MQTT_CACert_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "CACert")' unchecked >
  774. <label for=MQTT_CACert_enabled><class id="MQTT_CACert_text" style="color:black;">Root CA Certificate file</class></label>
  775. </td>
  776. <td>
  777. <input type="text" id="MQTT_CACert_value1">
  778. </td>
  779. <td>$TOOLTIP_MQTT_CACert</td>
  780. </tr>
  781. <tr class="MQTTItem expert" unused_id="exMqtt">
  782. <td class="indent1">
  783. <input type="checkbox" id="MQTT_ClientCert_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientCert")' unchecked >
  784. <label for=MQTT_ClientCert_enabled><class id="MQTT_ClientCert_text" style="color:black;">Client Certificate file</class></label>
  785. </td>
  786. <td>
  787. <input type="text" id="MQTT_ClientCert_value1">
  788. </td>
  789. <td>$TOOLTIP_MQTT_ClientCert</td>
  790. </tr>
  791. <tr class="MQTTItem expert" unused_id="exMqtt">
  792. <td class="indent1">
  793. <input type="checkbox" id="MQTT_ClientKey_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ClientKey")' unchecked >
  794. <label for=MQTT_ClientKey_enabled><class id="MQTT_ClientKey_text" style="color:black;">Client Key file</class></label>
  795. </td>
  796. <td>
  797. <input type="text" id="MQTT_ClientKey_value1">
  798. </td>
  799. <td>$TOOLTIP_MQTT_ClientKey</td>
  800. </tr>
  801. <tr class="MQTTItem">
  802. <td class="indent1">
  803. <label><class id="MQTT_RetainMessages_text" style="color:black;">Retain Messages</class></label>
  804. </td>
  805. <td>
  806. <select id="MQTT_RetainMessages_value1">
  807. <option value="true" selected>true</option>
  808. <option value="false" >false</option>
  809. </select>
  810. </td>
  811. <td>$TOOLTIP_MQTT_RetainMessages</td>
  812. </tr>
  813. <tr class="MQTTItem">
  814. <td class="indent1" style="padding-top:25px" colspan="2">
  815. <b>Homeassistant Discovery (using MQTT)</b><br>
  816. If activated, the discovery topics gets automatically scheduled to sent once after device startup during state "Publish to MQTT".
  817. To schedule a retransmission: Use "Manual Control > Resend HA Discovery" or call REST API:
  818. <a href=mqtt_publish_discovery target="_blank">http://&lt;IP&gt;/mqtt_publish_discovery</a>
  819. </td>
  820. </tr>
  821. <tr class="MQTTItem">
  822. <td class="indent2">
  823. <label><class id="MQTT_HomeassistantDiscovery_text" style="color:black;">Homeassistant Discovery</class></label>
  824. </td>
  825. <td>
  826. <select id="MQTT_HomeassistantDiscovery_value1">
  827. <option value="true" selected>true</option>
  828. <option value="false" >false</option>
  829. </select>
  830. </td>
  831. <td>$TOOLTIP_MQTT_HomeassistantDiscovery</td>
  832. </tr>
  833. <tr class="MQTTItem">
  834. <td class="indent2">
  835. <input type="checkbox" id="MQTT_MeterType_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "MeterType")' unchecked >
  836. <label for=MQTT_MeterType_enabled><class id="MQTT_MeterType_text" style="color:black;">Meter Type</class></label>
  837. </td>
  838. <td>
  839. <select class="select_large" id="MQTT_MeterType_value1"> <!-- See https://developers.home-assistant.io/docs/core/entity/sensor/#available-device-classes -->
  840. <option value="other" selected>Other (no Units)</option>
  841. <option value="water_m3">Watermeter (Value: m³, Rate: m³/h)</option>
  842. <option value="water_l">Watermeter (Value: l, Rate: l/h)</option>
  843. <option value="water_gal">Watermeter (Value: gal, Rate: gal/h)</option>
  844. <option value="water_ft3">Watermeter (Value: ft³, Rate: ft³/m)</option>
  845. <option value="gas_m3">Gasmeter (Value: m³, Rate: m³/h)</option>
  846. <option value="gas_ft3">Gasmeter (Value: ft³, Rate: ft³/m)</option>
  847. <option value="energy_wh">Energymeter (Value: Wh, Rate: W)</option>
  848. <option value="energy_kwh">Energymeter (Value: kWh, Rate: kW)</option>
  849. <option value="energy_mwh">Energymeter (Value: MWh, Rate: MW)</option>
  850. <option value="energy_gj">Energymeter (Value: GJ, Rate: GJ/h)</option>
  851. </select>
  852. </td>
  853. <td>$TOOLTIP_MQTT_MeterType</td>
  854. </tr>
  855. <!------------- INFLUXDB v1 ------------------>
  856. <tr style="border-bottom: 2px solid lightgray;">
  857. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  858. <h4>
  859. <input type="checkbox" id="Category_InfluxDB_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  860. <label for=Category_InfluxDB_enabled>InfluxDB v1.x</label></h4>
  861. </td>
  862. </tr>
  863. <tr class="InfluxDBv1Item">
  864. <td class="indent1">
  865. <input type="checkbox" id="InfluxDB_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Uri")' unchecked >
  866. <label for=InfluxDB_Uri_enabled><class id="InfluxDB_Uri_text" style="color:black;">URI</class></label>
  867. </td>
  868. <td>
  869. <input required type="text" id="InfluxDB_Uri_value1">
  870. </td>
  871. <td>$TOOLTIP_InfluxDB_Uri</td>
  872. </tr>
  873. <tr class="InfluxDBv1Item">
  874. <td class="indent1">
  875. <input type="checkbox" id="InfluxDB_Database_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Database")' unchecked >
  876. <label for=InfluxDB_Database_enabled><class id="InfluxDB_Database_text" style="color:black;">Database</class></label>
  877. </td>
  878. <td>
  879. <input required type="text" id="InfluxDB_Database_value1">
  880. </td>
  881. <td>$TOOLTIP_InfluxDB_Database</td>
  882. </tr>
  883. <tr class="InfluxDBv1Item">
  884. <td class="indent1">
  885. <input type="checkbox" id="InfluxDB_user_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "user")' unchecked >
  886. <label for=InfluxDB_user_enabled><class id="InfluxDB_user_text" style="color:black;">Username</class></label>
  887. </td>
  888. <td>
  889. <input type="text" id="InfluxDB_user_value1">
  890. </td>
  891. <td>$TOOLTIP_InfluxDB_user</td>
  892. </tr>
  893. <tr class="InfluxDBv1Item">
  894. <td class="indent1">
  895. <input type="checkbox" id="InfluxDB_password_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "password")' unchecked >
  896. <label for=InfluxDB_password_enabled><class id="InfluxDB_password_text" style="color:black;">Password</class></label>
  897. </td>
  898. <td>
  899. <input type="text" id="InfluxDB_password_value1">
  900. </td>
  901. <td>$TOOLTIP_InfluxDB_password</td>
  902. </tr>
  903. <tr class="InfluxDBv1Item" style="margin-top:12px">
  904. <td class="indent1" style="padding-top:25px" colspan="3">
  905. <b>Parameter per number sequence:</b>
  906. <select
  907. style="font-weight: bold; margin-left:17px" id="NumbersInfluxDB_value1" onchange="numberInfluxDBChanged()">
  908. </select>
  909. </td>
  910. </tr>
  911. <tr class="InfluxDBv1Item">
  912. <td class="indent2">
  913. <input type="checkbox" id="InfluxDB_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Measurement")' unchecked >
  914. <label for=InfluxDB_Measurement_enabled><class id="InfluxDB_Measurement_text" style="color:black;">Measurement</class></label>
  915. </td>
  916. <td>
  917. <input required type="text" id="InfluxDB_Measurement_value1">
  918. </td>
  919. <td>$TOOLTIP_InfluxDB_NUMBER.Measurement</td>
  920. </tr>
  921. <tr class="InfluxDBv1Item">
  922. <td class="indent2">
  923. <input type="checkbox" id="InfluxDB_Field_enabled" value="1" onclick = 'InvertEnableItem("InfluxDB", "Field")' unchecked >
  924. <label for=InfluxDB_Field_enabled><class id="InfluxDB_Field_text" style="color:black;">Field</class></label>
  925. </td>
  926. <td>
  927. <input required type="text" id="InfluxDB_Field_value1">
  928. </td>
  929. <td>$TOOLTIP_InfluxDB_NUMBER.Field</td>
  930. </tr>
  931. <!------------- INFLUXDB v2 ------------------>
  932. <tr style="border-bottom: 2px solid lightgray;">
  933. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  934. <h4>
  935. <input type="checkbox" id="Category_InfluxDBv2_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
  936. <label for=Category_InfluxDBv2_enabled>InfluxDB v2.x</label></h4>
  937. </td>
  938. </tr>
  939. <tr class="InfluxDBv2Item">
  940. <td class="indent1">
  941. <input type="checkbox" id="InfluxDBv2_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Uri")' unchecked >
  942. <label for=InfluxDBv2_Uri_enabled><class id="InfluxDBv2_Uri_text" style="color:black;">URI</class></label>
  943. </td>
  944. <td>
  945. <input required type="text" id="InfluxDBv2_Uri_value1">
  946. </td>
  947. <td>$TOOLTIP_InfluxDBv2_Uri</td>
  948. </tr>
  949. <tr class="InfluxDBv2Item">
  950. <td class="indent1">
  951. <input type="checkbox" id="InfluxDBv2_Bucket_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Bucket")' unchecked >
  952. <label for=InfluxDBv2_Bucket_enabled><class id="InfluxDBv2_Bucket_text" style="color:black;">Bucket</class></label>
  953. </td>
  954. <td>
  955. <input required type="text" id="InfluxDBv2_Bucket_value1">
  956. </td>
  957. <td>$TOOLTIP_InfluxDBv2_Bucket</td>
  958. </tr>
  959. <tr class="InfluxDBv2Item">
  960. <td class="indent1">
  961. <input type="checkbox" id="InfluxDBv2_Org_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Org")' unchecked >
  962. <label for=InfluxDBv2_Org_enabled><class id="InfluxDBv2_Org_text" style="color:black;">Organization (Org)</class></label>
  963. </td>
  964. <td>
  965. <input type="text" id="InfluxDBv2_Org_value1">
  966. </td>
  967. <td>$TOOLTIP_InfluxDBv2_Org</td>
  968. </tr>
  969. <tr class="InfluxDBv2Item">
  970. <td class="indent1">
  971. <input type="checkbox" id="InfluxDBv2_Token_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Token")' unchecked >
  972. <label for=InfluxDBv2_Token_enabled><class id="InfluxDBv2_Token_text" style="color:black;">Token</class></label>
  973. </td>
  974. <td>
  975. <input type="text" id="InfluxDBv2_Token_value1">
  976. </td>
  977. <td>$TOOLTIP_InfluxDBv2_Token</td>
  978. </tr>
  979. <tr class="InfluxDBv2Item" style="margin-top:12px">
  980. <td class="indent1" style="padding-top:25px" colspan="3">
  981. <b>Parameter per number sequence:</b>
  982. <select
  983. style="font-weight: bold; margin-left:17px" id="NumbersInfluxDBv2_value1" onchange="numberInfluxDBv2Changed()">
  984. </select>
  985. </td>
  986. </tr>
  987. <tr class="InfluxDBv2Item">
  988. <td class="indent2">
  989. <input type="checkbox" id="InfluxDBv2_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Measurement")' unchecked >
  990. <label for=InfluxDBv2_Measurement_enabled><class id="InfluxDBv2_Measurement_text" style="color:black;">Measurement</class></label>
  991. </td>
  992. <td>
  993. <input required type="text" id="InfluxDBv2_Measurement_value1">
  994. </td>
  995. <td>$TOOLTIP_InfluxDBv2_NUMBER.Measurement</td>
  996. </tr>
  997. <tr class="InfluxDBv2Item">
  998. <td class="indent2">
  999. <input type="checkbox" id="InfluxDBv2_Field_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Field")' unchecked >
  1000. <label for=InfluxDBv2_Field_enabled><class id="InfluxDBv2_Field_text" style="color:black;">Field</class></label>
  1001. </td>
  1002. <td>
  1003. <input required type="text" id="InfluxDBv2_Field_value1">
  1004. </td>
  1005. <td>$TOOLTIP_InfluxDBv2_NUMBER.Field</td>
  1006. </tr>
  1007. <!------------- GPIO ------------------>
  1008. <tr style="border-bottom: 2px solid lightgray;">
  1009. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;">
  1010. <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='UpdateAfterCategoryCheck()' unchecked >
  1011. <label for=Category_GPIO_enabled>GPIO (General Purpose Input / Output)</label></h4>
  1012. </td>
  1013. </tr>
  1014. <!------------- GPIO0 begin ------------------>
  1015. <tr class="GPIO_IO0 GPIO_item expert">
  1016. <td class="indent1">
  1017. <input type="checkbox" id="GPIO_IO0_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO0")' unchecked>
  1018. <label for=GPIO_IO0_enabled><span id="GPIO_IO0_text">GPIO0 Configuration</span></label>
  1019. </td>
  1020. <td>
  1021. <select id="GPIO_IO0_value1">
  1022. <option value="input">input</option>
  1023. <option value="input-pullup">input pullup</option>
  1024. <option value="input-pulldown">input pulldown</option>
  1025. <option value="output">output</option>
  1026. </select>
  1027. </td>
  1028. <td>$TOOLTIP_GPIO_IO0</td>
  1029. </tr>
  1030. <tr class="GPIO_IO0 GPIO_item expert">
  1031. <td class="indent2">
  1032. <span id="GPIO_IO0_text" class="GPIO_IO0 GPIO_item">GPIO0 Use Interrupt</span>
  1033. </td>
  1034. <td>
  1035. <select id="GPIO_IO0_value2">
  1036. <option value="disabled">disabled</option>
  1037. <option value="rising-edge">rising edge</option>
  1038. <option value="falling-edge">falling edge</option>
  1039. <option value="rising-and-falling">rising and falling</option>
  1040. <option value="low-level-trigger">low level trigger</option>
  1041. <option value="high-level-trigger">high level trigger</option>
  1042. </select>
  1043. </td>
  1044. <td></td>
  1045. </tr>
  1046. <tr class="GPIO_IO0 GPIO_item expert">
  1047. <td class="indent2">
  1048. <span class="GPIO_IO0 GPIO_item">GPIO0 PWM Duty Cycle Resolution</span>
  1049. </td>
  1050. <td>
  1051. <input required type="number" id="GPIO_IO0_value3" min="1" max="20"
  1052. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1053. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO0 GPIO_item">Bits</span>
  1054. </td>
  1055. <td></td>
  1056. </tr>
  1057. <tr class="GPIO_IO0 GPIO_item expert">
  1058. <td class="indent2">
  1059. <span class="GPIO_IO0 GPIO_item">GPIO0 Enable MQTT</span>
  1060. </td>
  1061. <td><input type="checkbox" id="GPIO_IO0_value4"></td>
  1062. <td></td>
  1063. </tr>
  1064. <tr class="GPIO_IO0 GPIO_item expert">
  1065. <td class="indent2">
  1066. <span class="GPIO_IO0 GPIO_item">GPIO0 Enable REST API</span>
  1067. </td>
  1068. <td><input type="checkbox" id="GPIO_IO0_value5"></td>
  1069. <td></td>
  1070. </tr>
  1071. <tr class="GPIO_IO0 GPIO_item expert">
  1072. <td class="indent2">
  1073. <span class="GPIO_IO0 GPIO_item">GPIO0 Name</span>
  1074. </td>
  1075. <td><input type="text" id="GPIO_IO0_value6"></td>
  1076. <td></td>
  1077. </tr>
  1078. <!------------- GPIO0 end ------------------>
  1079. <!------------- GPIO1 begin ------------------>
  1080. <tr class="GPIO_IO1 GPIO_item expert">
  1081. <td class="indent1">
  1082. <input type="checkbox" id="GPIO_IO1_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO1")' unchecked>
  1083. <label for=GPIO_IO1_enabled><span id="GPIO_IO1_text">GPIO1 Configuration</span></label>
  1084. </td>
  1085. <td>
  1086. <select id="GPIO_IO1_value1">
  1087. <option value="input">input</option>
  1088. <option value="input-pullup">input pullup</option>
  1089. <option value="input-pulldown">input pulldown</option>
  1090. <option value="output">output</option>
  1091. </select>
  1092. </td>
  1093. <td>$TOOLTIP_GPIO_IO1</td>
  1094. </tr>
  1095. <tr class="GPIO_IO1 GPIO_item expert">
  1096. <td class="indent2">
  1097. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO1 Use Interrupt</span>
  1098. </td>
  1099. <td>
  1100. <select id="GPIO_IO1_value2">
  1101. <option value="disabled">disabled</option>
  1102. <option value="rising-edge" disabled>rising edge</option>
  1103. <option value="falling-edge" disabled>falling edge</option>
  1104. <option value="rising-and-falling">rising and falling</option>
  1105. <option value="low-level-trigger">low level trigger</option>
  1106. <option value="high-level-trigger">high level trigger</option>
  1107. </select>
  1108. </td>
  1109. <td></td>
  1110. </tr>
  1111. <tr class="GPIO_IO1 GPIO_item expert">
  1112. <td class="indent2">
  1113. <span class="GPIO_IO1 GPIO_item">GPIO1 PWM Duty Cycle Resolution</span>
  1114. </td>
  1115. <td><input required type="number" id="GPIO_IO1_value3" min="1" max="20"
  1116. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1117. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO1 GPIO_item">Bits</span>
  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 Enable MQTT</span>
  1124. </td>
  1125. <td><input type="checkbox" id="GPIO_IO1_value4"></td>
  1126. <td></td>
  1127. </tr>
  1128. <tr class="GPIO_IO1 GPIO_item expert">
  1129. <td class="indent2">
  1130. <span class="GPIO_IO1 GPIO_item">GPIO1 Enable REST API</span>
  1131. </td>
  1132. <td><input type="checkbox" id="GPIO_IO1_value5"></td>
  1133. <td></td>
  1134. </tr>
  1135. <tr class="GPIO_IO1 GPIO_item expert">
  1136. <td class="indent2">
  1137. <span class="GPIO_IO1 GPIO_item" class="expert">GPIO1 Name</span>
  1138. </td>
  1139. <td><input type="text" id="GPIO_IO1_value6"></td>
  1140. <td></td>
  1141. </tr>
  1142. <!------------- GPIO1 end ------------------>
  1143. <!------------- GPIO3 begin ------------------>
  1144. <tr class="GPIO_IO3 GPIO_item expert">
  1145. <td class="indent1">
  1146. <input type="checkbox" id="GPIO_IO3_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO3")' unchecked>
  1147. <label for=GPIO_IO3_enabled><span id="GPIO_IO3_text">GPIO3 Configuration</span></label>
  1148. </td>
  1149. <td>
  1150. <select id="GPIO_IO3_value1">
  1151. <option value="input">input</option>
  1152. <option value="input-pullup">input pullup</option>
  1153. <option value="input-pulldown">input pulldown</option>
  1154. <option value="output">output</option>
  1155. </select>
  1156. </td>
  1157. <td>$TOOLTIP_GPIO_IO3</td>
  1158. </tr>
  1159. <tr class="GPIO_IO3 GPIO_item expert">
  1160. <td class="indent2">
  1161. <span class="GPIO_IO3 GPIO_item">GPIO3 Use Interrupt</span>
  1162. </td>
  1163. <td>
  1164. <select id="GPIO_IO3_value2">
  1165. <option value="disabled">disabled</option>
  1166. <option value="rising-edge" disabled>rising edge</option>
  1167. <option value="falling-edge" disabled>falling edge</option>
  1168. <option value="rising-and-falling">rising and falling</option>
  1169. <option value="low-level-trigger">low level trigger</option>
  1170. <option value="high-level-trigger">high level trigger</option>
  1171. </select>
  1172. </td>
  1173. <td></td>
  1174. </tr>
  1175. <tr class="GPIO_IO3 GPIO_item expert">
  1176. <td class="indent2">
  1177. <span class="GPIO_IO3 GPIO_item">GPIO3 PWM Duty Cycle Resolution</span>
  1178. </td>
  1179. <td><input required type="number" id="GPIO_IO3_value3" min="1" max="20"
  1180. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1181. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO3 GPIO_item">Bits</span>
  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 Enable MQTT</span>
  1188. </td>
  1189. <td><input type="checkbox" id="GPIO_IO3_value4"></td>
  1190. <td></td>
  1191. </tr>
  1192. <tr class="GPIO_IO3 GPIO_item expert">
  1193. <td class="indent2">
  1194. <span class="GPIO_IO3 GPIO_item">GPIO3 Enable REST API</span>
  1195. </td>
  1196. <td><input type="checkbox" id="GPIO_IO3_value5"></td>
  1197. <td></td>
  1198. </tr>
  1199. <tr class="GPIO_IO3 GPIO_item expert">
  1200. <td class="indent2">
  1201. <span class="GPIO_IO3 GPIO_item">GPIO3 Name</span>
  1202. </td>
  1203. <td><input type="text" id="GPIO_IO3_value6"></td>
  1204. <td></td>
  1205. </tr>
  1206. <!------------- GPIO3 end ------------------>
  1207. <!------------- GPIO4 begin ------------------>
  1208. <tr class="GPIO_item" style="border-bottom: 0px;">
  1209. <td class="indent1">
  1210. <input type="checkbox" id="GPIO_IO4_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO4")' checked>
  1211. <label for=GPIO_IO4_enabled><span id="GPIO_IO4_text">GPIO4 Configuration</span></label>
  1212. </td>
  1213. <td>
  1214. <select id="GPIO_IO4_value1">
  1215. <option value="input">input</option>
  1216. <option value="input-pullup">input pullup</option>
  1217. <option value="input-pulldown">input pulldown</option>
  1218. <option value="output">output</option>
  1219. <option value="built-in-led" select>built-in led flash light</option>
  1220. </select>
  1221. </td>
  1222. <td>$TOOLTIP_GPIO_IO4</td>
  1223. </tr>
  1224. <tr class="GPIO_item" style="border-top: 0px;">
  1225. <td colspan="2" style="padding-left:28px">
  1226. <b>IMPORTANT NOTE:</b><br>
  1227. If you'd like to use the built-in flash LED in parallel with other GPIO functionality,
  1228. you have to explicitely activate the "built-in LED flash light" option on GPIO4. The light
  1229. intensity control (PWM) of the LED flash light is not functional anymore (only 100%).
  1230. </td>
  1231. </tr>
  1232. <tr class="GPIO_IO4 GPIO_item expert">
  1233. <td class="indent2">
  1234. <span class="GPIO_IO4 GPIO_item">GPIO4 Use Interrupt</span>
  1235. </td>
  1236. <td>
  1237. <select id="GPIO_IO4_value2">
  1238. <option value="disabled">disabled</option>
  1239. <option value="rising-edge">rising edge</option>
  1240. <option value="falling-edge">falling edge</option>
  1241. <option value="rising-and-falling">rising and falling</option>
  1242. <option value="low-level-trigger">low level trigger</option>
  1243. <option value="high-level-trigger">high level trigger</option>
  1244. </select>
  1245. </td>
  1246. <td></td>
  1247. </tr>
  1248. <tr class="GPIO_IO4 GPIO_item expert">
  1249. <td class="indent2">
  1250. <span class="GPIO_IO4 GPIO_item">GPIO4 PWM Duty Cycle Resolution</span>
  1251. </td>
  1252. <td><input required type="number" id="GPIO_IO4_value3" min="1" max="20"
  1253. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1254. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO4 GPIO_item">Bits</span>
  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 Enable MQTT</span>
  1261. </td>
  1262. <td><input type="checkbox" id="GPIO_IO4_value4"></td>
  1263. <td></td>
  1264. </tr>
  1265. <tr class="GPIO_IO4 GPIO_item expert">
  1266. <td class="indent2">
  1267. <span class="GPIO_IO4 GPIO_item">GPIO4 Enable REST API</span>
  1268. </td>
  1269. <td><input type="checkbox" id="GPIO_IO4_value5"></td>
  1270. <td></td>
  1271. </tr>
  1272. <tr class="GPIO_IO4 GPIO_item expert">
  1273. <td class="indent2">
  1274. <span class="GPIO_IO4 GPIO_item">GPIO4 Name</span>
  1275. </td>
  1276. <td><input type="text" id="GPIO_IO4_value6"></td>
  1277. <td></td>
  1278. </tr>
  1279. <!------------- GPIO4 end ------------------>
  1280. <!------------- GPIO12 begin ------------------>
  1281. <tr class="GPIO_item">
  1282. <td class="indent1">
  1283. <input type="checkbox" id="GPIO_IO12_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO12")' unchecked>
  1284. <label for=GPIO_IO12_enabled><span id="GPIO_IO12_text">GPIO12 Configuration</span></label>
  1285. </td>
  1286. <td>
  1287. <select id="GPIO_IO12_value1">
  1288. <option value="input">input</option>
  1289. <option value="input-pullup">input pullup</option>
  1290. <option value="input-pulldown">input pulldown</option>
  1291. <option value="output">output</option>
  1292. <option value="external-flash-ws281x">external flash light ws281x controlled</option>
  1293. </select>
  1294. </td>
  1295. <td>$TOOLTIP_GPIO_IO12</td>
  1296. </tr>
  1297. <tr class="GPIO_IO12 GPIO_item expert">
  1298. <td class="indent2">
  1299. <span class="GPIO_IO12 GPIO_item">GPIO12 Use Interrupt</span>
  1300. </td>
  1301. <td>
  1302. <select class="GPIO_IO12 GPIO_item" id="GPIO_IO12_value2">
  1303. <option value="disabled">disabled</option>
  1304. <option value="rising-edge">rising edge</option>
  1305. <option value="falling-edge">falling edge</option>
  1306. <option value="rising-and-falling">rising and falling</option>
  1307. <option value="low-level-trigger">low level trigger</option>
  1308. <option value="high-level-trigger">high level trigger</option>
  1309. </select>
  1310. </td>
  1311. <td></td>
  1312. </tr>
  1313. <tr class="GPIO_IO12 GPIO_item expert">
  1314. <td class="indent2">
  1315. <span class="GPIO_IO12 GPIO_item">GPIO12 PWM Duty Cycle Resolution</span>
  1316. </td>
  1317. <td><input required type="number" id="GPIO_IO12_value3" min="1" max="20"
  1318. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1319. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO12 GPIO_item">Bits</span>
  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 Enable MQTT</span>
  1326. </td>
  1327. <td><input type="checkbox" id="GPIO_IO12_value4"></td>
  1328. <td></td>
  1329. </tr>
  1330. <tr class="GPIO_IO12 GPIO_item expert">
  1331. <td class="indent2">
  1332. <span class="GPIO_IO12 GPIO_item">GPIO12 Enable REST API</span>
  1333. </td>
  1334. <td><input type="checkbox" id="GPIO_IO12_value5"></td>
  1335. <td></td>
  1336. </tr>
  1337. <tr class="GPIO_IO12 GPIO_item expert">
  1338. <td class="indent2">
  1339. <span class="GPIO_IO12 GPIO_item">GPIO12 Name</span>
  1340. </td>
  1341. <td><input type="text" id="GPIO_IO12_value6"></td>
  1342. <td></td>
  1343. </tr>
  1344. <tr class="GPIO_item" unused_id="wstypeex3">
  1345. <td class="indent1">
  1346. <span class="GPIO_IO12 GPIO_item" id="GPIO_LEDType_text">LED Type (NeoPixel)</span>
  1347. </td>
  1348. <td class="GPIO_item">
  1349. <select class="GPIO_item" id="GPIO_LEDType_value1">
  1350. <option value="WS2812" selected>WS2812</option>
  1351. <option value="WS2812B">WS2812B</option>
  1352. <option value="SK6812">SK6812</option>
  1353. <option value="WS2813">WS2813 (not tested)</option>
  1354. </select>
  1355. </td>
  1356. <td>$TOOLTIP_GPIO_LEDType</td>
  1357. </tr>
  1358. <tr class="GPIO_item" unused_id="LEDANZex8" >
  1359. <td class="indent1">
  1360. <span class="GPIO_item" id="GPIO_LEDNumbers_text">Numbers of LEDs</span>
  1361. </td>
  1362. <td>
  1363. <input required type="number" name="name" id="GPIO_LEDNumbers_value1" size="13" min="1"
  1364. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.stepMismatch||(value=parseInt(this.value)));">
  1365. </td>
  1366. <td>$TOOLTIP_GPIO_LEDNumbers</td>
  1367. </tr>
  1368. <tr class="GPIO_item" unused_id="LEDRGBex9">
  1369. <td class="indent1">
  1370. <span class="GPIO_item" id="GPIO_LEDColor_text">LED Color</span>
  1371. </td>
  1372. <td class="GPIO_item">
  1373. R <input required style="min-width:35px;width:35px;" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value1"
  1374. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1375. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1376. G <input required style="min-width:35px;width:35px" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value2"
  1377. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1378. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1379. B <input required style="min-width:35px;width:35px" type="number" class="GPIO_IO12 GPIO_item" id="GPIO_LEDColor_value3"
  1380. size="12" min="0" max="255" step="1" oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=255)) &&
  1381. (!validity.stepMismatch||(value=parseInt(this.value)));">
  1382. </td>
  1383. <td>$TOOLTIP_GPIO_LEDColor</td>
  1384. </tr>
  1385. <!------------- GPIO12 end ------------------>
  1386. <!------------- GPIO13 begin ------------------>
  1387. <tr class="GPIO_IO13 GPIO_item expert">
  1388. <td class="indent1">
  1389. <input type="checkbox" id="GPIO_IO13_enabled" value="1" onclick = 'InvertEnableItem("GPIO", "IO13")' unchecked>
  1390. <label for=GPIO_IO13_enabled><span id="GPIO_IO13_text">GPIO13 Configuration</span></label>
  1391. </td>
  1392. <td>
  1393. <select id="GPIO_IO13_value1">
  1394. <option value="input">input</option>
  1395. <option value="input-pullup">input pullup</option>
  1396. <option value="input-pulldown">input pulldown</option>
  1397. <option value="output">output</option>
  1398. </select>
  1399. </td>
  1400. <td>$TOOLTIP_GPIO_IO13</td>
  1401. </tr>
  1402. <tr class="GPIO_IO13 GPIO_item expert">
  1403. <td class="indent2">
  1404. <span class="GPIO_IO13 GPIO_item">GPIO13 Use Interrupt</span>
  1405. </td>
  1406. <td>
  1407. <select id="GPIO_IO13_value2">
  1408. <option value="disabled">disabled</option>
  1409. <option value="rising-edge" disabled>rising edge</option>
  1410. <option value="falling-edge" disabled>falling edge</option>
  1411. <option value="rising-and-falling">rising and falling</option>
  1412. <option value="low-level-trigger">low level trigger</option>
  1413. <option value="high-level-trigger">high level trigger</option>
  1414. </select>
  1415. </td>
  1416. <td></td>
  1417. </tr>
  1418. <tr class="GPIO_IO13 GPIO_item expert">
  1419. <td class="indent2">
  1420. <span class="GPIO_IO13 GPIO_item">GPIO13 PWM Duty Cycle Resolution</span>
  1421. </td>
  1422. <td><input required type="number" id="GPIO_IO13_value3" min="1" max="20"
  1423. oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=20)) &&
  1424. (!validity.stepMismatch||(value=parseInt(this.value)));"><span class="GPIO_IO13 GPIO_item">Bits</span></td>
  1425. <td></td>
  1426. </tr>
  1427. <tr class="GPIO_IO13 GPIO_item expert">
  1428. <td class="indent2">
  1429. <span class="GPIO_IO13 GPIO_item">GPIO13 Enable MQTT</span>
  1430. </td>
  1431. <td><input type="checkbox" id="GPIO_IO13_value4"></td>
  1432. <td></td>
  1433. </tr>
  1434. <tr class="GPIO_IO13 GPIO_item expert">
  1435. <td class="indent2">
  1436. <span class="GPIO_IO13 GPIO_item">GPIO13 Enable REST API</span>
  1437. </td>
  1438. <td><input type="checkbox" id="GPIO_IO13_value5"></td>
  1439. <td></td>
  1440. </tr>
  1441. <tr class="GPIO_IO13 GPIO_item expert">
  1442. <td class="indent2">
  1443. <span class="GPIO_IO13 GPIO_item">GPIO13 Name</span>
  1444. </td>
  1445. <td><input type="text" id="GPIO_IO13_value6"></td>
  1446. <td></td>
  1447. </tr>
  1448. <!------------- GPIO13 end ------------------>
  1449. <!------------- Autotimer ------------------>
  1450. <tr style="border-bottom: 2px solid lightgray;">
  1451. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Auto Timer</h4></td>
  1452. </tr>
  1453. <tr class="expert" unused_id="ex13">
  1454. <td class="indent1">
  1455. <class id="AutoTimer_AutoStart_text" style="color:black;">Automatic Round Start</class>
  1456. </td>
  1457. <td>
  1458. <select id="AutoTimer_AutoStart_value1">
  1459. <option value="true" selected>true</option>
  1460. <option value="false" >false</option>
  1461. </select>
  1462. </td>
  1463. <td>$TOOLTIP_AutoTimer_AutoStart</td>
  1464. </tr>
  1465. <tr>
  1466. <td class="indent1">
  1467. <class id="AutoTimer_Interval_text" style="color:black;">Round Interval</class>
  1468. </td>
  1469. <td>
  1470. <input required type="number" id="AutoTimer_Interval_value1" size="13" min="1" step="any"
  1471. oninput="(!validity.rangeUnderflow||(value=1));">Minutes
  1472. </td>
  1473. <td>$TOOLTIP_AutoTimer_Interval</td>
  1474. </tr>
  1475. <!------------- Data Logging ------------------>
  1476. <tr style="border-bottom: 2px solid lightgray;">
  1477. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Data Logging</h4></td>
  1478. </tr>
  1479. <tr>
  1480. <td class="indent1">
  1481. <class id="DataLogging_DataLogActive_text" style="color:black;">Data Logging</class>
  1482. </td>
  1483. <td>
  1484. <select id="DataLogging_DataLogActive_value1">
  1485. <option value="true" selected>true</option>
  1486. <option value="false" >false</option>
  1487. </select>
  1488. </td>
  1489. <td>$TOOLTIP_DataLogging_DataLogActive</td>
  1490. </tr>
  1491. <tr>
  1492. <td class="indent1">
  1493. <class id="DataLogging_DataFilesRetention_text" style="color:black;">Data Files Retention</class>
  1494. </td>
  1495. <td>
  1496. <input required type="number" id="DataLogging_DataFilesRetention_value1" size="13" min="0" step="1"
  1497. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  1498. </td>
  1499. <td>$TOOLTIP_DataLogging_DataFilesRetention</td>
  1500. </tr>
  1501. <!------------- Debug Logging ------------------>
  1502. <tr style="border-bottom: 2px solid lightgray;">
  1503. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>Debug</h4></td>
  1504. </tr>
  1505. <tr>
  1506. <td class="indent1">
  1507. <class id="Debug_LogLevel_text" style="color:black;">Logfile Log Level</class>
  1508. </td>
  1509. <td>
  1510. <select id="Debug_LogLevel_value1">
  1511. <option value="1" selected>ERROR</option> <!-- matches esp_log_level_t -->
  1512. <option value="2">WARNING</option>
  1513. <option value="3">INFO</option>
  1514. <option value="4">DEBUG</option>
  1515. </select>
  1516. </td>
  1517. <td>$TOOLTIP_Debug_LogLevel</td>
  1518. </tr>
  1519. <tr>
  1520. <td class="indent1">
  1521. <class id="Debug_LogfilesRetention_text" style="color:black;">Logfiles Retention</class>
  1522. </td>
  1523. <td>
  1524. <input required type="number" id="Debug_LogfilesRetention_value1" size="13" min="0" step="1"
  1525. oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.stepMismatch||(value=parseInt(this.value)));">Days
  1526. </td>
  1527. <td>$TOOLTIP_Debug_LogfilesRetention</td>
  1528. </tr>
  1529. <!------------- System ------------------>
  1530. <tr style="border-bottom: 2px solid lightgray;">
  1531. <td colspan="3" style="padding-left: 0px; padding-bottom: 3px;"><h4>System</h4></td>
  1532. </tr>
  1533. <tr>
  1534. <td class="indent1">
  1535. <input type="checkbox" id="System_TimeZone_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeZone")' unchecked >
  1536. <label for=System_TimeZone_enabled><class id="System_TimeZone_text" style="color:black;">Time Zone</class></label>
  1537. <p></p><p></p>
  1538. </td>
  1539. <td>
  1540. <input type="text" id="System_TimeZone_value1">
  1541. <p>Use <a href="timezones.html" target="_blank">timezones</a> to find your settings</p>
  1542. </td>
  1543. <td>$TOOLTIP_System_TimeZone</td>
  1544. </tr>
  1545. <tr class="expert" unused_id="ex16">
  1546. <td class="indent1">
  1547. <input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'InvertEnableItem("System", "TimeServer")' unchecked >
  1548. <label for=System_TimeServer_enabled><class id="System_TimeServer_text" style="color:black;">Time Server (NTP)</class></label>
  1549. </td>
  1550. <td>
  1551. <input type="text" id="System_TimeServer_value1">
  1552. </td>
  1553. <td>$TOOLTIP_System_TimeServer</td>
  1554. </tr>
  1555. <tr class="expert" unused_id="System_Hostname">
  1556. <td class="indent1">
  1557. <input type="checkbox" id="System_Hostname_enabled" value="1" onclick = 'InvertEnableItem("System", "Hostname")' unchecked >
  1558. <label for=System_Hostname_enabled><class id="System_Hostname_text" style="color:black;">Hostname</class></label>
  1559. </td>
  1560. <td>
  1561. <input type="text" id="System_Hostname_value1">
  1562. </td>
  1563. <td>$TOOLTIP_System_Hostname</td>
  1564. </tr>
  1565. <tr class="expert" unused_id="System_RSSIThreshold">
  1566. <td class="indent1">
  1567. <input type="checkbox" id="System_RSSIThreshold_enabled" value="1" onclick = 'InvertEnableItem("System", "RSSIThreshold")' unchecked >
  1568. <label for=System_RSSIThreshold_enabled><class id="System_RSSIThreshold_text" style="color:black;">RSSI Threshold</class></label>
  1569. </td>
  1570. <td>
  1571. <input required type="number" name="name" id="System_RSSIThreshold_value1" min="-100" max="0" step="1"
  1572. oninput="(!validity.rangeUnderflow||(value=-100)) && (!validity.rangeOverflow||(value=0)) &&
  1573. (!validity.stepMismatch||(value=parseInt(this.value)));">dBm
  1574. </td>
  1575. <td>$TOOLTIP_System_RSSIThreshold</td>
  1576. </tr>
  1577. <tr class="expert" unused_id="System_CPUFrequency">
  1578. <td class="indent1">
  1579. <input type="checkbox" id="System_CPUFrequency_enabled" value="1" onclick = 'InvertEnableItem("System", "CPUFrequency")' unchecked >
  1580. <label for=System_CPUFrequency_enabled><class id="System_CPUFrequency_text" style="color:black;">CPU Frequency</class></label>
  1581. </td>
  1582. <td>
  1583. <select id="System_CPUFrequency_value1">
  1584. <option value="160" selected>160 MHz</option>
  1585. <option value="240">240 MHz</option>
  1586. </select>
  1587. </td>
  1588. <td>$TOOLTIP_System_CPUFrequency</td>
  1589. </tr>
  1590. </table>
  1591. <table style="padding-top:10px">
  1592. <td>
  1593. <button class="button" onclick="saveTextAsFile()">Save Config</button>
  1594. </td>
  1595. <td>
  1596. <button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate changes</button>
  1597. </td>
  1598. </table>
  1599. </div>
  1600. <script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
  1601. <script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
  1602. <script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
  1603. <script type="text/javascript">
  1604. var canvas = document.getElementById('canvas'),
  1605. domainname = getDomainname();
  1606. param;
  1607. category;
  1608. NUNBERSAkt = -1;
  1609. NUMBERS;
  1610. function LoadConfigNeu() {
  1611. domainname = getDomainname();
  1612. if (!loadConfig(domainname)) {
  1613. firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
  1614. return;
  1615. }
  1616. ParseConfig();
  1617. param = getConfigParameters();
  1618. category = getConfigCategory();
  1619. InitIndivParameter();
  1620. UpdateInput();
  1621. var sel = document.getElementById("Numbers_value1");
  1622. UpdateInputIndividual(sel);
  1623. UpdateExpertModus();
  1624. document.getElementById("divall").style.display = '';
  1625. }
  1626. function InitIndivParameter()
  1627. {
  1628. NUMBERS = getNUMBERInfo();
  1629. var _index = document.getElementById("Numbers_value1");
  1630. while (_index.length)
  1631. _index.remove(0);
  1632. var _indexInflux = document.getElementById("NumbersInfluxDBv2_value1");
  1633. while (_indexInflux.length)
  1634. _indexInflux.remove(0);
  1635. var _indexInfluxv1 = document.getElementById("NumbersInfluxDB_value1");
  1636. while (_indexInflux.length)
  1637. _indexInfluxv1.remove(0);
  1638. for (var i = 0; i < NUMBERS.length; ++i){
  1639. var option = document.createElement("option");
  1640. option.text = NUMBERS[i]["name"];
  1641. option.value = i;
  1642. _index.add(option);
  1643. var optionInflux = document.createElement("option");
  1644. optionInflux.text = NUMBERS[i]["name"];
  1645. optionInflux.value = i;
  1646. _indexInflux.add(optionInflux);
  1647. var optionInfluxv1 = document.createElement("option");
  1648. optionInfluxv1.text = NUMBERS[i]["name"];
  1649. optionInfluxv1.value = i;
  1650. _indexInfluxv1.add(optionInfluxv1);
  1651. }
  1652. _index.selectedIndex = 0;
  1653. _indexInflux.selectedIndex = 0;
  1654. _indexInfluxv1.selectedIndex = 0;
  1655. }
  1656. function getParameterByName(name, url = window.location.href) {
  1657. name = name.replace(/[\[\]]/g, '\\$&');
  1658. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  1659. results = regex.exec(url);
  1660. if (!results) return null;
  1661. if (!results[2]) return '';
  1662. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  1663. }
  1664. function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1){
  1665. let anzpara;
  1666. try {
  1667. anzpara = _param[_cat][_name].anzParam;
  1668. }
  1669. catch (error) {
  1670. firework.launch("Parameter '" + _name + "' in category '" + _cat + "' is unknown!", 'danger', 30000);
  1671. return;
  1672. }
  1673. if (_number > -1) {
  1674. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1675. return;
  1676. if (_optional) {
  1677. document.getElementById(_cat+"_"+_name+"_enabled").checked = NUMBERS[_number][_cat][_name]["enabled"];
  1678. for (var j = 1; j <= anzpara; ++j) {
  1679. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !NUMBERS[_number][_cat][_name]["enabled"];
  1680. }
  1681. }
  1682. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  1683. setEnabled(_cat+"_"+_name, true);
  1684. for (var j = 1; j <= anzpara; ++j) {
  1685. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1686. if (element.tagName.toLowerCase() == "select") {
  1687. var textToFind = NUMBERS[_number][_cat][_name]["value"+j];
  1688. if (textToFind == undefined)
  1689. continue;
  1690. _isFound = false;
  1691. element.selectedIndex = -1;
  1692. for (var i = 0; i < element.options.length; i++) {
  1693. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1694. element.selectedIndex = i;
  1695. _isFound = true;
  1696. break;
  1697. }
  1698. }
  1699. if (!_isFound)
  1700. {
  1701. _zw_txt = "In the selected field the value '" + textToFind + "' in the parameter '";
  1702. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  1703. firework.launch(_zw_txt, 'warning', 10000);
  1704. }
  1705. }
  1706. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1707. element.checked = NUMBERS[_number][_cat][_name]["value"+j] == "true";
  1708. }
  1709. else {
  1710. element.value = NUMBERS[_number][_cat][_name]["value"+j];
  1711. }
  1712. }
  1713. }
  1714. else {
  1715. if (_optional) {
  1716. document.getElementById(_cat+"_"+_name+"_enabled").checked = _param[_cat][_name]["enabled"];
  1717. for (var j = 1; j <= anzpara; ++j) {
  1718. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_param[_cat][_name]["enabled"];
  1719. }
  1720. }
  1721. document.getElementById(_cat+"_"+_name+"_text").style.color = "black"
  1722. setEnabled(_cat+"_"+_name, true);
  1723. for (var j = 1; j <= anzpara; ++j) {
  1724. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1725. if (element.tagName.toLowerCase() == "select") {
  1726. var textToFind = _param[_cat][_name]["value"+j];
  1727. if (textToFind == undefined)
  1728. continue;
  1729. _isFound = false;
  1730. element.selectedIndex = -1;
  1731. for (var i = 0; i < element.options.length; i++) {
  1732. if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
  1733. element.selectedIndex = i;
  1734. _isFound = true;
  1735. break;
  1736. }
  1737. }
  1738. if (!_isFound)
  1739. {
  1740. _zw_txt = "In the selected field the value '" + textToFind + "' in the section '";
  1741. _zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
  1742. firework.launch(_zw_txt, 'warning', 10000);
  1743. }
  1744. }
  1745. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1746. element.checked = _param[_cat][_name]["value"+j] == "true";
  1747. }
  1748. else {
  1749. element.value = _param[_cat][_name]["value"+j];
  1750. }
  1751. }
  1752. }
  1753. ///////////////// am Ende, falls Kategorie als gesamtes nicht ausgewählt --> deaktivieren
  1754. if (_category[_cat]["enabled"] == false)
  1755. {
  1756. if (_optional) {
  1757. document.getElementById(_cat+"_"+_name+"_enabled").disabled = true;
  1758. for (var j = 1; j <= anzpara; ++j) {
  1759. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = true;
  1760. }
  1761. }
  1762. document.getElementById(_cat+"_"+_name+"_text").style="color: gray;"
  1763. setEnabled(_cat+"_"+_name, false);
  1764. }
  1765. EnDisableItem(_category[_cat]["enabled"], _param, _category, _cat, _name, _optional, _number);
  1766. }
  1767. function InvertEnableItem(_cat, _param)
  1768. {
  1769. _zw = _cat + "_" + _param + "_enabled";
  1770. _isOn = document.getElementById(_zw).checked;
  1771. _color = "rgb(122, 122, 122)";
  1772. if (_isOn) {
  1773. _color = "black";
  1774. }
  1775. _zw = _cat + "_" + _param + "_text";
  1776. document.getElementById(_zw).disabled = !_isOn;
  1777. document.getElementById(_zw).style.color = _color;
  1778. setEnabled(_cat + "_" + _param, _isOn);
  1779. for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
  1780. document.getElementById(_cat+"_"+_param+"_value"+j).disabled = !_isOn;
  1781. document.getElementById(_cat+"_"+_param+"_value"+j).style.color = _color;
  1782. }
  1783. }
  1784. function setEnabled(className, enabled) {
  1785. _color = "rgb(122, 122, 122)";
  1786. if (enabled) {
  1787. _color = "black";
  1788. }
  1789. let elements = document.getElementsByClassName(className);
  1790. for (i = 0; i < elements.length; i++) {
  1791. if (enabled) {
  1792. elements[i].classList.remove("disabled");
  1793. } else {
  1794. elements[i].classList.add("disabled");
  1795. }
  1796. let inputs = elements[i].getElementsByTagName("input");
  1797. for (j = 0; j < inputs.length; j++) {
  1798. if (inputs[j].id.endsWith("_enabled"))
  1799. continue;
  1800. inputs[j].style.color = _color;
  1801. if (enabled) {
  1802. inputs[j].removeAttribute("disabled");
  1803. } else {
  1804. inputs[j].setAttribute("disabled", "disabled");
  1805. }
  1806. }
  1807. }
  1808. }
  1809. function setVisible(className, visible) {
  1810. let elements = document.getElementsByClassName(className);
  1811. for (i = 0; i < elements.length; i++) {
  1812. if (visible) {
  1813. elements[i].classList.remove("hidden");
  1814. } else {
  1815. elements[i].classList.add("hidden");
  1816. }
  1817. }
  1818. }
  1819. function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1)
  1820. {
  1821. _status = _category[_cat]["enabled"];
  1822. _color = "rgb(122, 122, 122)";
  1823. if (_status) {
  1824. _color = "black";
  1825. }
  1826. if (_optional) {
  1827. document.getElementById(_cat+"_"+_name+"_enabled").disabled = !_status;
  1828. document.getElementById(_cat+"_"+_name+"_enabled").style.color = _color;
  1829. }
  1830. if (_number == -1){
  1831. if (!_param[_cat][_name]["enabled"]) {
  1832. _status = false;
  1833. _color = "rgb(122, 122, 122)";
  1834. }
  1835. }
  1836. else
  1837. if (!NUMBERS[_number][_cat][_name]["enabled"]) {
  1838. _status = false;
  1839. _color = "rgb(122, 122, 122)";
  1840. }
  1841. document.getElementById(_cat+"_"+_name+"_text").disabled = !_status;
  1842. document.getElementById(_cat+"_"+_name+"_text").style.color = _color;
  1843. setEnabled(_cat+"_"+_name, _status);
  1844. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1845. document.getElementById(_cat+"_"+_name+"_value"+j).disabled = !_status;
  1846. document.getElementById(_cat+"_"+_name+"_value"+j).style.color = _color;
  1847. }
  1848. }
  1849. function ReadParameter(_param, _cat, _name, _optional, _number = -1){
  1850. if (_number > -1) {
  1851. if (_cat == "Digits")
  1852. _cat = "digit";
  1853. if (_cat == "Analog")
  1854. _cat = "analog";
  1855. if ((NUMBERS[_number] == undefined) || (NUMBERS[_number][_cat] == undefined) || (NUMBERS[_number][_cat][_name] == undefined))
  1856. return;
  1857. if (_optional) {
  1858. NUMBERS[_number][_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1859. }
  1860. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1861. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1862. if (element.tagName.toLowerCase() == "select") {
  1863. NUMBERS[_number][_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1864. }
  1865. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1866. NUMBERS[_number][_cat][_name]["value"+j] = element.checked;
  1867. }
  1868. else {
  1869. if ((NUMBERS[_number][_cat][_name].checkRegExList != null) && (NUMBERS[_number][_cat][_name].checkRegExList[j-1] != null)) {
  1870. if (!element.value.match(NUMBERS[_cat][_name].checkRegExList[j-1])) {
  1871. element.classList.add("invalid-input");
  1872. } else {
  1873. element.classList.remove("invalid-input");
  1874. }
  1875. }
  1876. NUMBERS[_number][_cat][_name]["value"+j] = element.value;
  1877. }
  1878. }
  1879. }
  1880. else
  1881. {
  1882. if (_optional) {
  1883. _param[_cat][_name]["enabled"] = document.getElementById(_cat+"_"+_name+"_enabled").checked;
  1884. }
  1885. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  1886. let element = document.getElementById(_cat+"_"+_name+"_value"+j);
  1887. if (element.tagName.toLowerCase() == "select") {
  1888. _param[_cat][_name]["value"+j] = element.selectedIndex > -1 ? element.options[element.selectedIndex].value : "";
  1889. }
  1890. else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
  1891. _param[_cat][_name]["value"+j] = element.checked;
  1892. }
  1893. else {
  1894. if ((_param[_cat][_name].checkRegExList != null) && (_param[_cat][_name].checkRegExList[j-1] != null)) {
  1895. if (!element.value.match(_param[_cat][_name].checkRegExList[j-1])) {
  1896. element.classList.add("invalid-input");
  1897. } else {
  1898. element.classList.remove("invalid-input");
  1899. }
  1900. }
  1901. _param[_cat][_name]["value"+j] = element.value;
  1902. }
  1903. }
  1904. }
  1905. }
  1906. function UpdateInputIndividual(sel)
  1907. {
  1908. if (NUNBERSAkt != -1)
  1909. {
  1910. ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1911. ReadParameter(param, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1912. ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1913. ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1914. ReadParameter(param, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1915. ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1916. ReadParameter(param, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1917. ReadParameter(param, "InfluxDB", "Field", true, NUNBERSAkt);
  1918. ReadParameter(param, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1919. ReadParameter(param, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1920. ReadParameter(param, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1921. }
  1922. // var sel = document.getElementById("Numbers_value1");
  1923. NUNBERSAkt = sel.selectedIndex;
  1924. WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
  1925. WriteParameter(param, category, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
  1926. WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
  1927. WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
  1928. WriteParameter(param, category, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
  1929. WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
  1930. WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
  1931. WriteParameter(param, category, "InfluxDB", "Field", true, NUNBERSAkt);
  1932. WriteParameter(param, category, "InfluxDBv2", "Field", true, NUNBERSAkt);
  1933. WriteParameter(param, category, "InfluxDB", "Measurement", true, NUNBERSAkt);
  1934. WriteParameter(param, category, "InfluxDBv2", "Measurement", true, NUNBERSAkt);
  1935. }
  1936. function UpdateInput() {
  1937. document.getElementById("Category_Digits_enabled").checked = category["Digits"]["enabled"];
  1938. setVisible("DigitItem", category["Digits"]["enabled"]);
  1939. document.getElementById("Category_Analog_enabled").checked = category["Analog"]["enabled"];
  1940. setVisible("AnalogItem", category["Analog"]["enabled"]);
  1941. document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
  1942. setVisible("MQTTItem", category["MQTT"]["enabled"]);
  1943. document.getElementById("Category_GPIO_enabled").checked = category["GPIO"]["enabled"];
  1944. setVisible("GPIO_item", category["GPIO"]["enabled"]);
  1945. document.getElementById("Category_InfluxDB_enabled").checked = category["InfluxDB"]["enabled"];
  1946. setVisible("InfluxDBv1Item", category["InfluxDB"]["enabled"]);
  1947. document.getElementById("Category_InfluxDBv2_enabled").checked = category["InfluxDBv2"]["enabled"];
  1948. setVisible("InfluxDBv2Item", category["InfluxDBv2"]["enabled"]);
  1949. WriteParameter(param, category, "TakeImage", "RawImagesLocation", true);
  1950. WriteParameter(param, category, "TakeImage", "RawImagesRetention", true);
  1951. WriteParameter(param, category, "TakeImage", "Demo", false);
  1952. WriteParameter(param, category, "TakeImage", "WaitBeforeTakingPicture", false);
  1953. WriteParameter(param, category, "TakeImage", "ImageQuality", false);
  1954. WriteParameter(param, category, "TakeImage", "Brightness", false);
  1955. WriteParameter(param, category, "TakeImage", "Contrast", false);
  1956. WriteParameter(param, category, "TakeImage", "Saturation", false);
  1957. WriteParameter(param, category, "TakeImage", "Sharpness", false);
  1958. WriteParameter(param, category, "TakeImage", "LEDIntensity", false);
  1959. WriteParameter(param, category, "TakeImage", "ImageSize", false);
  1960. WriteParameter(param, category, "TakeImage", "Zoom", false);
  1961. WriteParameter(param, category, "TakeImage", "ZoomMode", false);
  1962. WriteParameter(param, category, "TakeImage", "ZoomOffsetX", false);
  1963. WriteParameter(param, category, "TakeImage", "ZoomOffsetY", false);
  1964. WriteParameter(param, category, "TakeImage", "Grayscale", false);
  1965. WriteParameter(param, category, "TakeImage", "Negative", false);
  1966. WriteParameter(param, category, "TakeImage", "Aec2", false);
  1967. WriteParameter(param, category, "TakeImage", "AutoExposureLevel", false);
  1968. WriteParameter(param, category, "TakeImage", "FixedExposure", false);
  1969. WriteParameter(param, category, "Alignment", "SearchFieldX", false);
  1970. WriteParameter(param, category, "Alignment", "SearchFieldY", false);
  1971. WriteParameter(param, category, "Alignment", "AlignmentAlgo", true);
  1972. WriteParameter(param, category, "Alignment", "FlipImageSize", false);
  1973. WriteParameter(param, category, "Alignment", "InitialMirror", false);
  1974. WriteParameter(param, category, "Digits", "CNNGoodThreshold", true);
  1975. WriteParameter(param, category, "Digits", "ROIImagesLocation", true);
  1976. WriteParameter(param, category, "Digits", "ROIImagesRetention", true);
  1977. WriteParameter(param, category, "Analog", "ROIImagesLocation", true);
  1978. WriteParameter(param, category, "Analog", "ROIImagesRetention", true);
  1979. WriteParameter(param, category, "PostProcessing", "PreValueUse", false);
  1980. WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
  1981. // WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true);
  1982. WriteParameter(param, category, "PostProcessing", "ErrorMessage", false);
  1983. WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  1984. WriteParameter(param, category, "MQTT", "Uri", true);
  1985. WriteParameter(param, category, "MQTT", "MainTopic", true);
  1986. WriteParameter(param, category, "MQTT", "ClientID", true);
  1987. WriteParameter(param, category, "MQTT", "user", true);
  1988. WriteParameter(param, category, "MQTT", "password", true);
  1989. WriteParameter(param, category, "MQTT", "RetainMessages", false);
  1990. WriteParameter(param, category, "MQTT", "HomeassistantDiscovery", false);
  1991. WriteParameter(param, category, "MQTT", "MeterType", true);
  1992. WriteParameter(param, category, "MQTT", "CACert", true);
  1993. WriteParameter(param, category, "MQTT", "ClientCert", true);
  1994. WriteParameter(param, category, "MQTT", "ClientKey", true);
  1995. WriteParameter(param, category, "InfluxDB", "Uri", true);
  1996. WriteParameter(param, category, "InfluxDB", "Database", true);
  1997. // WriteParameter(param, category, "InfluxDB", "Measurement", true);
  1998. WriteParameter(param, category, "InfluxDB", "user", true);
  1999. WriteParameter(param, category, "InfluxDB", "password", true);
  2000. // WriteParameter(param, category, "InfluxDB", "Field", true);
  2001. WriteParameter(param, category, "InfluxDBv2", "Uri", true);
  2002. WriteParameter(param, category, "InfluxDBv2", "Bucket", true);
  2003. // WriteParameter(param, category, "InfluxDBv2", "Measurement", true);
  2004. WriteParameter(param, category, "InfluxDBv2", "Org", true);
  2005. WriteParameter(param, category, "InfluxDBv2", "Token", true);
  2006. // WriteParameter(param, category, "InfluxDBv2", "Field", true);
  2007. WriteParameter(param, category, "GPIO", "IO0", true);
  2008. WriteParameter(param, category, "GPIO", "IO1", true);
  2009. WriteParameter(param, category, "GPIO", "IO3", true);
  2010. WriteParameter(param, category, "GPIO", "IO4", true);
  2011. WriteParameter(param, category, "GPIO", "IO12", true);
  2012. WriteParameter(param, category, "GPIO", "IO13", true);
  2013. WriteParameter(param, category, "GPIO", "LEDType", false);
  2014. WriteParameter(param, category, "GPIO", "LEDNumbers", false);
  2015. WriteParameter(param, category, "GPIO", "LEDColor", false);
  2016. WriteParameter(param, category, "AutoTimer", "AutoStart", false);
  2017. WriteParameter(param, category, "AutoTimer", "Interval", false);
  2018. WriteParameter(param, category, "DataLogging", "DataLogActive", false);
  2019. WriteParameter(param, category, "DataLogging", "DataFilesRetention", false);
  2020. WriteParameter(param, category, "Debug", "LogLevel", false);
  2021. WriteParameter(param, category, "Debug", "LogfilesRetention", false);
  2022. WriteParameter(param, category, "System", "TimeZone", true);
  2023. WriteParameter(param, category, "System", "Hostname", true);
  2024. WriteParameter(param, category, "System", "TimeServer", true);
  2025. WriteParameter(param, category, "System", "RSSIThreshold", true);
  2026. WriteParameter(param, category, "System", "CPUFrequency", true);
  2027. WriteModelFiles();
  2028. }
  2029. function WriteModelFiles()
  2030. {
  2031. list_tflite = getTFLITEList();
  2032. var _indexDig = document.getElementById("Digits_Model_value1");
  2033. var _indexAna = document.getElementById("Analog_Model_value1");
  2034. while (_indexDig.length)
  2035. _indexDig.remove(0);
  2036. while (_indexAna.length)
  2037. _indexAna.remove(0);
  2038. for (var i = 0; i < list_tflite.length; ++i){
  2039. var optionDig = document.createElement("option");
  2040. var optionAna = document.createElement("option");
  2041. var text = list_tflite[i].replace("/config/", "");
  2042. if (list_tflite[i].includes("/dig")) { // Its a digital file, only show in the digital list box
  2043. optionDig.text = text;
  2044. optionDig.value = list_tflite[i];
  2045. _indexDig.add(optionDig);
  2046. }
  2047. else if (list_tflite[i].includes("/ana")) { // Its a digital file, only show in the analog list box
  2048. optionAna.text = text;
  2049. optionAna.value = list_tflite[i];
  2050. _indexAna.add(optionAna);
  2051. }
  2052. else { // all other files, show in both list boxes
  2053. optionDig.text = text;
  2054. optionDig.value = list_tflite[i];
  2055. _indexDig.add(optionDig);
  2056. optionAna.text = text;
  2057. optionAna.value = list_tflite[i];
  2058. _indexAna.add(optionAna);
  2059. }
  2060. }
  2061. WriteParameter(param, category, "Analog", "Model", false);
  2062. WriteParameter(param, category, "Digits", "Model", false);
  2063. }
  2064. function ReadParameterAll()
  2065. {
  2066. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  2067. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  2068. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  2069. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  2070. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  2071. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  2072. ReadParameter(param, "TakeImage", "RawImagesLocation", true);
  2073. ReadParameter(param, "TakeImage", "RawImagesRetention", true);
  2074. ReadParameter(param, "TakeImage", "Demo", false);
  2075. ReadParameter(param, "TakeImage", "WaitBeforeTakingPicture", false);
  2076. ReadParameter(param, "TakeImage", "ImageQuality", false);
  2077. ReadParameter(param, "TakeImage", "Brightness", false);
  2078. ReadParameter(param, "TakeImage", "Contrast", false);
  2079. ReadParameter(param, "TakeImage", "Saturation", false);
  2080. ReadParameter(param, "TakeImage", "Sharpness", false);
  2081. ReadParameter(param, "TakeImage", "LEDIntensity", false);
  2082. ReadParameter(param, "TakeImage", "ImageSize", false);
  2083. ReadParameter(param, "TakeImage", "Zoom", false);
  2084. ReadParameter(param, "TakeImage", "ZoomMode", false);
  2085. ReadParameter(param, "TakeImage", "ZoomOffsetX", false);
  2086. ReadParameter(param, "TakeImage", "ZoomOffsetY", false);
  2087. ReadParameter(param, "TakeImage", "Grayscale", false);
  2088. ReadParameter(param, "TakeImage", "Negative", false);
  2089. ReadParameter(param, "TakeImage", "Aec2", false);
  2090. ReadParameter(param, "TakeImage", "AutoExposureLevel", false);
  2091. ReadParameter(param, "TakeImage", "FixedExposure", false);
  2092. ReadParameter(param, "Alignment", "SearchFieldX", false);
  2093. ReadParameter(param, "Alignment", "SearchFieldY", false);
  2094. ReadParameter(param, "Alignment", "AlignmentAlgo", true);
  2095. ReadParameter(param, "Alignment", "FlipImageSize", false);
  2096. ReadParameter(param, "Alignment", "InitialMirror", false);
  2097. ReadParameter(param, "Digits", "Model", false);
  2098. ReadParameter(param, "Digits", "CNNGoodThreshold", true);
  2099. ReadParameter(param, "Digits", "ROIImagesLocation", true);
  2100. ReadParameter(param, "Digits", "ROIImagesRetention", true);
  2101. ReadParameter(param, "Analog", "Model", false);
  2102. ReadParameter(param, "Analog", "ROIImagesLocation", true);
  2103. ReadParameter(param, "Analog", "ROIImagesRetention", true);
  2104. ReadParameter(param, "PostProcessing", "PreValueUse", false);
  2105. ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
  2106. ReadParameter(param, "PostProcessing", "ErrorMessage", false);
  2107. ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", false);
  2108. ReadParameter(param, "MQTT", "Uri", true);
  2109. ReadParameter(param, "MQTT", "MainTopic", true);
  2110. ReadParameter(param, "MQTT", "ClientID", true);
  2111. ReadParameter(param, "MQTT", "user", true);
  2112. ReadParameter(param, "MQTT", "password", true);
  2113. ReadParameter(param, "MQTT", "RetainMessages", false);
  2114. ReadParameter(param, "MQTT", "HomeassistantDiscovery", false);
  2115. ReadParameter(param, "MQTT", "MeterType", true);
  2116. ReadParameter(param, "MQTT", "CACert", true);
  2117. ReadParameter(param, "MQTT", "ClientCert", true);
  2118. ReadParameter(param, "MQTT", "ClientKey", true);
  2119. ReadParameter(param, "InfluxDB", "Uri", true);
  2120. ReadParameter(param, "InfluxDB", "Database", true);
  2121. ReadParameter(param, "InfluxDB", "Measurement", true);
  2122. ReadParameter(param, "InfluxDB", "user", true);
  2123. ReadParameter(param, "InfluxDB", "password", true);
  2124. ReadParameter(param, "InfluxDBv2", "Uri", true);
  2125. ReadParameter(param, "InfluxDBv2", "Bucket", true);
  2126. ReadParameter(param, "InfluxDBv2", "Measurement", true);
  2127. ReadParameter(param, "InfluxDBv2", "Org", true);
  2128. ReadParameter(param, "InfluxDBv2", "Token", true);
  2129. // ReadParameter(param, "InfluxDB", "Field", true);
  2130. ReadParameter(param, "GPIO", "IO0", true);
  2131. ReadParameter(param, "GPIO", "IO1", true);
  2132. ReadParameter(param, "GPIO", "IO3", true);
  2133. ReadParameter(param, "GPIO", "IO4", true);
  2134. ReadParameter(param, "GPIO", "IO12", true);
  2135. ReadParameter(param, "GPIO", "IO13", true);
  2136. ReadParameter(param, "GPIO", "LEDType", false);
  2137. ReadParameter(param, "GPIO", "LEDNumbers", false);
  2138. ReadParameter(param, "GPIO", "LEDColor", false);
  2139. // Folgende Zeilen sind für Abwärtskompatibität < v9.0.0 notwendig (manchmal parameter auskommentiert)
  2140. param["GPIO"]["LEDType"]["enabled"] = true;
  2141. param["GPIO"]["LEDNumbers"]["enabled"] = true;
  2142. param["GPIO"]["LEDColor"]["enabled"] = true;
  2143. param["GPIO"]["LEDType"]["found"] = true;
  2144. param["GPIO"]["LEDNumbers"]["found"] = true;
  2145. param["GPIO"]["LEDColor"]["found"] = true;
  2146. ReadParameter(param, "AutoTimer", "AutoStart", false);
  2147. ReadParameter(param, "AutoTimer", "Interval", false);
  2148. ReadParameter(param, "DataLogging", "DataLogActive", false);
  2149. ReadParameter(param, "DataLogging", "DataFilesRetention", false);
  2150. ReadParameter(param, "Debug", "LogLevel", false);
  2151. ReadParameter(param, "Debug", "LogfilesRetention", false);
  2152. ReadParameter(param, "System", "TimeZone", true);
  2153. ReadParameter(param, "System", "Hostname", true);
  2154. ReadParameter(param, "System", "TimeServer", true);
  2155. ReadParameter(param, "System", "RSSIThreshold", true);
  2156. ReadParameter(param, "System", "CPUFrequency", true);
  2157. var sel = document.getElementById("Numbers_value1");
  2158. UpdateInputIndividual(sel);
  2159. // FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
  2160. }
  2161. function FormatDecimalValue(_param, _cat, _name) {
  2162. for (var j = 1; j <= _param[_cat][_name]["anzParam"]; ++j) {
  2163. var _val = _param[_cat][_name]["value"+j];
  2164. _val = _val.replace(",", ".");
  2165. _param[_cat][_name]["value"+j] = _val;
  2166. }
  2167. }
  2168. function UpdateAfterCategoryCheck() {
  2169. ReadParameterAll();
  2170. category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
  2171. category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
  2172. category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
  2173. category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
  2174. category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
  2175. category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
  2176. UpdateInput();
  2177. var sel = document.getElementById("Numbers_value1");
  2178. UpdateInputIndividual(sel);
  2179. }
  2180. function UpdateExpertModus()
  2181. {
  2182. // var _style = 'display:none;';
  2183. var _style_pur = 'none';
  2184. var _hidden = true;
  2185. if (document.getElementById("ExpertModus_enabled").checked) {
  2186. // _style = '';
  2187. _style_pur = '';
  2188. _hidden = false;
  2189. document.getElementById("Edit_Config_Direct").style.display = "";
  2190. firework.launch("Expert view activated. Please use carefully", 'warning', 5000);
  2191. }
  2192. else
  2193. {
  2194. document.getElementById("Edit_Config_Direct").style.display = "none";
  2195. }
  2196. const expert = document.querySelectorAll(".expert");
  2197. for (var i = 0; i < expert.length; i++) {
  2198. expert[i].style.display = _style_pur;
  2199. // document.getElementById(expert[i].id).style = _style;
  2200. }
  2201. // 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
  2202. Array.from(document.querySelector("#GPIO_IO4_value1").options).forEach(function(option_element) {
  2203. if (option_element.value != "built-in-led")
  2204. option_element.hidden = _hidden;
  2205. });
  2206. Array.from(document.querySelector("#GPIO_IO12_value1").options).forEach(function(option_element) {
  2207. if (option_element.value != "external-flash-ws281x")
  2208. option_element.hidden = _hidden;
  2209. });
  2210. }
  2211. function saveTextAsFile()
  2212. {
  2213. ReadParameterAll();
  2214. if (document.getElementsByClassName("invalid-input").length > 0) {
  2215. firework.launch("Settings cannot be saved. Please check your entries!", 'danger', 30000);
  2216. return;
  2217. }
  2218. if (confirm("Are you sure you want to save the configuration?")) {
  2219. ReadParameterAll();
  2220. WriteConfigININew();
  2221. SaveConfigToServer(domainname);
  2222. firework.launch('Configuration saved. It will get applied after the next reboot!', 'success', 5000);
  2223. }
  2224. }
  2225. function doReboot() {
  2226. if (confirm("Are you sure you want to reboot?")) {
  2227. var stringota = getDomainname() + "/reboot";
  2228. window.location = stringota;
  2229. window.location.href = stringota;
  2230. window.location.assign(stringota);
  2231. window.location.replace(stringota);
  2232. }
  2233. }
  2234. function editConfigDirect() {
  2235. if (confirm("Proceed to switch the view? Unsaved changes get lost")) {
  2236. var stringota = getDomainname() + "/edit_config.html?v=$COMMIT_HASH";
  2237. window.location = stringota;
  2238. window.location.href = stringota;
  2239. window.location.assign(stringota);
  2240. window.location.replace(stringota);
  2241. }
  2242. }
  2243. function numberChanged()
  2244. {
  2245. var sel = document.getElementById("Numbers_value1");
  2246. _neu = sel.selectedIndex;
  2247. UpdateInputIndividual(sel);
  2248. var _selInflux = document.getElementById("NumbersInfluxDBv2_value1");
  2249. if (_selInflux.selectedIndex != _neu)
  2250. _selInflux.selectedIndex = _neu
  2251. }
  2252. function numberInfluxDBv2Changed()
  2253. {
  2254. var sel = document.getElementById("NumbersInfluxDBv2_value1");
  2255. _neu = sel.selectedIndex;
  2256. UpdateInputIndividual(sel);
  2257. var _sel2 = document.getElementById("Numbers_value1");
  2258. if (_sel2.selectedIndex != _neu)
  2259. _sel2.selectedIndex = _neu
  2260. var _sel3 = document.getElementById("NumbersInfluxDB_value1");
  2261. if (_sel3.selectedIndex != _neu)
  2262. _sel3.selectedIndex = _neu
  2263. }
  2264. function numberInfluxDBChanged()
  2265. {
  2266. var sel = document.getElementById("NumbersInfluxDB_value1");
  2267. _neu = sel.selectedIndex;
  2268. UpdateInputIndividual(sel);
  2269. var _sel2 = document.getElementById("Numbers_value1");
  2270. if (_sel2.selectedIndex != _neu)
  2271. _sel2.selectedIndex = _neu
  2272. var _sel3 = document.getElementById("NumbersInfluxDBv2_value1");
  2273. if (_sel3.selectedIndex != _neu)
  2274. _sel3.selectedIndex = _neu
  2275. }
  2276. /* hash #description open the details part of the page */
  2277. function openDescription()
  2278. {
  2279. if(window.location.hash) {
  2280. var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
  2281. if(hash == 'description')
  2282. document.getElementById("desc_details").open = true;
  2283. document.getElementById("reboot").style.display = "none";
  2284. document.getElementById("reboot_text").style.display = "none";
  2285. }
  2286. }
  2287. openDescription();
  2288. LoadConfigNeu();
  2289. </script>
  2290. </body>
  2291. </html>