+
+
+
+
+
+
+ [[computeSelectCaptionGroup(state)]]
+
+
+
+
+
+
-
+ slot="dropdown-content"
+ selected='{{selectedTargetNode}}'>
+
[[computeSelectCaption(state)]]
-
-
-
-
-
-
-
- [[computeSelectCaptionGroup(state)]]
-
-
-
-
-
-
-
- Other Nodes in this group:
-
- [[state]]
-
-
-
- Max Associations:
- [[maxAssociations]]
-
-
-
-
+
+
+
Other Nodes in this group:
+
+ [[state]]
+
+
+
+ Max Associations:
+ [[maxAssociations]]
+
+
+
+
+
+
+ Add To Group
-
- Remove From Group
+ >Add To Group
+
+
+ Remove From Group
+
-
-
+
@@ -164,15 +167,37 @@ Polymer({
computeMaxAssociations: function (selectedGroup) {
if (selectedGroup === -1) return -1;
var maxAssociations = this.groups[selectedGroup].value.max_associations;
- if (!maxAssociations) return ['None'];
+ if (!maxAssociations) return 'None';
return maxAssociations;
},
computeOtherGroupNodes: function (selectedGroup) {
if (selectedGroup === -1) return -1;
- var associations = Object.values(this.groups[selectedGroup].value.associations);
+ var associations = Object.values(this.groups[selectedGroup].value.association_instances);
if (!associations.length) return ['None'];
- return associations;
+ return associations.map((assoc) => {
+ if (!assoc.length || assoc.length !== 2) {
+ return 'Unknown Node: ' + assoc;
+ }
+ const id = assoc[0];
+ const instance = assoc[1];
+ const node = this.nodes.find(n => n.attributes.node_id === id);
+ if (!node) {
+ return 'Unknown Node (id: ' + (instance ? id + '.' + instance : id) + ')';
+ }
+ let caption = this.computeSelectCaption(node);
+ if (instance) {
+ caption += '/ Instance: ' + instance;
+ }
+ return caption;
+ });
+ },
+
+ computeTargetInGroup: function (selectedGroup, selectedTargetNode) {
+ if (selectedGroup === -1 || selectedTargetNode === -1) return false;
+ const associations = Object.values(this.groups[selectedGroup].value.associations);
+ if (!associations.length) return false;
+ return associations.indexOf(this.nodes[selectedTargetNode].attributes.node_id) !== -1;
},
computeSelectCaption: function (stateObj) {
@@ -186,11 +211,11 @@ Polymer({
},
computeIsTargetNodeSelected: function (selectedTargetNode) {
- return (!this.nodes || selectedTargetNode === -1);
+ return this.nodes && selectedTargetNode !== -1;
},
computeIsGroupSelected: function (selectedGroup) {
- return (!this.nodes || this.selectedNode === -1 || selectedGroup === -1);
+ return this.nodes && this.selectedNode !== -1 && selectedGroup !== -1;
},
computeAssocServiceData: function (selectedGroup, type) {
@@ -223,4 +248,3 @@ Polymer({
},
});
-
diff --git a/panels/config/zwave/zwave-log.html b/panels/config/zwave/zwave-log.html
index 0487765cd2..27d8c1b6a0 100644
--- a/panels/config/zwave/zwave-log.html
+++ b/panels/config/zwave/zwave-log.html
@@ -2,6 +2,8 @@
+
+
-
-
-
-
+
+ OZW Log
+
+
+
+
+
diff --git a/panels/config/zwave/zwave-network.html b/panels/config/zwave/zwave-network.html
index 73be3d928b..a5f585a53c 100644
--- a/panels/config/zwave/zwave-network.html
+++ b/panels/config/zwave/zwave-network.html
@@ -4,6 +4,8 @@
+
+
-
-
-
-
Add Node Secure
-
-
-
Add Node
-
-
-
Remove Node
-
+
+
+
Z-Wave Network Management
+
-
- Cancel Command
-
+
+ Run commands that affect the Z-Wave network. You won't get feedback on whether the command succeeded, but you can look in the OZW Log to try to figure out.
+
-
-
-
Heal Network
-
Start Network
-
+
+
+ Add Node Secure
+
- Stop Network
-
+ Add Node
+
- Soft Reset
-
+ Remove Node
+
- Test Network
-
+
+
+ Cancel Command
+
-
-
+
+
+ Heal Network
+
+ Start Network
+
+
+ Stop Network
+
+
+ Soft Reset
+
+
+ Test Network
+
+
+
+
+