It is currently October 15th, 2019, 9:46 am

illustro Gadgets 1.0.0

Post your work-in-progress and completed skins to share and discuss.
User avatar
SilverAzide
Posts: 590
Joined: March 23rd, 2015, 5:26 pm

Re: illustro Gadgets v0.4 (WIP) - Based on SilverAzide's Gad

SilverAzide » August 19th, 2015, 3:43 pm

OK, cool... I've targeted Rainmeter 3.2 for my Gadgets, but if your target release is Rainmeter 3.3, then you can use the new RM 3.3 functions (with the "Best" setting) to get your internal IP and adapter name. Here are changes to 3 measures for the 3.3-compatible code that I am using:

Code: Select all

[MeasureIPLan]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=Best
DynamicVariables=1

[MeasureAdapterName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=Best
DynamicVariables=1
OnChangeAction=[!Log "Network adapter changed, refreshing ActiveNet info" Notice][!SetOption MeasureAdapterType Reload 0][!SetOption MeasureAdapterTypeID Reload 0][!SetOption MeasureInterfaceName Reload 0][!SetOption MeasureInterfaceID Reload 0]

[MeasureNetworkIsLAN]
Measure=Plugin
Plugin=SysInfo
SysInfoType=LAN_CONNECTIVITY
OnChangeAction=[!Log "LAN state change, refreshing ActiveNet info" Notice][!SetOption MeasureAdapterType Reload 0][!SetOption MeasureAdapterTypeID Reload 0][!SetOption MeasureInterfaceName Reload 0][!SetOption MeasureInterfaceID Reload 0]
DeviantArt Gadgets More...
User avatar
raiguard
Posts: 642
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: illustro Gadgets v0.5 - Based on AddGadgets.com Gadgets

raiguard » September 13th, 2015, 3:09 am

Image
v0.5 12-9-2015:
Added GPU Meter (requires HWiNFO to be installed)
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
SilverAzide
Posts: 590
Joined: March 23rd, 2015, 5:26 pm

Re: illustro Gadgets v0.5.1 - Based on AddGadgets.com Gadget

SilverAzide » September 14th, 2015, 4:11 pm

Very nice! :thumbup:
There have been some enhancements to the Gadgets to properly handle displaying temperatures for CPUs with single-threaded physical cores (e.g., AMD, older Intel, etc.), so you might want to grab the latest plugin and code if you are interested (CPU Lua script changed as well). Also, regarding the comment on your GPU Meter, the core voltage does change on some systems (mobile GPUs), but I opted not to display this graph because it is... well, very boring. On my laptop the changes are rare (unless some heavy graphics are going on), so seeing a flat line seemed a little useless, plus the core usage graph better showed GPU activity anyway.
DeviantArt Gadgets More...
User avatar
raiguard
Posts: 642
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: illustro Gadgets v0.5.1 - Based on AddGadgets.com Gadget

raiguard » September 14th, 2015, 5:18 pm

SilverAzide wrote:Very nice! :thumbup:
There have been some enhancements to the Gadgets to properly handle displaying temperatures for CPUs with single-threaded physical cores (e.g., AMD, older Intel, etc.), so you might want to grab the latest plugin and code if you are interested (CPU Lua script changed as well). Also, regarding the comment on your GPU Meter, the core voltage does change on some systems (mobile GPUs), but I opted not to display this graph because it is... well, very boring. On my laptop the changes are rare (unless some heavy graphics are going on), so seeing a flat line seemed a little useless, plus the core usage graph better showed GPU activity anyway.
Thanks for the clarification. I was planning on adding support for non-hyperthreaded CPUs in v0.6 (I realized it was unsupported right after pushing v0.5.1) but if you already have code for it I guess I'll just borrow that! Also, a question: If you look at my CoreTemp/SpeedFan/HWiNFO detection measures you will see that I'm not using the configure script anymore. The way I set them up is simply just supposed to change the "activeTempReader" variable if it gets a measure greater than zero. So why do they not work? I'd appreciate your insight.

Thanks for all your help so far! I hope I can repay you somehow in the future.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
SilverAzide
Posts: 590
Joined: March 23rd, 2015, 5:26 pm

Re: illustro Gadgets v0.5.1 - Based on AddGadgets.com Gadget

SilverAzide » September 15th, 2015, 12:22 am

I see where your skin is broken with the activeTempReader variable. Maybe someone knows a trick, but I've never gotten string comparisons to work in formulas. Formulas seem to be numbers only.

I can think of a few workarounds you can try: change the variable to be a numeric value, use a string measure that takes activeTempReader as input and uses substitutions to return "1"/"2"/"3" (which I think will be treated as numbers), use your existing IsXXXInUse measures in your expression(s), or use a Lua script.

Hope this helps!
DeviantArt Gadgets More...
User avatar
raiguard
Posts: 642
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: illustro Gadgets v0.5.1 - Based on AddGadgets.com Gadget

raiguard » September 15th, 2015, 4:03 am

SilverAzide wrote:I see where your skin is broken with the activeTempReader variable. Maybe someone knows a trick, but I've never gotten string comparisons to work in formulas. Formulas seem to be numbers only.

I can think of a few workarounds you can try: change the variable to be a numeric value, use a string measure that takes activeTempReader as input and uses substitutions to return "1"/"2"/"3" (which I think will be treated as numbers), use your existing IsXXXInUse measures in your expression(s), or use a Lua script.

Hope this helps!
***EDIT: This is no longer relevant. See my next post.***

I'm not comparing any strings... In the formulae I'm checking to see if the output of the measures are zero or greater than zero, and if the tempsDisabled variable is true or not. I'm not comparing any strings in the formulae, I'm just trying to write strings to the variable based on integer comparisons. The variable itself (and the meters that use it) work fine, but the !WriteKeyValue bangs in the four detection measures aren't actually changing anything. I think.

Code: Select all

[IsCoreTempInUse]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=0
IfCondition=(IsCoreTempInUse > 0) && (#disableTemps# = 0)
IfTrueAction=[!WriteKeyValue Variables activeTempReader "CoreTemp" "#varPath#"]
Disabled=#disableTemps#
DynamicVariables=1

[IsSpeedFanInUse]
Measure=Plugin
Plugin=SpeedFanPlugin
SpeedFanType=Temperature
SpeedFanNumber=0
IfCondition=(IsCoreTempInUse = 0) && (IsSpeedFanInUse > 0) && (#disableTemps# = 0)
IfTrueAction=[!WriteKeyValue Variables activeTempReader "SpeedFan" "#varPath#"]
Disabled=#disableTemps#
DynamicVariables=1

[IsHWiNFOInUse]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=#HWiNFO-CPU0-DTS-SensorId#
HWiNFOSensorInstance=#HWiNFO-CPU0-DTS-SensorInstance#
HWiNFOEntryId=#HWiNFO-CPU0-DTS-Core0Temp#
HWiNFOType=CurrentValue
IfCondition=(IsCoreTempInUse = 0) && (IsSpeedFanInUse = 0) && (IsHWiNFOInUse > 0) && (#disableTemps# = 0)
IfTrueAction=[!WriteKeyValue Variables activeTempReader "HWiNFO" "#varPath#"]
Disabled=#disableTemps#
DynamicVariables=1

[NoTempInUse]
Measure=Calc
Formula=#disableTemps#
IfCondition=(IsCoreTempInUse = 0) && (IsSpeedFanInUse = 0) || (#disableTemps# = 1)
IfTrueAction=[!WriteKeyValue Variables disableTemps 1 "#varPath#"]
Disabled=#disableTemps#
DynamicVariables=1
(Oops, just realized an error in the NoTempInUse measure - I forgot to account for HWiNFO!
Last edited by raiguard on September 15th, 2015, 4:16 am, edited 1 time in total.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
raiguard
Posts: 642
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: illustro Gadgets v0.5.1 - Based on AddGadgets.com Gadget

raiguard » September 15th, 2015, 4:15 am

SilverAzide wrote:I see where your skin is broken with the activeTempReader variable. Maybe someone knows a trick, but I've never gotten string comparisons to work in formulas. Formulas seem to be numbers only.

I can think of a few workarounds you can try: change the variable to be a numeric value, use a string measure that takes activeTempReader as input and uses substitutions to return "1"/"2"/"3" (which I think will be treated as numbers), use your existing IsXXXInUse measures in your expression(s), or use a Lua script.

Hope this helps!
OH
MY
EFFING
GOSH.

...

I AM AN IDIOT.

...

I DIDN'T SPECIFY THE VARPATH VARIABLE.

...

*FACEDESK*

It works fine now! :D

Code: Select all

varPath=#@#AllCpuMeterVars.inc
EDIT: It does NOT work fine. Now I'm stuck with an infinite refresh loop, causing Rainmeter to overload and the computer to hang. Is there a way to keep checking these values, but only refresh the meter when something changes? (I tried OnChangeAction, but it refreshes the skin if any of the CPU temperatures change, which I don't want.)

Code: Select all

; ## CORE TEMPERATURES ##
[IsCoreTempInUse]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=0
IfCondition=(IsCoreTempInUse > 0)
IfTrueAction=[!WriteKeyValue Variables activeTempReader "CoreTemp" "#varPath#"][!WriteKeyValue Variables noTempReader 0 "#varPath#"][!Refresh]
DynamicVariables=1
Disabled=#disableTemps#

[IsSpeedFanInUse]
Measure=Plugin
Plugin=SpeedFanPlugin
SpeedFanType=Temperature
SpeedFanNumber=0
IfCondition=(IsCoreTempInUse = 0) && (IsSpeedFanInUse > 0)
IfTrueAction=[!WriteKeyValue Variables activeTempReader "SpeedFan" "#varPath#"][!WriteKeyValue Variables noTempReader 0 "#varPath#"][!Refresh]
DynamicVariables=1
Disabled=#disableTemps#

[IsHWiNFOInUse]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=#HWiNFO-CPU0-DTS-SensorId#
HWiNFOSensorInstance=#HWiNFO-CPU0-DTS-SensorInstance#
HWiNFOEntryId=#HWiNFO-CPU0-DTS-Core0Temp#
HWiNFOType=CurrentValue
IfCondition=(IsCoreTempInUse = 0) && (IsSpeedFanInUse = 0) && (IsHWiNFOInUse > 0)
IfTrueAction=[!WriteKeyValue Variables activeTempReader "HWiNFO" "#varPath#"][!WriteKeyValue Variables noTempReader 0 "#varPath#"][!Refresh]
DynamicVariables=1
Disabled=#disableTemps#

[NoTempInUse]
Measure=Calc
Formula=#disableTemps#
IfCondition=(IsCoreTempInUse = 0) && (IsSpeedFanInUse = 0) && (IsHWiNFOInUse = 0)
IfTrueAction=[!WriteKeyValue Variables noTempReader 1 "#varPath#"][!Refresh]
DynamicVariables=1
Disabled=#disableTemps#
EDIT #2: I realized I need to use measures from CoreTemp/SpeedFan/HWiNFO that are consistent. Something like the processor name. I'll figure something out.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
SilverAzide
Posts: 590
Joined: March 23rd, 2015, 5:26 pm

Re: illustro Gadgets v0.5.1 - Based on AddGadgets.com Gadget

SilverAzide » September 15th, 2015, 5:45 pm

Just a thought, but instead of using !WriteKeyValue to permanently record the setting, you could use !SetVariable to change the value of the variable dynamically. I use this technique a lot. You just need to refresh the measures/meters that reference the variable or use DynamicVariables=1, no need to refresh/reload the whole skin.
DeviantArt Gadgets More...
User avatar
raiguard
Posts: 642
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: illustro Gadgets v0.5.1 - Based on AddGadgets.com Gadget

raiguard » September 16th, 2015, 1:21 am

SilverAzide wrote:Just a thought, but instead of using !WriteKeyValue to permanently record the setting, you could use !SetVariable to change the value of the variable dynamically. I use this technique a lot. You just need to refresh the measures/meters that reference the variable or use DynamicVariables=1, no need to refresh/reload the whole skin.
I tried that, and the temperature meters don't update to the changed variables. For example, if I have the activeTempReader set to SpeedFan (but speedfan is not on), then I use !SetVariable to dynamically change it to HWiNFO, the meters (which also have DynamicVariables on) don't sense the change unless I refresh the skin.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
SilverAzide
Posts: 590
Joined: March 23rd, 2015, 5:26 pm

Re: illustro Gadgets v0.5.1 - Based on AddGadgets.com Gadget

SilverAzide » September 16th, 2015, 5:41 pm

Iamanai wrote:I tried that, and the temperature meters don't update to the changed variables.
Correct, that's because the temp meters are still pointing to the old SpeedFan measures, not the new HWiNFO measures. DynamicVariables won't help you with that part. This is why I used a Lua script... However you decide to do it (a script isn't the only way), without doing a full Refresh you'll need to change the MeasureNames for all the temp meters, then force the meters to be reloaded. The easiest way to force a meter or measure to be re-evaluated from scratch without refreshing the whole skin is to use !SetOption to set a property that doesn't exist (for clarity, I set "Reload" to 1, which doesn't do anything except cause the meter to be reloaded).

BTW, I kept the HWiNFO and the CoreTemp/SpeedFan CPU skins separate because the HWiNFO plugin annoyingly spews out error messages about HWiNFO not being loaded even if all the HWiNFO measures are disabled. The CoreTemp/SpeedFan plugins are silent if the background process isn't active.
DeviantArt Gadgets More...