Search in sources :

Example 1 with Universe

use of org.eclipse.smarthome.binding.dmx.internal.multiverse.Universe in project smarthome by eclipse.

the class TestBridgeHandler method updateConfiguration.

@Override
protected void updateConfiguration() {
    universe = new Universe(MIN_UNIVERSE_ID);
    universe.setRefreshTime(0);
    super.updateConfiguration();
    updateStatus(ThingStatus.ONLINE, ThingStatusDetail.NONE);
    logger.debug("updated configuration for Test bridge {}", this.thing.getUID());
}
Also used : Universe(org.eclipse.smarthome.binding.dmx.internal.multiverse.Universe)

Example 2 with Universe

use of org.eclipse.smarthome.binding.dmx.internal.multiverse.Universe in project smarthome by eclipse.

the class Lib485BridgeHandler method updateConfiguration.

@Override
protected void updateConfiguration() {
    Configuration configuration = getConfig();
    universe = new Universe(MIN_UNIVERSE_ID);
    receiverNodes.clear();
    if (configuration.get(CONFIG_ADDRESS) == null) {
        receiverNodes.put(new IpNode("localhost:9020"), null);
        logger.debug("sending to {} for {}", receiverNodes, this.thing.getUID());
    } else {
        try {
            for (IpNode receiverNode : IpNode.fromString((String) configuration.get(CONFIG_ADDRESS), DEFAULT_PORT)) {
                receiverNodes.put(receiverNode, null);
                logger.debug("sending to {} for {}", receiverNode, this.thing.getUID());
            }
        } catch (IllegalArgumentException e) {
            updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, e.getMessage());
            return;
        }
    }
    super.updateConfiguration();
    updateStatus(ThingStatus.UNKNOWN, ThingStatusDetail.NONE);
    logger.debug("updated configuration for Lib485 bridge {}", this.thing.getUID());
}
Also used : Configuration(org.eclipse.smarthome.config.core.Configuration) IpNode(org.eclipse.smarthome.binding.dmx.internal.dmxoverethernet.IpNode) Universe(org.eclipse.smarthome.binding.dmx.internal.multiverse.Universe)

Aggregations

Universe (org.eclipse.smarthome.binding.dmx.internal.multiverse.Universe)2 IpNode (org.eclipse.smarthome.binding.dmx.internal.dmxoverethernet.IpNode)1 Configuration (org.eclipse.smarthome.config.core.Configuration)1