Search in sources :

Example 1 with Hyperion

use of org.openhab.binding.hyperion.internal.protocol.ng.Hyperion in project openhab-addons by openhab.

the class HyperionNgHandler method handleServerInfoResponse.

protected void handleServerInfoResponse(NgResponse response) {
    NgInfo info = response.getInfo();
    if (info != null) {
        // update Hyperion, older API compatibility
        Hyperion hyperion = info.getHyperion();
        if (hyperion != null) {
            updateHyperion(hyperion);
        }
        // populate the effect states
        List<Effect> effects = info.getEffects();
        populateEffects(effects);
        // update adjustments
        List<Adjustment> adjustments = info.getAdjustment();
        updateAdjustments(adjustments);
        // update components
        List<Component> components = info.getComponents();
        updateComponents(components);
        // update colors/effects
        List<Priority> priorities = info.getPriorities();
        updatePriorities(priorities);
    }
}
Also used : Adjustment(org.openhab.binding.hyperion.internal.protocol.ng.Adjustment) Hyperion(org.openhab.binding.hyperion.internal.protocol.ng.Hyperion) Priority(org.openhab.binding.hyperion.internal.protocol.ng.Priority) Effect(org.openhab.binding.hyperion.internal.protocol.v1.Effect) Component(org.openhab.binding.hyperion.internal.protocol.ng.Component) NgInfo(org.openhab.binding.hyperion.internal.protocol.ng.NgInfo)

Aggregations

Adjustment (org.openhab.binding.hyperion.internal.protocol.ng.Adjustment)1 Component (org.openhab.binding.hyperion.internal.protocol.ng.Component)1 Hyperion (org.openhab.binding.hyperion.internal.protocol.ng.Hyperion)1 NgInfo (org.openhab.binding.hyperion.internal.protocol.ng.NgInfo)1 Priority (org.openhab.binding.hyperion.internal.protocol.ng.Priority)1 Effect (org.openhab.binding.hyperion.internal.protocol.v1.Effect)1