Skip to content

Commit

Permalink
Add fingerprint command to dump useful information about a device (#1152
Browse files Browse the repository at this point in the history
)

Signed-off-by: Chris Jackson <[email protected]>
  • Loading branch information
cdjackson authored Oct 4, 2020
1 parent 8314be9 commit 84042f7
Show file tree
Hide file tree
Showing 7 changed files with 432 additions and 22 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,14 @@ Note that the console is currently being refactored and this readme only documen
|node |Provides detailed information about a node |
|endpoint |Provides detailed information about an endpoint |
|info |Get basic info about a device |
|fingerprint |Get detailed information about a device |
|read |Read an attribute |
|write |Write an attribute |
|bind |Binds a device to another device |
|unbind |Unbinds a device from another device |
|bindtable |Reads and displays the binding table from a node |
|attsupported |Check what attributes are supported within a cluster |
|cmdsupported |Check what commanda are supported within a cluster |
|subscribe |Subscribe to attribute reports |
|unsubscribe |Unsubscribe from attribute reports |
|reportcfg |Read the reporting configuration of an attribute |
Expand All @@ -307,6 +309,10 @@ Note that the console is currently being refactored and this readme only documen
|netstart |Join or Form a network as a router or coordinator |
|netbackup |Backup or restores the state of the dongle |
|discovery |Gets information on the network discovery tasks |
|on |Turns a device on |
|off |Turns a device off |
|level |Sets the level on a level control device |
|covering |Sets the level on a window covering device |


### Ember NCP Commands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import com.zsmartsystems.zigbee.console.ZigBeeConsoleCommandsSupportedCommand;
import com.zsmartsystems.zigbee.console.ZigBeeConsoleDescribeEndpointCommand;
import com.zsmartsystems.zigbee.console.ZigBeeConsoleDescribeNodeCommand;
import com.zsmartsystems.zigbee.console.ZigBeeConsoleDeviceFingerprintCommand;
import com.zsmartsystems.zigbee.console.ZigBeeConsoleDeviceInformationCommand;
import com.zsmartsystems.zigbee.console.ZigBeeConsoleInstallKeyCommand;
import com.zsmartsystems.zigbee.console.ZigBeeConsoleLinkKeyCommand;
Expand Down Expand Up @@ -190,6 +191,7 @@ public ZigBeeConsole(final ZigBeeNetworkManager networkManager, final ZigBeeTran
newCommands.put("attsupported", new ZigBeeConsoleAttributeSupportedCommand());
newCommands.put("cmdsupported", new ZigBeeConsoleCommandsSupportedCommand());

newCommands.put("fingerprint", new ZigBeeConsoleDeviceFingerprintCommand());
newCommands.put("info", new ZigBeeConsoleDeviceInformationCommand());
newCommands.put("join", new ZigBeeConsoleNetworkJoinCommand());
newCommands.put("leave", new ZigBeeConsoleNetworkLeaveCommand());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,14 @@
import com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit;
import com.zsmartsystems.zigbee.zcl.clusters.ZclBasicCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclColorControlCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclGroupsCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclIasZoneCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclIdentifyCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclLevelControlCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclOnOffCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclPollControlCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclPressureMeasurementCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclScenesCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclThermostatCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclWindowCoveringCluster;

Expand Down Expand Up @@ -104,16 +108,20 @@ public static void main(final String[] args) {

final Set<Integer> supportedClientClusters = new TreeSet<>();
supportedClientClusters.addAll(Stream
.of(ZclBasicCluster.CLUSTER_ID, ZclOnOffCluster.CLUSTER_ID, ZclLevelControlCluster.CLUSTER_ID,
.of(ZclBasicCluster.CLUSTER_ID, ZclIdentifyCluster.CLUSTER_ID, ZclGroupsCluster.CLUSTER_ID,
ZclScenesCluster.CLUSTER_ID,
ZclPollControlCluster.CLUSTER_ID, ZclOnOffCluster.CLUSTER_ID, ZclLevelControlCluster.CLUSTER_ID,
ZclColorControlCluster.CLUSTER_ID, ZclPressureMeasurementCluster.CLUSTER_ID,
ZclThermostatCluster.CLUSTER_ID, ZclWindowCoveringCluster.CLUSTER_ID)
ZclThermostatCluster.CLUSTER_ID, ZclWindowCoveringCluster.CLUSTER_ID, 1000)
.collect(Collectors.toSet()));

final Set<Integer> supportedServerClusters = new TreeSet<>();
supportedServerClusters.addAll(Stream
.of(ZclBasicCluster.CLUSTER_ID, ZclOnOffCluster.CLUSTER_ID, ZclLevelControlCluster.CLUSTER_ID,
.of(ZclBasicCluster.CLUSTER_ID, ZclIdentifyCluster.CLUSTER_ID, ZclGroupsCluster.CLUSTER_ID,
ZclScenesCluster.CLUSTER_ID,
ZclPollControlCluster.CLUSTER_ID, ZclOnOffCluster.CLUSTER_ID, ZclLevelControlCluster.CLUSTER_ID,
ZclColorControlCluster.CLUSTER_ID, ZclPressureMeasurementCluster.CLUSTER_ID,
ZclWindowCoveringCluster.CLUSTER_ID)
ZclWindowCoveringCluster.CLUSTER_ID, 1000)
.collect(Collectors.toSet()));

final TransportConfig transportOptions = new TransportConfig();
Expand Down
Loading

0 comments on commit 84042f7

Please sign in to comment.