2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.velux.internal.bridge;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.velux.internal.bridge.common.RunProductSearch;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
21 * The {@link VeluxBridgeDeviceCheckLostNodes} represents a complete set of transactions
22 * for querying device status on the <B>Velux</B> bridge.
24 * It therefore provides a method
26 * <LI>{@link #initiate} for starting the detection.
29 * @see VeluxBridgeProvider
31 * @author Guenther Schreiner - Initial contribution
34 public class VeluxBridgeDeviceCheckLostNodes {
35 private final Logger logger = LoggerFactory.getLogger(VeluxBridgeDeviceCheckLostNodes.class);
37 // Class access methods
40 * Login into bridge, query the bridge for device status and logout from bridge
41 * based on a well-prepared environment of a {@link VeluxBridgeProvider}.
43 * @param bridge Initialized Velux bridge handler.
45 public void initiate(VeluxBridge bridge) {
46 logger.trace("initiate() called.");
47 RunProductSearch bcp = bridge.bridgeAPI().runProductSearch();
48 if (bridge.bridgeCommunicate(bcp) && bcp.isCommunicationSuccessful()) {
49 logger.trace("initiate() finished successfully.");
51 logger.trace("initiate() finished with failure.");