]> git.basschouten.com Git - openhab-addons.git/blob
6569776d3eaf2c117852ebcfe080d21127ceea0f
[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.vitotronic.internal;
14
15 import java.util.Collections;
16 import java.util.Set;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
19
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
22
23 /**
24  * The {@link VitotronicBinding} class defines common constants, which are
25  * used across the whole binding.
26  *
27  * @author Stefan Andres - Initial contribution
28  */
29 @NonNullByDefault
30 public class VitotronicBindingConstants {
31
32     public static final String BROADCAST_MESSAGE = "@@@@VITOTRONIC@@@@/";
33     public static final int BROADCAST_PORT = 31113;
34
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";
41
42     // List of main device types
43     public static final String BRIDGE_VITOTRONIC = "bridge";
44
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";
56
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);
70
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()));
76
77     public static final Set<ThingTypeUID> SUPPORTED_BRIDGE_THING_TYPES_UIDS = Set.of(THING_TYPE_UID_BRIDGE);
78 }