zwave-js-ui 11.3.1 → 11.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AssociationGroups-D684vz5W.js → AssociationGroups-cNTv7Po9.js} +2 -2
- package/dist/assets/{BaseFab-DvAFTdHk.js → BaseFab-hl8TUbDO.js} +1 -1
- package/dist/assets/{BgRssiChart-CNz5rGN8.js → BgRssiChart-e0XlYnEP.js} +1 -1
- package/dist/assets/{BlinkIcon-CYQiS83z.js → BlinkIcon-CKFM34rW.js} +1 -1
- package/dist/assets/{CCTreeView-B_d2A6sl.js → CCTreeView-DQ26Iuzn.js} +1 -1
- package/dist/assets/{ColorScheme-D-e-UbOA.js → ColorScheme-DOGrCuTX.js} +1 -1
- package/dist/assets/{ColumnFilter-BS3mabrJ.js → ColumnFilter-CKp2Wuhr.js} +2 -2
- package/dist/assets/{ColumnFilterBoolean-BNJB4gXG.js → ColumnFilterBoolean-j6VT2FOw.js} +1 -1
- package/dist/assets/{ColumnFilterDate-ZccJ9MNf.js → ColumnFilterDate-Dvst9Ng2.js} +1 -1
- package/dist/assets/{ColumnFilterNumber-BiSoTBSH.js → ColumnFilterNumber-CIIsgS8X.js} +1 -1
- package/dist/assets/{ColumnFilterString-CgvxeigY.js → ColumnFilterString-3TU7LmPf.js} +1 -1
- package/dist/assets/{ControlPanel-lpKf8YN_.js → ControlPanel-C0yx6XpP.js} +2 -2
- package/dist/assets/{ControllerChart-IKnm2-T-.js → ControllerChart-DuDYmCka.js} +2 -2
- package/dist/assets/{Debug-DXbUDkAD.js → Debug-CV3nWsx9.js} +1 -1
- package/dist/assets/{DialogAdvanced-J4Mb8K7I.js → DialogAdvanced-cq0JskWZ.js} +1 -1
- package/dist/assets/{DialogAssociation-D27ilTuC.js → DialogAssociation-CbZd5dft.js} +1 -1
- package/dist/assets/{DialogGatewayValue-Da3m8X91.js → DialogGatewayValue-CVhIpyzj.js} +2 -2
- package/dist/assets/DialogGatewayValue-gz-QRudE.css +1 -0
- package/dist/assets/{DialogHealthCheck-CBvkgXxv.js → DialogHealthCheck-1YmXDVC0.js} +2 -2
- package/dist/assets/{DialogHealthCheckInfo-DJR8swNy.js → DialogHealthCheckInfo-ykn7ku2v.js} +1 -1
- package/dist/assets/{DialogLinkReliability-We__AGf7.js → DialogLinkReliability-Owfufayk.js} +1 -1
- package/dist/assets/{DialogSceneValue-DKxoBuhw.js → DialogSceneValue-Df3v3Arx.js} +2 -2
- package/dist/assets/{ErrorPage-DHRcSmgr.js → ErrorPage-DkGO7hi6.js} +1 -1
- package/dist/assets/{ExpandedNode-29EEx5pU.js → ExpandedNode-B65m85OW.js} +2 -2
- package/dist/assets/{FirmwareUpdates-WHTJCFMh.js → FirmwareUpdates-C1a-5Cf3.js} +1 -1
- package/dist/assets/{FrameDetails-DVESXlyl.js → FrameDetails-npBO1EB5.js} +2 -2
- package/dist/assets/{HomeAssistant-CoynUYAE.js → HomeAssistant-DglleJ3W.js} +1 -1
- package/dist/assets/{InvertedCheckbox-Cey0uLcd.js → InvertedCheckbox-DCqiTP9q.js} +1 -1
- package/dist/assets/{ListInput-BRmjz3FF.js → ListInput-vuaVDc_c.js} +1 -1
- package/dist/assets/{Login-DwQqQn_G.js → Login-BHoQcnPs.js} +2 -2
- package/dist/assets/{Mesh-BkEyEK8d.js → Mesh-B-yxjW_t.js} +2 -2
- package/dist/assets/{MissingKeysAlert-CQYLk299.js → MissingKeysAlert-DlvQRatk.js} +1 -1
- package/dist/assets/{Multipane-D2HRiq2n.js → Multipane-8lPJy_oO.js} +1 -1
- package/dist/assets/{MultipaneResizer-6a4cc23f.js → MultipaneResizer-lqb6RzjP.js} +1 -1
- package/dist/assets/NodeDetails-C8tlES6Z.js +2 -0
- package/dist/assets/{NodePanel-Pp-p_Dgf.js → NodePanel-CKG4pORb.js} +2 -2
- package/dist/assets/{NodeScheduler-CHIY_Np5.js → NodeScheduler-C_Ucgioi.js} +1 -1
- package/dist/assets/{OTAUpdates-BICpoTPu.js → OTAUpdates-b2U6EMHr.js} +2 -2
- package/dist/assets/{OTWUpdates-D2urWEfN.js → OTWUpdates-nQhYBBvv.js} +2 -2
- package/dist/assets/{QrReader-B1_FV1Rw.js → QrReader-DVMpEXn_.js} +1 -1
- package/dist/assets/{ReinterviewBadge-Ngc3Xkqk.js → ReinterviewBadge-BtPftpwk.js} +1 -1
- package/dist/assets/{RichValue-Fi3Ru7Jq.js → RichValue-BIY5PZuN.js} +1 -1
- package/dist/assets/{Scenes-Dl6-hZKq.js → Scenes-C30ZlG7j.js} +2 -2
- package/dist/assets/{Settings-CpWZwSlO.js → Settings-CUboLnjn.js} +2 -2
- package/dist/assets/{SmartStart-DObbfWZa.js → SmartStart-01MUZy3N.js} +2 -2
- package/dist/assets/{SmartView-C_M8SQZ2.js → SmartView-BRxcT0zx.js} +2 -2
- package/dist/assets/{StatisticsArrows-D5XT-p1f.js → StatisticsArrows-BRdj590i.js} +2 -2
- package/dist/assets/{StatisticsCard-CZBj8nYC.js → StatisticsCard-D-bRw2of.js} +1 -1
- package/dist/assets/{Store-B7m8ysUY.js → Store-DbRIDVe8.js} +2 -2
- package/dist/assets/UserCodeTable-M17AED-g.js +2 -0
- package/dist/assets/{VDataTable-D1N2yFq4.js → VDataTable-DPUxFhCV.js} +1 -1
- package/dist/assets/{VExpansionPanels-RDZeUBjf.js → VExpansionPanels-D7bTGW5j.js} +1 -1
- package/dist/assets/{VFab-XrGSyA4w.js → VFab-DNY2WOe0.js} +1 -1
- package/dist/assets/{VNumberInput-cZs2owQA.js → VNumberInput-D96JqIdc.js} +1 -1
- package/dist/assets/{VTable-Fmymzr4r.js → VTable-CD5OKisM.js} +1 -1
- package/dist/assets/{VTextarea-D1Mn4njN.js → VTextarea-DX3kqrVu.js} +1 -1
- package/dist/assets/{VTreeview-BbBid6Pa.js → VTreeview-D-WXOI-Z.js} +1 -1
- package/dist/assets/{ValueId-BPvwkDOS.css → ValueId-C_5EDl2E.css} +1 -1
- package/dist/assets/{ValueId-BIJglJfp.js → ValueId-Ci9qUjhE.js} +1 -1
- package/dist/assets/{Zniffer-QhehO4gN.js → Zniffer-4sbBDjbb.js} +2 -2
- package/dist/assets/{ZwaveGraph-LhEyUhhf.js → ZwaveGraph-CdCI2GuR.js} +1 -1
- package/dist/assets/{file-input-CScZbmRs.js → file-input-DNJcxKHx.js} +1 -1
- package/dist/assets/{index-D9weSlD7.js → index-C1kUNIYT.js} +2 -2
- package/dist/assets/{index-DBKhA5F-.css → index-CfCXnUjB.css} +1 -1
- package/dist/assets/index-DQ2UbtiL.js +93 -0
- package/dist/assets/{prismeditor.esm-CeJa7BC7.js → prismeditor.esm-CtM6qV2s.js} +1 -1
- package/dist/assets/{sort-Bz9B_F8L.js → sort-BdHVKc5S.js} +1 -1
- package/dist/assets/{vuedraggable.umd-gFDdQjSA.js → vuedraggable.umd-c7x9W4uF.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/sw.js +1 -1
- package/package.json +17 -14
- package/server/app.js +21 -23
- package/server/bin/www.js +17 -7
- package/server/lib/BackupManager.js +17 -7
- package/server/lib/Constants.js +8 -8
- package/server/lib/CustomPlugin.js +1 -2
- package/server/lib/Gateway.js +19 -12
- package/server/lib/MqttClient.js +0 -1
- package/server/lib/ZnifferManager.js +6 -2
- package/server/lib/ZwaveClient.js +56 -40
- package/server/lib/jsonStore.js +17 -7
- package/server/lib/logger.js +26 -16
- package/server/lib/shared.js +10 -0
- package/server/lib/utils.js +43 -36
- package/dist/assets/DialogGatewayValue-CXWOoXeb.css +0 -1
- package/dist/assets/NodeDetails-DHtK-kji.js +0 -2
- package/dist/assets/UserCodeTable-Xqr7GQJS.js +0 -2
- package/dist/assets/index-C01ZJNxl.js +0 -93
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DialogHealthCheckInfo-
|
|
2
|
-
import{_,d as b,z as w,I as x,m as V,u as C,av as T,a as S,du as R,dv as L,G as M,r as H,o as a,l as N,w as l,b as i,N as j,ar as B,U as g,t as n,O as F,V as I,e as v,f as p,P as E,W as D,h as k,k as u,i as y,n as c,q as d,bC as U,c as h,at as O,ai as q,a7 as A}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DialogHealthCheckInfo-ykn7ku2v.js","./index-DQ2UbtiL.js","./index-CfCXnUjB.css","./VDataTable-DPUxFhCV.js","./sort-BdHVKc5S.js","./VTable-CD5OKisM.js","./VTable-CQyv0wyO.css","./VDataTable-DNwLG7iF.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_,d as b,z as w,I as x,m as V,u as C,av as T,a as S,du as R,dv as L,G as M,r as H,o as a,l as N,w as l,b as i,N as j,ar as B,U as g,t as n,O as F,V as I,e as v,f as p,P as E,W as D,h as k,k as u,i as y,n as c,q as d,bC as U,c as h,at as O,ai as q,a7 as A}from"./index-DQ2UbtiL.js";import{V as z}from"./VDataTable-DPUxFhCV.js";import"./sort-BdHVKc5S.js";import"./VTable-CD5OKisM.js";const W={components:{DialogHealthCheckInfo:b(()=>w(()=>import("./DialogHealthCheckInfo-ykn7ku2v.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url))},props:{modelValue:Boolean,node:Object,socket:Object},mixins:[x],watch:{modelValue(t){this.init(t)}},computed:{...V(C,["nodes"]),_value:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},isLR(){var t;return((t=this.activeNode)==null?void 0:t.protocol)===T.ZWaveLongRange},filteredNodes(){return this.isLR?this.nodes.filter(t=>t.isControllerNode):this.activeNode?this.nodes.filter(t=>t.id!==this.activeNode.id):this.nodes},headers(){return this.mode==="Lifeline"?[{title:"Max latency",key:"latency"},{title:"Failed pings",key:"failedPingsNode"},{title:"Route Changes",key:"routeChanges"},{title:"SNR margin",key:"snrMargin"},{title:"Min power level w/o errors",key:"minPowerlevel"},{title:"Rating",key:"rating"}]:[{title:"Failed pings",key:"failedPingsToSource"},{title:"Min Power Level w/o errors",key:"minPowerlevelSource"},{title:"Rating",key:"rating"}]}},data(){return{loading:!1,infoMenu:!1,results:[],rounds:5,targetNode:null,activeNode:null,resultsTargetNode:null,averages:null,mode:"Lifeline"}},methods:{...S(C,["showSnackbar"]),exportResults(){this.app.exportConfiguration(this.results,`healthCheck_${this.activeNode.id}-${this.resultsTargetNode}`,"json")},getNeighborsColor(t){return t>2?"text-success":t===0?"text-error":"text-warning"},getLatencyColor(t){return t<=100?"text-success":t<=500?"text-warning":"text-error"},getSnrMarginColor(t){return t>=17?"text-success":"text-error"},getFailedPingsColor(t){return t===0?"text-success":t===1?"text-warning":"text-error"},getRatingColor(t){return t===void 0?"primary":t>=6?"success":t>=4?"warning":"error"},getPowerLevel(t){return R(L,t)},getPowerLevelColor(t){return t===void 0?"":t>=6?"text-success":t>=3?"text-warning":"text-error"},init(t){t?(this.rounds=5,this.activeNode=M(this.node),this.targetNode=this.filteredNodes.find(r=>r.isControllerNode),this.selectedNode=this.filteredNodes[0]?this.filteredNodes[0].id:null,this.bindEvent("healthCheckProgress",this.onHealthCheckProgress.bind(this))):t===!1&&(this.unbindEvents(),this.results=[],this.loading=!1,this.targetNode=null,this.averages=null)},onHealthCheckProgress(t){const{request:r,round:m,totalRounds:f,lastResult:s}=t;if(r.nodeId===this.activeNode.id){const o=this.results[this.results.length-1];s&&Object.assign(o,s),m<f&&this.results.push({round:m,rating:void 0})}},async stopHealth(){(await this.app.apiRequest("abortHealthCheck",[this.activeNode.id])).success&&this.showSnackbar("Health check aborted","success")},async checkHealth(){this.loading=!0,this.results=[];const t=[this.activeNode.id],r=typeof this.targetNode=="object"?this.targetNode:this.nodes.find(f=>f.id==this.targetNode);if(!r)return;r.isControllerNode?this.mode="Lifeline":(this.mode="Route",t.push(r.id)),t.push(this.rounds||1),this.results.push({round:1,rating:void 0});const m=await this.app.apiRequest(`check${this.mode}Health`,t,{infoSnack:!0,errorSnack:!1});if(this.loading=!1,m.success){const f=m.result;this.results=f.results,delete f.results,this.averages=f,this.averages.numNeighbors=Math.max(...this.results.map(s=>s.numNeighbors)),this.resultsTargetNode=f.targetNodeId}else this.results.pop(),this.showSnackbar(m.message||"Health check failed","error")}},beforeUnmount(){this.init(!1)}},G={class:"text-h5"},Z={key:0},J={key:0},K={key:0,class:"mb-0"},Q={key:1,class:"mb-0"},X={key:0,class:"mb-0"},Y={key:1,class:"mb-0"},$={key:0,class:"mb-0"},ee={key:1,class:"mb-0"};function te(t,r,m,f,s,o){const P=H("dialog-health-check-info");return a(),N(A,{modelValue:o._value,"onUpdate:modelValue":r[6]||(r[6]=e=>o._value=e),"max-width":"800px",persistent:""},{default:l(()=>[i(j,{loading:s.loading},{default:l(()=>[i(B,null,{default:l(()=>[g("span",G,"Node "+n(s.activeNode?s.activeNode.id:"")+" - Health check",1)]),_:1}),i(F,null,{default:l(()=>[i(I,null,{default:l(()=>[i(v,{class:"ma-3",justify:"start"},{default:l(()=>[i(p,null,{default:l(()=>[i(E,{style:{"max-width":"300px"},label:"Target Node",modelValue:s.targetNode,"onUpdate:modelValue":r[0]||(r[0]=e=>s.targetNode=e),items:o.filteredNodes,"return-object":"",hint:"Target node to run the route health check on","persistent-hint":"","item-title":"_name","item-value":"id"},null,8,["modelValue","items"])]),_:1}),i(p,null,{default:l(()=>[i(D,{modelValue:s.rounds,"onUpdate:modelValue":r[1]||(r[1]=e=>s.rounds=e),modelModifiers:{number:!0},hint:"Number of rounds to run the health check",label:"Rounds",min:"1",max:"10",type:"number","persistent-hint":""},null,8,["modelValue"])]),_:1})]),_:1}),i(v,{class:"mb-2",justify:"space-around"},{default:l(()=>[i(k,{variant:"flat",color:s.loading?"error":"success",disabled:!s.targetNode,onClick:r[2]||(r[2]=e=>s.loading?o.stopHealth():o.checkHealth())},{default:l(()=>[u(n(s.loading?"Stop":"Check"),1)]),_:1},8,["color","disabled"]),i(k,{variant:"flat",color:"primary",onClick:r[3]||(r[3]=e=>s.infoMenu=!0)},{default:l(()=>[r[8]||(r[8]=u(" Info ")),i(y,null,{default:l(()=>r[7]||(r[7]=[u("help")])),_:1,__:[7]})]),_:1,__:[8]})]),_:1}),s.averages&&!s.loading?(a(),N(v,{key:0,class:"mb-2",justify:"space-around"},{default:l(()=>[s.averages.numNeighbors&&!o.isLR?(a(),N(p,{key:0,class:"text-center"},{default:l(()=>[r[9]||(r[9]=g("p",{class:"mb-1 text-subtitle-1 font-weight-bold"}," No. Neighbors ",-1)),g("span",{class:c([o.getNeighborsColor(s.averages.numNeighbors),"text-h3"])},n(s.averages.numNeighbors),3)]),_:1,__:[9]})):d("",!0),s.averages.rating?(a(),N(p,{key:1,class:"text-center"},{default:l(()=>[r[10]||(r[10]=g("p",{class:"mb-1 text-subtitle-1 font-weight-bold"}," Rating ",-1)),g("span",{class:c(["text-"+o.getRatingColor(s.averages.rating),"text-h3"])},n(s.averages.rating)+"/10",3)]),_:1,__:[10]})):d("",!0)]),_:1})):d("",!0),s.results.length>0?(a(),N(z,{key:1,headers:o.headers,items:s.results,"item-key":"id",class:"elevation-1","hide-default-footer":"","items-per-page":-1},{top:l(()=>[i(v,{class:"py-2",align:"center",justify:"center"},{default:l(()=>[!s.loading&&s.resultsTargetNode>=0?(a(),N(k,{key:0,variant:"flat",color:"primary",onClick:o.exportResults,class:"mb-2"},{default:l(()=>[r[12]||(r[12]=u("Export ")),i(y,null,{default:l(()=>r[11]||(r[11]=[u("file_download")])),_:1,__:[11]})]),_:1,__:[12]},8,["onClick"])):d("",!0)]),_:1})]),"item.rating":l(({item:e})=>[i(U,{rounded:"",style:{"min-width":"80px"},height:"25","model-value":e.rating*10,color:o.getRatingColor(e.rating),indeterminate:e.rating===void 0},{default:l(()=>[e.rating!==void 0?(a(),h("strong",Z,n(e.rating)+"/10",1)):d("",!0)]),_:2},1032,["model-value","color","indeterminate"])]),"item.latency":l(({item:e})=>[e.latency!==void 0?(a(),h("strong",{key:0,class:c(o.getLatencyColor(e.latency))},n(e.latency)+" ms",3)):d("",!0)]),"item.snrMargin":l(({item:e})=>[e.snrMargin!==void 0?(a(),h("strong",{key:0,class:c(o.getSnrMarginColor(e.snrMargin))},n(e.snrMargin)+" dBm",3)):d("",!0)]),"item.routeChanges":l(({item:e})=>[e.routeChanges!==void 0?(a(),h("strong",J,n(e.routeChanges),1)):d("",!0)]),"item.minPowerlevel":l(({item:e})=>[e.minPowerlevel!==void 0?(a(),h("strong",{key:0,class:c(o.getPowerLevelColor(e.minPowerlevel))},n(o.getPowerLevel(e.minPowerlevel)),3)):d("",!0)]),"item.failedPingsNode":l(({item:e})=>[e.failedPingsNode!==void 0?(a(),h("p",K,[u(n(s.resultsTargetNode)+" → "+n(s.activeNode.id)+": ",1),g("strong",{class:c(o.getFailedPingsColor(e.failedPingsNode))},n(e.failedPingsNode)+"/10",3)])):d("",!0),e.failedPingsController!==void 0?(a(),h("p",Q,[u(n(s.resultsTargetNode)+" ← "+n(s.activeNode.id)+": ",1),g("strong",{class:c(o.getFailedPingsColor(e.failedPingsController))},n(e.failedPingsController)+"/10",3)])):d("",!0)]),"item.failedPingsToSource":l(({item:e})=>[e.failedPingsToSource!==void 0?(a(),h("p",X,[u(n(s.resultsTargetNode)+" → "+n(s.activeNode.id)+": ",1),g("strong",{class:c(o.getFailedPingsColor(e.failedPingsToSource))},n(e.failedPingsToSource)+"/10",3)])):d("",!0),e.failedPingsToTarget!==void 0?(a(),h("p",Y,[u(n(s.resultsTargetNode)+" ← "+n(s.activeNode.id)+": ",1),g("strong",{class:c(o.getFailedPingsColor(e.failedPingsToTarget))},n(e.failedPingsToTarget)+"/10",3)])):d("",!0)]),"item.minPowerlevelSource":l(({item:e})=>[e.minPowerlevelSource!==void 0?(a(),h("p",$,[u(" Node "+n(s.activeNode.id)+": ",1),g("strong",{class:c(o.getPowerLevelColor(e.minPowerlevelSource))},n(o.getPowerLevel(e.minPowerlevelSource)),3)])):d("",!0),e.minPowerlevelTarget!==void 0?(a(),h("p",ee,[u(" Node "+n(s.resultsTargetNode)+": ",1),g("strong",{class:c(o.getPowerLevelColor(e.minPowerlevelTarget))},n(o.getPowerLevel(e.minPowerlevelTarget)),3)])):d("",!0)]),_:2},1032,["headers","items"])):d("",!0)]),_:1})]),_:1}),i(O,null,{default:l(()=>[i(q),i(k,{color:"blue-darken-1",variant:"text",onClick:r[4]||(r[4]=e=>t.$emit("close"))},{default:l(()=>r[13]||(r[13]=[u("Close")])),_:1,__:[13]})]),_:1})]),_:1},8,["loading"]),s.infoMenu?(a(),N(P,{key:0,modelValue:s.infoMenu,"onUpdate:modelValue":r[5]||(r[5]=e=>s.infoMenu=e)},null,8,["modelValue"])):d("",!0)]),_:1},8,["modelValue"])}const ne=_(W,[["render",te]]);export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as m,o as g,l as p,w as l,b as t,N as y,e as b,ai as w,h as _,i as v,k as a,ae as h,Z as n,aD as i,dy as s,U as f,ag as V,a7 as P}from"./index-
|
|
1
|
+
import{_ as m,o as g,l as p,w as l,b as t,N as y,e as b,ai as w,h as _,i as v,k as a,ae as h,Z as n,aD as i,dy as s,U as f,ag as V,a7 as P}from"./index-DQ2UbtiL.js";import{V as k}from"./VDataTable-DPUxFhCV.js";import"./sort-BdHVKc5S.js";import"./VTable-CD5OKisM.js";const B={props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{headers:[{title:"Rating",key:"rating",sortable:!1},{title:"Failed pings",key:"failedPings",sortable:!1},{title:"Max latency (*)",key:"latency",sortable:!1},{title:"No. of Neighbors",key:"neighbors",sortable:!1},{title:"SNR margin (*)",key:"snrMargin",sortable:!1},{title:"Min power level w/o errors",key:"minPowerlevel",sortable:!1}],values:[{rating:10,failedPings:0,latency:"≤ 50 ms",neighbors:"> 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:9,failedPings:0,latency:"≤ 100 ms",neighbors:"> 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:8,failedPings:0,latency:"≤ 100 ms",neighbors:"≤ 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:7,failedPings:0,latency:"≤ 100ms",neighbors:"> 2"},{rating:6,failedPings:0,latency:"≤ 100ms",neighbors:"≤ 2"},{rating:5,failedPings:0,latency:"≤ 250ms"},{rating:4,failedPings:0,latency:"≤ 500 ms"},{rating:3,failedPings:1,latency:"≤ 1000ms"},{rating:2,failedPings:"≤ 2",latency:"> 1000ms"},{rating:1,failedPings:"≤ 9"},{rating:0,failedPings:10}]}},computed:{_value:{get(){return this.modelValue},set(d){this.$emit("update:modelValue",d)}}}};function C(d,e,L,N,u,o){return g(),p(P,{fullscreen:"",onKeydown:e[1]||(e[1]=V(r=>o._value=!1,["esc"])),modelValue:o._value,"onUpdate:modelValue":e[2]||(e[2]=r=>o._value=r)},{default:l(()=>[t(y,{class:"fill"},{default:l(()=>[t(b,null,{default:l(()=>[t(w),t(_,{class:"ma-3",icon:"",onClick:e[0]||(e[0]=r=>o._value=!1)},{default:l(()=>[t(v,null,{default:l(()=>e[3]||(e[3]=[a("close")])),_:1,__:[3]})]),_:1})]),_:1}),t(h,{density:"compact"},{default:l(()=>[t(n,null,{default:l(()=>[t(i,null,{default:l(()=>e[4]||(e[4]=[a("Route changes")])),_:1,__:[4]}),t(s,null,{default:l(()=>e[5]||(e[5]=[a("How many times at least one new route was needed. Lower = better, ideally 0. Only available if the controller supports TX reports")])),_:1,__:[5]})]),_:1}),t(n,null,{default:l(()=>[t(i,null,{default:l(()=>e[6]||(e[6]=[a("Latency")])),_:1,__:[6]}),t(s,null,{default:l(()=>e[7]||(e[7]=[a("The maximum time it took to send a ping to the node. Lower = better, ideally 10 ms. Will use the time in TX reports if available, otherwise fall back to measuring the round trip time.")])),_:1,__:[7]})]),_:1}),t(n,null,{default:l(()=>[t(i,null,{default:l(()=>e[8]||(e[8]=[a("No. Neighbors")])),_:1,__:[8]}),t(s,null,{default:l(()=>e[9]||(e[9]=[a("How many routing neighbors this node has. Higher = better, ideally > 2")])),_:1,__:[9]})]),_:1}),t(n,null,{default:l(()=>[t(i,null,{default:l(()=>e[10]||(e[10]=[a("Failed Pings node")])),_:1,__:[10]}),t(s,null,{default:l(()=>e[11]||(e[11]=[a("How many pings were not ACKed by the node. Lower = better, ideally 0.")])),_:1,__:[11]})]),_:1}),t(n,null,{default:l(()=>[t(i,null,{default:l(()=>e[12]||(e[12]=[a("Min Power Level")])),_:1,__:[12]}),t(s,null,{default:l(()=>e[13]||(e[13]=[a("The minimum powerlevel where all pings from the (source) node were ACKed by the target node / controller. Lower = better, ideally -6dBm or less. Only available if the (source) node supports Powerlevel CC")])),_:1,__:[13]})]),_:1}),t(n,null,{default:l(()=>[t(i,null,{default:l(()=>e[14]||(e[14]=[a("Failed pings Controller")])),_:1,__:[14]}),t(s,null,{default:l(()=>e[15]||(e[15]=[a("If no powerlevel was found where the controller ACKed all pings from the node, this contains the number of pings that weren't ACKed. Lower = better, ideally 0.")])),_:1,__:[15]})]),_:1}),t(n,null,{default:l(()=>[t(i,null,{default:l(()=>e[16]||(e[16]=[a("SNR Margin")])),_:1,__:[16]}),t(s,null,{default:l(()=>e[17]||(e[17]=[a("An estimation of the Signal-to-Noise Ratio Margin in dBm. Only available if the controller supports TX reports.")])),_:1,__:[17]})]),_:1}),t(n,null,{default:l(()=>[t(i,null,{default:l(()=>e[18]||(e[18]=[a("Rating")])),_:1,__:[18]})]),_:1})]),_:1}),t(k,{headers:u.headers,items:u.values,class:"elevation-1","mobile-breakpoint":0,"hide-default-footer":"","disable-pagination":""},{footer:l(()=>e[19]||(e[19]=[f("p",{class:"mb-0 text-caption"},[f("code",null,"*"),a(" Due to missing insight into re-routing attempts between two nodes, some of the values for the for the route check rating don't exist here and are only present in lifeline checks (when target node is the controller). Furthermore, it is not guaranteed that a route between two nodes and lifeline with the same health rating have the same quality. ")],-1)])),_:1},8,["headers","items"])]),_:1})]),_:1},8,["modelValue"])}const I=m(B,[["render",C]]);export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as R,I as S,a as x,u as _,G as C,o as u,l as f,w as i,b as e,N as I,ar as L,U as l,t as n,O as N,V as w,e as c,f as p,Q as M,dw as B,dx as g,h as b,k as r,M as j,bC as T,q as d,ae as U,Z as h,aD as V,dy as k,c as v,at as D,ai as E,a7 as O}from"./index-
|
|
1
|
+
import{_ as R,I as S,a as x,u as _,G as C,o as u,l as f,w as i,b as e,N as I,ar as L,U as l,t as n,O as N,V as w,e as c,f as p,Q as M,dw as B,dx as g,h as b,k as r,M as j,bC as T,q as d,ae as U,Z as h,aD as V,dy as k,c as v,at as D,ai as E,a7 as O}from"./index-DQ2UbtiL.js";import{V as y}from"./VNumberInput-D96JqIdc.js";import{V as A}from"./VTable-CD5OKisM.js";const F={components:{},props:{modelValue:Boolean,node:Object,socket:Object},mixins:[S],watch:{modelValue(a){this.init(a)}},computed:{_value:{get(){return this.modelValue},set(a){this.$emit("update:modelValue",a)}}},data(){return{running:!1,activeNode:null,isRunning:!1,mode:0,modes:[{title:"Basic Set On/Off",value:0}],infinite:!1,interval:250,iterations:100,statistics:null,progress:0}},methods:{...x(_,["showSnackbar"]),exportResults(){this.app.exportConfiguration(this.results,`linkReliability_${this.activeNode.id}-${this.statistics}`,"json")},init(a){const s=this.running;this.mode=0,this.statistics=null,this.infinite=!1,this.running=!1,this.interval=250,this.iterations=25,this.progress=0,a?(this.activeNode=C(this.node),this.bindEvent("linkReliability",this.onProgress.bind(this))):a===!1&&(this.unbindEvents(),s&&this.abortLinkReliabilityCheck())},onProgress(a){this.statistics=a.args[0],this.progress=Math.round(this.statistics.rounds/this.iterations*100)},async abortLinkReliabilityCheck(){const a=await this.app.apiRequest("abortLinkReliabilityCheck",[this.activeNode.id]);this.running=!1,a.success&&this.showSnackbar("Link statistics aborted","success")},async checkLinkReliability(){this.running=!0;const a=await this.app.apiRequest("checkLinkReliability",[this.activeNode.id,{mode:this.mode,interval:this.interval,rounds:this.infinite?void 0:this.iterations}],{infoSnack:!0,errorSnack:!1});this.running=!1,this.progress=0,a.success?this.statistics=a.result:this.showSnackbar(a.message||"Health check failed","error")}},beforeUnmount(){this.init(!1)}},q={class:"text-h5"},P={key:0},G={key:0};function X(a,s,H,K,t,m){return u(),f(O,{modelValue:m._value,"onUpdate:modelValue":s[5]||(s[5]=o=>m._value=o),"max-width":"800px",persistent:""},{default:i(()=>[e(I,null,{default:i(()=>[e(L,null,{default:i(()=>[l("span",q,"Node "+n(t.activeNode?t.activeNode.id:"")+" - Link Statistics",1)]),_:1}),e(N,null,{default:i(()=>[e(w,null,{default:i(()=>[e(c,{class:"ma-3",justify:"start"},{default:i(()=>[e(p,{cols:"12",align:"center"},{default:i(()=>[e(M,{label:"Mode",style:{"max-width":"325px"},modelValue:t.mode,"onUpdate:modelValue":s[0]||(s[0]=o=>t.mode=o),items:t.modes,"persistent-hint":""},null,8,["modelValue","items"])]),_:1}),e(p,{cols:"12",sm:"6"},{default:i(()=>[e(B,{class:"justify-center",modelValue:t.infinite,"onUpdate:modelValue":s[2]||(s[2]=o=>t.infinite=o),inline:""},{default:i(()=>[e(g,{label:"Infinite",value:!0}),e(g,{label:"XX",value:!1},{label:i(()=>[e(y,{disabled:t.infinite,label:"Iterations",modelValue:t.iterations,"onUpdate:modelValue":s[1]||(s[1]=o=>t.iterations=o),modelModifiers:{number:!0},type:"number",min:1,max:1e4,"persistent-hint":""},null,8,["disabled","modelValue"])]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(p,{cols:"12",sm:"6",class:"mt-4"},{default:i(()=>[e(y,{label:"Interval",modelValue:t.interval,"onUpdate:modelValue":s[3]||(s[3]=o=>t.interval=o),modelModifiers:{number:!0},suffix:"ms",type:"number",min:1,max:1e4,"persistent-hint":""},null,8,["modelValue"])]),_:1})]),_:1}),e(c,{class:"mb-4",justify:"space-around"},{default:i(()=>[e(b,{variant:"flat",color:"success",onClick:m.checkLinkReliability,disabled:t.running,loading:t.running},{default:i(()=>s[6]||(s[6]=[r("Run")])),_:1,__:[6]},8,["onClick","disabled","loading"]),e(b,{variant:"flat",color:"error",onClick:m.abortLinkReliabilityCheck,disabled:!t.running},{default:i(()=>s[7]||(s[7]=[r("Stop")])),_:1,__:[7]},8,["onClick","disabled"])]),_:1}),e(j),t.statistics?(u(),f(c,{key:0,class:"ma-3",justify:"center",align:"center"},{default:i(()=>[t.running?(u(),f(T,{key:0,indeterminate:this.infinite,"model-value":this.infinite?null:this.progress,color:"success"},null,8,["indeterminate","model-value"])):d("",!0),e(U,{class:"mr-2",density:"compact"},{default:i(()=>{var o;return[e(h,null,{default:i(()=>[e(V,{class:"text-info"},{default:i(()=>s[8]||(s[8]=[r("Commands Sent")])),_:1,__:[8]}),e(k,null,{default:i(()=>[r(n(t.statistics.commandsSent),1)]),_:1})]),_:1}),e(h,null,{default:i(()=>[e(V,{class:"text-error"},{default:i(()=>s[9]||(s[9]=[r("Failed Commands")])),_:1,__:[9]}),e(k,null,{default:i(()=>[r(n(t.statistics.commandErrors)+" ("+n((t.statistics.commandErrors/t.statistics.rounds*100).toFixed(1))+" %)",1)]),_:1})]),_:1}),((o=t.statistics)==null?void 0:o.missingResponses)!=null?(u(),f(h,{key:0},{default:i(()=>[e(V,{class:"text-error"},{default:i(()=>s[10]||(s[10]=[r("Missing Responses")])),_:1,__:[10]}),e(k,null,{default:i(()=>[r(n(t.statistics.missingResponses)+" ("+n((t.statistics.missingResponses/t.statistics.commandsSent*100).toFixed(1))+" %)",1)]),_:1})]),_:1})):d("",!0)]}),_:1}),e(A,null,{default:i(()=>{var o;return[s[15]||(s[15]=l("thead",null,[l("tr",null,[l("th",{class:"text-left"}),l("th",{class:"text-left"},"Min"),l("th",{class:"text-left"},"Max"),l("th",{class:"text-left"},"Avg")])],-1)),t.statistics.latency?(u(),v("tbody",P,[l("tr",null,[s[11]||(s[11]=l("td",null,"Latency [ms]",-1)),l("td",null,n(t.statistics.latency.min),1),l("td",null,n(t.statistics.latency.max),1),l("td",null,n(Math.round(t.statistics.latency.average)),1)]),l("tr",null,[s[12]||(s[12]=l("td",null,"Round-Trip Time [ms]",-1)),l("td",null,n(t.statistics.rtt.min),1),l("td",null,n(t.statistics.rtt.max),1),l("td",null,n(Math.round(t.statistics.rtt.average)),1)]),l("tr",null,[s[13]||(s[13]=l("td",null,"ACK RSSI [dBm]",-1)),l("td",null,n(t.statistics.ackRSSI.min),1),l("td",null,n(t.statistics.ackRSSI.max),1),l("td",null,n(Math.round(t.statistics.ackRSSI.average)),1)]),Number.isFinite((o=t.statistics.responseRSSI)==null?void 0:o.average)?(u(),v("tr",G,[s[14]||(s[14]=l("td",null,"Response RSSI [dBm]",-1)),l("td",null,n(t.statistics.responseRSSI.min),1),l("td",null,n(t.statistics.responseRSSI.max),1),l("td",null,n(Math.round(t.statistics.responseRSSI.average)),1)])):d("",!0)])):d("",!0)]}),_:1})]),_:1})):d("",!0)]),_:1})]),_:1}),e(D,null,{default:i(()=>[e(E),e(b,{color:"blue-darken-1",variant:"text",onClick:s[4]||(s[4]=o=>a.$emit("close"))},{default:i(()=>s[16]||(s[16]=[r("Close")])),_:1,__:[16]})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const J=R(F,[["render",X]]);export{J as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ValueId-
|
|
2
|
-
import{_ as p,d as w,z as C,r as x,o as n,l as r,w as t,b as a,N as k,ar as y,U as S,O as T,V as q,a0 as c,e as g,f as o,Q as m,k as V,t as D,Z as N,$ as U,q as f,W as A,at as B,ai as I,h as v,a7 as E}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ValueId-Ci9qUjhE.js","./index-DQ2UbtiL.js","./index-CfCXnUjB.css","./colors-DoZdCu1D.js","./ValueId-C_5EDl2E.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as p,d as w,z as C,r as x,o as n,l as r,w as t,b as a,N as k,ar as y,U as S,O as T,V as q,a0 as c,e as g,f as o,Q as m,k as V,t as D,Z as N,$ as U,q as f,W as A,at as B,ai as I,h as v,a7 as E}from"./index-DQ2UbtiL.js";const O={components:{ValueID:w(()=>C(()=>import("./ValueId-Ci9qUjhE.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url))},props:{modelValue:Boolean,title:String,editedValue:Object,nodes:Array},watch:{modelValue(d){this.$refs.form&&this.$refs.form.resetValidation()}},computed:{_value:{get(){return this.modelValue},set(d){this.$emit("update:modelValue",d)}}},data(){return{valid:!0,required:d=>!!d||"This field is required",positive:d=>d>=0||"Value must be positive",validValue:[d=>!!d||"This field is required",d=>d&&d.writeable||"This value is Read Only"]}},methods:{async handleSave(){(await this.$refs.form.validate()).valid&&this.$emit("save")}}};function j(d,l,i,P,u,s){const _=x("ValueID");return n(),r(E,{modelValue:s._value,"onUpdate:modelValue":l[6]||(l[6]=e=>s._value=e),"max-width":"500px",persistent:""},{default:t(()=>[a(k,null,{default:t(()=>[a(y,null,{default:t(()=>l[7]||(l[7]=[S("span",{class:"text-h5"},"Add association",-1)])),_:1,__:[7]}),a(T,null,{default:t(()=>[a(q,{"grid-list-md":""},{default:t(()=>[a(c,{modelValue:u.valid,"onUpdate:modelValue":l[4]||(l[4]=e=>u.valid=e),ref:"form","validate-on":"lazy"},{default:t(()=>[a(g,null,{default:t(()=>[a(o,{cols:"12"},{default:t(()=>[a(m,{modelValue:i.editedValue.node,"onUpdate:modelValue":l[0]||(l[0]=e=>i.editedValue.node=e),label:"Node",required:"","return-object":"","item-title":"_name",rules:[u.required],"item-value":"id",items:i.nodes},null,8,["modelValue","rules","items"])]),_:1}),i.editedValue.node?(n(),r(o,{key:0,cols:"12"},{default:t(()=>[a(m,{modelValue:i.editedValue.value,"onUpdate:modelValue":l[1]||(l[1]=e=>i.editedValue.value=e),label:"Value",required:"","return-object":"","item-title":"label",rules:u.validValue,"item-value":"id",items:i.editedValue.node.values},{selection:t(({item:e})=>[V(D((e.raw.label||e.raw.id)+(e.raw.endpoint>1?" - Endpoint "+e.raw.endpoint:"")),1)]),item:t(({item:e,props:b})=>[a(N,U(b,{title:(e.raw.label||e.raw.id)+(e.raw.endpoint>0?" - Endpoint "+e.raw.endpoint:""),subtitle:e.raw.description||"No description available"}),null,16,["title","subtitle"])]),_:1},8,["modelValue","rules","items"])]),_:1})):f("",!0),i.editedValue.value?(n(),r(o,{key:1,cols:"12"},{default:t(()=>[a(_,{disable_send:"",modelValue:i.editedValue.value,"onUpdate:modelValue":l[2]||(l[2]=e=>i.editedValue.value=e)},null,8,["modelValue"])]),_:1})):f("",!0),a(o,{cols:"12"},{default:t(()=>[a(A,{modelValue:i.editedValue.timeout,"onUpdate:modelValue":l[3]||(l[3]=e=>i.editedValue.timeout=e),modelModifiers:{number:!0},label:"Timeout",hint:"Seconds to wait before send this value. Set to 0 to send immediately",suffix:"s",rules:[u.positive],required:"",type:"number"},null,8,["modelValue","rules"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(B,null,{default:t(()=>[a(I),a(v,{color:"blue-darken-1",variant:"text",onClick:l[5]||(l[5]=e=>d.$emit("close"))},{default:t(()=>l[8]||(l[8]=[V("Cancel")])),_:1,__:[8]}),a(v,{color:"blue-darken-1",variant:"text",onClick:s.handleSave},{default:t(()=>l[9]||(l[9]=[V("Save")])),_:1,__:[9]},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const z=p(O,[["render",j]]);export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as g,l as y,w as e,V as i,o as V,b as t,f as l,N as m,ah as c,h as d,i as f,k as s,as as h,t as u,ai as b,O as q,e as p,U as o,au as x}from"./index-
|
|
1
|
+
import{_ as g,l as y,w as e,V as i,o as V,b as t,f as l,N as m,ah as c,h as d,i as f,k as s,as as h,t as u,ai as b,O as q,e as p,U as o,au as x}from"./index-DQ2UbtiL.js";const k={data(){return{query:{code:404,message:"Not Found",path:"/error"}}},methods:{},beforeMount(){this.query=Object.keys(this.$route.query).length>0?this.$route.query:this.query}},w={class:"text-h5 font-weight-bold"};function C(n,r,$,N,a,T){return V(),y(i,{fluid:"","fill-height":""},{default:e(()=>[t(p,{align:"center",justify:"center"},{default:e(()=>[t(l,{cols:"12",sm:"8",md:"4"},{default:e(()=>[t(m,{class:"elevation-12"},{default:e(()=>[t(c,{color:"primary"},{default:e(()=>[t(d,{icon:"",onClick:r[0]||(r[0]=_=>n.$router.go(-2))},{default:e(()=>[t(f,null,{default:e(()=>r[2]||(r[2]=[s("arrow_back")])),_:1,__:[2]})]),_:1}),t(h,null,{default:e(()=>[s(u(a.query.code+" - "+a.query.message),1)]),_:1}),t(b),t(d,{icon:"",onClick:r[1]||(r[1]=_=>n.$router.push("/"))},{default:e(()=>[t(f,null,{default:e(()=>r[3]||(r[3]=[s("home")])),_:1,__:[3]})]),_:1})]),_:1}),t(q,null,{default:e(()=>[t(i,{"fill-height":"","text-xs-center":""},{default:e(()=>[t(p,{justify:"center"},{default:e(()=>[t(l,null,{default:e(()=>[o("strong",w,[r[4]||(r[4]=s(" Error while requesting resource at ")),o("code",null,u(a.query.path),1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(x,{absolute:"",class:"pa-3"},{default:e(()=>[t(l,{class:"d-flex pa-0 justify-center py-3 text-caption"},{default:e(()=>[s(" ©"+u(new Date().getFullYear())+" — ",1),r[5]||(r[5]=o("strong",{class:"ml-1 mr-2"},[o("a",{target:"_blank",href:"https://github.com/sponsors/robertsLando"},"Daniel Lando")],-1)),r[6]||(r[6]=s(" All Rights Reserved. "))]),_:1,__:[5,6]})]),_:1})]),_:1})}const v=g(k,[["render",C]]);export{v as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AssociationGroups-
|
|
2
|
-
import{_ as K,I as Z,d as h,z as v,m as G,u as A,av as U,a as Q,j as X,aQ as Y,a8 as $,r as y,o as i,c as m,b as n,w as r,f as x,U as c,t as g,v as C,l,i as ee,k as w,ao as T,q as d,n as I,g as te,h as k,p as oe,e as D,an as V,am as S,X as se,y as ne,M as ae,aW as p,aX as ie,aY as f,V as L,W as re,a_ as le,a1 as de,a9 as ue}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AssociationGroups-cNTv7Po9.js","./index-DQ2UbtiL.js","./index-CfCXnUjB.css","./VDataTable-DPUxFhCV.js","./sort-BdHVKc5S.js","./VTable-CD5OKisM.js","./VTable-CQyv0wyO.css","./VDataTable-DNwLG7iF.css","./HomeAssistant-DglleJ3W.js","./VTextarea-DX3kqrVu.js","./VTextarea-BTR7f0gW.css","./NodeDetails-C8tlES6Z.js","./VNumberInput-D96JqIdc.js","./VNumberInput-BAUyh3O1.css","./VExpansionPanels-D7bTGW5j.js","./VExpansionPanels-RsCANmDP.css","./NodeDetails-BVv96O7e.css","./DialogAdvanced-cq0JskWZ.js","./DialogAdvanced-BEfdsoBJ.css","./StatisticsCard-D-bRw2of.js","./OTAUpdates-b2U6EMHr.js","./OTWUpdates-nQhYBBvv.js","./UserCodeTable-M17AED-g.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as K,I as Z,d as h,z as v,m as G,u as A,av as U,a as Q,j as X,aQ as Y,a8 as $,r as y,o as i,c as m,b as n,w as r,f as x,U as c,t as g,v as C,l,i as ee,k as w,ao as T,q as d,n as I,g as te,h as k,p as oe,e as D,an as V,am as S,X as se,y as ne,M as ae,aW as p,aX as ie,aY as f,V as L,W as re,a_ as le,a1 as de,a9 as ue}from"./index-DQ2UbtiL.js";import{V as ce}from"./VTextarea-DX3kqrVu.js";var b;(function(e){e[e.NoDeviceSupport=0]="NoDeviceSupport",e[e.Working=1]="Working",e[e.Fail=2]="Fail",e[e.EndpointNotFound=3]="EndpointNotFound",e[e.NotImplemented=4]="NotImplemented",e[e.InvalidValue=5]="InvalidValue",e[e.SuccessUnsupervised=254]="SuccessUnsupervised",e[e.Success=255]="Success"})(b||(b={}));function me(e){return e.status===b.Success||e.status===b.Working}function pe(e){return e.status===b.SuccessUnsupervised||me(e)}const N={props:{actions:Array,headers:{type:Array,default:()=>[]},node:Object,socket:Object},mixins:[Z],components:{AssociationGroups:h(()=>v(()=>import("./AssociationGroups-cNTv7Po9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),HomeAssistant:h(()=>v(()=>import("./HomeAssistant-DglleJ3W.js"),__vite__mapDeps([8,1,2,3,4,5,6,7,9,10]),import.meta.url)),NodeDetails:h(()=>v(()=>import("./NodeDetails-C8tlES6Z.js"),__vite__mapDeps([11,1,2,12,13,14,15,16]),import.meta.url)),DialogAdvanced:h(()=>v(()=>import("./DialogAdvanced-cq0JskWZ.js"),__vite__mapDeps([17,1,2,18]),import.meta.url)),StatisticsCard:h(()=>v(()=>import("./StatisticsCard-D-bRw2of.js"),__vite__mapDeps([19,1,2]),import.meta.url)),OTAUpdates:h(()=>v(()=>import("./OTAUpdates-b2U6EMHr.js"),__vite__mapDeps([20,1,2]),import.meta.url)),OTWUpdates:h(()=>v(()=>import("./OTWUpdates-nQhYBBvv.js"),__vite__mapDeps([21,1,2]),import.meta.url)),UserCodeTable:h(()=>v(()=>import("./UserCodeTable-M17AED-g.js"),__vite__mapDeps([22,1,2,3,4,5,6,7]),import.meta.url))},computed:{...G(A,["gateway","mqtt"]),isMobile(){return this.$vuetify.display.xs},isLongRange(){return this.node?this.node.protocol===U.ZWaveLongRange:!1},nodeMetadata(){var e;return(e=this.node.deviceConfig)==null?void 0:e.metadata},nodeComments(){var t;const e=((t=this.nodeMetadata)==null?void 0:t.comments)??[];return Array.isArray(e)?e:[e]},metaKeys(){const e=["manual","inclusion","exclusion","reset","wakeup"];return(this.nodeMetadata?Object.keys(this.nodeMetadata):[]).filter(o=>e.includes(o))},nodeJson(){return JSON.stringify(this.node,null,2)},showHass(){return!this.mqtt.disabled&&this.gateway.hassDiscovery&&this.node.hassDevices&&Object.keys(this.node.hassDevices).length>0},statisticsOpeningIndicator(){return this.showStatistics?"arrow_drop_up":"arrow_drop_down"},statsBorderColor(){return this.showStatistics?"border-primary":""},filteredNodeEvents(){return this.node.eventsQueue.filter(e=>!this.searchEvents||JSON.stringify(e).toLowerCase().includes(this.searchEvents.toLowerCase())).sort((e,t)=>(e=new Date(e.time),t=new Date(t.time),this.inverseSort?t-e:e-t))},advancedActions(){const e=this.node.isControllerNode?[]:[{text:"Firmware update",options:[{name:"Begin",action:"updateFirmware"},{name:"Abort",action:"abortFirmwareUpdate"}],icon:"update",color:"error",desc:"Start/Stop a firmware update"},{text:"Refresh Values",options:[{name:"Refresh",action:"refreshValues",args:{confirm:"Are you sure you want to refresh values of this node? This action increases network traffic"}}],icon:"cached",desc:"Update all CC values and metadata. Use only when many values seems stale"},{text:"Re-interview Node",options:[{name:"Interview",action:"refreshInfo"}],icon:"history",desc:"Clear all info about this node and make a new full interview. Use when the node has wrong or missing capabilities"},{text:"Failed Nodes",options:[{name:"Remove",action:"removeFailedNode"},{name:"Replace",action:"replaceFailedNode"}],color:"error",icon:"dangerous",desc:"Manage nodes that are dead and/or marked as failed with the controller"}];this.node.protocol!==U.ZWaveLongRange&&e.splice(1,0,{text:"Rebuild Routes",options:[{name:"Rebuild",action:"rebuildNodeRoutes",args:{confirm:"Rebuilding node routes causes a lot of traffic, can take minutes up to hours and you can expect degraded performance while it is going on"}}],icon:"healing",color:"warning",desc:"Discover and assign new routes from node to the controller and other nodes."});const t=this.node.isControllerNode?[]:[{name:"Clear",action:"removeAllAssociations",color:"error",args:{confirm:"This action will remove all associations of this node. This will also clear lifeline association with controller node, the node won't report state changes until that is set up again"}}],o=[];return this.node.supportsTime&&o.push({text:"Set Date and Time",options:[{name:"Sync",action:"syncNodeDateAndTime"}],icon:"schedule",desc:"Set date and time of this node to current time"}),[{text:"Export json",options:[{name:"UI",action:"exportNode"},{name:"Driver",action:"dumpNode"}],icon:"get_app",desc:"Export this node in a json file"},{text:"Clear Retained",options:[{name:"Clear",action:"removeNodeRetained",args:{mqtt:!0,confirm:"Are you sure you want to remove all retained messages?"}}],icon:"clear",desc:"All retained messages of this node will be removed from broker"},{text:"Update topics",options:[{name:"Update",action:"updateNodeTopics",args:{mqtt:!0,confirm:"Are you sure you want to update all topics?"}}],icon:"update",desc:"Update all node topics. Useful when name/location has changed"},...e,{text:"Associations",options:[...t,{name:"Remove",action:"removeNodeFromAllAssociations",args:{confirm:"All direct associations to this node will be removed. Battery-powered nodes need to be woken up to edit their associations."}}],icon:"link_off",color:"error",desc:"Clear all node associations / Remove node from all associations"},...o]}},watch:{"node.eventsQueue":{handler(){this.scrollBottom()},deep:1},inverseSort(){this.savePreferences()},autoScroll(){this.savePreferences()}},data(){return{currentTab:0,autoScroll:!0,inverseSort:!0,searchEvents:"",advancedShowDialog:!1,showStatistics:!1}},mounted(){const e=A().getPreference("eventsList",{inverseSort:!0,autoScroll:!0});this.inverseSort=e.inverseSort,this.autoScroll=e.autoScroll},methods:{...Q(A,["showSnackbar","setValue","getDateTimeString"]),savePreferences(){A().savePreferences({eventsList:{inverseSort:this.inverseSort,autoScroll:this.autoScroll}})},async updateValue(e,t){if(e){e.toUpdate=!0,e.type==="number"&&(e.newValue=Number(e.newValue)),e.type==="boolean"&&!e.readable&&(e.newValue=!0),t!==void 0&&(e.newValue=t),this.setValue(e);const o=await this.app.apiRequest("writeValue",[{nodeId:e.nodeId,commandClass:e.commandClass,endpoint:e.endpoint,property:e.property,propertyKey:e.propertyKey},e.newValue,this.options]);if(e.toUpdate=!1,o.success){const _=o.result;if(pe(_))this.showSnackbar("Value updated","success");else{let s=_.message;!s&&_.status===b.NoDeviceSupport&&(s="No device support"),this.showSnackbar("Value update failed"+(s?": "+s:""),"error")}}else this.showSnackbar(`Error updating value${o.message?": "+o.message:""}`,"error")}},prettyPrintEventArg(e,t){return`
|
|
3
3
|
Arg ${t}:
|
|
4
4
|
`+X(e,void 0,1)},linkify(e){var t=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gi;return e.replace(t,function(o){return'<a target="_blank" href="'+o+'">'+o+"</a>"})},copyText(){this.$refs.nodeJsonContent.$el.querySelector("textarea").select(),document.execCommand("copy")},nodeAction(e,t={}){e==="exportNode"?this.exportNode():t.mqtt?this.sendMqttAction(e,t.confirm):this.sendAction(e,{...t,nodeId:this.node.id})},exportNode(){this.app.exportConfiguration(this.node,"node_"+this.node.id,"json")},async sendMqttAction(e,t){if(this.node){let o=!0;if(t&&(o=await this.app.confirm("Info",t,"info",{confirmText:"Ok"})),o){const _=[this.node.id],u={api:e,args:_};this.socket.emit(Y.mqtt,u,s=>{s.success?this.showSnackbar(`Node ${this.node.id}: ${e} successfully sent `,"success"):this.showSnackbar(`Error sending ${e} to node ${this.node.id}: ${s.message}`,"error")})}}},toggleStatistics(){this.showStatistics=!this.showStatistics},openLink(e){window.open(e,"_blank")},toggleAutoScroll(){this.autoScroll=!this.autoScroll},toggleSort(){this.inverseSort=!this.inverseSort},onEventsListInited(e){e?(this.eventsListEl=e.$el,this.scrollBottom()):this.eventsListEl=null},async scrollBottom(){if(!this.autoScroll||this.inverseSort)return;const e=this.eventsListEl;e&&(await $(),e.scrollTop=e.scrollHeight)}}},R=()=>{ue(e=>({"28355f2c":e.$vuetify.theme.current.colors.secondary}))},O=N.setup;N.setup=O?(e,t)=>(R(),O(e,t)):R;const fe={class:"subtitle font-weight-bold font-monospace"},he={key:0,class:"comment font-weight-bold text-primary"},ve=["innerHTML"],ye={class:"text-uppercase"},ge={class:"text-caption"},_e={key:1},we={class:"text-uppercase"};function ke(e,t,o,_,u,s){const j=y("statistics-card"),P=y("node-details"),M=y("home-assistant"),W=y("association-groups"),F=y("user-code-table"),B=y("OTAUpdates"),q=y("OTWUpdates"),H=y("DialogAdvanced");return o.node?(i(),m("div",{key:0,style:de(`max-width: calc(100vw - ${e.$vuetify.display.lgAndUp?120:70}px)`),class:"mx-2"},[n(D,{class:"mt-2",align:"center"},{default:r(()=>[n(x,{style:{"min-width":"200px"},class:"ml-4"},{default:r(()=>[t[12]||(t[12]=c("span",{class:"text-h6 text-grey"},"Device ",-1)),t[13]||(t[13]=c("br",null,null,-1)),c("span",fe,g(o.node.hexId),1),C((i(),l(ee,{onClick:t[0]||(t[0]=a=>s.openLink(o.node.dbLink)),class:"ml-2"},{default:r(()=>t[11]||(t[11]=[w(" open_in_new ")])),_:1,__:[11]})),[[T,"See device config","bottom"]]),t[14]||(t[14]=c("br",null,null,-1)),e.$vuetify.display.smAndDown?(i(),m("span",he,g(`${o.node.manufacturer||""}${o.node.productDescription?" - "+o.node.productDescription:""}`),1)):d("",!0)]),_:1,__:[12,13,14]}),n(x,{class:I(e.$vuetify.display.smAndDown?"text-center":"text-end")},{default:r(()=>[n(te,{class:"ml-2",multiple:""},{default:r(()=>[n(k,{color:"primary",variant:"outlined",onClick:s.toggleStatistics,"prepend-icon":s.statisticsOpeningIndicator,"append-icon":"multiline_chart"},{default:r(()=>t[15]||(t[15]=[w(" Statistics ")])),_:1,__:[15]},8,["onClick","prepend-icon"]),o.node.isControllerNode?d("",!0):(i(),l(k,{key:0,color:"primary",onClick:t[1]||(t[1]=oe(a=>e.pingNode(o.node),["stop"])),variant:"flat"},{default:r(()=>t[16]||(t[16]=[w(" Ping ")])),_:1,__:[16]})),n(k,{color:"success",variant:"flat",onClick:t[2]||(t[2]=a=>u.advancedShowDialog=!0)},{default:r(()=>t[17]||(t[17]=[w(" Advanced ")])),_:1,__:[17]})]),_:1})]),_:1},8,["class"])]),_:1}),s.nodeComments.length>0?(i(),l(D,{key:0},{default:r(()=>[n(x,null,{default:r(()=>[(i(!0),m(V,null,S(s.nodeComments,a=>(i(),l(se,{key:a.level,text:"",style:{"white-space":"break-spaces"},type:a.level},{default:r(()=>[c("span",{innerHTML:s.linkify(a.text)},null,8,ve)]),_:2},1032,["type"]))),128))]),_:1})]),_:1})):d("",!0),n(D,{"no-gutters":""},{default:r(()=>[u.showStatistics?(i(),l(ne,{key:0,class:"my-4",border:"",rounded:""},{default:r(()=>[n(j,{title:"Statistics",node:o.node},null,8,["node"])]),_:1})):d("",!0)]),_:1}),n(ae,{class:"my-4"}),c("div",{class:I(["d-flex",e.$vuetify.display.mdAndUp?"flex-row":"flex-column"])},[n(ie,{modelValue:u.currentTab,"onUpdate:modelValue":t[3]||(t[3]=a=>u.currentTab=a),"show-arrows":"",class:"bg-transparent mb-4",direction:e.$vuetify.display.mdAndUp?"vertical":"horizontal"},{default:r(()=>[n(p,{"prepend-icon":"widgets",value:"node",class:"justify-start",text:"Node"}),s.nodeMetadata?(i(),l(p,{key:0,"prepend-icon":"help",value:"manual",class:"justify-start",text:"Help",W:""})):d("",!0),s.showHass?(i(),l(p,{key:1,"prepend-icon":"home",value:"homeassistant",class:"justify-start",text:"Home Assistant"})):d("",!0),n(p,{"prepend-icon":"device_hub",value:"groups",class:"justify-start",text:"Groups"}),o.node.schedule?(i(),l(p,{key:2,"prepend-icon":"group",value:"users",class:"justify-start",text:"Users"})):d("",!0),o.node.isControllerNode?d("",!0):(i(),l(p,{key:3,value:"ota","prepend-icon":"auto_mode",class:"justify-start",text:"OTA Updates"})),o.node.isControllerNode?(i(),l(p,{key:4,value:"otw","prepend-icon":"auto_mode",class:"justify-start",text:"Firmware Updates"})):d("",!0),n(p,{"prepend-icon":"list_alt",value:"events",class:"justify-start",text:"Events"}),e.$vuetify.display.mdAndUp?(i(),l(p,{key:5,"prepend-icon":"bug_report",class:"justify-start",value:"debug",text:"Debug Info"})):d("",!0)]),_:1},8,["modelValue","direction"]),n(le,{style:{background:"transparent","padding-bottom":"10px"},touchless:"",class:"fill",modelValue:u.currentTab,"onUpdate:modelValue":t[8]||(t[8]=a=>u.currentTab=a)},{default:r(()=>[n(f,{value:"node",transition:"slide-y-transition"},{default:r(()=>[n(P,{ref:"nodeDetails",headers:o.headers,node:o.node,onUpdateValue:s.updateValue},null,8,["headers","node","onUpdateValue"])]),_:1}),s.nodeMetadata?(i(),l(f,{key:0,value:"manual",transition:"slide-y-transition"},{default:r(()=>[(i(!0),m(V,null,S(s.metaKeys,a=>(i(),m("section",{key:`tab-${a}`,class:"px-8 py-4"},[c("h1",ye,g(a),1),c("p",ge,[a==="manual"?(i(),l(k,{key:0,class:"ma-2",href:s.nodeMetadata[a],variant:"flat",color:"primary"},{default:r(()=>t[18]||(t[18]=[w(" DOWNLOAD ")])),_:2,__:[18]},1032,["href"])):(i(),m("span",_e,g(s.nodeMetadata[a]),1))])]))),128))]),_:1})):d("",!0),s.showHass?(i(),l(f,{key:1,value:"homeassistant",transition:"slide-y-transition"},{default:r(()=>[n(M,{node:o.node,socket:o.socket},null,8,["node","socket"])]),_:1})):d("",!0),n(f,{value:"groups",transition:"slide-y-transition"},{default:r(()=>[n(W,{node:o.node},null,8,["node"])]),_:1}),o.node.schedule?(i(),l(f,{key:2,value:"users",transition:"slide-y-transition"},{default:r(()=>[n(F,{node:o.node,onUpdateValue:s.updateValue},null,8,["node","onUpdateValue"])]),_:1})):d("",!0),o.node.isControllerNode?d("",!0):(i(),l(f,{key:3,value:"ota",transition:"slide-y-transition"},{default:r(()=>[n(B,{node:o.node,socket:o.socket},null,8,["node","socket"])]),_:1})),o.node.isControllerNode?(i(),l(f,{key:4,value:"otw",transition:"slide-y-transition"},{default:r(()=>[n(q,{node:o.node,socket:o.socket},null,8,["node","socket"])]),_:1})):d("",!0),n(f,{value:"events",transition:"slide-y-transition"},{default:r(()=>[n(L,{"grid-list-md":""},{default:r(()=>[n(re,{modelValue:u.searchEvents,"onUpdate:modelValue":t[6]||(t[6]=a=>u.searchEvents=a),variant:"outlined",density:"compact","prepend-icon":"search",label:"Search",class:"pa-3","single-line":"","hide-details":"",style:{"max-width":"400px"},clearable:""},{append:r(()=>[u.inverseSort?d("",!0):C((i(),l(k,{key:0,variant:u.autoScroll?"flat":"outlined",size:"small",onClick:t[4]||(t[4]=a=>s.toggleAutoScroll()),icon:"autorenew",color:"primary"},null,8,["variant"])),[[T,"Enable/Disable auto scroll","bottom"]]),C(n(k,{onClick:t[5]||(t[5]=a=>s.toggleSort()),icon:"swap_vert",class:"ml-2",variant:u.inverseSort?"flat":"outlined",size:"small",color:"primary"},null,8,["variant"]),[[T,"Inverse Sort","bottom"]])]),_:1},8,["modelValue"]),n(x,{ref:s.onEventsListInited,class:"pa-5 events-list"},{default:r(()=>[(i(!0),m(V,null,S(s.filteredNodeEvents,(a,z)=>(i(),m("div",{key:"event_"+z+a.time,class:"log-row font-monospace"},[c("span",null,[c("i",null,g(e.getDateTimeString(a.time)),1)]),t[19]||(t[19]=w(" - ")),c("strong",we,g(a.event),1),(i(!0),m(V,null,S(a.args,(J,E)=>(i(),m("span",{style:{"white-space":"pre","font-size":"0.75rem"},key:"arg_"+E},g(s.prettyPrintEventArg(J,E)),1))),128))]))),128))]),_:1},512)]),_:1})]),_:1}),e.$vuetify.display.mdAndUp?(i(),l(f,{key:5,value:"debug",transition:"slide-y-transition"},{default:r(()=>[n(L,{"grid-list-md":""},{default:r(()=>[n(ce,{class:"debug-content font-monospace mx-2","append-icon":"content_copy",modelValue:s.nodeJson,"onUpdate:modelValue":t[7]||(t[7]=a=>s.nodeJson=a),readonly:"","hide-details":"","no-resize":"",rows:"37",ref:"nodeJsonContent","onClick:append":s.copyText},null,8,["modelValue","onClick:append"])]),_:1})]),_:1})):d("",!0)]),_:1},8,["modelValue"])],2),n(H,{modelValue:u.advancedShowDialog,"onUpdate:modelValue":t[9]||(t[9]=a=>u.advancedShowDialog=a),onClose:t[10]||(t[10]=a=>u.advancedShowDialog=!1),actions:s.advancedActions,onAction:s.nodeAction},null,8,["modelValue","actions","onAction"])],4)):d("",!0)}const xe=K(N,[["render",ke]]);export{xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as R,I as C,aJ as T,m as D,u as _,a as F,z as S,o as r,l as i,w as e,b as a,e as g,v,f as w,h,k as o,R as k,q as y,X as N,U as n,t as c,x as I,c as V,an as b,am as U,N as z,ar as B,i as x,ai as L,M as P,O as j,T as q,Z as A,ao as M,aD as O,dy as E,af as J,V as Z}from"./index-
|
|
1
|
+
import{_ as R,I as C,aJ as T,m as D,u as _,a as F,z as S,o as r,l as i,w as e,b as a,e as g,v,f as w,h,k as o,R as k,q as y,X as N,U as n,t as c,x as I,c as V,an as b,am as U,N as z,ar as B,i as x,ai as L,M as P,O as j,T as q,Z as A,ao as M,aD as O,dy as E,af as J,V as Z}from"./index-DQ2UbtiL.js";const H={components:{},props:{node:{type:Object,required:!0},socket:{type:Object,required:!0},hideDowngrades:{type:Boolean,default:!1},hideTargets:{type:Boolean,default:!1}},mixins:[C],data(){return{RFRegion:T,rfRegion:null,fwUpdates:[],loading:!1,includePrereleases:!1,showDowngrades:!1}},computed:{...D(_,["controllerNode","zwave"]),filteredUpdates(){return this.fwUpdates.filter(l=>!l.downgrade||l.downgrade&&this.showDowngrades)},invalidRfRegion(){return this.controllerNode&&this.controllerNode.RFRegion===void 0&&this.zwave.rf.region===void 0}},mounted(){this.checkUpdates()},methods:{...F(_,["showSnackbar"]),async checkUpdates(){this.loading=!0,this.fwUpdates=[];const l={includePrereleases:this.includePrereleases};this.controllerNode&&this.controllerNode.RFRegion===void 0&&this.zwave.rf.region!==void 0&&(l.rfRegion=this.zwave.rf.region);const t=await this.app.apiRequest("getAvailableFirmwareUpdates",[this.node.id,l]);if(this.loading=!1,t.success){const{default:d}=await S(async()=>{const{default:p}=await import("./index-Blr6EMNg.js");return{default:p}},[],import.meta.url);for(const p of t.result)p.changelog=d().render(p.changelog);this.fwUpdates=t.result}else this.showSnackbar(`Failed to check for firmware updates: ${t.message}`,"error")},download(l){window.open(l,"_blank")},async handleUpdateFirmware(l){this.$emit("update-firmware",l)}}},W={class:"text-h5 ml-2"},X=["innerHTML"],G={class:"text-caption"};function K(l,t,d,p,u,m){return r(),i(Z,{"grid-list-md":""},{default:e(()=>[a(g,{class:"ml-5"},{default:e(()=>[v(a(w,{cols:"12"},{default:e(()=>[a(g,{justify:"center",class:"mb-2 text-center"},{default:e(()=>[a(h,{disabled:u.loading,variant:"outlined",class:"my-auto",color:"success",onClick:m.checkUpdates},{default:e(()=>t[2]||(t[2]=[o("Check updates")])),_:1,__:[2]},8,["disabled","onClick"]),a(k,{modelValue:u.includePrereleases,"onUpdate:modelValue":t[0]||(t[0]=s=>u.includePrereleases=s),"hide-details":"",density:"compact",label:"Include pre-releases",class:"ml-2 my-auto"},null,8,["modelValue"]),d.hideDowngrades?y("",!0):(r(),i(k,{key:0,modelValue:u.showDowngrades,"onUpdate:modelValue":t[1]||(t[1]=s=>u.showDowngrades=s),"hide-details":"",density:"compact",label:"Show downgrades",class:"ml-2 my-auto"},null,8,["modelValue"]))]),_:1}),l.controllerNode.RFRegion===void 0?(r(),i(g,{key:0,justify:"center",class:"pt-2 text-center"},{default:e(()=>[a(N,{type:"info",density:"compact",text:"",class:"ml-2 mb-2",style:{"max-width":"400px"}},{default:e(()=>[n("small",null,c(m.invalidRfRegion?"To get region-specific firmware updates, you need to configure your current region in the settings.":`Firmware updates include updates specific to ${u.RFRegion[l.zwave.rf.region]}. If this is not correct, you can change it in the settings.`),1)]),_:1})]),_:1})):y("",!0)]),_:1},512),[[I,!d.node.firmwareUpdate]]),m.filteredUpdates.length>0&&!d.node.firmwareUpdate?(r(!0),V(b,{key:0},U(m.filteredUpdates,s=>(r(),i(w,{cols:"12",sm:"6",md:"4",key:s.version},{default:e(()=>[a(z,{density:"compact",elevation:"5"},{default:e(()=>[a(B,null,{default:e(()=>[a(g,{class:"ma-1"},{default:e(()=>[a(x,null,{default:e(()=>t[3]||(t[3]=[o("update")])),_:1,__:[3]}),n("span",W,[n("strong",null,"v"+c(s.version)+" ["+c(s.channel)+"]",1)]),a(L),a(h,{variant:"outlined",size:"small",color:s.downgrade?"warning":"success",onClick:f=>m.handleUpdateFirmware(s),"prepend-icon":s.downgrade?"download":"upload"},{default:e(()=>[o(c(s.downgrade?"Downgrade":"Update"),1)]),_:2},1032,["color","onClick","prepend-icon"])]),_:2},1024)]),_:2},1024),a(P,{class:"mx-4"}),a(j,null,{default:e(()=>[a(q,{class:"text-subtitle-1"},{default:e(()=>t[4]||(t[4]=[n("strong",null,"Changelog",-1)])),_:1,__:[4]}),n("p",{class:"text-caption ml-4",innerHTML:s.changelog},null,8,X),(r(!0),V(b,null,U(s.files,f=>(r(),i(A,{key:f.url,lines:"two",density:"compact",style:{"border-bottom":"1px solid #e0e0e0"}},{prepend:e(()=>[a(x,{color:"primary"},{default:e(()=>t[5]||(t[5]=[o("widgets")])),_:1,__:[5]})]),append:e(()=>[v(a(h,{onClick:Q=>m.download(f.url),icon:"download",color:"success"},null,8,["onClick"]),[[M,"Download","bottom"]])]),default:e(()=>[!d.hideTargets&&f.target!==void 0?(r(),i(O,{key:0},{default:e(()=>[o("Target: "+c(f.target),1)]),_:2},1024)):y("",!0),a(E,null,{default:e(()=>[o(c(f.url),1)]),_:2},1024)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)):u.loading||d.node.firmwareUpdate?(r(),i(w,{key:1,class:"text-center"},{default:e(()=>[a(J,{indeterminate:"",color:"primary"}),n("p",G,c(d.node.firmwareUpdate?"Update in progress...":"Remember to wake up sleeping devices..."),1)]),_:1})):(r(),i(w,{key:2,class:"text-center"},{default:e(()=>t[6]||(t[6]=[n("h1",{class:"text-h6"},"No updates available",-1),n("span",null,[o("This service relies on "),n("a",{href:"https://github.com/zwave-js/firmware-updates#readme",target:"_blank"},"Z-Wave JS Firmware Update Service"),o(", and may not represent all updates for your device.")],-1),n("br",null,null,-1),n("span",null,[o("If you know that a firmware update "),n("i",null,"does"),o(" exist, you can help the Z-Wave JS community by encouraging your device manufacturer to provide the firmwares. Read more in the link above.")],-1)])),_:1,__:[6]}))]),_:1})]),_:1})}const $=R(H,[["render",K]]);export{$ as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CCTreeView-
|
|
2
|
-
import{_ as R,d as g,z as k,dt as C,aM as P,aN as w,aO as T,aP as x,aw as _,r as b,o as a,l as s,w as o,b as n,f as i,U as e,t as d,c as m,q as r,e as V}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CCTreeView-DQ26Iuzn.js","./index-DQ2UbtiL.js","./index-CfCXnUjB.css","./VTreeview-D-WXOI-Z.js","./VTreeview-ezR7OQDS.css","./CCTreeView-D77WZJ4V.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as R,d as g,z as k,dt as C,aM as P,aN as w,aO as T,aP as x,aw as _,r as b,o as a,l as s,w as o,b as n,f as i,U as e,t as d,c as m,q as r,e as V}from"./index-DQ2UbtiL.js";import{V as D}from"./VTable-CD5OKisM.js";import{V as q}from"./VTextarea-DX3kqrVu.js";const A={props:{modelValue:Object},components:{CCTreeView:g(()=>k(()=>import("./CCTreeView-DQ26Iuzn.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url))},data:()=>({}),methods:{getRegion:C,getRoute:P,getType:w,getRssi:T,getProtocolDataRate:x,getProtocol:_}},E={key:0},I=["innerHTML"],N={key:1},v={key:2},S={key:3};function B(M,l,t,H,L,u){const f=b("CCTreeView");return t.modelValue?(a(),s(V,{key:0},{default:o(()=>[n(i,null,{default:o(()=>[n(D,{class:"frame-details",density:"compact"},{default:o(()=>[e("tbody",null,[e("tr",null,[l[1]||(l[1]=e("td",null,"Type",-1)),e("td",null,d(u.getType(t.modelValue)),1)]),e("tr",null,[l[2]||(l[2]=e("td",null,"Protocol",-1)),e("td",null,d(u.getProtocol(t.modelValue)),1)]),e("tr",null,[l[3]||(l[3]=e("td",null,"Channel",-1)),e("td",null,d(t.modelValue.channel),1)]),e("tr",null,[l[4]||(l[4]=e("td",null,"Region",-1)),e("td",null,d(u.getRegion(t.modelValue)),1)]),e("tr",null,[l[5]||(l[5]=e("td",null,"RSSI",-1)),e("td",null,d(u.getRssi(t.modelValue)),1)]),e("tr",null,[l[6]||(l[6]=e("td",null,"Protocol Data Rate",-1)),e("td",null,d(u.getProtocolDataRate(t.modelValue)+(t.modelValue.speedModified?" (speed modified)":"")),1)]),e("tr",null,[l[7]||(l[7]=e("td",null,"Sequence Number",-1)),e("td",null,d(t.modelValue.sequenceNumber),1)]),t.modelValue.payload?(a(),m("tr",E,[l[8]||(l[8]=e("td",null,"Payload",-1)),e("td",null,d(t.modelValue.payload),1)])):r("",!0),e("tr",null,[l[9]||(l[9]=e("td",null,"Home ID",-1)),e("td",null,d(t.modelValue.homeId?t.modelValue.homeId.toString(16):""),1)]),e("tr",null,[l[10]||(l[10]=e("td",null,"Route",-1)),e("td",{innerHTML:u.getRoute(t.modelValue,!0)},null,8,I)]),t.modelValue.ackRequested!==void 0?(a(),m("tr",N,[l[11]||(l[11]=e("td",null,"Ack Requested",-1)),e("td",null,d(t.modelValue.ackRequested),1)])):r("",!0),t.modelValue.routedAck?(a(),m("tr",v,[l[12]||(l[12]=e("td",null,"Routed Ack",-1)),e("td",null,d(t.modelValue.routedAck),1)])):r("",!0),t.modelValue.routedError?(a(),m("tr",S,[l[13]||(l[13]=e("td",null,"Routed Error",-1)),e("td",null,d(t.modelValue.routedError),1)])):r("",!0)])]),_:1})]),_:1}),n(i,null,{default:o(()=>[t.modelValue.parsedPayload?(a(),s(f,{key:0,class:"my-2",modelValue:t.modelValue.parsedPayload},null,8,["modelValue"])):r("",!0),l[14]||(l[14]=e("span",{class:"text-caption"},"Raw",-1)),n(q,{class:"mono",readonly:"","hide-details":"",variant:"solo","no-resize":"",modelValue:t.modelValue.raw,"onUpdate:modelValue":l[0]||(l[0]=y=>t.modelValue.raw=y),rows:"2"},null,8,["modelValue"])]),_:1,__:[14]})]),_:1})):(a(),s(V,{key:1,class:"fill",justify:"center",align:"center"},{default:o(()=>[n(i,{class:"text-center text-caption"},{default:o(()=>l[15]||(l[15]=[e("span",{dense:""},"Click on a frame in table to see details",-1)])),_:1,__:[15]})]),_:1}))}const U=R(A,[["render",B],["__scopeId","data-v-f5ae3d16"]]);export{U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as w,I as S,m as N,u as b,a as g,aQ as O,o as a,l as c,w as i,b as h,T as J,k as r,X as A,U as C,q as p,e as V,f as y,v,h as l,ao as u,t as D,R as x,p as k,c as _}from"./index-
|
|
1
|
+
import{_ as w,I as S,m as N,u as b,a as g,aQ as O,o as a,l as c,w as i,b as h,T as J,k as r,X as A,U as C,q as p,e as V,f as y,v,h as l,ao as u,t as D,R as x,p as k,c as _}from"./index-DQ2UbtiL.js";import{V as I}from"./VDataTable-DPUxFhCV.js";import{V as R}from"./VTextarea-DX3kqrVu.js";import"./sort-BdHVKc5S.js";import"./VTable-CD5OKisM.js";const j={props:{node:Object,socket:Object},mixins:[S],data(){return{deviceJSON:"",errorDevice:!1,headers_hass:[{title:"Id",value:"id"},{title:"Type",value:"type"},{title:"Object id",value:"object_id"},{title:"Persistent",value:"persistent"},{title:"Discovery",value:"ignoreDiscovery"}],selectedDevice:null}},computed:{...N(b,["gateway"]),hassDevices(){const s=[];if(this.node&&this.node.hassDevices)for(const e in this.node.hassDevices){const n=JSON.parse(JSON.stringify(this.node.hassDevices[e]));n.id=e,s.push(n)}return s}},watch:{selectedDevice(){this.deviceJSON=this.selectedDevice?JSON.stringify(this.selectedDevice,null,2):""}},methods:{...g(b,["showSnackbar"]),async sendAction(s={}){return new Promise(e=>{this.socket.connected?(this.showSnackbar(`API ${s.apiName} called`,"info"),this.socket.emit(O.hass,s,n=>{n.success||this.showSnackbar(`Error while calling ${s.apiName}: ${n.message}`,"error"),e(n)})):(e({success:!1,message:"Socket disconnected"}),this.showSnackbar("Socket disconnected","error"))})},selectDevice(s,{item:e,toggleSelect:n,internalItem:f,index:d}){n(f,d,s),this.selectedDevice=this.selectedDevice===e?null:e},async addDevice(){if(!this.errorDevice){const s=JSON.parse(this.deviceJSON);(await this.sendAction({apiName:"add",device:s,nodeId:this.node.id})).success&&this.showSnackbar(`Device ${s.id} added`,"success")}},async deleteDevice(){const s=this.selectedDevice;s&&await this.app.confirm("Attention","Are you sure you want to delete selected device?","alert")&&(await this.sendAction({apiName:"delete",device:s,nodeId:this.node.id})).success&&this.showSnackbar(`Device ${s.id} deleted`,"success")},async disableDiscovery(){this.node&&await this.app.confirm("Rediscover node","Are you sure you want to disable discovery of all values? In order to make this persistent remember to click on Store")&&(await this.sendAction({apiName:"disableDiscovery",nodeId:this.node.id})).success&&this.showSnackbar(`Discovery disabled for node ${this.node.id}`,"success")},async rediscoverDevice(){const s=this.selectedDevice;s&&await this.app.confirm("Rediscover Device","Are you sure you want to re-discover selected device?")&&(await this.sendAction({apiName:"discover",device:s,nodeId:this.node.id})).success&&this.showSnackbar(`Device ${s.id} re-discovered`,"success")},async rediscoverNode(){this.node&&await this.app.confirm("Rediscover node","Are you sure you want to re-discover all node values?")&&(await this.sendAction({apiName:"rediscoverNode",nodeId:this.node.id})).success&&this.showSnackbar(`Node ${this.node.id} re-discovered`,"success")},async storeDevices(s){(await this.sendAction({apiName:"store",devices:this.node.hassDevices,nodeId:this.node.id,remove:s})).success&&this.showSnackbar(`Devices stored for node ${this.node.id}`,"success")},async updateDeviceJSON(){if(!this.errorDevice){const s=JSON.parse(this.deviceJSON);this.node.hassDevices[this.selectedDevice.id]=s,await this.updateDevice(s)}},async toggleField(s,e){s[e]=!s[e],await this.updateDevice(s)},async updateDevice(s){(await this.sendAction({apiName:"update",device:s,nodeId:this.node.id})).success&&(this.node.hassDevices={...this.node.hassDevices,[s.id]:s},this.selectedDevice&&this.selectedDevice.id===s.id&&(this.deviceJSON=JSON.stringify(s,null,2)),this.showSnackbar(`Device ${s.id} updated`,"success"))},validJSONdevice(){let s=!0;try{JSON.parse(this.deviceJSON)}catch{s=!1}return this.errorDevice=!s,this.deviceJSON===""||s||"JSON test failed"}}},T={key:2,style:{margin:"20px"},class:"text-subtitle-1"};function U(s,e,n,f,d,o){return a(),c(y,null,{default:i(()=>[h(J,null,{default:i(()=>e[6]||(e[6]=[r("Home Assistant - Devices")])),_:1,__:[6]}),s.gateway.manualDiscovery?(a(),c(A,{key:0,"max-width":"1150",text:"",type:"warning"},{default:i(()=>e[7]||(e[7]=[C("small",null,"Manual discovery is enabled, you have to select an entity in the table and then press on `REDISCOVER` button on the top of JSON input in order to publish the discovery payload to MQTT",-1)])),_:1,__:[7]})):p("",!0),o.hassDevices.length>0?(a(),c(V,{key:1},{default:i(()=>[h(y,{cols:"12",md:"6"},{default:i(()=>[v((a(),c(l,{color:"primary",variant:"text",onClick:e[0]||(e[0]=t=>o.storeDevices(!1))},{default:i(()=>e[8]||(e[8]=[r(" Store ")])),_:1,__:[8]})),[[u,"Store all discovered devices in nodes.json in store directory. Prevents re-discovery on startup","bottom"]]),v((a(),c(l,{color:"error",variant:"text",onClick:e[1]||(e[1]=t=>o.storeDevices(!0))},{default:i(()=>e[9]||(e[9]=[r(" Remove Store ")])),_:1,__:[9]})),[[u,"Remove devices from nodes.json in store directory","bottom"]]),v((a(),c(l,{color:"success",variant:"text",onClick:o.rediscoverNode},{default:i(()=>e[10]||(e[10]=[r(" Rediscover Node ")])),_:1,__:[10]},8,["onClick"])),[[u,"Rediscover all node entities. Useful when changing node name/location and need to recalculate topics","bottom"]]),v((a(),c(l,{color:"warning",variant:"text",onClick:o.disableDiscovery},{default:i(()=>e[11]||(e[11]=[r(" Disable Discovery ")])),_:1,__:[11]},8,["onClick"])),[[u,"Set the ignoreDiscovery flag to true on all entities of this node to skip the discovery of them","bottom"]]),h(I,{headers:d.headers_hass,items:o.hassDevices,"show-select":"","select-strategy":"single","item-key":"id","onClick:row":o.selectDevice,class:"elevation-1"},{"item.id":i(({item:t})=>[r(D(t.id),1)]),"item.type":i(({item:t})=>[r(D(t.type),1)]),"item.object_id":i(({item:t})=>[r(D(t.object_id),1)]),"item.persistent":i(({item:t})=>[h(x,{modelValue:t.persistent,"onUpdate:modelValue":[m=>t.persistent=m,m=>o.updateDevice(t)],onClick:e[2]||(e[2]=k(()=>{},["stop"])),"hide-details":"",density:"compact"},null,8,["modelValue","onUpdate:modelValue"])]),"item.ignoreDiscovery":i(({item:t})=>[h(l,{variant:"flat",onClick:k(m=>o.toggleField(t,"ignoreDiscovery"),["stop"]),color:t.ignoreDiscovery?"error":"success",size:"x-small"},{default:i(()=>[r(D(t.ignoreDiscovery?"Disabled":"Enabled"),1)]),_:2},1032,["onClick","color"])]),_:2},1032,["headers","items","onClick:row"])]),_:1}),h(y,{cols:"12",md:"6","pa-1":""},{default:i(()=>[d.selectedDevice?p("",!0):v((a(),c(l,{key:0,color:"primary",disabled:d.errorDevice,variant:"text",onClick:e[3]||(e[3]=t=>o.addDevice())},{default:i(()=>e[12]||(e[12]=[r(" Add ")])),_:1,__:[12]},8,["disabled"])),[[u,"Add this device to discovered entities","bottom"]]),d.selectedDevice?v((a(),c(l,{key:1,color:"primary",disabled:d.errorDevice,variant:"text",onClick:e[4]||(e[4]=t=>o.updateDeviceJSON())},{default:i(()=>e[13]||(e[13]=[r(" Update ")])),_:1,__:[13]},8,["disabled"])),[[u,"Update the in-memory discover template. You have to press Rediscover in order to send this to HA","bottom"]]):p("",!0),d.selectedDevice?v((a(),c(l,{key:2,color:"success",disabled:d.errorDevice,variant:"text",onClick:o.rediscoverDevice},{default:i(()=>e[14]||(e[14]=[r(" Rediscover ")])),_:1,__:[14]},8,["disabled","onClick"])),[[u,"Send this payload to HA","bottom"]]):p("",!0),d.selectedDevice?v((a(),c(l,{key:3,color:"error",disabled:d.errorDevice,variant:"text",onClick:o.deleteDevice},{default:i(()=>e[15]||(e[15]=[r(" Delete ")])),_:1,__:[15]},8,["disabled","onClick"])),[[u,"Delete this entity","bottom"]]):p("",!0),h(R,{label:"Hass Device JSON","auto-grow":"",rules:[o.validJSONdevice],modelValue:d.deviceJSON,"onUpdate:modelValue":e[5]||(e[5]=t=>d.deviceJSON=t)},null,8,["rules","modelValue"])]),_:1})]),_:1})):(a(),_("div",T," No Hass Devices "))]),_:1})}const F=w(j,[["render",U]]);export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as l,o as r,l as d,$ as s,R as u}from"./index-
|
|
1
|
+
import{_ as l,o as r,l as d,$ as s,R as u}from"./index-DQ2UbtiL.js";const n={props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],computed:{inverted:{get(){return!this.modelValue},set(e){this.$emit("update:modelValue",!e)}}}};function m(e,t,p,c,i,o){return r(),d(u,s({modelValue:o.inverted,"onUpdate:modelValue":t[0]||(t[0]=a=>o.inverted=a)},e.$attrs),null,16,["modelValue"])}const V=l(n,[["render",m]]);export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as g,a8 as x,r as b,o as m,c as y,b as o,w as s,l as a,Z as p,t as r,q as u,i as h,k as f,a$ as k,e as C,U as I,h as v,ae as w,ag as V,W as T,Q as U,Y as K,P as B}from"./index-
|
|
1
|
+
import{_ as g,a8 as x,r as b,o as m,c as y,b as o,w as s,l as a,Z as p,t as r,q as u,i as h,k as f,a$ as k,e as C,U as I,h as v,ae as w,ag as V,W as T,Q as U,Y as K,P as B}from"./index-DQ2UbtiL.js";import{d as N}from"./vuedraggable.umd-c7x9W4uF.js";const _={props:{input:Object,modelValue:Array,toggleEdit:{type:Boolean,default:!0},menuProps:Object},components:{draggable:N},data:()=>({item:null,inputItems:[],allItems:[]}),computed:{items:{get(){return this.modelValue||[]},set(i){this.$emit("update:modelValue",i)}}},mounted(){this.getItems()},methods:{getItems(){typeof this.input.items=="function"?this.inputItems=this.input.items():this.inputItems=this.input.items,this.allItems=[...this.inputItems]},getItem(i){return this.allItems.find(t=>t[this.input.itemValue]===i)},async addItem(){this.item&&(this.$emit("add",this.item),this.items.push(this.item),this.inputItems.splice(this.inputItems.indexOf(this.getItem(this.item)),1),await x(),this.item=null)},deleteItem(i){const t=this.items[i];t&&(this.$emit("delete",t),this.items.splice(i,1),this.inputItems.push(this.getItem(t)))},getItemName(i){var t;return((t=this.allItems.find(e=>(e==null?void 0:e[this.input.itemValue])===i))==null?void 0:t[this.input.itemText||"text"])??i}}},E={class:"text-caption mr-1"},P={style:{"font-size":"0.9rem"}},q={key:0};function L(i,t,e,j,M,l){const c=b("draggable");return m(),y("div",null,[o(w,{density:"compact"},{default:s(()=>[e.input.prefix?(m(),a(p,{textContent:r(e.input.prefix),key:"prefix"},null,8,["textContent"])):u("",!0),e.input.prefix?(m(),a(h,{key:1,class:"ml-5"},{default:s(()=>t[5]||(t[5]=[f("arrow_downward")])),_:1,__:[5]})):u("",!0),o(c,{modelValue:l.items,"onUpdate:modelValue":t[0]||(t[0]=n=>l.items=n),handle:".handle","item-key":(n,d)=>`${d}_${n}`},{item:s(({element:n,index:d})=>[o(p,null,{prepend:s(()=>[k(i.$slots,"item-action",{item:n})]),default:s(()=>[o(C,{class:"ma-0 d-block"},{default:s(()=>[e.toggleEdit?(m(),a(h,{key:0,class:"handle",style:{cursor:"move"},color:"primary-lighten-2"},{default:s(()=>t[6]||(t[6]=[f("drag_indicator")])),_:1,__:[6]})):u("",!0),I("span",E,r(d+1)+".",1),I("span",P,r(l.getItemName(n)),1),e.toggleEdit?(m(),a(v,{key:1,class:"ml-1",icon:"delete",size:"small",onClick:O=>l.deleteItem(d),color:"error"},null,8,["onClick"])):u("",!0)]),_:2},1024)]),_:2},1024)]),_:3},8,["modelValue","item-key"]),e.input.prefix&&l.items.length>0?(m(),a(h,{key:2,class:"ml-5"},{default:s(()=>t[7]||(t[7]=[f("arrow_downward")])),_:1,__:[7]})):u("",!0),e.input.suffix?(m(),a(p,{textContent:r(e.input.suffix),key:"suffix"},null,8,["textContent"])):u("",!0)]),_:3}),e.toggleEdit?(m(),y("div",q,[e.input.inputType==="text"?(m(),a(T,{key:0,modelValue:i.item,"onUpdate:modelValue":t[1]||(t[1]=n=>i.item=n),modelModifiers:{trim:!0},label:e.input.label,hint:e.input.hint,required:e.input.required,density:"compact",maxlength:e.input.maxLength,"persistent-hint":!!e.input.hint,type:"text",suffix:e.input.suffix,prefix:e.input.prefix,onKeyup:V(l.addItem,["enter"]),"append-icon":"add","onClick:append":l.addItem},null,8,["modelValue","label","hint","required","maxlength","persistent-hint","suffix","prefix","onKeyup","onClick:append"])):u("",!0),e.input.inputType==="select"?(m(),a(U,{key:1,"menu-props":e.menuProps,modelValue:i.item,"onUpdate:modelValue":[t[2]||(t[2]=n=>i.item=n),l.addItem],label:e.input.label,hint:e.input.hint,"persistent-hint":!!e.input.hint,items:i.inputItems,"item-value":e.input.itemValue,"item-title":e.input.itemText,density:"compact"},null,8,["menu-props","modelValue","label","hint","persistent-hint","items","item-value","item-title","onUpdate:modelValue"])):u("",!0),e.input.inputType==="autocomplete"?(m(),a(K,{key:2,"menu-props":e.menuProps,modelValue:i.item,"onUpdate:modelValue":[t[3]||(t[3]=n=>i.item=n),l.addItem],modelModifiers:{trim:!0},label:e.input.label,"persistent-hint":!!e.input.hint,hint:e.input.hint,items:i.inputItems,"item-value":e.input.itemValue,"item-title":e.input.itemText,density:"compact",onKeyup:V(l.addItem,["enter"])},null,8,["menu-props","modelValue","label","persistent-hint","hint","items","item-value","item-title","onUpdate:modelValue","onKeyup"])):u("",!0),e.input.inputType==="combobox"?(m(),a(B,{key:3,"menu-props":e.menuProps,modelValue:i.item,"onUpdate:modelValue":[t[4]||(t[4]=n=>i.item=n),l.addItem],modelModifiers:{trim:!0},label:e.input.label,hint:e.input.hint,"persistent-hint":!!e.input.hint,items:i.inputItems,"item-value":e.input.itemValue,"item-title":e.input.itemText,density:"compact",onKeyup:V(l.addItem,["enter"]),chips:"","closable-chips":"","return-object":!1,"append-icon":"add","onClick:append":l.addItem},null,8,["menu-props","modelValue","label","hint","persistent-hint","items","item-value","item-title","onUpdate:modelValue","onKeyup","onClick:append"])):u("",!0)])):u("",!0)])}const A=g(_,[["render",L]]);export{A as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ColorScheme-
|
|
2
|
-
import{_ as c,L as h,d as _,ap as w,a as V,u,C as y,aq as b,l as S,w as a,V as v,r as m,o as x,b as s,N as C,n as L,ar as M,U as I,as as U,k as n,O as T,a0 as A,p as P,W as d,R as k,at as q,h as N,X as B,t as O,f as z,z as D}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ColorScheme-DOGrCuTX.js","./index-DQ2UbtiL.js","./index-CfCXnUjB.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as c,L as h,d as _,ap as w,a as V,u,C as y,aq as b,l as S,w as a,V as v,r as m,o as x,b as s,N as C,n as L,ar as M,U as I,as as U,k as n,O as T,a0 as A,p as P,W as d,R as k,at as q,h as N,X as B,t as O,f as z,z as D}from"./index-DQ2UbtiL.js";const R=h.get("Login"),J={components:{ColorScheme:_(()=>D(()=>import("./ColorScheme-DOGrCuTX.js"),__vite__mapDeps([0,1,2]),import.meta.url)),Logo:w},data(){return{username:"",password:"",rememberMe:!1,error_text:"",error_type:"error",showPsw:!1,error:!1,valid_login:!0,rules:{required(o){return!!o||"This field is required."}}}},watch:{error:function(o){o&&setTimeout(function(){this.error=!1},5e3)}},mounted(){if(this.isLocalStorageSupported()){const o=localStorage.getItem("user")?JSON.parse(localStorage.getItem("user")):null,e=!!localStorage.getItem("logged");o&&o.rememberMe?(this.username=o.username||this.username,this.password=o.password||this.password,this.rememberMe=o.rememberMe,e&&this.login(!0)):localStorage.removeItem("user"),this.initColorScheme()}else this.error=!0,this.error_type="error",this.error_text="Local storage not supported"},methods:{...V(u,["initColorScheme"]),isLocalStorageSupported(){const o="test",e=window.localStorage;try{return e.setItem(o,"1"),e.removeItem(o),!0}catch{return!1}},async login(o){if(!this.isLocalStorageSupported()){this.error=!0,this.error_type="error",this.error_text="Local storage not supported";return}const e=await this.$refs.form.validate();if(o===!0||e.valid)try{let t={username:this.username,password:this.password};const i=await y.login(t);i.success?(t=Object.assign(t,i.user),t.rememberMe=this.rememberMe,localStorage.setItem("user",JSON.stringify(t)),localStorage.setItem("logged","true"),u().onUserLogged(t),this.$route.params.nextUrl!=null?this.$router.push(this.$route.params.nextUrl):this.$router.push(b.main)):(i.message&&(this.error=!0),this.error_type="error",this.error_text=i.message)}catch(t){R.error(t),this.error=!0,this.error_type="error",this.error_text=t.message}}}},j={class:"d-flex align-center"};function E(o,e,t,i,r,p){const f=m("Logo"),g=m("color-scheme");return x(),S(v,{class:"pa-0 background",fluid:"","fill-height":""},{default:a(()=>[s(z,{elevation:"12",cols:"12",class:"pa-0 fill-height"},{default:a(()=>[s(C,{class:L(["mx-auto",o.$vuetify.display.smAndDown?"":"ml-10"]),width:o.$vuetify.display.smAndDown?"100%":"500",height:"100%",tile:""},{default:a(()=>[s(M,null,{default:a(()=>[I("div",j,[s(f,{size:"50"}),s(U,{style:{"margin-left":"20px"}},{default:a(()=>e[6]||(e[6]=[n("Z-Wave JS UI")])),_:1,__:[6]})])]),_:1}),s(T,null,{default:a(()=>[s(A,{modelValue:r.valid_login,"onUpdate:modelValue":e[4]||(e[4]=l=>r.valid_login=l),id:"login-form",onSubmit:P(p.login,["prevent"]),ref:"form","validate-on":"lazy"},{default:a(()=>[s(d,{required:"",rules:[r.rules.required],modelValue:r.username,"onUpdate:modelValue":e[0]||(e[0]=l=>r.username=l),modelModifiers:{trim:!0},autocomplete:"","prepend-icon":"person",name:"username",label:"Username",type:"text"},null,8,["rules","modelValue"]),s(d,{required:"",rules:[r.rules.required],modelValue:r.password,"onUpdate:modelValue":e[1]||(e[1]=l=>r.password=l),"prepend-icon":"lock",name:"password",label:"Password",autocomplete:"",type:r.showPsw?"text":"password","append-icon":r.showPsw?"visibility":"visibility_off","onClick:append":e[2]||(e[2]=l=>r.showPsw=!r.showPsw)},null,8,["rules","modelValue","type","append-icon"]),s(k,{modelValue:r.rememberMe,"onUpdate:modelValue":e[3]||(e[3]=l=>r.rememberMe=l),"prepend-icon":"null",name:"rememberMe","hide-details":"",label:"Remember Me"},null,8,["modelValue"]),s(g,{"hide-details":""})]),_:1},8,["modelValue","onSubmit"])]),_:1}),s(q,{class:"justify-center"},{default:a(()=>[s(N,{color:"primary",style:{"min-width":"150px",margin:"10px"},rounded:"",variant:"flat",class:"mb-6",type:"submit",form:"login-form"},{default:a(()=>e[7]||(e[7]=[n("Login")])),_:1,__:[7]})]),_:1}),s(B,{closable:"",type:r.error_type,modelValue:r.error,"onUpdate:modelValue":e[5]||(e[5]=l=>r.error=l)},{default:a(()=>[n(O(r.error_text),1)]),_:1},8,["type","modelValue"])]),_:1},8,["class","width"])]),_:1})]),_:1})}const W=c(J,[["render",E],["__scopeId","data-v-3e5554d2"]]);export{W as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ZwaveGraph-
|
|
2
|
-
import{a2 as k,a3 as P,a4 as b,a5 as y,a6 as C,a7 as f,b as r,$ as x,_ as D,I as N,d as h,m as A,u as _,a as B,a8 as S,l as c,w as u,V as I,a9 as L,r as w,o as m,O as T,N as E,z as g}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ZwaveGraph-CdCI2GuR.js","./index-DQ2UbtiL.js","./index-CfCXnUjB.css","./VExpansionPanels-D7bTGW5j.js","./VExpansionPanels-RsCANmDP.css","./index-_vbXjPry.js","./ZwaveGraph-CV956Kpy.css","./NodePanel-CKG4pORb.js","./vuedraggable.umd-c7x9W4uF.js","./NodePanel-C--3J2AU.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a2 as k,a3 as P,a4 as b,a5 as y,a6 as C,a7 as f,b as r,$ as x,_ as D,I as N,d as h,m as A,u as _,a as B,a8 as S,l as c,w as u,V as I,a9 as L,r as w,o as m,O as T,N as E,z as g}from"./index-DQ2UbtiL.js";const U=k({inset:Boolean,...P({transition:"bottom-sheet-transition"})},"VBottomSheet"),M=b()({name:"VBottomSheet",props:U(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:n}=o;const l=y(e,"modelValue");return C(()=>{const s=f.filterProps(e);return r(f,x(s,{contentClass:["v-bottom-sheet__content",e.contentClass],modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,class:["v-bottom-sheet",{"v-bottom-sheet--inset":e.inset},e.class],style:e.style}),n)}),{}}}),p={name:"Mesh",mixins:[N],props:{socket:Object},components:{ZwaveGraph:h(()=>g(()=>import("./ZwaveGraph-CdCI2GuR.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),NodePanel:h(()=>g(()=>import("./NodePanel-CKG4pORb.js"),__vite__mapDeps([7,1,2,8,9]),import.meta.url))},computed:{...A(_,["nodes"])},documentListeners:{},data(){return{selectedNode:null,showProperties:!1}},methods:{...B(_,["showSnackbar","setNeighbors"]),setInitialPosition(e){const o=window.innerHeight,n=window.innerWidth,l=e.offsetHeight,s=e.offsetWidth;let a=(o-l)/2-50,t=(n-s)/10;a<0&&(a=10),t<0&&(t=10),e.style.top=a+"px",e.style.left=t+"px"},makeDivDraggable(){const e=document.getElementById("properties");if(!e||e.hasAttribute("data-draggable"))return;e.setAttribute("data-draggable",!0),setTimeout(()=>{this.setInitialPosition(e)},100);let o=0,n=0;e.onmousedown=l;function l(t){t=t||window.event,!t.target.classList.contains("handle")&&(t.preventDefault(),!t.target.classList.contains("u-over")&&(o=t.clientX,n=t.clientY,document.onmouseup=a,document.onmousemove=s))}function s(t){t=t||window.event,t.preventDefault();const d=o-t.clientX,i=n-t.clientY;o=t.clientX,n=t.clientY,e.style.top=e.offsetTop-i+"px",e.style.left=e.offsetLeft-d+"px"}function a(){document.onmouseup=null,document.onmousemove=null}},async nodeClick(e){this.selectedNode=this.selectedNode===e?null:e,this.showProperties=!!this.selectedNode,this.$vuetify.display.mdAndUp&&this.showProperties&&(await S(),this.makeDivDraggable())}}},V=()=>{L(e=>({"1ca261c9":e.$vuetify.theme.current.colors.surface}))},v=p.setup;p.setup=v?(e,o)=>(V(),v(e,o)):V;function H(e,o,n,l,s,a){const t=w("zwave-graph"),d=w("node-panel");return m(),c(I,{class:"fill",fluid:""},{default:u(()=>[r(t,{ref:"mesh",id:"mesh",nodes:e.nodes,onNodeClick:a.nodeClick},null,8,["nodes","onNodeClick"]),e.$vuetify.display.mdAndUp?(m(),c(d,{key:0,node:s.selectedNode,socket:n.socket,modelValue:s.showProperties,"onUpdate:modelValue":o[0]||(o[0]=i=>s.showProperties=i),id:"properties",draggable:"",class:"details"},null,8,["node","socket","modelValue"])):(m(),c(M,{key:1,scrollable:"",modelValue:s.showProperties,"onUpdate:modelValue":o[2]||(o[2]=i=>s.showProperties=i)},{default:u(()=>[r(E,{scrollable:"",class:"text-center"},{default:u(()=>[r(T,null,{default:u(()=>[r(d,{node:s.selectedNode,socket:n.socket,modelValue:s.showProperties,"onUpdate:modelValue":o[1]||(o[1]=i=>s.showProperties=i)},null,8,["node","socket","modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))]),_:1})}const W=D(p,[["render",H],["__scopeId","data-v-ff96bf4a"]]);export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as u,m as c,u as l,o as r,l as m,w as d,c as o,k as g,U as i,t as y,q as a,X as _}from"./index-
|
|
1
|
+
import{_ as u,m as c,u as l,o as r,l as m,w as d,c as o,k as g,U as i,t as y,q as a,X as _}from"./index-DQ2UbtiL.js";const h={data:()=>({requiredKeys:["S2_Unauthenticated","S2_Authenticated","S2_AccessControl","S0_Legacy"],requiredKeysLongRange:["S2_Authenticated","S2_AccessControl"]}),computed:{...c(l,["zwave"]),missingKeys(){const t=this.zwave.securityKeys||{},e=[];for(const s of this.requiredKeys)(!t[s]||t[s].length!==32)&&e.push(s);return e},missingZwlrKeys(){const t=this.zwave.securityKeysLongRange||{},e=[];for(const s of this.requiredKeysLongRange)(!t[s]||t[s].length!==32)&&e.push(s);return e}}},k={key:0},K={key:1};function f(t,e,s,p,S,n){return n.missingKeys.length>0||n.missingZwlrKeys.length>0?(r(),m(_,{key:0,"max-width":"600px",density:"compact",border:"start",type:"warning"},{default:d(()=>[n.missingKeys.length>0?(r(),o("p",k,[e[0]||(e[0]=g(" Some Z-Wave security keys are missing: ")),i("strong",null,y(n.missingKeys.join(", ")),1)])):a("",!0),n.missingZwlrKeys.length>0?(r(),o("p",K,[e[1]||(e[1]=g(" Some Z-Wave Long Range security keys are missing: ")),i("strong",null,y(n.missingZwlrKeys.join(", ")),1)])):a("",!0),e[2]||(e[2]=i("span",null,"Please make sure to set the keys in Settings.",-1))]),_:1,__:[2]})):a("",!0)}const x=u(h,[["render",f]]);export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as R,o as M,c as P,a$ as S,n as Y,a1 as H}from"./index-
|
|
1
|
+
import{_ as R,o as M,c as P,a$ as S,n as Y,a1 as H}from"./index-DQ2UbtiL.js";const L="horizontal",u="vertical",W={name:"multipane",props:{layout:{type:String,default:u}},data(){return{isResizing:!1}},computed:{classnames(){return["multipane","layout-"+this.layout.slice(0,1),this.isResizing?"is-resizing":""]},cursor(){return this.isResizing?this.layout==u?"col-resize":"row-resize":""},userSelect(){return this.isResizing?"none":""}},methods:{getPageXY(i){var e;return((e=i.touches)==null?void 0:e[0])||i},onMouseDown(i){const e=i.target;if(e.className&&e.className.match("multipane-resizer")){let{$el:z,layout:n}=this;const{pageX:f,pageY:s}=this.getPageXY(i);let t=e.previousElementSibling,{offsetWidth:w,offsetHeight:y}=t,v=!!(t.style.width+"").match("%");const{addEventListener:c,removeEventListener:h}=window,o=(p,d=0)=>{if(n==u){let r=z.clientWidth,l=p+d;return t.style.width=v?l/r*100+"%":l+"px"}if(n==L){let r=z.clientHeight,l=p+d;return t.style.height=v?l/r*100+"%":l+"px"}};this.isResizing=!0;let a=o();this.$emit("paneResizeStart",t,e,a);const m=p=>{const{pageX:d,pageY:r}=this.getPageXY(p);a=n==u?o(w,d-f):o(y,r-s),this.$emit("paneResize",t,e,a)},g=()=>{a=n==u?o(t.clientWidth):o(t.clientHeight),this.isResizing=!1,h("mousemove",m),h("mouseup",g),h("touchmove",m),h("touchend",g),this.$emit("paneResizeStop",t,e,a)};c("mousemove",m),c("mouseup",g),c("touchmove",m),c("touchend",g)}}}};function X(i,e,z,n,f,s){return M(),P("div",{class:Y(s.classnames),style:H({cursor:s.cursor,userSelect:s.userSelect}),onMousedown:e[0]||(e[0]=(...t)=>s.onMouseDown&&s.onMouseDown(...t)),onTouchstart:e[1]||(e[1]=(...t)=>s.onMouseDown&&s.onMouseDown(...t))},[S(i.$slots,"default")],38)}const D=R(W,[["render",X]]);export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s,o as t,c as r,a$ as o}from"./index-
|
|
1
|
+
import{_ as s,o as t,c as r,a$ as o}from"./index-DQ2UbtiL.js";const a={},c={class:"multipane-resizer"};function n(e,l){return t(),r("div",c,[o(e.$slots,"default")])}const i=s(a,[["render",n]]);export{i as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ValueId-Ci9qUjhE.js","./index-DQ2UbtiL.js","./index-CfCXnUjB.css","./colors-DoZdCu1D.js","./ValueId-C_5EDl2E.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{aJ as S,_ as ue,d as fe,z as me,I as ce,F as pe,m as be,u as se,a as ye,e1 as Oe,r as ge,o as d,l as f,w as n,b as l,e as w,f as m,W as I,c as B,an as T,T as L,k as u,Q as N,U as C,v,h as y,i as g,ao as x,aS as Ce,q as R,X as oe,t as ae,am as re,p as k,M as we,V as ve}from"./index-DQ2UbtiL.js";import{V as xe}from"./VNumberInput-D96JqIdc.js";import{V as Re,a as he,b as Ie,c as ze}from"./VExpansionPanels-D7bTGW5j.js";function Ve(t){return Object.prototype.toString.call(t)==="[object Object]"}var j;(function(t){t[t.NoSupport=0]="NoSupport",t[t.Working=1]="Working",t[t.Fail=2]="Fail",t[t.Success=255]="Success"})(j||(j={}));function ke(t){return Ve(t)&&"status"in t&&typeof j[t.status]=="string"}function Ue(t){return ke(t)&&(t.status===j.Success||t.status===j.Working)}function je(t){return!t||Ue(t)}const h=Object.freeze({UInt8:Object.freeze({min:0,max:255}),UInt16:Object.freeze({min:0,max:65535}),UInt24:Object.freeze({min:0,max:16777215}),UInt32:Object.freeze({min:0,max:4294967295}),Int8:Object.freeze({min:-128,max:127}),Int16:Object.freeze({min:-32768,max:32767}),Int24:Object.freeze({min:-8388608,max:8388607}),Int32:Object.freeze({min:-2147483648,max:2147483647})}),z=()=>t=>t,P=z(),o=z(),F=z(),V=z(),M=z(),q=z();var U;(function(t){t[t.SignedInteger=0]="SignedInteger",t[t.UnsignedInteger=1]="UnsignedInteger",t[t.Enumerated=2]="Enumerated",t[t.BitField=3]="BitField"})(U||(U={}));const c=P({type:"any",readable:!0,writeable:!0}),p={writeable:!1},b={readable:!1},_e=P({...c}),Se=P({...c,...p}),Le=P({...c,...b}),G=F({...c,type:"boolean"}),Ne=F({...G,...p}),Pe=F({...G,...b}),H=o({...c,type:"number"}),We=o({...H,...p}),Ee=o({...H,...b}),W=o({...c,type:"number",...h.UInt8}),Ae=o({...W,...p}),De=o({...W,...b}),X=o({...c,type:"number",...h.UInt16}),Be=o({...X,...p}),Te=o({...X,...b}),Y=o({...c,type:"number",...h.UInt24}),Fe=o({...Y,...p}),Me=o({...Y,...b}),J=o({...c,type:"number",...h.UInt32}),qe=o({...J,...p}),Ge=o({...J,...b}),K=o({...c,type:"number",...h.Int8}),He=o({...K,...p}),Xe=o({...K,...b}),Q=o({...c,type:"number",...h.Int16}),Ye=o({...Q,...p}),Je=o({...Q,...b}),Z=o({...c,type:"number",...h.Int24}),Ke=o({...Z,...p}),Qe=o({...Z,...b}),$=o({...c,type:"number",...h.Int32}),Ze=o({...$,...p}),$e=o({...$,...b}),E=V({...c,type:"string"}),et=V({...E,...p}),tt=V({...E,...b}),ee=V({...E,type:"color"}),nt=V({...ee,...p}),lt=V({...ee,...b}),te=o({...W,max:99}),st=o({...te,...p}),ot=o({...te,...b}),ne=q({...c,type:"duration"}),at=q({...ne,...p}),rt=q({...ne,...b}),le=M({...c,type:"buffer"}),it=M({...le,...p}),dt=M({...le,...b});Object.freeze(_e),Object.freeze(Se),Object.freeze(Le),Object.freeze(H),Object.freeze(We),Object.freeze(Ee),Object.freeze(W),Object.freeze(X),Object.freeze(Y),Object.freeze(J),Object.freeze(K),Object.freeze(Q),Object.freeze(Z),Object.freeze($),Object.freeze(Ae),Object.freeze(Be),Object.freeze(Fe),Object.freeze(qe),Object.freeze(He),Object.freeze(Ye),Object.freeze(Ke),Object.freeze(Ze),Object.freeze(De),Object.freeze(Te),Object.freeze(Me),Object.freeze(Ge),Object.freeze(Xe),Object.freeze(Je),Object.freeze(Qe),Object.freeze($e),Object.freeze(te),Object.freeze(st),Object.freeze(ot),Object.freeze(G),Object.freeze(Ne),Object.freeze(Pe),Object.freeze(E),Object.freeze(et),Object.freeze(tt),Object.freeze(ee),Object.freeze(nt),Object.freeze(lt),Object.freeze(ne),Object.freeze(at),Object.freeze(rt),Object.freeze(le),Object.freeze(it),Object.freeze(dt);function ut(t){return t===S.Europe||t===S["Europe (Long Range)"]||t===S.USA||t===S["USA (Long Range)"]}const ft={props:{headers:Array,node:Object},components:{ValueID:fe(()=>me(()=>import("./ValueId-Ci9qUjhE.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url))},mixins:[ce],data(){return{locError:null,nameError:null,options:{},maxLRPowerLevels:pe,newName:this.node.name,newLoc:this.node.loc,selectedRFRegion:this.node.RFRegion,configCCValueFormats:[{title:"Signed",value:U.SignedInteger},{title:"Unsigned",value:U.UnsignedInteger}],configCC:{value:0,valueSize:1,parameter:1,valueFormat:U.UnsignedInteger}}},computed:{...be(se,["mqtt","zwave"]),regionSupportsAutoPowerlevel(){var t;return ut((t=this.node)==null?void 0:t.RFRegion)},isAutoPowerLevelEnabled(){return this.zwave.rf.autoPowerlevels&&this.regionSupportsAutoPowerlevel},showPowerWarnings(){return!this.isAutoPowerLevelEnabled},commandGroups(){if(this.node){const t={};let e=!0;for(const i of this.node.values){const _=i.commandClassName+" v"+i.commandClassVersion;t[_]||(i.commandClassName==="Configuration"&&(e=!1),t[_]=[]),t[_].push(i)}return e&&(t.Configuration=[]),t}else return{}}},watch:{node(){this.newName=this.node.name,this.newLoc=this.node.loc},newLoc(t){this.locError=this.validateTopic(t)},newName(t){this.nameError=this.validateTopic(t)}},mounted(){this.options={transitionDuration:this.node.defaultTransitionDuration,volume:this.node.defaultVolume}},methods:{...ye(se,["showSnackbar"]),async setDefaults(t){let e="";switch(t){case"transitionDuration":e="defaultTransitionDuration";break;case"volume":e="defaultVolume";break}if(!e)return;(await this.app.apiRequest("setNodeDefaultSetValueOptions",[this.node.id,{[e]:this.options[t]}])).success&&this.showSnackbar(`Default node ${t} updated successffully`,"success")},async updateControllerNodeProp(t){(await this.app.apiRequest("updateControllerNodeProps",[null,[t]])).success&&this.showSnackbar("Powerlevel updated","success")},canResetConfig(t){return t&&t.commandClass===112&&t.commandClassVersion>3},async resetAllConfig(){await this.app.confirm("Attention","Are you sure you want to reset all configurations to default?","alert")&&(await this.app.apiRequest("sendCommand",[{nodeId:this.node.id,commandClass:112},"resetAll",[]])).success&&this.showSnackbar("All config values resetted","success")},async resetConfig(){(await this.app.apiRequest("sendCommand",[{nodeId:this.node.id,commandClass:112},"reset",[this.configCC.parameter]])).success&&this.showSnackbar(`Parameter ${this.configCC.parameter}: resetted`,"success")},async refreshCCValues(t){(await this.app.apiRequest("refreshCCValues",[this.node.id,t])).success&&this.showSnackbar(`Values of CC ${t} refreshed`,"success")},async configurationGet(){const t=await this.app.apiRequest("sendCommand",[{nodeId:this.node.id,commandClass:112},"get",[this.configCC.parameter]]);t.success&&this.showSnackbar(`Parameter ${this.configCC.parameter}: ${t.result}`,"success")},async configurationSet(){const t=await this.app.apiRequest("sendCommand",[{nodeId:this.node.id,commandClass:112},"set",[{parameter:this.configCC.parameter,value:this.configCC.value,valueSize:this.configCC.valueSize,valueFormat:this.configCC.valueFormat}]]);t.success&&(je(t.result)?this.showSnackbar(`Parameter ${this.configCC.parameter} set successfully`,"success"):this.showSnackbar(`Parameter ${this.configCC.parameter} set failed`,"error"))},getValue(t){return this.node&&this.node.values?this.node.values.find(e=>e.id===t.id):null},resetLocation(){setTimeout(()=>{this.newLoc=this.node.loc},10)},resetName(){setTimeout(()=>{this.newName=this.node.name},10)},async updatePowerLevel(){if(this.node){const t=[this.node.powerlevel,this.node.measured0dBm];(await this.app.apiRequest("setPowerlevel",t)).success&&this.showSnackbar("Powerlevel updated","success")}},async updateRFRegion(){if(this.node){const t=[this.selectedRFRegion];(await this.app.apiRequest("setRFRegion",t)).success&&this.showSnackbar("RF Region updated","success")}},async updateMaxLRPowerLevel(){if(this.node){const t=[this.node.maxLongRangePowerlevel];(await this.app.apiRequest("setMaxLRPowerLevel",t)).success&&this.showSnackbar("Maximum LR power level updated","success")}},async updateLoc(){this.node&&!this.locError&&(await this.app.apiRequest("setNodeLocation",[this.node.id,this.newLoc])).success&&this.showSnackbar("Node location updated","success")},async updateName(){this.node&&!this.nameError&&(await this.app.apiRequest("setNodeName",[this.node.id,this.newName])).success&&this.showSnackbar("Node name updated","success")},updateValue(t,e){this.$emit("updateValue",t,e)},validateTopic(t){const e=this.mqtt.disabled?"":Oe(t);return typeof e=="string"?e:""}}},mt={class:"d-flex flex-row",style:{"margin-top":"-8px",gap:"5px","margin-left":"5px"}},ct={class:"d-flex flex-row",style:{"margin-top":"-8px",gap:"5px","margin-left":"5px"}},pt={class:"d-flex flex-row",style:{"margin-top":"-8px",gap:"5px","margin-left":"5px"}},bt={class:"d-flex flex-row",style:{"margin-top":"-8px",gap:"5px"}},yt={class:"d-flex flex-row",style:{"margin-top":"-8px",gap:"5px"}};function Ot(t,e,i,_,r,a){const ie=ge("ValueID");return d(),f(ve,{fluid:""},{default:n(()=>[l(w,null,{default:n(()=>[l(m,{cols:"12",sm:"6",style:{"max-width":"300px"}},{default:n(()=>[l(I,{label:"Name","append-icon":"send",error:!!r.nameError,"error-messages":r.nameError,modelValue:r.newName,"onUpdate:modelValue":e[0]||(e[0]=s=>r.newName=s),modelModifiers:{trim:!0},clearable:"","clear-icon":"refresh","onClick:clear":a.resetName,"onClick:append":a.updateName},null,8,["error","error-messages","modelValue","onClick:clear","onClick:append"])]),_:1}),l(m,{cols:"12",sm:"6",style:{"max-width":"300px"}},{default:n(()=>[l(I,{label:"Location","append-icon":"send",modelValue:r.newLoc,"onUpdate:modelValue":e[1]||(e[1]=s=>r.newLoc=s),modelModifiers:{trim:!0},error:!!r.locError,"error-messages":r.locError,clearable:"","clear-icon":"refresh","onClick:clear":a.resetLocation,"onClick:append":a.updateLoc},null,8,["modelValue","error","error-messages","onClick:clear","onClick:append"])]),_:1})]),_:1}),i.node.isControllerNode?(d(),B(T,{key:0},[l(L,{class:"text-h6",style:{padding:"0"}},{default:n(()=>e[22]||(e[22]=[u("Controller Options")])),_:1,__:[22]}),l(w,null,{default:n(()=>[l(m,{cols:"12",style:{"max-width":"350px"}},{default:n(()=>[l(N,{label:"RF Region",items:i.node.rfRegions,modelValue:r.selectedRFRegion,"onUpdate:modelValue":e[3]||(e[3]=s=>r.selectedRFRegion=s),disabled:i.node.RFRegion===void 0,hint:i.node.RFRegion===void 0?"Not supported by your controller":"","persistent-hint":""},{append:n(()=>[C("div",mt,[v((d(),f(y,{color:"primary",size:"small",icon:"",onClick:e[2]||(e[2]=s=>a.updateControllerNodeProp("RFRegion"))},{default:n(()=>[l(g,null,{default:n(()=>e[23]||(e[23]=[u("refresh")])),_:1,__:[23]})]),_:1})),[[x,"Refresh","bottom"]]),v((d(),f(y,{color:"primary",size:"small",icon:"",onClick:a.updateRFRegion},{default:n(()=>[l(g,null,{default:n(()=>e[24]||(e[24]=[u("send")])),_:1,__:[24]})]),_:1},8,["onClick"])),[[x,"Save","bottom"]])])]),_:1},8,["items","modelValue","disabled","hint"])]),_:1})]),_:1}),l(w,null,{default:n(()=>[l(m,{cols:"12",sm:"6",style:{"max-width":"350px"}},{default:n(()=>[l(I,{label:"Normal Power Level",modelValue:i.node.powerlevel,"onUpdate:modelValue":e[4]||(e[4]=s=>i.node.powerlevel=s),modelModifiers:{number:!0},min:-10,max:20,step:.1,suffix:"dBm",type:"number",disabled:a.isAutoPowerLevelEnabled,hint:a.isAutoPowerLevelEnabled?"Automatic mode enabled in settings":"","persistent-hint":""},null,8,["modelValue","disabled","hint"])]),_:1}),l(m,{cols:"12",sm:"6",style:{"max-width":"350px"}},{default:n(()=>[l(I,{label:"Measured output power at 0 dBm","hide-details":"","append-icon":"send",modelValue:i.node.measured0dBm,"onUpdate:modelValue":e[6]||(e[6]=s=>i.node.measured0dBm=s),modelModifiers:{number:!0},min:-10,max:10,step:.1,suffix:"dBm",type:"number"},{append:n(()=>[C("div",ct,[v((d(),f(y,{color:"primary",size:"small",icon:"",onClick:e[5]||(e[5]=s=>a.updateControllerNodeProp("powerlevel"))},{default:n(()=>[l(g,null,{default:n(()=>e[25]||(e[25]=[u("refresh")])),_:1,__:[25]})]),_:1})),[[x,"Refresh","bottom"]]),v((d(),f(y,{color:"primary",size:"small",icon:"",onClick:a.updatePowerLevel},{default:n(()=>[l(g,null,{default:n(()=>e[26]||(e[26]=[u("send")])),_:1,__:[26]})]),_:1},8,["onClick"])),[[x,"Save","bottom"]])])]),_:1},8,["modelValue"])]),_:1})]),_:1}),i.node.supportsLongRange?(d(),f(w,{key:0},{default:n(()=>[l(m,{cols:"12",style:{"max-width":"350px"}},{default:n(()=>[l(N,{label:"Maximum LR Power Level",items:r.maxLRPowerLevels,modelValue:i.node.maxLongRangePowerlevel,"onUpdate:modelValue":e[8]||(e[8]=s=>i.node.maxLongRangePowerlevel=s),disabled:a.isAutoPowerLevelEnabled,hint:a.isAutoPowerLevelEnabled?"Automatic mode enabled in settings":"","persistent-hint":""},Ce({_:2},[a.isAutoPowerLevelEnabled?void 0:{name:"append",fn:n(()=>[C("div",pt,[v((d(),f(y,{color:"primary",size:"small",icon:"",onClick:e[7]||(e[7]=s=>a.updateControllerNodeProp("maxLongRangePowerlevel"))},{default:n(()=>[l(g,null,{default:n(()=>e[27]||(e[27]=[u("refresh")])),_:1,__:[27]})]),_:1})),[[x,"Refresh","bottom"]]),v((d(),f(y,{color:"primary",size:"small",icon:"",onClick:a.updateMaxLRPowerLevel},{default:n(()=>[l(g,null,{default:n(()=>e[28]||(e[28]=[u("send")])),_:1,__:[28]})]),_:1},8,["onClick"])),[[x,"Save","bottom"]])])]),key:"0"}]),1032,["items","modelValue","disabled","hint"])]),_:1})]),_:1})):R("",!0),a.showPowerWarnings?(d(),f(m,{key:1,style:{"max-width":"700px"},dense:""},{default:n(()=>[l(oe,{text:"",type:"warning"},{default:n(()=>e[29]||(e[29]=[C("strong",null,"DO NOT CHANGE THESE VALUES UNLESS YOU KNOW WHAT YOU ARE DOING ",-1),C("small",null,[u("Increasing the TX power (normal power level) may be "),C("b",null,"illegal"),u(", depending on where you are located. ")],-1),C("small",null,'Increasing the TX power will only make the nodes "hear" the controller better, but not vice versa',-1)])),_:1,__:[29]}),l(oe,{class:"pb-0",text:"",style:{"white-space":"break-spaces"},type:"info"},{default:n(()=>e[30]||(e[30]=[C("small",null,ae("Please consult the manufacturer for the default values, as these can vary between different sticks."),-1)])),_:1,__:[30]})]),_:1})):R("",!0)],64)):R("",!0),C("div",null,[i.node.isControllerNode?R("",!0):(d(),f(L,{key:0,class:"text-h6",style:{padding:"0"}},{default:n(()=>e[31]||(e[31]=[u("Send Options")])),_:1,__:[31]})),i.node.isControllerNode?R("",!0):(d(),f(w,{key:1,class:"mt-0"},{default:n(()=>[l(m,{cols:"12",sm:"6",style:{"max-width":"300px","padding-top":"0"}},{default:n(()=>[l(I,{label:"Transition duration",hint:"Ex: '10s' (10 seconds)","persistent-hint":"",modelValue:r.options.transitionDuration,"onUpdate:modelValue":e[11]||(e[11]=s=>r.options.transitionDuration=s),modelModifiers:{trim:!0}},{append:n(()=>[C("div",bt,[v((d(),f(y,{icon:"",size:"small",onClick:e[9]||(e[9]=s=>r.options.transitionDuration=i.node.defaultTransitionDuration||"")},{default:n(()=>[l(g,null,{default:n(()=>e[32]||(e[32]=[u("clear")])),_:1,__:[32]})]),_:1})),[[x,"Clear","bottom"]]),v((d(),f(y,{icon:"",size:"small",onClick:e[10]||(e[10]=s=>a.setDefaults("transitionDuration"))},{default:n(()=>[l(g,null,{default:n(()=>e[33]||(e[33]=[u("save")])),_:1,__:[33]})]),_:1})),[[x,"Save","bottom"]])])]),_:1},8,["modelValue"])]),_:1}),l(m,{cols:"12",sm:"6",style:{"max-width":"300px","padding-top":"0"}},{default:n(()=>[l(xe,{label:"Volume",hint:"The volume (for the Sound Switch CC)","persistent-hint":"",modelValue:r.options.volume,"onUpdate:modelValue":e[14]||(e[14]=s=>r.options.volume=s),modelModifiers:{number:!0}},{append:n(()=>[C("div",yt,[v((d(),f(y,{icon:"",size:"small",onClick:e[12]||(e[12]=s=>r.options.volume=i.node.defaultVolume||"")},{default:n(()=>[l(g,null,{default:n(()=>e[34]||(e[34]=[u("clear")])),_:1,__:[34]})]),_:1})),[[x,"Clear","bottom"]]),v((d(),f(y,{icon:"",size:"small",onClick:e[13]||(e[13]=s=>a.setDefaults("volume"))},{default:n(()=>[l(g,null,{default:n(()=>e[35]||(e[35]=[u("save")])),_:1,__:[35]})]),_:1})),[[x,"Save","bottom"]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})),!i.node.isControllerNode||i.node.values.length?(d(),f(w,{key:2},{default:n(()=>[l(L,{class:"text-h6"},{default:n(()=>e[36]||(e[36]=[u("Values")])),_:1,__:[36]}),l(Re,{class:"expansion-panels-outlined",variant:"accordion",multiple:"",flat:""},{default:n(()=>[(d(!0),B(T,null,re(a.commandGroups,(s,A)=>(d(),f(he,{key:A},{default:n(()=>[l(Ie,null,{default:n(()=>[l(w,{"no-gutters":""},{default:n(()=>[l(m,{"align-self":"center"},{default:n(()=>[u(ae(A),1)]),_:2},1024),l(m,{class:"text-right"},{default:n(()=>[a.canResetConfig(s[0])?(d(),f(y,{key:0,onClick:e[15]||(e[15]=k(O=>a.resetAllConfig(),["stop"])),color:"error",class:"mr-3",variant:"outlined",size:"x-small"},{default:n(()=>[e[38]||(e[38]=u(" Reset ")),l(g,{size:"x-small",end:""},{default:n(()=>e[37]||(e[37]=[u("clear")])),_:1,__:[37]})]),_:1,__:[38]})):R("",!0),s[0]?(d(),f(y,{key:1,class:"mr-1",onClick:k(O=>a.refreshCCValues(s[0].commandClass),["stop"]),color:"primary",variant:"outlined",size:"x-small"},{default:n(()=>[e[40]||(e[40]=u(" Refresh ")),l(g,{size:"x-small",end:""},{default:n(()=>e[39]||(e[39]=[u("refresh")])),_:1,__:[39]})]),_:2,__:[40]},1032,["onClick"])):R("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024),l(ze,null,{default:n(()=>[l(w,null,{default:n(()=>[(d(!0),B(T,null,re(s,(O,D)=>(d(),f(m,{cols:"12",key:D,sm:"6",md:"4"},{default:n(()=>[l(ie,{onUpdateValue:a.updateValue,modelValue:s[D],"onUpdate:modelValue":de=>s[D]=de,node:i.node},null,8,["onUpdateValue","modelValue","onUpdate:modelValue","node"])]),_:2},1024))),128))]),_:2},1024),l(w,null,{default:n(()=>[A.startsWith("Configuration")&&!i.node.isControllerNode?(d(),f(m,{key:0,cols:"12",sm:"6",md:"4"},{default:n(()=>[l(L,{class:"valueid-label"},{default:n(()=>e[41]||(e[41]=[u("Custom Configuration ")])),_:1,__:[41]}),l(w,null,{default:n(()=>[l(m,{cols:"3"},{default:n(()=>[l(I,{label:"Parameter","hide-details":"",modelValue:r.configCC.parameter,"onUpdate:modelValue":e[16]||(e[16]=O=>r.configCC.parameter=O),modelModifiers:{number:!0}},null,8,["modelValue"])]),_:1}),l(m,{cols:"3"},{default:n(()=>[l(N,{label:"Size","hide-details":"",items:[1,2,3,4],modelValue:r.configCC.valueSize,"onUpdate:modelValue":e[17]||(e[17]=O=>r.configCC.valueSize=O),modelModifiers:{number:!0}},null,8,["modelValue"])]),_:1}),l(m,{cols:"3"},{default:n(()=>[l(I,{label:"Value","hide-details":"",modelValue:r.configCC.value,"onUpdate:modelValue":e[18]||(e[18]=O=>r.configCC.value=O),modelModifiers:{number:!0}},null,8,["modelValue"])]),_:1}),l(m,{cols:t.$vuetify.display.xs?4:3},{default:n(()=>[l(N,{label:"Format","hide-details":"",items:r.configCCValueFormats,modelValue:r.configCC.valueFormat,"onUpdate:modelValue":e[19]||(e[19]=O=>r.configCC.valueFormat=O)},null,8,["items","modelValue"])]),_:1},8,["cols"]),l(m,{class:"d-flex",style:{gap:"10px"}},{default:n(()=>[l(y,{variant:"flat",width:"60px",onClick:e[20]||(e[20]=k(O=>a.configurationGet(),["stop"])),color:"success",size:"x-small"},{default:n(()=>e[42]||(e[42]=[u(" GET ")])),_:1,__:[42]}),l(y,{variant:"flat",width:"60px",onClick:e[21]||(e[21]=k(O=>a.configurationSet(),["stop"])),color:"primary",size:"x-small"},{default:n(()=>e[43]||(e[43]=[u(" SET ")])),_:1,__:[43]}),a.canResetConfig(s[0])?(d(),f(y,{key:0,variant:"flat",width:"60px",onClick:k(a.resetConfig,["stop"]),size:"x-small",color:"error"},{default:n(()=>e[44]||(e[44]=[u("Reset")])),_:1,__:[44]},8,["onClick"])):R("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024)):R("",!0)]),_:2},1024)]),_:2},1024),l(we)]),_:2},1024))),128))]),_:1})]),_:1})):R("",!0)])]),_:1})}const vt=ue(ft,[["render",Ot]]);export{vt as default};
|