Removed generics from device listener and updated some js libs

This commit is contained in:
Ziver Koc 2021-07-02 00:06:26 +02:00
parent 53d471c0aa
commit 94bfbbd664
18 changed files with 707 additions and 689 deletions

View file

@ -35,7 +35,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* Controller that will connect to a Zigbee USB coordinator.
*/
public class HalZigbeeController implements HalSensorController,
HalEventController,
@ -254,7 +254,7 @@ public class HalZigbeeController implements HalSensorController,
if (config != null) {
registerCluster(endpoint, config);
} else {
logger.finest("[Node: " + endpoint.getIeeeAddress() + "] Cluster ID '" + inputClusterId + "' is not supported.");
logger.finest("[Node: " + endpoint.getIeeeAddress() + ", Endpoint: " + endpoint.getEndpointId() + "] Cluster ID '" + inputClusterId + "' is not supported.");
}
}
}

View file

@ -52,8 +52,7 @@ public class ZigBeeDataStore implements ZigBeeNetworkDataStore {
@Override
public void writeNode(ZigBeeNodeDao node) {
logger.fine("[Node: " + node.getIeeeAddress() + "] Storing Zigbee Node in DB: " +
"IeeAddr: " + node.getIeeeAddress() + ", " +
logger.fine("[Node: " + node.getIeeeAddress() + "]: Storing Zigbee Node in DB: " +
"NetAddr: " + node.getNetworkAddress() + ", " +
"binding: " + node.getBindingTable() + ", " +
"description: " + node.getNodeDescriptor() + ", " +
@ -66,7 +65,7 @@ public class ZigBeeDataStore implements ZigBeeNetworkDataStore {
@Override
public void removeNode(IeeeAddress address) {
logger.fine("[Node: " + address + "] Removing Node from DB.");
logger.fine("[Node: " + address + "]: Removing Node from DB.");
devices.remove(address);
}

View file

@ -29,6 +29,9 @@ import com.zsmartsystems.zigbee.ZigBeeNetworkManager;
import com.zsmartsystems.zigbee.ZigBeeNode;
import com.zsmartsystems.zigbee.zcl.ZclAttribute;
import com.zsmartsystems.zigbee.zcl.ZclCluster;
import se.hal.intf.HalDeviceConfig;
import se.hal.intf.HalDeviceData;
import se.hal.intf.HalDeviceReportListener;
import zutil.log.CompactLogFormatter;
import zutil.log.LogUtil;
@ -46,6 +49,12 @@ public class HalZigbeeControllerTest {
HalZigbeeController controller = new HalZigbeeController();
controller.initialize("COM5", HalZigbeeController.ZIGBEE_DONGLE_CC2531);
controller.addListener(new HalDeviceReportListener() {
@Override
public void reportReceived(HalDeviceConfig deviceConfig, HalDeviceData deviceData) {
System.out.println("Device reported: " + deviceConfig + " , " + deviceData);
}
});
Scanner in = new Scanner(System.in);
handleConsoleInput("h", in, controller.networkManager);