]> git.basschouten.com Git - openhab-addons.git/blob
bff859793d7035e3c4a7f9cfdf4b0bcb45d33c9c
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.zoneminder.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17
18 /**
19  * The {@link ZoneMinderConstants} class defines common constants, which are
20  * used across the whole binding.
21  *
22  * @author Martin S. Eskildsen - Initial contribution
23  */
24 @NonNullByDefault
25 public class ZoneMinderConstants {
26
27     public static final String BINDING_ID = "zoneminder";
28
29     // ZoneMinder Server Bridge
30     public static final String BRIDGE_ZONEMINDER_SERVER = "server";
31
32     // ZoneMinder Monitor thing
33     public static final String THING_ZONEMINDER_MONITOR = "monitor";
34
35     // ZoneMinder Server displayable name
36     public static final String ZONEMINDER_SERVER_NAME = "ZoneMinder Server";
37
38     // ZoneMinder Monitor displayable name
39     public static final String ZONEMINDER_MONITOR_NAME = "ZoneMinder Monitor";
40
41     /*
42      * ZoneMinder Server Constants
43      */
44
45     // Thing Type UID for Server
46     public static final ThingTypeUID THING_TYPE_BRIDGE_ZONEMINDER_SERVER = new ThingTypeUID(BINDING_ID,
47             BRIDGE_ZONEMINDER_SERVER);
48
49     // Shared channel for all bridges / things
50     public static final String CHANNEL_ONLINE = "online";
51
52     // Channel Id's for the ZoneMinder Server
53     public static final String CHANNEL_SERVER_DISKUSAGE = "disk-usage";
54     public static final String CHANNEL_SERVER_CPULOAD = "cpu-load";
55
56     // Parameters for the ZoneMinder Server
57     public static final String PARAM_HOSTNAME = "hostname";
58     public static final String PARAM_PORT = "port";
59     public static final String PARAM_REFRESH_INTERVAL = "refresh_interval";
60     public static final String PARAM_REFRESH_INTERVAL_DISKUSAGE = "refresh_interval_disk_usage";
61
62     // Default values for Monitor parameters
63     public static final Integer DEFAULT_HTTP_PORT = 80;
64     public static final Integer DEFAULT_TELNET_PORT = 6802;
65
66     /*
67      * ZoneMinder Monitor Constants
68      */
69
70     // Thing Type UID for Monitor
71     public static final ThingTypeUID THING_TYPE_THING_ZONEMINDER_MONITOR = new ThingTypeUID(BINDING_ID,
72             THING_ZONEMINDER_MONITOR);
73     /*
74      * Channel Id's for the ZoneMinder Monitor
75      */
76     public static final String CHANNEL_MONITOR_ENABLED = "enabled";
77     public static final String CHANNEL_MONITOR_FORCE_ALARM = "force-alarm";
78     public static final String CHANNEL_MONITOR_EVENT_STATE = "alarm";
79     public static final String CHANNEL_MONITOR_EVENT_CAUSE = "event-cause";
80     public static final String CHANNEL_MONITOR_RECORD_STATE = "recording";
81     public static final String CHANNEL_MONITOR_DETAILED_STATUS = "detailed-status";
82     public static final String CHANNEL_MONITOR_FUNCTION = "function";
83
84     public static final String CHANNEL_MONITOR_CAPTURE_DAEMON_STATE = "capture-daemon";
85     public static final String CHANNEL_MONITOR_ANALYSIS_DAEMON_STATE = "analysis-daemon";
86     public static final String CHANNEL_MONITOR_FRAME_DAEMON_STATE = "frame-daemon";
87
88     // Parameters for the ZoneMinder Monitor
89     public static final String PARAMETER_MONITOR_ID = "monitorId";
90     public static final String PARAMETER_MONITOR_TRIGGER_TIMEOUT = "monitorTriggerTimeout";
91     public static final String PARAMETER_MONITOR_EVENTTEXT = "monitorEventText";
92
93     // Default values for Monitor parameters
94     public static final Integer PARAMETER_MONITOR_TRIGGER_TIMEOUT_DEFAULTVALUE = 60;
95
96     public static final String PARAMETER_MONITOR_EVENTNOTE_DEFAULTVALUE = "openHAB triggered event";
97
98     // ZoneMinder Event types
99     public static final String MONITOR_EVENT_NONE = "";
100     public static final String MONITOR_EVENT_SIGNAL = "Signal";
101     public static final String MONITOR_EVENT_MOTION = "Motion";
102     public static final String MONITOR_EVENT_FORCED_WEB = "Forced Web";
103     public static final String MONITOR_EVENT_OPENHAB = "openHAB";
104 }