]> git.basschouten.com Git - openhab-addons.git/blob
bd01e4cc8cd5a0460af8d94ea601d9d1279fe12a
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.nuvo.internal.communication;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.nuvo.internal.NuvoException;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
19
20 /**
21  * Class to create a default NuvoDefaultConnector before initialization is complete.
22  *
23  * @author Laurent Garnier - Initial contribution
24  * @author Michael Lobstein - Adapted for the Nuvo binding
25  */
26 @NonNullByDefault
27 public class NuvoDefaultConnector extends NuvoConnector {
28
29     private final Logger logger = LoggerFactory.getLogger(NuvoDefaultConnector.class);
30
31     @Override
32     public void open() throws NuvoException {
33         logger.warn("Nuvo binding incorrectly configured. Please configure for Serial or IP over serial connection");
34         setConnected(false);
35     }
36
37     @Override
38     public void close() {
39         setConnected(false);
40     }
41 }