Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Fix POM and remove test from old API #99

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions zigbee-gateway-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@

<dependency>
<groupId>org.bubblecloud.zigbee4java</groupId>
<artifactId>zigbee-api</artifactId>
<artifactId>zigbee-common</artifactId>
<version>3.0.3-SNAPSHOT</version>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,45 +75,4 @@ public void testDiscoverNetwork() throws Exception {
zigbeeNetworkManager.shutdown();
}

@Test
@Ignore
public void testZigBeeApi() throws Exception {

final Set<DiscoveryMode> discoveryModes = DiscoveryMode.ALL;
discoveryModes.remove(DiscoveryMode.LinkQuality);
final ZigBeeApi zigbeeApi = new ZigBeeApi(port, 4951, 11, null, false, discoveryModes);
zigbeeApi.startup();

Thread.sleep(1000);

logger.info("Listing devices:");
for (final Device device : zigbeeApi.getZigBeeApiContext().getDevices()) {
logger.info(device.getClass().getSimpleName() + " : " + device.getEndpoint().getEndpointId());
}

while (true) {
try {
final Device switchDevice = zigbeeApi.getZigBeeApiContext().getDevice("00:12:4B:00:01:DD:8B:21/2");
final Device lampDevice = zigbeeApi.getZigBeeApiContext().getDevice("00:17:88:01:00:BE:51:EC/11");

if (lampDevice == null) {
continue;
}

Thread.sleep(1000);

final OnOff onOff = lampDevice.getCluster(OnOff.class);
onOff.off();

break;
} catch (final Throwable t) {
logger.error("Error getting information for device.", t);
break;
}
}

zigbeeApi.shutdown();
}


}