]> git.basschouten.com Git - openhab-addons.git/blob
71a2e8df2e23edff3cc30bdc6b5e5a4c240199b4
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.systeminfo.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17
18 /**
19  * The {@link SystemInfoBindingConstants} class defines common constants, which are
20  * used across the whole binding.
21  *
22  * @author Svilen Valkanov - Initial contribution
23  * @author Mark Herwege - Add dynamic creation of extra channels
24  * @author Mark Herwege - Processor frequency channels
25  */
26 @NonNullByDefault
27 public class SystemInfoBindingConstants {
28
29     public static final String BINDING_ID = "systeminfo";
30
31     public static final String THING_TYPE_COMPUTER_ID = "computer";
32     public static final ThingTypeUID THING_TYPE_COMPUTER = new ThingTypeUID(BINDING_ID, THING_TYPE_COMPUTER_ID);
33
34     // Thing properties
35     /**
36      * Number of CPU logical cores
37      */
38     public static final String PROPERTY_CPU_LOGICAL_CORES = "CPU Logical Cores";
39
40     /**
41      * Number of CPU physical cores
42      */
43     public static final String PROPERTY_CPU_PHYSICAL_CORES = "CPU Physical Cores";
44
45     /**
46      * Contains information about the family /Windows, Linux, OS X etc/ of the operation system
47      */
48     public static final String PROPERTY_OS_FAMILY = "OS Family";
49
50     /**
51      * Name of the manufacturer of the operation system
52      */
53     public static final String PROPERTY_OS_MANUFACTURER = "OS Manufacturer";
54
55     /**
56      * Version of the operation system
57      */
58     public static final String PROPERTY_OS_VERSION = "OS Version";
59
60     // List of all Channel IDs
61
62     /**
63      * Name of the channel group type for memory information
64      */
65     public static final String CHANNEL_GROUP_TYPE_MEMORY = "memoryGroup";
66
67     /**
68      * Name of the channel group for memory information
69      */
70     public static final String CHANNEL_GROUP_MEMORY = "memory";
71
72     /**
73      * Size of the available memory
74      */
75     public static final String CHANNEL_MEMORY_AVAILABLE = "memory#available";
76
77     /**
78      * Size of the used memory
79      */
80     public static final String CHANNEL_MEMORY_USED = "memory#used";
81
82     /**
83      * Total size of the memory
84      */
85     public static final String CHANNEL_MEMORY_TOTAL = "memory#total";
86
87     /**
88      * Percents of the available memory
89      */
90     public static final String CHANNEL_MEMORY_AVAILABLE_PERCENT = "memory#availablePercent";
91
92     /**
93      * Percents of the used memory
94      */
95     public static final String CHANNEL_MEMORY_USED_PERCENT = "memory#usedPercent";
96
97     /**
98      * Percents of the used heap
99      */
100     public static final String CHANNEL_MEMORY_USED_HEAP_PERCENT = "memory#usedHeapPercent";
101
102     /**
103      * Bytes used in the heap
104      */
105     public static final String CHANNEL_MEMORY_HEAP_AVAILABLE = "memory#availableHeap";
106
107     /**
108      * Name of the channel group type for swap information
109      */
110     public static final String CHANNEL_GROUP_TYPE_SWAP = "swapGroup";
111
112     /**
113      * Name of the channel group for swap information
114      */
115     public static final String CHANNEL_GROUP_SWAP = "swap";
116
117     /**
118      * Total size of swap memory
119      */
120     public static final String CHANNEL_SWAP_TOTAL = "swap#total";
121
122     /**
123      * Size of the available swap memory
124      */
125     public static final String CHANNEL_SWAP_AVAILABLE = "swap#available";
126
127     /**
128      * Size of the used swap memory
129      */
130     public static final String CHANNEL_SWAP_USED = "swap#used";
131
132     /**
133      * Percents of the available swap memory
134      */
135     public static final String CHANNEL_SWAP_AVAILABLE_PERCENT = "swap#availablePercent";
136
137     /**
138      * Percents of the used swap memory
139      */
140     public static final String CHANNEL_SWAP_USED_PERCENT = "swap#usedPercent";
141
142     /**
143      * Name of the channel group type for drive information
144      */
145     public static final String CHANNEL_GROUP_TYPE_DRIVE = "driveGroup";
146
147     /**
148      * Name of the channel group for drive information
149      */
150     public static final String CHANNEL_GROUP_DRIVE = "drive";
151
152     /**
153      * Physical storage drive name
154      */
155     public static final String CHANNEL_DRIVE_NAME = "drive#name";
156
157     /**
158      * Physical storage drive model
159      */
160     public static final String CHANNEL_DRIVE_MODEL = "drive#model";
161
162     /**
163      * Physical storage drive serial number
164      */
165     public static final String CHANNEL_DRIVE_SERIAL = "drive#serial";
166
167     /**
168      * Name of the channel group type for storage information
169      */
170     public static final String CHANNEL_GROUP_TYPE_STORAGE = "storageGroup";
171
172     /**
173      * Name of the channel group for storage information
174      */
175     public static final String CHANNEL_GROUP_STORAGE = "storage";
176
177     /**
178      * Name of the logical volume storage
179      */
180     public static final String CHANNEL_STORAGE_NAME = "storage#name";
181
182     /**
183      * Logical storage volume type -(e.g. NTFS, FAT32 ..)
184      */
185     public static final String CHANNEL_STORAGE_TYPE = "storage#type";
186
187     /**
188      * Description of the logical volume storage
189      */
190     public static final String CHANNEL_STORAGE_DESCRIPTION = "storage#description";
191
192     /**
193      * Size of the available storage space
194      */
195     public static final String CHANNEL_STORAGE_AVAILABLE = "storage#available";
196
197     /**
198      * Size of the used storage space
199      */
200     public static final String CHANNEL_STORAGE_USED = "storage#used";
201
202     /**
203      * Total storage space
204      */
205     public static final String CHANNEL_STORAGE_TOTAL = "storage#total";
206
207     /**
208      * Percents of the available storage space
209      */
210     public static final String CHANNEL_STORAGE_AVAILABLE_PERCENT = "storage#availablePercent";
211
212     /**
213      * Percents of the used storage space
214      */
215     public static final String CHANNEL_STORAGE_USED_PERCENT = "storage#usedPercent";
216
217     /**
218      * Name of the channel group type for sensors information
219      */
220     public static final String CHANNEL_GROUP_TYPE_SENSORS = "sensorsGroup";
221
222     /**
223      * Name of the channel group for sensors information
224      */
225     public static final String CHANNEL_GROUP_SENSORS = "sensors";
226
227     /**
228      * Temperature of the CPU measured from the sensors.
229      */
230     public static final String CHANNEL_SENSORS_CPU_TEMPERATURE = "sensors#cpuTemp";
231
232     /**
233      * Voltage of the CPU core.
234      */
235     public static final String CHANNEL_SENOSRS_CPU_VOLTAGE = "sensors#cpuVoltage";
236
237     /**
238      * Fan speed
239      */
240     public static final String CHANNEL_SENSORS_FAN_SPEED = "sensors#fanSpeed";
241
242     /**
243      * Name of the channel group type for battery information
244      */
245     public static final String CHANNEL_GROUP_TYPE_BATTERY = "batteryGroup";
246
247     /**
248      * Name of the channel group for battery information
249      */
250     public static final String CHANNEL_GROUP_BATTERY = "battery";
251
252     /**
253      * Name of the battery
254      */
255     public static final String CHANNEL_BATTERY_NAME = "battery#name";
256
257     /**
258      * Remaining capacity of the battery.
259      */
260     public static final String CHANNEL_BATTERY_REMAINING_CAPACITY = "battery#remainingCapacity";
261
262     /**
263      * Estimated remaining time of the battery
264      */
265     public static final String CHANNEL_BATTERY_REMAINING_TIME = "battery#remainingTime";
266
267     /**
268      * Name of the channel group type for CPU information
269      */
270     public static final String CHANNEL_GROUP_TYPE_CPU = "cpuGroup";
271
272     /**
273      * Name of the channel group for CPU information
274      */
275     public static final String CHANNEL_GROUP_CPU = "cpu";
276
277     /**
278      * Detailed description about the CPU
279      */
280     public static final String CHANNEL_CPU_DESCRIPTION = "cpu#description";
281
282     /**
283      * Maximum frequency of the CPU
284      */
285     public static final String CHANNEL_CPU_MAXFREQ = "cpu#maxfreq";
286
287     /**
288      * Frequency of the CPU
289      */
290     public static final String CHANNEL_CPU_FREQ = "cpu#freq";
291
292     /**
293      * Average recent CPU load
294      */
295     public static final String CHANNEL_CPU_LOAD = "cpu#load";
296
297     /**
298      * Average CPU load for the last minute
299      */
300     public static final String CHANNEL_CPU_LOAD_1 = "cpu#load1";
301
302     /**
303      * Average CPU load for the last 5 minutes
304      */
305     public static final String CHANNEL_CPU_LOAD_5 = "cpu#load5";
306
307     /**
308      * Average CPU load for the last 15 minutes
309      */
310     public static final String CHANNEL_CPU_LOAD_15 = "cpu#load15";
311
312     /**
313      * CPU name
314      */
315     public static final String CHANNEL_CPU_NAME = "cpu#name";
316
317     /**
318      * CPU uptime in minutes
319      */
320     public static final String CHANNEL_CPU_UPTIME = "cpu#uptime";
321
322     /**
323      * CPU running threads count
324      */
325     public static final String CHANNEL_CPU_THREADS = "cpu#threads";
326
327     /**
328      * Name of the channel group type for display information
329      */
330     public static final String CHANNEL_GROUP_TYPE_DISPLAY = "displayGroup";
331
332     /**
333      * Name of the channel group for display information
334      */
335     public static final String CHANNEL_GROUP_DISPLAY = "display";
336
337     /**
338      * Information about the display device
339      */
340     public static final String CHANNEL_DISPLAY_INFORMATION = "display#information";
341
342     /**
343      * Name of the channel group type for network information
344      */
345     public static final String CHANNEL_GROUP_TYPE_NETWORK = "networkGroup";
346
347     /**
348      * Name of the channel group for network information
349      */
350     public static final String CHANNEL_GROUP_NETWORK = "network";
351
352     /**
353      * Host IP address of the network
354      */
355     public static final String CHANNEL_NETWORK_IP = "network#ip";
356
357     /**
358      * Network display name
359      */
360     public static final String CHANNEL_NETWORK_ADAPTER_NAME = "network#networkName";
361
362     /**
363      * Network data sent
364      */
365     public static final String CHANNEL_NETWORK_DATA_SENT = "network#dataSent";
366
367     /**
368      * Network data received
369      */
370     public static final String CHANNEL_NETWORK_DATA_RECEIVED = "network#dataReceived";
371
372     /**
373      * Network packets sent
374      */
375     public static final String CHANNEL_NETWORK_PACKETS_SENT = "network#packetsSent";
376
377     /**
378      * Network packets received
379      */
380     public static final String CHANNEL_NETWORK_PACKETS_RECEIVED = "network#packetsReceived";
381
382     /**
383      * Network name
384      */
385     public static final String CHANNEL_NETWORK_NAME = "network#networkDisplayName";
386
387     /**
388      * Network mac address
389      */
390     public static final String CHANNEL_NETWORK_MAC = "network#mac";
391
392     /**
393      * Name of the channel group type for process information
394      */
395     public static final String CHANNEL_GROUP_TYPE_CURRENT_PROCESS = "currentProcessGroup";
396
397     /**
398      * Name of the channel group for process information
399      */
400     public static final String CHANNEL_GROUP_CURRENT_PROCESS = "currentProcess";
401
402     /**
403      * CPU load used from a process
404      */
405
406     public static final String CHANNEL_CURRENT_PROCESS_LOAD = "currentProcess#load";
407
408     /**
409      * Size of memory used from a process in MB
410      */
411     public static final String CHANNEL_CURRENT_PROCESS_MEMORY = "currentProcess#used";
412
413     /**
414      * Name of the process
415      */
416     public static final String CHANNEL_CURRENT_PROCESS_NAME = "currentProcess#name";
417
418     /**
419      * Number of threads, used form the process
420      */
421     public static final String CHANNEL_CURRENT_PROCESS_THREADS = "currentProcess#threads";
422
423     /**
424      * The full path of the process
425      */
426     public static final String CHANNEL_CURRENT_PROCESS_PATH = "currentProcess#path";
427
428     /**
429      * Name of the channel group type for process information
430      */
431     public static final String CHANNEL_GROUP_TYPE_PROCESS = "processGroup";
432
433     /**
434      * Name of the channel group for process information
435      */
436     public static final String CHANNEL_GROUP_PROCESS = "process";
437
438     /**
439      * CPU load used from a process
440      */
441
442     public static final String CHANNEL_PROCESS_LOAD = "process#load";
443
444     /**
445      * Size of memory used from a process in MB
446      */
447     public static final String CHANNEL_PROCESS_MEMORY = "process#used";
448
449     /**
450      * Name of the process
451      */
452     public static final String CHANNEL_PROCESS_NAME = "process#name";
453
454     /**
455      * Number of threads, used form the process
456      */
457     public static final String CHANNEL_PROCESS_THREADS = "process#threads";
458
459     /**
460      * The full path of the process
461      */
462     public static final String CHANNEL_PROCESS_PATH = "process#path";
463
464     // Thing configuraion
465     /**
466      * Name of the configuration parameter of the thing that defines refresh time for High priority channels
467      */
468     public static final String HIGH_PRIORITY_REFRESH_TIME = "interval_high";
469
470     /**
471      * Name of the configuration parameter of the thing that defines refresh time for Medium priority channels
472      */
473     public static final String MEDIUM_PRIORITY_REFRESH_TIME = "interval_medium";
474
475     // Channel configuration
476
477     /**
478      * Name of the channel configuration parameter priority
479      */
480     public static final String PRIOIRITY_PARAM = "priority";
481
482     /**
483      * Name of the channel configuration parameter pid
484      *
485      */
486     public static final String PID_PARAM = "pid";
487 }