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.verisure.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
19 * The {@link VerisureBindingConstants} class defines common constants, which are
20 * used across the whole binding.
22 * @author l3rum - Initial contribution
23 * @author Jan Gustafsson - Furher development
26 public class VerisureBindingConstants {
28 public static final String BINDING_ID = "verisure";
30 // List of all Thing Type UIDs
31 public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
32 public static final ThingTypeUID THING_TYPE_ALARM = new ThingTypeUID(BINDING_ID, "alarm");
33 public static final ThingTypeUID THING_TYPE_SMARTPLUG = new ThingTypeUID(BINDING_ID, "smartPlug");
34 public static final ThingTypeUID THING_TYPE_SMOKEDETECTOR = new ThingTypeUID(BINDING_ID, "smokeDetector");
35 public static final ThingTypeUID THING_TYPE_WATERDETECTOR = new ThingTypeUID(BINDING_ID, "waterDetector");
36 public static final ThingTypeUID THING_TYPE_SIREN = new ThingTypeUID(BINDING_ID, "siren");
37 public static final ThingTypeUID THING_TYPE_DOORWINDOW = new ThingTypeUID(BINDING_ID, "doorWindowSensor");
38 public static final ThingTypeUID THING_TYPE_USERPRESENCE = new ThingTypeUID(BINDING_ID, "userPresence");
39 public static final ThingTypeUID THING_TYPE_SMARTLOCK = new ThingTypeUID(BINDING_ID, "smartLock");
40 public static final ThingTypeUID THING_TYPE_BROADBAND_CONNECTION = new ThingTypeUID(BINDING_ID,
41 "broadbandConnection");
42 public static final ThingTypeUID THING_TYPE_NIGHT_CONTROL = new ThingTypeUID(BINDING_ID, "nightControl");
43 public static final ThingTypeUID THING_TYPE_MICE_DETECTION = new ThingTypeUID(BINDING_ID, "miceDetection");
44 public static final ThingTypeUID THING_TYPE_EVENT_LOG = new ThingTypeUID(BINDING_ID, "eventLog");
45 public static final ThingTypeUID THING_TYPE_GATEWAY = new ThingTypeUID(BINDING_ID, "gateway");
47 // List of all Channel ids
48 public static final String CHANNEL_NUMERIC_STATUS = "numericStatus";
49 public static final String CHANNEL_TEMPERATURE = "temperature";
50 public static final String CHANNEL_HUMIDITY = "humidity";
51 public static final String CHANNEL_HUMIDITY_ENABLED = "humidityEnabled";
52 public static final String CHANNEL_LOCATION = "location";
53 public static final String CHANNEL_STATUS = "status";
54 public static final String CHANNEL_CONNECTED = "connected";
55 public static final String CHANNEL_STATE = "state";
56 public static final String CHANNEL_LABEL = "label";
57 public static final String CHANNEL_USER_NAME = "userName";
58 public static final String CHANNEL_WEBACCOUNT = "webAccount";
59 public static final String CHANNEL_USER_LOCATION_STATUS = "userLocationStatus";
60 public static final String CHANNEL_USER_DEVICE_NAME = "userDeviceName";
61 public static final String CHANNEL_SMARTLOCK_VOLUME = "smartLockVolume";
62 public static final String CHANNEL_SMARTLOCK_VOICE_LEVEL = "smartLockVoiceLevel";
63 public static final String CHANNEL_SMARTLOCK_TRIGGER_CHANNEL = "smartLockTriggerChannel";
64 public static final String CHANNEL_AUTO_RELOCK = "autoRelock";
65 public static final String CHANNEL_SMARTPLUG_STATUS = "smartPlugStatus";
66 public static final String CHANNEL_SMARTPLUG_TRIGGER_CHANNEL = "smartPlugTriggerChannel";
67 public static final String CHANNEL_ALARM_STATUS = "alarmStatus";
68 public static final String CHANNEL_ALARM_TRIGGER_CHANNEL = "alarmTriggerChannel";
69 public static final String CHANNEL_SMARTLOCK_STATUS = "smartLockStatus";
70 public static final String CHANNEL_CHANGED_BY_USER = "changedByUser";
71 public static final String CHANNEL_CHANGED_VIA = "changedVia";
72 public static final String CHANNEL_TIMESTAMP = "timestamp";
73 public static final String CHANNEL_TEMPERATURE_TIMESTAMP = "temperatureTimestamp";
74 public static final String CHANNEL_HAZARDOUS = "hazardous";
75 public static final String CHANNEL_MOTOR_JAM = "motorJam";
76 public static final String CHANNEL_INSTALLATION_NAME = "installationName";
77 public static final String CHANNEL_INSTALLATION_ID = "installationId";
78 public static final String CHANNEL_COUNT_LATEST_DETECTION = "countLatestDetection";
79 public static final String CHANNEL_COUNT_LAST_24_HOURS = "countLast24Hours";
80 public static final String CHANNEL_DURATION_LATEST_DETECTION = "durationLatestDetection";
81 public static final String CHANNEL_DURATION_LAST_24_HOURS = "durationLast24Hours";
82 public static final String CHANNEL_LAST_EVENT_LOCATION = "lastEventLocation";
83 public static final String CHANNEL_LAST_EVENT_ID = "lastEventId";
84 public static final String CHANNEL_LAST_EVENT_DEVICE_ID = "lastEventDeviceId";
85 public static final String CHANNEL_LAST_EVENT_DEVICE_TYPE = "lastEventDeviceType";
86 public static final String CHANNEL_LAST_EVENT_TYPE = "lastEventType";
87 public static final String CHANNEL_LAST_EVENT_CATEGORY = "lastEventCategory";
88 public static final String CHANNEL_LAST_EVENT_TIME = "lastEventTime";
89 public static final String CHANNEL_LAST_EVENT_USER_NAME = "lastEventUserName";
90 public static final String CHANNEL_EVENT_LOG = "eventLog";
91 public static final String CHANNEL_STATUS_GSM_OVER_UDP = "statusGSMOverUDP";
92 public static final String CHANNEL_STATUS_GSM_OVER_SMS = "statusGSMOverSMS";
93 public static final String CHANNEL_STATUS_GPRS_OVER_UDP = "statusGPRSOverUDP";
94 public static final String CHANNEL_STATUS_ETH_OVER_UDP = "statusETHOverUDP";
95 public static final String CHANNEL_TEST_TIME_GSM_OVER_UDP = "testTimeGSMOverUDP";
96 public static final String CHANNEL_TEST_TIME_GSM_OVER_SMS = "testTimeGSMOverSMS";
97 public static final String CHANNEL_TEST_TIME_GPRS_OVER_UDP = "testTimeGPRSOverUDP";
98 public static final String CHANNEL_TEST_TIME_ETH_OVER_UDP = "testTimeETHOverUDP";
99 public static final String CHANNEL_GATEWAY_MODEL = "model";
100 public static final String CHANNEL_SMOKE_DETECTION_TRIGGER_CHANNEL = "smokeDetectionTriggerChannel";
101 public static final String CHANNEL_MICE_DETECTION_TRIGGER_CHANNEL = "miceDetectionTriggerChannel";
102 public static final String CHANNEL_WATER_DETECTION_TRIGGER_CHANNEL = "waterDetectionTriggerChannel";
103 public static final String CHANNEL_SIREN_TRIGGER_CHANNEL = "sirenTriggerChannel";
104 public static final String CHANNEL_NIGHT_CONTROL_TRIGGER_CHANNEL = "nightControlTriggerChannel";
105 public static final String CHANNEL_DOOR_WINDOW_TRIGGER_CHANNEL = "doorWindowTriggerChannel";
106 public static final String CHANNEL_GATEWAY_TRIGGER_CHANNEL = "gatewayTriggerChannel";
107 public static final String CHANNEL_BATTERY_STATUS = "lowBattery";
109 // Trigger channel events
110 public static final String TRIGGER_EVENT_LOCK = "LOCK";
111 public static final String TRIGGER_EVENT_UNLOCK = "UNLOCK";
112 public static final String TRIGGER_EVENT_LOCK_FAILURE = "LOCK_FAILURE";
113 public static final String TRIGGER_EVENT_ARM = "ARM";
114 public static final String TRIGGER_EVENT_DISARM = "DISARM";
115 public static final String TRIGGER_EVENT_FIRE = "FIRE";
116 public static final String TRIGGER_EVENT_INSTRUSION = "INTRUSION";
117 public static final String TRIGGER_EVENT_WATER = "WATER";
118 public static final String TRIGGER_EVENT_MICE = "MICE";
119 public static final String TRIGGER_EVENT_BATTERY_LOW = "BATTERY_LOW";
120 public static final String TRIGGER_EVENT_BATTERY_RESTORED = "BATTERY_RESTORED";
121 public static final String TRIGGER_EVENT_COM_FAILURE = "COM_FAILURE";
122 public static final String TRIGGER_EVENT_COM_RESTORED = "COM_RESTORED";
123 public static final String TRIGGER_EVENT_COM_TEST = "COM_TEST";
124 public static final String TRIGGER_EVENT_SABOTAGE_ALARM = "SABOTAGE_ALARM";
125 public static final String TRIGGER_EVENT_SABOTAGE_RESTORED = "SABOTAGE_RESTORED";
126 public static final String TRIGGER_EVENT_DOORWINDOW_OPENED = "DOORWINDOW_OPENED";
127 public static final String TRIGGER_EVENT_DOORWINDOW_CLOSED = "DOORWINDOW_CLOSED";
128 public static final String TRIGGER_EVENT_LOCATION_HOME = "LOCATION_HOME";
129 public static final String TRIGGER_EVENT_LOCATION_AWAY = "LOCATION_AWAY";
131 // REST URI constants
132 public static final String USERNAME = "username";
133 public static final String PASSWORD = "password";
134 public static final String BASE_URL = "https://mypages.verisure.com";
135 public static final String LOGON_SUF = BASE_URL + "/j_spring_security_check?locale=en_GB";
136 public static final String ALARM_COMMAND = BASE_URL + "/remotecontrol/armstatechange.cmd";
137 public static final String SMARTLOCK_LOCK_COMMAND = BASE_URL + "/remotecontrol/lockunlock.cmd";
138 public static final String SMARTLOCK_SET_COMMAND = BASE_URL + "/overview/setdoorlock.cmd";
139 public static final String SMARTLOCK_AUTORELOCK_COMMAND = BASE_URL + "/settings/setautorelock.cmd";
140 public static final String SMARTLOCK_VOLUME_COMMAND = BASE_URL + "/settings/setvolume.cmd";
142 public static final String SMARTPLUG_COMMAND = BASE_URL + "/settings/smartplug/onoffplug.cmd";
143 public static final String START_REDIRECT = "/uk/start.html";
144 public static final String START_SUF = BASE_URL + START_REDIRECT;
147 public static final String STATUS = BASE_URL + "/uk/status";
148 public static final String EXTEND = BASE_URL + "/session/extend";
149 public static final String SETTINGS = BASE_URL + "/uk/settings.html?giid=";
150 public static final String SET_INSTALLATION = BASE_URL + "/setinstallation?giid=";
151 public static final String BASEURL_API = "https://m-api02.verisure.com";
152 public static final String START_GRAPHQL = "/graphql";
153 public static final String AUTH_TOKEN = "/auth/token";
154 public static final String AUTH_LOGIN = "/auth/login";
156 public static final String ALARMSTATUS_PATH = "/remotecontrol";
157 public static final String SMARTLOCK_PATH = "/overview/doorlock/";
158 public static final String DOORWINDOW_PATH = "/settings/doorwindow";
159 public static final String USERTRACKING_PATH = "/overview/usertrackingcontacts";
160 public static final String CLIMATEDEVICE_PATH = "/overview/climatedevice";
161 public static final String SMARTPLUG_PATH = "/settings/smartplug";
162 public static final String ETHERNETSTATUS_PATH = "/overview/ethernetstatus";
163 public static final String VACATIONMODE_PATH = "/overview/vacationmode";
164 public static final String TEMPERATURE_CONTROL_PATH = "/overview/temperaturecontrol";
165 public static final String MOUSEDETECTION_PATH = "/overview/mousedetection";
166 public static final String CAMERA_PATH = "/overview/camera";
167 public static final String BATTERY_STATUS = "/batterywizard/choose/device?_";