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.vitotronic.internal;
15 import java.util.Collections;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
24 * The {@link VitotronicBinding} class defines common constants, which are
25 * used across the whole binding.
27 * @author Stefan Andres - Initial contribution
30 public class VitotronicBindingConstants {
32 public static final String BROADCAST_MESSAGE = "@@@@VITOTRONIC@@@@/";
33 public static final int BROADCAST_PORT = 31113;
35 public static final String BINDING_ID = "vitotronic";
36 public static final String IP_ADDRESS = "ipAddress";
37 public static final String PORT = "port";
38 public static final String ADAPTER_ID = "adapterID";
39 public static final String REFRESH_INTERVAL = "refreshInterval";
40 public static final String DISCOVERY_INTERVAL = "discoveryInterval";
42 // List of main device types
43 public static final String BRIDGE_VITOTRONIC = "bridge";
45 // List of all Thing Type
46 public static final String THING_ID_HEATING = "heating";
47 public static final String THING_ID_GASBURNER = "gasburner";
48 public static final String THING_ID_PELLETBURNER = "pelletburner";
49 public static final String THING_ID_OILBURNER = "oilburner";
50 public static final String THING_ID_STORAGETANK = "storagetank";
51 public static final String THING_ID_CIRCUIT = "circuit";
52 public static final String THING_ID_SOLAR = "solar";
53 public static final String THING_ID_TEMPERATURESENSOR = "temperaturesensor";
54 public static final String THING_ID_PUMP = "pump";
55 public static final String THING_ID_VALVE = "valve";
57 // List of all Thing Type UIDs
58 public static final ThingTypeUID THING_TYPE_UID_BRIDGE = new ThingTypeUID(BINDING_ID, BRIDGE_VITOTRONIC);
59 public static final ThingTypeUID THING_TYPE_UID_HEATING = new ThingTypeUID(BINDING_ID, THING_ID_HEATING);
60 public static final ThingTypeUID THING_TYPE_UID_GASBURNER = new ThingTypeUID(BINDING_ID, THING_ID_GASBURNER);
61 public static final ThingTypeUID THING_TYPE_UID_PELLETBURNER = new ThingTypeUID(BINDING_ID, THING_ID_PELLETBURNER);
62 public static final ThingTypeUID THING_TYPE_UID_OILBURNER = new ThingTypeUID(BINDING_ID, THING_ID_OILBURNER);
63 public static final ThingTypeUID THING_TYPE_UID_STORAGETANK = new ThingTypeUID(BINDING_ID, THING_ID_STORAGETANK);
64 public static final ThingTypeUID THING_TYPE_UID_CIRCUIT = new ThingTypeUID(BINDING_ID, THING_ID_CIRCUIT);
65 public static final ThingTypeUID THING_TYPE_UID_SOLAR = new ThingTypeUID(BINDING_ID, THING_ID_SOLAR);
66 public static final ThingTypeUID THING_TYPE_UID_TEMPERATURESENSOR = new ThingTypeUID(BINDING_ID,
67 THING_ID_TEMPERATURESENSOR);
68 public static final ThingTypeUID THING_TYPE_UID_PUMP = new ThingTypeUID(BINDING_ID, THING_ID_PUMP);
69 public static final ThingTypeUID THING_TYPE_UID_VALVE = new ThingTypeUID(BINDING_ID, THING_ID_VALVE);
71 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.unmodifiableSet(Stream
72 .of(THING_TYPE_UID_BRIDGE, THING_TYPE_UID_GASBURNER, THING_TYPE_UID_HEATING, THING_TYPE_UID_PELLETBURNER,
73 THING_TYPE_UID_OILBURNER, THING_TYPE_UID_STORAGETANK, THING_TYPE_UID_CIRCUIT, THING_TYPE_UID_SOLAR,
74 THING_TYPE_UID_TEMPERATURESENSOR, THING_TYPE_UID_PUMP, THING_TYPE_UID_VALVE)
75 .collect(Collectors.toSet()));
77 public static final Set<ThingTypeUID> SUPPORTED_BRIDGE_THING_TYPES_UIDS = Collections
78 .singleton(THING_TYPE_UID_BRIDGE);