]> git.basschouten.com Git - openhab-addons.git/blob
43442d7a3fe29317561af25a903cd45f989d3f72
[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.mecmeter;
14
15 import java.util.Set;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.thing.ThingTypeUID;
19
20 /**
21  * The {@link MecMeterBindingConstants} class defines common constants, which are
22  * used across the whole binding.
23  *
24  * @author Florian Pazour - Initial contribution
25  * @author Klaus Berger - Initial contribution
26  */
27 @NonNullByDefault
28 public class MecMeterBindingConstants {
29
30     private static final String BINDING_ID = "mecmeter";
31
32     // List of all Thing Type UIDs
33     public static final ThingTypeUID THING_TYPE_METER = new ThingTypeUID(BINDING_ID, "meter");
34
35     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_METER);
36
37     /*
38      * List of all Groups
39      */
40     public static final String GENERAL_GROUP = "general_group";
41     public static final String VOLTAGE_GROUP = "voltage_group";
42     public static final String CURRENT_GROUP = "current_group";
43     public static final String ANGLE_GROUP = "angle_group";
44
45     public static final String ACTIVE_POWER_GROUP = "activepower_group";
46     public static final String ACTIVE_FUND_POWER_GROUP = "activefundpower_group";
47     public static final String POWER_FACTOR_GROUP = "powerfactor_group";
48     public static final String ACTIVE_HARM_POWER_GROUP = "activeharmpower_group";
49     public static final String REACTIVE_POWER_GROUP = "reactivepower_group";
50
51     public static final String APP_POWER_GROUP = "apppower_group";
52
53     public static final String FWD_ACTIVE_ENERGY_GROUP = "fwd_active_energy_group";
54     public static final String FWD_ACTIVE_FUND_ENERGY_GROUP = "fwd_active_fund_energy_group";
55     public static final String FWD_ACTIVE_HARM_ENERGY_GROUP = "fwd_active_harm_energy_group";
56     public static final String FWD_REACTIVE_ENERGY_GROUP = "fwd_reactive_energy_group";
57
58     public static final String REV_ACTIVE_ENERGY_GROUP = "rev_active_energy_group";
59     public static final String REV_ACTIVE_FUND_ENERGY_GROUP = "rev_active_fund_energy_group";
60     public static final String REV_ACTIVE_HARM_ENERGY_GROUP = "rev_active_harm_energy_group";
61     public static final String REV_REACTIVE_ENERGY_GROUP = "rev_reactive_energy_group";
62
63     public static final String APP_ENERGY_GROUP = "app_energy_group";
64
65     /*
66      * List of all Channels
67      */
68     // General Channels
69     public static final String FREQUENCY = GENERAL_GROUP + "#" + "frequency";
70     public static final String TEMPERATURE = GENERAL_GROUP + "#" + "temperature";
71     public static final String OPERATIONAL_TIME = GENERAL_GROUP + "#" + "op_time";
72
73     // Voltage Channels
74     public static final String VOLTAGE_PHASE_1 = VOLTAGE_GROUP + "#" + "voltage_phase1";
75     public static final String VOLTAGE_PHASE_2 = VOLTAGE_GROUP + "#" + "voltage_phase2";
76     public static final String VOLTAGE_PHASE_3 = VOLTAGE_GROUP + "#" + "voltage_phase3";
77
78     public static final String VOLTAGE_PHASE_3_TO_PHASE_2 = VOLTAGE_GROUP + "#" + "voltage_phase3-2";
79     public static final String VOLTAGE_PHASE_2_TO_PHASE_1 = VOLTAGE_GROUP + "#" + "voltage_phase2-1";
80     public static final String VOLTAGE_PHASE_1_TO_PHASE_3 = VOLTAGE_GROUP + "#" + "voltage_phase1-3";
81
82     public static final String AVERAGE_VOLTAGE_PHASE_2_PHASE = VOLTAGE_GROUP + "#" + "avg_phase_phase_voltage";
83     public static final String AVERAGE_VOLTAGE_NEUTRAL_2_PHASE = VOLTAGE_GROUP + "#" + "avg_neutral_phase_voltage";
84
85     // Current Channels
86     public static final String CURRENT_PHASE_1 = CURRENT_GROUP + "#" + "current_phase1";
87     public static final String CURRENT_PHASE_2 = CURRENT_GROUP + "#" + "current_phase2";
88     public static final String CURRENT_PHASE_3 = CURRENT_GROUP + "#" + "current_phase3";
89     public static final String CURRENT_SUM = CURRENT_GROUP + "#" + "current_allphase";
90
91     // Angle Channels
92     public static final String PHASE_ANGLE_TO_CURRENT_PHASE_1 = ANGLE_GROUP + "#" + "phase_angle_currvolt_phase1";
93     public static final String PHASE_ANGLE_TO_CURRENT_PHASE_2 = ANGLE_GROUP + "#" + "phase_angle_currvolt_phase2";
94     public static final String PHASE_ANGLE_TO_CURRENT_PHASE_3 = ANGLE_GROUP + "#" + "phase_angle_currvolt_phase3";
95
96     public static final String PHASE_ANGLE_PHASE_1_3 = ANGLE_GROUP + "#" + "phase_angle_phase1-3";
97     public static final String PHASE_ANGLE_PHASE_2_3 = ANGLE_GROUP + "#" + "phase_angle_phase2-3";
98
99     // Power Channels
100     public static final String ACTIVE_POWER_PHASE_1 = ACTIVE_POWER_GROUP + "#" + "activepower_phase1";
101     public static final String ACTIVE_POWER_PHASE_2 = ACTIVE_POWER_GROUP + "#" + "activepower_phase2";
102     public static final String ACTIVE_POWER_PHASE_3 = ACTIVE_POWER_GROUP + "#" + "activepower_phase3";
103     public static final String ACTIVE_POWER_SUM = ACTIVE_POWER_GROUP + "#" + "activepower_allphase";
104
105     public static final String ACTIVE_FUND_POWER_PHASE_1 = ACTIVE_FUND_POWER_GROUP + "#" + "activefundpower_phase1";
106     public static final String ACTIVE_FUND_POWER_PHASE_2 = ACTIVE_FUND_POWER_GROUP + "#" + "activefundpower_phase2";
107     public static final String ACTIVE_FUND_POWER_PHASE_3 = ACTIVE_FUND_POWER_GROUP + "#" + "activefundpower_phase3";
108     public static final String ACTIVE_FUND_POWER_ALL = ACTIVE_FUND_POWER_GROUP + "#" + "activefundpower_allphase";
109
110     public static final String POWER_FACTOR_PHASE_1 = POWER_FACTOR_GROUP + "#" + "powerFactor_phase1";
111     public static final String POWER_FACTOR_PHASE_2 = POWER_FACTOR_GROUP + "#" + "powerFactor_phase2";
112     public static final String POWER_FACTOR_PHASE_3 = POWER_FACTOR_GROUP + "#" + "powerFactor_phase3";
113     public static final String POWER_FACTOR_ALL = POWER_FACTOR_GROUP + "#" + "powerFactor_allphase";
114
115     public static final String ACTIVE_HARM_POWER_PHASE_1 = ACTIVE_HARM_POWER_GROUP + "#" + "activeharmpower_phase1";
116     public static final String ACTIVE_HARM_POWER_PHASE_2 = ACTIVE_HARM_POWER_GROUP + "#" + "activeharmpower_phase2";
117     public static final String ACTIVE_HARM_POWER_PHASE_3 = ACTIVE_HARM_POWER_GROUP + "#" + "activeharmpower_phase3";
118     public static final String ACTIVE_HARM_POWER_ALL = ACTIVE_HARM_POWER_GROUP + "#" + "activeharmpower_allphase";
119
120     public static final String REACTIVE_POWER_PHASE_1 = REACTIVE_POWER_GROUP + "#" + "reactivepower_phase1";
121     public static final String REACTIVE_POWER_PHASE_2 = REACTIVE_POWER_GROUP + "#" + "reactivepower_phase2";
122     public static final String REACTIVE_POWER_PHASE_3 = REACTIVE_POWER_GROUP + "#" + "reactivepower_phase3";
123     public static final String REACTIVE_POWER_ALL = REACTIVE_POWER_GROUP + "#" + "reactivepower_allphase";
124
125     public static final String APP_POWER_PHASE_1 = APP_POWER_GROUP + "#" + "apppower_phase1";
126     public static final String APP_POWER_PHASE_2 = APP_POWER_GROUP + "#" + "apppower_phase2";
127     public static final String APP_POWER_PHASE_3 = APP_POWER_GROUP + "#" + "apppower_phase3";
128     public static final String APP_POWER_ALL = APP_POWER_GROUP + "#" + "apppower_allphase";
129
130     // Forward Energy Channels
131     public static final String FORWARD_ACTIVE_ENERGY_PHASE_1 = FWD_ACTIVE_ENERGY_GROUP + "#"
132             + "fwd_active_energy_phase1";
133     public static final String FORWARD_ACTIVE_ENERGY_PHASE_2 = FWD_ACTIVE_ENERGY_GROUP + "#"
134             + "fwd_active_energy_phase2";
135     public static final String FORWARD_ACTIVE_ENERGY_PHASE_3 = FWD_ACTIVE_ENERGY_GROUP + "#"
136             + "fwd_active_energy_phase3";
137     public static final String FORWARD_ACTIVE_ENERGY_ALL = FWD_ACTIVE_ENERGY_GROUP + "#" + "fwd_active_energy_allphase";
138
139     public static final String FORWARD_ACTIVE_FUND_ENERGY_PHASE_1 = FWD_ACTIVE_FUND_ENERGY_GROUP + "#"
140             + "fwd_active_fund_energy_phase1";
141     public static final String FORWARD_ACTIVE_FUND_ENERGY_PHASE_2 = FWD_ACTIVE_FUND_ENERGY_GROUP + "#"
142             + "fwd_active_fund_energy_phase2";
143     public static final String FORWARD_ACTIVE_FUND_ENERGY_PHASE_3 = FWD_ACTIVE_FUND_ENERGY_GROUP + "#"
144             + "fwd_active_fund_energy_phase3";
145     public static final String FORWARD_ACTIVE_FUND_ENERGY_ALL = FWD_ACTIVE_FUND_ENERGY_GROUP + "#"
146             + "fwd_active_fund_energy_allphase";
147
148     public static final String FORWARD_ACTIVE_HARM_ENERGY_PHASE_1 = FWD_ACTIVE_HARM_ENERGY_GROUP + "#"
149             + "fwd_active_harm_energy_phase1";
150     public static final String FORWARD_ACTIVE_HARM_ENERGY_PHASE_2 = FWD_ACTIVE_HARM_ENERGY_GROUP + "#"
151             + "fwd_active_harm_energy_phase2";
152     public static final String FORWARD_ACTIVE_HARM_ENERGY_PHASE_3 = FWD_ACTIVE_HARM_ENERGY_GROUP + "#"
153             + "fwd_active_harm_energy_phase3";
154     public static final String FORWARD_ACTIVE_HARM_ENERGY_ALL = FWD_ACTIVE_HARM_ENERGY_GROUP + "#"
155             + "fwd_active_harm_energy_allphase";
156
157     public static final String FORWARD_REACTIVE_ENERGY_PHASE_1 = FWD_REACTIVE_ENERGY_GROUP + "#"
158             + "fwd_reactive_energy_phase1";
159     public static final String FORWARD_REACTIVE_ENERGY_PHASE_2 = FWD_REACTIVE_ENERGY_GROUP + "#"
160             + "fwd_reactive_energy_phase2";
161     public static final String FORWARD_REACTIVE_ENERGY_PHASE_3 = FWD_REACTIVE_ENERGY_GROUP + "#"
162             + "fwd_reactive_energy_phase3";
163     public static final String FORWARD_REACTIVE_ENERGY_ALL = FWD_REACTIVE_ENERGY_GROUP + "#"
164             + "fwd_reactive_energy_allphase";
165
166     // Reverse Energy Channels
167     public static final String REVERSE_ACTIVE_ENERGY_PHASE_1 = REV_ACTIVE_ENERGY_GROUP + "#"
168             + "rev_active_energy_phase1";
169     public static final String REVERSE_ACTIVE_ENERGY_PHASE_2 = REV_ACTIVE_ENERGY_GROUP + "#"
170             + "rev_active_energy_phase2";
171     public static final String REVERSE_ACTIVE_ENERGY_PHASE_3 = REV_ACTIVE_ENERGY_GROUP + "#"
172             + "rev_active_energy_phase3";
173     public static final String REVERSE_ACTIVE_ENERGY_ALL = REV_ACTIVE_ENERGY_GROUP + "#" + "rev_active_energy_allphase";
174
175     public static final String REVERSE_ACTIVE_FUND_ENERGY_PHASE_1 = REV_ACTIVE_FUND_ENERGY_GROUP + "#"
176             + "rev_active_fund_energy_phase1";
177     public static final String REVERSE_ACTIVE_FUND_ENERGY_PHASE_2 = REV_ACTIVE_FUND_ENERGY_GROUP + "#"
178             + "rev_active_fund_energy_phase2";
179     public static final String REVERSE_ACTIVE_FUND_ENERGY_PHASE_3 = REV_ACTIVE_FUND_ENERGY_GROUP + "#"
180             + "rev_active_fund_energy_phase3";
181     public static final String REVERSE_ACTIVE_FUND_ENERGY_ALL = REV_ACTIVE_FUND_ENERGY_GROUP + "#"
182             + "rev_active_fund_energy_allphase";
183
184     public static final String REVERSE_ACTIVE_HARM_ENERGY_PHASE_1 = REV_ACTIVE_HARM_ENERGY_GROUP + "#"
185             + "rev_active_harm_energy_phase1";
186     public static final String REVERSE_ACTIVE_HARM_ENERGY_PHASE_2 = REV_ACTIVE_HARM_ENERGY_GROUP + "#"
187             + "rev_active_harm_energy_phase2";
188     public static final String REVERSE_ACTIVE_HARM_ENERGY_PHASE_3 = REV_ACTIVE_HARM_ENERGY_GROUP + "#"
189             + "rev_active_harm_energy_phase3";
190     public static final String REVERSE_ACTIVE_HARM_ENERGY_ALL = REV_ACTIVE_HARM_ENERGY_GROUP + "#"
191             + "rev_active_harm_energy_allphase";
192
193     public static final String REVERSE_REACTIVE_ENERGY_PHASE_1 = REV_REACTIVE_ENERGY_GROUP + "#"
194             + "rev_reactive_energy_phase1";
195     public static final String REVERSE_REACTIVE_ENERGY_PHASE_2 = REV_REACTIVE_ENERGY_GROUP + "#"
196             + "rev_reactive_energy_phase2";
197     public static final String REVERSE_REACTIVE_ENERGY_PHASE_3 = REV_REACTIVE_ENERGY_GROUP + "#"
198             + "rev_reactive_energy_phase3";
199     public static final String REVERSE_REACTIVE_ENERGY_ALL = REV_REACTIVE_ENERGY_GROUP + "#"
200             + "rev_reactive_energy_allphase";
201
202     // Apparent Energy Channels
203     public static final String APP_ENERGY_PHASE_1 = APP_ENERGY_GROUP + "#" + "appenergy_consumption_phase1";
204     public static final String APP_ENERGY_PHASE_2 = APP_ENERGY_GROUP + "#" + "appenergy_consumption_phase2";
205     public static final String APP_ENERGY_PHASE_3 = APP_ENERGY_GROUP + "#" + "appenergy_consumption_phase3";
206     public static final String APP_ENERGY_ALL = APP_ENERGY_GROUP + "#" + "appenergy_consumption_allphase";
207
208     // list of all URLs
209     public static final String POWERMETER_DATA_URL = "http://%IP%/wizard/public/api/measurements";
210 }