2 * Copyright (c) 2010-2020 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.zoneminder.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
19 * The {@link ZoneMinderConstants} class defines common constants, which are
20 * used across the whole binding.
22 * @author Martin S. Eskildsen - Initial contribution
25 public class ZoneMinderConstants {
27 public static final String BINDING_ID = "zoneminder";
29 // ZoneMinder Server Bridge
30 public static final String BRIDGE_ZONEMINDER_SERVER = "server";
32 // ZoneMinder Monitor thing
33 public static final String THING_ZONEMINDER_MONITOR = "monitor";
35 // ZoneMinder Server displayable name
36 public static final String ZONEMINDER_SERVER_NAME = "ZoneMinder Server";
38 // ZoneMinder Monitor displayable name
39 public static final String ZONEMINDER_MONITOR_NAME = "ZoneMinder Monitor";
42 * ZoneMinder Server Constants
45 // Thing Type UID for Server
46 public static final ThingTypeUID THING_TYPE_BRIDGE_ZONEMINDER_SERVER = new ThingTypeUID(BINDING_ID,
47 BRIDGE_ZONEMINDER_SERVER);
49 // Shared channel for all bridges / things
50 public static final String CHANNEL_ONLINE = "online";
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";
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";
62 // Default values for Monitor parameters
63 public static final Integer DEFAULT_HTTP_PORT = 80;
64 public static final Integer DEFAULT_TELNET_PORT = 6802;
67 * ZoneMinder Monitor Constants
70 // Thing Type UID for Monitor
71 public static final ThingTypeUID THING_TYPE_THING_ZONEMINDER_MONITOR = new ThingTypeUID(BINDING_ID,
72 THING_ZONEMINDER_MONITOR);
74 * Channel Id's for the ZoneMinder Monitor
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";
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";
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";
93 // Default values for Monitor parameters
94 public static final Integer PARAMETER_MONITOR_TRIGGER_TIMEOUT_DEFAULTVALUE = 60;
96 public static final String PARAMETER_MONITOR_EVENTNOTE_DEFAULTVALUE = "openHAB triggered event";
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";