2 * Copyright (c) 2010-2024 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.systeminfo.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
19 * The {@link SystemInfoBindingConstants} class defines common constants, which are
20 * used across the whole binding.
22 * @author Svilen Valkanov - Initial contribution
23 * @author Mark Herwege - Add dynamic creation of extra channels
24 * @author Mark Herwege - Processor frequency channels
27 public class SystemInfoBindingConstants {
29 public static final String BINDING_ID = "systeminfo";
31 public static final ThingTypeUID THING_TYPE_COMPUTER = new ThingTypeUID(BINDING_ID, "computer");
32 public static final ThingTypeUID THING_TYPE_COMPUTER_IMPL = new ThingTypeUID(BINDING_ID, "computer-impl");
36 * Number of CPU logical cores
38 public static final String PROPERTY_CPU_LOGICAL_CORES = "CPU Logical Cores";
41 * Number of CPU physical cores
43 public static final String PROPERTY_CPU_PHYSICAL_CORES = "CPU Physical Cores";
46 * Contains information about the family /Windows, Linux, OS X etc/ of the operation system
48 public static final String PROPERTY_OS_FAMILY = "OS Family";
51 * Name of the manufacturer of the operation system
53 public static final String PROPERTY_OS_MANUFACTURER = "OS Manufacturer";
56 * Version of the operation system
58 public static final String PROPERTY_OS_VERSION = "OS Version";
60 // List of all Channel IDs
63 * Name of the channel group type for memory information
65 public static final String CHANNEL_GROUP_TYPE_MEMORY = "memoryGroup";
68 * Name of the channel group for memory information
70 public static final String CHANNEL_GROUP_MEMORY = "memory";
73 * Size of the available memory
75 public static final String CHANNEL_MEMORY_AVAILABLE = "memory#available";
78 * Size of the used memory
80 public static final String CHANNEL_MEMORY_USED = "memory#used";
83 * Total size of the memory
85 public static final String CHANNEL_MEMORY_TOTAL = "memory#total";
88 * Percents of the available memory
90 public static final String CHANNEL_MEMORY_AVAILABLE_PERCENT = "memory#availablePercent";
93 * Percents of the used memory
95 public static final String CHANNEL_MEMORY_USED_PERCENT = "memory#usedPercent";
98 * Percents of the used heap
100 public static final String CHANNEL_MEMORY_USED_HEAP_PERCENT = "memory#usedHeapPercent";
103 * Bytes used in the heap
105 public static final String CHANNEL_MEMORY_HEAP_AVAILABLE = "memory#availableHeap";
108 * Name of the channel group type for swap information
110 public static final String CHANNEL_GROUP_TYPE_SWAP = "swapGroup";
113 * Name of the channel group for swap information
115 public static final String CHANNEL_GROUP_SWAP = "swap";
118 * Total size of swap memory
120 public static final String CHANNEL_SWAP_TOTAL = "swap#total";
123 * Size of the available swap memory
125 public static final String CHANNEL_SWAP_AVAILABLE = "swap#available";
128 * Size of the used swap memory
130 public static final String CHANNEL_SWAP_USED = "swap#used";
133 * Percents of the available swap memory
135 public static final String CHANNEL_SWAP_AVAILABLE_PERCENT = "swap#availablePercent";
138 * Percents of the used swap memory
140 public static final String CHANNEL_SWAP_USED_PERCENT = "swap#usedPercent";
143 * Name of the channel group type for drive information
145 public static final String CHANNEL_GROUP_TYPE_DRIVE = "driveGroup";
148 * Name of the channel group for drive information
150 public static final String CHANNEL_GROUP_DRIVE = "drive";
153 * Physical storage drive name
155 public static final String CHANNEL_DRIVE_NAME = "drive#name";
158 * Physical storage drive model
160 public static final String CHANNEL_DRIVE_MODEL = "drive#model";
163 * Physical storage drive serial number
165 public static final String CHANNEL_DRIVE_SERIAL = "drive#serial";
168 * Name of the channel group type for storage information
170 public static final String CHANNEL_GROUP_TYPE_STORAGE = "storageGroup";
173 * Name of the channel group for storage information
175 public static final String CHANNEL_GROUP_STORAGE = "storage";
178 * Name of the logical volume storage
180 public static final String CHANNEL_STORAGE_NAME = "storage#name";
183 * Logical storage volume type -(e.g. NTFS, FAT32 ..)
185 public static final String CHANNEL_STORAGE_TYPE = "storage#type";
188 * Description of the logical volume storage
190 public static final String CHANNEL_STORAGE_DESCRIPTION = "storage#description";
193 * Size of the available storage space
195 public static final String CHANNEL_STORAGE_AVAILABLE = "storage#available";
198 * Size of the used storage space
200 public static final String CHANNEL_STORAGE_USED = "storage#used";
203 * Total storage space
205 public static final String CHANNEL_STORAGE_TOTAL = "storage#total";
208 * Percents of the available storage space
210 public static final String CHANNEL_STORAGE_AVAILABLE_PERCENT = "storage#availablePercent";
213 * Percents of the used storage space
215 public static final String CHANNEL_STORAGE_USED_PERCENT = "storage#usedPercent";
218 * Name of the channel group type for sensors information
220 public static final String CHANNEL_GROUP_TYPE_SENSORS = "sensorsGroup";
223 * Name of the channel group for sensors information
225 public static final String CHANNEL_GROUP_SENSORS = "sensors";
228 * Temperature of the CPU measured from the sensors.
230 public static final String CHANNEL_SENSORS_CPU_TEMPERATURE = "sensors#cpuTemp";
233 * Voltage of the CPU core.
235 public static final String CHANNEL_SENOSRS_CPU_VOLTAGE = "sensors#cpuVoltage";
240 public static final String CHANNEL_SENSORS_FAN_SPEED = "sensors#fanSpeed";
243 * Name of the channel group type for battery information
245 public static final String CHANNEL_GROUP_TYPE_BATTERY = "batteryGroup";
248 * Name of the channel group for battery information
250 public static final String CHANNEL_GROUP_BATTERY = "battery";
253 * Name of the battery
255 public static final String CHANNEL_BATTERY_NAME = "battery#name";
258 * Remaining capacity of the battery.
260 public static final String CHANNEL_BATTERY_REMAINING_CAPACITY = "battery#remainingCapacity";
263 * Estimated remaining time of the battery
265 public static final String CHANNEL_BATTERY_REMAINING_TIME = "battery#remainingTime";
268 * Name of the channel group type for CPU information
270 public static final String CHANNEL_GROUP_TYPE_CPU = "cpuGroup";
273 * Name of the channel group for CPU information
275 public static final String CHANNEL_GROUP_CPU = "cpu";
278 * Detailed description about the CPU
280 public static final String CHANNEL_CPU_DESCRIPTION = "cpu#description";
283 * Maximum frequency of the CPU
285 public static final String CHANNEL_CPU_MAXFREQ = "cpu#maxfreq";
288 * Frequency of the CPU
290 public static final String CHANNEL_CPU_FREQ = "cpu#freq";
293 * Average recent CPU load
295 public static final String CHANNEL_CPU_LOAD = "cpu#load";
298 * Average CPU load for the last minute
300 public static final String CHANNEL_CPU_LOAD_1 = "cpu#load1";
303 * Average CPU load for the last 5 minutes
305 public static final String CHANNEL_CPU_LOAD_5 = "cpu#load5";
308 * Average CPU load for the last 15 minutes
310 public static final String CHANNEL_CPU_LOAD_15 = "cpu#load15";
315 public static final String CHANNEL_CPU_NAME = "cpu#name";
318 * CPU uptime in minutes
320 public static final String CHANNEL_CPU_UPTIME = "cpu#uptime";
323 * CPU running threads count
325 public static final String CHANNEL_CPU_THREADS = "cpu#threads";
328 * Name of the channel group type for display information
330 public static final String CHANNEL_GROUP_TYPE_DISPLAY = "displayGroup";
333 * Name of the channel group for display information
335 public static final String CHANNEL_GROUP_DISPLAY = "display";
338 * Information about the display device
340 public static final String CHANNEL_DISPLAY_INFORMATION = "display#information";
343 * Name of the channel group type for network information
345 public static final String CHANNEL_GROUP_TYPE_NETWORK = "networkGroup";
348 * Name of the channel group for network information
350 public static final String CHANNEL_GROUP_NETWORK = "network";
353 * Host IP address of the network
355 public static final String CHANNEL_NETWORK_IP = "network#ip";
358 * Network display name
360 public static final String CHANNEL_NETWORK_ADAPTER_NAME = "network#networkName";
365 public static final String CHANNEL_NETWORK_DATA_SENT = "network#dataSent";
368 * Network data received
370 public static final String CHANNEL_NETWORK_DATA_RECEIVED = "network#dataReceived";
373 * Network packets sent
375 public static final String CHANNEL_NETWORK_PACKETS_SENT = "network#packetsSent";
378 * Network packets received
380 public static final String CHANNEL_NETWORK_PACKETS_RECEIVED = "network#packetsReceived";
385 public static final String CHANNEL_NETWORK_NAME = "network#networkDisplayName";
388 * Network mac address
390 public static final String CHANNEL_NETWORK_MAC = "network#mac";
393 * Name of the channel group type for process information
395 public static final String CHANNEL_GROUP_TYPE_CURRENT_PROCESS = "currentProcessGroup";
398 * Name of the channel group for process information
400 public static final String CHANNEL_GROUP_CURRENT_PROCESS = "currentProcess";
403 * CPU load used from a process
406 public static final String CHANNEL_CURRENT_PROCESS_LOAD = "currentProcess#load";
409 * Size of memory used from a process in MB
411 public static final String CHANNEL_CURRENT_PROCESS_MEMORY = "currentProcess#used";
414 * Name of the process
416 public static final String CHANNEL_CURRENT_PROCESS_NAME = "currentProcess#name";
419 * Number of threads, used form the process
421 public static final String CHANNEL_CURRENT_PROCESS_THREADS = "currentProcess#threads";
424 * The full path of the process
426 public static final String CHANNEL_CURRENT_PROCESS_PATH = "currentProcess#path";
429 * Name of the channel group type for process information
431 public static final String CHANNEL_GROUP_TYPE_PROCESS = "processGroup";
434 * Name of the channel group for process information
436 public static final String CHANNEL_GROUP_PROCESS = "process";
439 * CPU load used from a process
442 public static final String CHANNEL_PROCESS_LOAD = "process#load";
445 * Size of memory used from a process in MB
447 public static final String CHANNEL_PROCESS_MEMORY = "process#used";
450 * Name of the process
452 public static final String CHANNEL_PROCESS_NAME = "process#name";
455 * Number of threads, used form the process
457 public static final String CHANNEL_PROCESS_THREADS = "process#threads";
460 * The full path of the process
462 public static final String CHANNEL_PROCESS_PATH = "process#path";
464 // Thing configuraion
466 * Name of the configuration parameter of the thing that defines refresh time for High priority channels
468 public static final String HIGH_PRIORITY_REFRESH_TIME = "interval_high";
471 * Name of the configuration parameter of the thing that defines refresh time for Medium priority channels
473 public static final String MEDIUM_PRIORITY_REFRESH_TIME = "interval_medium";
475 // Channel configuration
478 * Name of the channel configuration parameter priority
480 public static final String PRIOIRITY_PARAM = "priority";
483 * Name of the channel configuration parameter pid
486 public static final String PID_PARAM = "pid";