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