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.milight.internal.test;
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;
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".
26 * @author David Graeff - Initial contribution
28 @Component(service = DiscoveryService.class, enabled = false)
29 public class TestDiscovery extends AbstractDiscoveryService {
30 private final Logger logger = LoggerFactory.getLogger(TestDiscovery.class);
32 @SuppressWarnings("unused")
33 private EmulatedV6Bridge server;
35 public TestDiscovery() {
36 super(MilightBindingConstants.BRIDGE_THING_TYPES_UIDS, 2, true);
38 server = new EmulatedV6Bridge();
39 } catch (Exception e) {
40 logger.warn("An error occurred", e);
45 protected void startScan() {