这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ public class PlugwiseBinding extends AbstractActiveBinding<PlugwiseBindingProvid
@Override
public void updated(Dictionary config) throws ConfigurationException {

int interval = 150;

if (config != null) {

// First of all make sure the Stick gets set up
Expand Down Expand Up @@ -102,7 +100,10 @@ public void updated(Dictionary config) throws ConfigurationException {
logger.info("Plugwise added Stick connected to serial port {}",value);
} else if ("interval".equals(configKey)) {
// do nothing for now. we will set in the second run
} else if ("retries".equals(configKey)) {
// do nothing for now. we will set in the second run
}

else {
throw new ConfigurationException(configKey,
"the given configKey '" + configKey + "' is unknown");
Expand Down Expand Up @@ -146,8 +147,11 @@ public void updated(Dictionary config) throws ConfigurationException {

if ("interval".equals(configKey)) {
stick.setInterval(Integer.valueOf(value));
logger.info("Plugwise set the interval to send ZigBee PDUs to {} ms",value);
} else if ("port".equals(configKey)) {
logger.info("Setting the interval to send ZigBee PDUs to {} ms",value);
} else if ("retries".equals(configKey)) {
stick.setRetries(Integer.valueOf(value));
logger.info("Setting the maximum number of attempts to send a message to ",value);
}else if ("port".equals(configKey)) {
//ignore
}
else {
Expand Down Expand Up @@ -404,7 +408,7 @@ protected void execute() {
// check if the device already exists (via cfg definition of Role Call)

if(stick.getDevice(anElement.getId())==null) {
logger.info("The Plugwise device with id {} is not yet defined",anElement.getId());
logger.debug("The Plugwise device with id {} is not yet defined",anElement.getId());

// check if the config string really contains a MAC address
Pattern MAC_PATTERN = Pattern.compile("(\\w{16})");
Expand Down
Loading