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
26 public class SysteminfoBindingConstants {
28 public static final String BINDING_ID = "systeminfo";
30 public static final String THING_TYPE_COMPUTER_ID = "computer";
31 public static final ThingTypeUID THING_TYPE_COMPUTER = new ThingTypeUID(BINDING_ID, THING_TYPE_COMPUTER_ID);
35 * Number of CPU logical cores
37 public static final String PROPERTY_CPU_LOGICAL_CORES = "CPU Logical Cores";
40 * Number of CPU physical cores
42 public static final String PROPERTY_CPU_PHYSICAL_CORES = "CPU Physical Cores";
45 * Contains information about the family /Windows, Linux, OS X etc/ of the operation system
47 public static final String PROPERTY_OS_FAMILY = "OS Family";
50 * Name of the manufacturer of the operation system
52 public static final String PROPERTY_OS_MANUFACTURER = "OS Manufacturer";
55 * Version of the operation system
57 public static final String PROPERTY_OS_VERSION = "OS Version";
59 // List of all Channel IDs
62 * Name of the channel group type for memory information
64 public static final String CHANNEL_GROUP_TYPE_MEMORY = "memoryGroup";
67 * Name of the channel group for memory information
69 public static final String CHANNEL_GROUP_MEMORY = "memory";
72 * Size of the available memory
74 public static final String CHANNEL_MEMORY_AVAILABLE = "memory#available";
77 * Size of the used memory
79 public static final String CHANNEL_MEMORY_USED = "memory#used";
82 * Total size of the memory
84 public static final String CHANNEL_MEMORY_TOTAL = "memory#total";
87 * Percents of the available memory
89 public static final String CHANNEL_MEMORY_AVAILABLE_PERCENT = "memory#availablePercent";
92 * Percents of the used memory
94 public static final String CHANNEL_MEMORY_USED_PERCENT = "memory#usedPercent";
97 * Percents of the used heap
99 public static final String CHANNEL_MEMORY_USED_HEAP_PERCENT = "memory#usedHeapPercent";
102 * Bytes used in the heap
104 public static final String CHANNEL_MEMORY_HEAP_AVAILABLE = "memory#availableHeap";
107 * Name of the channel group type for swap information
109 public static final String CHANNEL_GROUP_TYPE_SWAP = "swapGroup";
112 * Name of the channel group for swap information
114 public static final String CHANNEL_GROUP_SWAP = "swap";
117 * Total size of swap memory
119 public static final String CHANNEL_SWAP_TOTAL = "swap#total";
122 * Size of the available swap memory
124 public static final String CHANNEL_SWAP_AVAILABLE = "swap#available";
127 * Size of the used swap memory
129 public static final String CHANNEL_SWAP_USED = "swap#used";
132 * Percents of the available swap memory
134 public static final String CHANNEL_SWAP_AVAILABLE_PERCENT = "swap#availablePercent";
137 * Percents of the used swap memory
139 public static final String CHANNEL_SWAP_USED_PERCENT = "swap#usedPercent";
142 * Name of the channel group type for drive information
144 public static final String CHANNEL_GROUP_TYPE_DRIVE = "driveGroup";
147 * Name of the channel group for drive information
149 public static final String CHANNEL_GROUP_DRIVE = "drive";
152 * Physical storage drive name
154 public static final String CHANNEL_DRIVE_NAME = "drive#name";
157 * Physical storage drive model
159 public static final String CHANNEL_DRIVE_MODEL = "drive#model";
162 * Physical storage drive serial number
164 public static final String CHANNEL_DRIVE_SERIAL = "drive#serial";
167 * Name of the channel group type for storage information
169 public static final String CHANNEL_GROUP_TYPE_STORAGE = "storageGroup";
172 * Name of the channel group for storage information
174 public static final String CHANNEL_GROUP_STORAGE = "storage";
177 * Name of the logical volume storage
179 public static final String CHANNEL_STORAGE_NAME = "storage#name";
182 * Logical storage volume type -(e.g. NTFS, FAT32 ..)
184 public static final String CHANNEL_STORAGE_TYPE = "storage#type";
187 * Description of the logical volume storage
189 public static final String CHANNEL_STORAGE_DESCRIPTION = "storage#description";
192 * Size of the available storage space
194 public static final String CHANNEL_STORAGE_AVAILABLE = "storage#available";
197 * Size of the used storage space
199 public static final String CHANNEL_STORAGE_USED = "storage#used";
202 * Total storage space
204 public static final String CHANNEL_STORAGE_TOTAL = "storage#total";
207 * Percents of the available storage space
209 public static final String CHANNEL_STORAGE_AVAILABLE_PERCENT = "storage#availablePercent";
212 * Percents of the used storage space
214 public static final String CHANNEL_STORAGE_USED_PERCENT = "storage#usedPercent";
217 * Name of the channel group type for sensors information
219 public static final String CHANNEL_GROUP_TYPE_SENSORS = "sensorsGroup";
222 * Name of the channel group for sensors information
224 public static final String CHANNEL_GROUP_SENSORS = "sensors";
227 * Temperature of the CPU measured from the sensors.
229 public static final String CHANNEL_SENSORS_CPU_TEMPERATURE = "sensors#cpuTemp";
232 * Voltage of the CPU core.
234 public static final String CHANNEL_SENOSRS_CPU_VOLTAGE = "sensors#cpuVoltage";
239 public static final String CHANNEL_SENSORS_FAN_SPEED = "sensors#fanSpeed";
242 * Name of the channel group type for battery information
244 public static final String CHANNEL_GROUP_TYPE_BATTERY = "batteryGroup";
247 * Name of the channel group for battery information
249 public static final String CHANNEL_GROUP_BATTERY = "battery";
252 * Name of the battery
254 public static final String CHANNEL_BATTERY_NAME = "battery#name";
257 * Remaining capacity of the battery.
259 public static final String CHANNEL_BATTERY_REMAINING_CAPACITY = "battery#remainingCapacity";
262 * Estimated remaining time of the battery
264 public static final String CHANNEL_BATTERY_REMAINING_TIME = "battery#remainingTime";
267 * Name of the channel group type for CPU information
269 public static final String CHANNEL_GROUP_TYPE_CPU = "cpuGroup";
272 * Name of the channel group for CPU information
274 public static final String CHANNEL_GROUP_CPU = "cpu";
277 * Detailed description about the CPU
279 public static final String CHANNEL_CPU_DESCRIPTION = "cpu#description";
282 * Average recent CPU load
284 public static final String CHANNEL_CPU_LOAD = "cpu#load";
287 * Average CPU load for the last minute
289 public static final String CHANNEL_CPU_LOAD_1 = "cpu#load1";
292 * Average CPU load for the last 5 minutes
294 public static final String CHANNEL_CPU_LOAD_5 = "cpu#load5";
297 * Average CPU load for the last 15 minutes
299 public static final String CHANNEL_CPU_LOAD_15 = "cpu#load15";
304 public static final String CHANNEL_CPU_NAME = "cpu#name";
307 * CPU uptime in minutes
309 public static final String CHANNEL_CPU_UPTIME = "cpu#uptime";
312 * CPU running threads count
314 public static final String CHANNEL_CPU_THREADS = "cpu#threads";
317 * Name of the channel group type for display information
319 public static final String CHANNEL_GROUP_TYPE_DISPLAY = "displayGroup";
322 * Name of the channel group for display information
324 public static final String CHANNEL_GROUP_DISPLAY = "display";
327 * Information about the display device
329 public static final String CHANNEL_DISPLAY_INFORMATION = "display#information";
332 * Name of the channel group type for network information
334 public static final String CHANNEL_GROUP_TYPE_NETWORK = "networkGroup";
337 * Name of the channel group for network information
339 public static final String CHANNEL_GROUP_NETWORK = "network";
342 * Host IP address of the network
344 public static final String CHANNEL_NETWORK_IP = "network#ip";
347 * Network display name
349 public static final String CHANNEL_NETWORK_ADAPTER_NAME = "network#networkName";
354 public static final String CHANNEL_NETWORK_DATA_SENT = "network#dataSent";
357 * Network data received
359 public static final String CHANNEL_NETWORK_DATA_RECEIVED = "network#dataReceived";
362 * Network packets sent
364 public static final String CHANNEL_NETWORK_PACKETS_SENT = "network#packetsSent";
367 * Network packets received
369 public static final String CHANNEL_NETWORK_PACKETS_RECEIVED = "network#packetsReceived";
374 public static final String CHANNEL_NETWORK_NAME = "network#networkDisplayName";
377 * Network mac address
379 public static final String CHANNEL_NETWORK_MAC = "network#mac";
382 * Name of the channel group type for process information
384 public static final String CHANNEL_GROUP_TYPE_CURRENT_PROCESS = "currentProcessGroup";
387 * Name of the channel group for process information
389 public static final String CHANNEL_GROUP_CURRENT_PROCESS = "currentProcess";
392 * CPU load used from a process
395 public static final String CHANNEL_CURRENT_PROCESS_LOAD = "currentProcess#load";
398 * Size of memory used from a process in MB
400 public static final String CHANNEL_CURRENT_PROCESS_MEMORY = "currentProcess#used";
403 * Name of the process
405 public static final String CHANNEL_CURRENT_PROCESS_NAME = "currentProcess#name";
408 * Number of threads, used form the process
410 public static final String CHANNEL_CURRENT_PROCESS_THREADS = "currentProcess#threads";
413 * The full path of the process
415 public static final String CHANNEL_CURRENT_PROCESS_PATH = "currentProcess#path";
418 * Name of the channel group type for process information
420 public static final String CHANNEL_GROUP_TYPE_PROCESS = "processGroup";
423 * Name of the channel group for process information
425 public static final String CHANNEL_GROUP_PROCESS = "process";
428 * CPU load used from a process
431 public static final String CHANNEL_PROCESS_LOAD = "process#load";
434 * Size of memory used from a process in MB
436 public static final String CHANNEL_PROCESS_MEMORY = "process#used";
439 * Name of the process
441 public static final String CHANNEL_PROCESS_NAME = "process#name";
444 * Number of threads, used form the process
446 public static final String CHANNEL_PROCESS_THREADS = "process#threads";
449 * The full path of the process
451 public static final String CHANNEL_PROCESS_PATH = "process#path";
453 // Thing configuraion
455 * Name of the configuration parameter of the thing that defines refresh time for High priority channels
457 public static final String HIGH_PRIORITY_REFRESH_TIME = "interval_high";
460 * Name of the configuration parameter of the thing that defines refresh time for Medium priority channels
462 public static final String MEDIUM_PRIORITY_REFRESH_TIME = "interval_medium";
464 // Channel configuration
467 * Name of the channel configuration parameter priority
469 public static final String PRIOIRITY_PARAM = "priority";
472 * Name of the channel configuration parameter pid
475 public static final String PID_PARAM = "pid";