Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #8 from spdermn02/BugFixes
Browse files Browse the repository at this point in the history
Bug fixes and Ehancements
  • Loading branch information
spdermn02 authored Apr 28, 2020
2 parents e30217d + 31151ae commit f000de6
Show file tree
Hide file tree
Showing 14 changed files with 247 additions and 35 deletions.
67 changes: 59 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ TouchPortal Plugin to Utilize Statistics from Open Hardware Monitor - for Window
- [RAM](#ram)
- [Sample Page](#sample-page)
- [Events](#events)
- [CPU Total Status](#cpu-total-status)
- [Memory Status](#memory-status)
- [CPU Package Temperature Status ++NEW++](#cpu-package-temperature-status-new)
- [GPU Core Temperature Status ++NEW++](#gpu-core-temperature-status-new)
- [CPU Total Load Status ++renamed v2++](#cpu-total-load-status-renamed-v2)
- [Memory Load Status ++renamed v2++](#memory-load-status-renamed-v2)
- [CPU Package Temperature Status ++NEW -renamed v2++](#cpu-package-temperature-status-new--renamed-v2)
- [GPU Core Load Status ++NEW v2++](#gpu-core-load-status-new-v2)
- [GPU Memory Load Status ++NEW v2++](#gpu-memory-load-status-new-v2)
- [GPU Core Temperature Status ++NEW renamed v2++](#gpu-core-temperature-status-new-renamed-v2)
- [GPU Memory Temperature Status ++NEW v2++](#gpu-memory-temperature-status-new-v2)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installing](#installing)
Expand All @@ -28,6 +31,8 @@ TouchPortal Plugin to Utilize Statistics from Open Hardware Monitor - for Window

## Current Sensors and Values Available

__*NOTICE*__: Not all sensors configured will work with your computer, there may be some that don't show anything, and other sensors that I didn't know about were even available so have to be configured to work. If there is one I missed open an Issue with your attached OHM report and the sensor you are requesting and it will get put on the log.

These are the current sensors and values available via this plugin. This information will be transmitted back to Touch Portal every 1 seconds. If this becomes a problem I'll probably extract this out into a configuration file so it can be controlled by you.

##### Data Types
Expand Down Expand Up @@ -71,8 +76,20 @@ _Note: All Decimals are to the tenths place. I chose not to include the symbol a

- **Total GPU Load** - Percentage
- state id is `tpohm_gpu_core_load_val`
- **GPU Status** (based on Total GPU Load) - Threshold - **+NEW v2+**
- state id is `tpohm_gpu_core_load_status`
- Final Values are: `Low, Medium, High`
- `Low` is when < 45% of GPU is used
- `Medium` is when < 85% of GPU is used
- `High` is when >= 85% of GPU is used
- **Total GPU Memory Load** - Percentage
- state id is `tpohm_gpu_memory_load_val`
- **GPU Memory Status** (based on Total GPU Memory Load) - Threshold - **+NEW v2+**
- state id is `tpohm_gpu_memory_load_status`
- Final Values are: `Low, Medium, High`
- `Low` is when < 40% of GPU Memory is used
- `Medium` is when < 85% of GPU Memory is used
- `High` is when >= 85% of GPU Memory is used
- **GPU Core Clock** - Clock
- state id is `tpohm_gpu_core_clock_val`
- **GPU Memory Clock** - Clock
Expand All @@ -93,6 +110,14 @@ _Note: All Decimals are to the tenths place. I chose not to include the symbol a
- state id is `tpohm_gpu_free_memory_val`
- **GPU Memory Used** - SmallData
- state id is `tpohm_gpu_used_memory_val`
- **GPU Memory Temperature** - Temperature - Maybe AMD Only - **+NEW v2+**
- state id is `tpohm_gpu_memory_temp_val`
- **GPU Memory Temperature Status** - Threshold - Maybe AMD Only - **+New v2+**
- state id is `tpohm_gpu_memory_temp_status`
- Final Values are: `Low, Medium, High`
- `Low` is when < 40°C
- `Medium` is when < 60°C
- `High` is when >= 60°C

#### RAM

Expand Down Expand Up @@ -123,38 +148,64 @@ Here is a gif of it in action on my phone (*note:* slightly different than exist

## Events

### CPU Total Status
### CPU Total Load Status ++renamed v2++

This event is triggered off the state id `tpohm_cpu_total_load_status`

Example:

![TP OHM CPU Total Status](images/tp_ohm_cpu_total_status_event.png)

### Memory Status
### Memory Load Status ++renamed v2++

This event is triggered off the state id `tpohm_memory_load_status`

Example:

![TP OHM Memory Status](images/tp_ohm_memory_status_event.png)

### CPU Package Temperature Status ++NEW++
### CPU Package Temperature Status ++NEW -renamed v2++

This event is triggered off the state id `tpohm_cpu_package_temp_status`

Example:

![TP OHM CPU Temperature Status](images/tp_ohm_cpu_temperature_status_event.png)

### GPU Core Temperature Status ++NEW++
### GPU Core Load Status ++NEW v2++

This event is triggered off the state id `tpohm_gpu_core_load_status`

Example:

![TP OHM GPU Core Load Status](images/tp_ohm_gpu_core_load_status_event.png)

### GPU Memory Load Status ++NEW v2++

This event is triggered off the state id `tpohm_gpu_memory_load_status`

Example:

![TP OHM GPU Memory Load Status](images/tp_ohm_gpu_memory_load_status_event.png)

### GPU Core Temperature Status ++NEW renamed v2++

This event is triggered off the state id `tpohm_gpu_core_temp_status`

Example:

![TP OHM GPU Temperature Status](images/tp_ohm_gpu_temperature_status_event.png)

### GPU Memory Temperature Status ++NEW v2++

This event is triggered off the state id `tpohm_gpu_memory_temp_status`

NOTE: This may be AMD GPU only

Example:

![TP OHM GPU Memory Temperature Status](images/tp_ohm_gpu_memory_temperature_status_event.png)

## Getting Started

If you use [Touch Portal](https://touch-portal.com) and are interested in having a "dashboard" display of some base computer statistics, these instructions will help get that setup for you.
Expand Down
Binary file modified images/tp_ohm_cpu_total_status_event.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/tp_ohm_gpu_core_load_status_event.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/tp_ohm_gpu_memory_load_status_event.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/tp_ohm_memory_status_event.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/tp_ohm_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified installer/OpenHardwareMonitor.tpp
Binary file not shown.
Binary file modified resources/OHM Page Example.tpz
Binary file not shown.
71 changes: 63 additions & 8 deletions src/OpenHardwareMonitor/entry.tp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": 1,
"version": 1,
"version": 2,
"name": "Touch Portal Open Hardware Monitor Interface",
"id": "TPOpenHardwareMonitor",
"plugin_start_cmd": "\"%TP_PLUGIN_FOLDER%OpenHardwareMonitor\\tp_ohm.exe\"",
Expand Down Expand Up @@ -58,13 +58,27 @@
"default": "0",
"valueChoices": ["0"]
},
{
"id": "tpohm_gpu_core_load_status",
"type": "choice",
"desc": "TP OHM GPU Core Load Status",
"default": "Low",
"valueChoices": ["Low", "Medium", "High"]
},
{
"id": "tpohm_gpu_memory_load_val",
"type": "choice",
"desc": "TP OHM GPU Memory Load Value",
"default": "0",
"valueChoices": ["0"]
},
{
"id": "tpohm_gpu_memory_load_status",
"type": "choice",
"desc": "TP OHM GPU Memory Load Status",
"default": "Low",
"valueChoices": ["Low", "Medium", "High"]
},
{
"id": "tpohm_gpu_core_clock_val",
"type": "choice",
Expand Down Expand Up @@ -114,6 +128,20 @@
"default": "Low",
"valueChoices": ["Low", "Medium", "High"]
},
{
"id": "tpohm_gpu_memory_temp_val",
"type": "choice",
"desc": "TP OHM GPU Memory Temp Value - Celsius",
"default": "0",
"valueChoices": ["0"]
},
{
"id": "tpohm_gpu_memory_temp_status",
"type": "choice",
"desc": "TP OHM GPU Memory Temperature Status",
"default": "Low",
"valueChoices": ["Low", "Medium", "High"]
},
{
"id": "tpohm_cpu_package_power_val",
"type": "choice",
Expand Down Expand Up @@ -384,25 +412,25 @@
"events": [
{
"id": "tpohm_cpu_total_event",
"name": "CPU Total Status",
"format": "When the CPU Status is $val",
"name": "CPU Total Load Status",
"format": "When the CPU Load Status is $val",
"type": "communicate",
"valueType": "choice",
"valueChoices": ["Low", "Medium", "High"],
"valueStateId": "tpohm_cpu_total_load_status"
},
{
"id": "tpohm_memory_load_event",
"name": "Memory Status",
"format": "When the Memory Status is $val",
"name": "Memory Load Status",
"format": "When the Memory Load Status is $val",
"type": "communicate",
"valueType": "choice",
"valueChoices": ["Low", "Medium", "High"],
"valueStateId": "tpohm_memory_load_status"
},
{
"id": "tpohm_cpu_temperature_event",
"name": "CPU Temperature Status",
"name": "CPU Package Temperature Status",
"format": "When the CPU Package Temperature Status is $val",
"type": "communicate",
"valueType": "choice",
Expand All @@ -411,13 +439,40 @@
},
{
"id": "tpohm_gpu_temperature_event",
"name": "GPU Temperature Status",
"name": "GPU Core Temperature Status",
"format": "When the GPU Core Temperature Status is $val",
"type": "communicate",
"valueType": "choice",
"valueChoices": ["Low", "Medium", "High"],
"valueStateId": "tpohm_gpu_core_temp_status"
}
},
{
"id": "tpohm_gpu_core_load_event",
"name": "GPU Core Load Status",
"format": "When the GPU Core Status is $val",
"type": "communicate",
"valueType": "choice",
"valueChoices": ["Low", "Medium", "High"],
"valueStateId": "tpohm_gpu_core_load_status"
},
{
"id": "tpohm_gpu_memory_load_event",
"name": "GPU Memory Load Status",
"format": "When the GPU Memory Status is $val",
"type": "communicate",
"valueType": "choice",
"valueChoices": ["Low", "Medium", "High"],
"valueStateId": "tpohm_gpu_memory_load_status"
},
{
"id": "tpohm_gpu_memory_temperature_event",
"name": "GPU Memory Temperature Status",
"format": "When the GPU Memory Temperature Status is $val",
"type": "communicate",
"valueType": "choice",
"valueChoices": ["Low", "Medium", "High"],
"valueStateId": "tpohm_gpu_memory_temp_status"
},
]
}
]
Expand Down
Binary file modified src/OpenHardwareMonitor/tp_ohm.exe
Binary file not shown.
29 changes: 29 additions & 0 deletions src/perl/Module/TouchPortal/Socket.pm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ sub _send {
}

logIt( 'DEBUG', 'Sending: ' . $send_msg );
my $rc = $self->_send_json( $send_msg);

return $rc;
}

sub _send_json {
my $self = shift;
my ($send_msg) = @_;

my $rc = $self->{'socket'}->send( $send_msg . "\n" );

return $rc;
Expand Down Expand Up @@ -115,6 +124,26 @@ sub state_update {

}

sub state_update_array {
my $self = shift;
my ( $stateArray ) = @_;

my @stateJsonArray = ();

foreach my $state ( @$stateArray ) {
my $msg = {
'type' => 'stateUpdate',
'id' => '' . $state->{id},
'value' => '' . $state->{value}
};

push @stateJsonArray, encode_json($msg);
}

$self->_send_json(join("\n",@stateJsonArray));

}

# for the future when I implement Actions
# to possibly configure the plugin through TP
sub read {
Expand Down
6 changes: 6 additions & 0 deletions src/perl/fixIcon.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!C:\Strawberry\bin\perl

use Win32::Exe;
$exe = Win32::Exe->new($ARGV[0]);
$exe->set_single_group_icon($ARGV[1]);
$exe->write;
Loading

0 comments on commit f000de6

Please sign in to comment.