]> git.basschouten.com Git - openhab-addons.git/blob
c15c140ebaad43480858d5c466657ab2290cbab4
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.milight.internal.test;
14
15 import org.openhab.binding.milight.internal.MilightBindingConstants;
16 import org.openhab.core.config.discovery.AbstractDiscoveryService;
17 import org.openhab.core.config.discovery.DiscoveryService;
18 import org.osgi.service.component.annotations.Component;
19 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory;
21
22 /**
23  * A simple discovery service that will make the emulated V6 bridge visible to the Inbox of OH.
24  * Enable this in OSGI-INF/TestDiscovery.xml with enabled="true".
25  *
26  * @author David Graeff - Initial contribution
27  */
28 @Component(service = DiscoveryService.class, enabled = false)
29 public class TestDiscovery extends AbstractDiscoveryService {
30     private final Logger logger = LoggerFactory.getLogger(TestDiscovery.class);
31
32     @SuppressWarnings("unused")
33     private EmulatedV6Bridge server;
34
35     public TestDiscovery() {
36         super(MilightBindingConstants.BRIDGE_THING_TYPES_UIDS, 2, true);
37         try {
38             server = new EmulatedV6Bridge();
39         } catch (Exception e) {
40             logger.warn("An error occurred", e);
41         }
42     }
43
44     @Override
45     protected void startScan() {
46     }
47 }