perhaps this proposed plugin could be designed to be user selectable to support all the data connected power supplies, M4-ATX, M3-ATX, DS-ATX, as well as Carnetix 2140.
This would make the plugin much more popular
Printable View
perhaps this proposed plugin could be designed to be user selectable to support all the data connected power supplies, M4-ATX, M3-ATX, DS-ATX, as well as Carnetix 2140.
This would make the plugin much more popular
If you could post a link to the API/SDK for those PSU's I can look at it, and see what I can come up with.
I think it would be some of the most vital information that can be skinned alongside speedfan and similar system monitoring controls. It would also be nice to have some event triggers, like ONIGNITION, OFFIGNITION, etc, to trigger other events.
I'm still really new at coding, so this might take a little while to produce compared to the codevets that could do this blindfolded with both hands tied behind their backs.
So far the planned skincommands.txt will include the following:
Labels:
psuBATT_V - displays Input Voltage
psuBATT_C - displays Input Current
psuBATT_W - displays Input Power available (psuBATT_V X psuBATT_C = psuBATT_W)
psuPRI_V -displays Primary Output Voltage
psuPRI_C - displays Primary Output Current
psuPRI_W - displays Primary Output Power used (psuPRI_V X psuPRI_C = psuPRI_W)
psuSEC_V - displays Secondary Output Voltage
psuSEC_C - displays Secondary Output Current
psuSEC_W - displays Secondary Output Power used (psuSEC_V X psuSEC_C = psuSEC_W)
psuEFF - displays overall efficiency (psuTOTOUT / psuBATT_W = psuEFF)
psuTOTOUT - displays total output power (psuPRI_W + psuSEC_W = psuTOTOUT)
psuTEMP - displays PSU internal Temperature in C, but can be converted to F with the "C2F" tag
Indicators:
psuIGNITION - on when the PSU's ignition line shows voltage, off without
psuPULSE - normally off, but if a pulse input is used, on when pulse is activated
psuFANSTAT - on when PSU's internal fan is active, off without
psuDLYON - on after delay on interval, and remains until power is removed from PSU
psuACPI - normally off, but on when ACPI is activated
psuPOWGOOD - on as long as sufficient power is supplied to the PSU, off without
psuPS_ON - on when PSU is on, off without
psuBATT - on when Battery voltage and current are within acceptable range, off when overcurrent, or under/overvoltage
psuPRI - on when connected to primary output, and voltage and current are within range, off when output shows overcurrent.
psuSEC - on when connected to secondary output, and voltage and current are withing range, off when output shows overcurrent (overcurrent is shown on PRI)
psuOVERTEMP - off when temp is below 60C, on when over.
psuCONNECT - on when PSU is connected to the USB port, off without
Sliders:
psuSLD_BATT_V
psuSLD_BATT_C
psuSLD_PRI_V
psuSLD_PRI_C
psuSLD_SEC_V
psuSLD_SEC_C
psuSLD_TEMP
Possible other commands:
Labels:
psuSD_DLY_MIN - Shut Down Delay in minutes
psuSD_DLY_SEC - Shut Down Delay in seconds
psuDMT - Dead Man's Timer in Hours
psuDLYON_SEC - Delay On For remote output in seconds
psuBU_LO - Boot Up Lock Out time remaining in seconds
psuSD_LO - Shut Down Lock Out time remaining in seconds
psuLO_BAT - Low Battery protection limit in volts
psuFIRMWARE - Displays current firmware version
Sliders:
psuSLD_SD_DLY_MIN
psuSLD_SD_DLY_SEC
psuSLD_DMT
psuSLD_DLYON_SEC
psuSLD_BU_LO
psuSLD_SD_LO
psuSLD_LO_BAT
Button Codes:
psuUPDATE - Saves the current settings to the EEPROM
psuRESET - Resets settings to EEPROM defaults
psuJUMPERS - Loads PSU_JUMPER_MENU.skin to change soft jumpers
Depending on the SDK/API for the M(x)-ATX and DS-ATX units, there mey be more commands. This is looking like a lot of coding, but will probably be worth the effort.
If you haven't done that yet, you should be able to export the class into a .tlb file using "regasm /codebase /tlb P2140API.dll" then load it up to use it with the extension plugin sources.. or you could simply edit their demo in C# and have it send commands to RR regularly to set variables with the desired values -- just suggestions of course.
Great, now my noob colors come out.
I tried regasm /codebase /tlb P2140API.dll in Start>Run, and it couldn't find regasm.
The whole thing is a little overwhelming. I wonder if this can't be done in autoit?
In laymans terms, what I want to do is this:
read variables from program a, create variable in program b.
Obviously it's a little more complicated than that. If it can be done in AI, I understand how to create the variables for RR, but what would I need to read the info from P2140?
Please don't use AI.
ok, i've got the P2140API.dll exported to P2140API.tlb...
I've looked through the example plugin, and it looks like for all my labels, I would use this code:
Code:'*****************************************************************
'* This Function will be called with a requested label code and
'* format specified at the skin file. Simply return any text to
'* be displayed for the specified format.
'*****************************************************************
Public Function ReturnLabel(ByRef LBL As String, ByRef FMT As String) As String
Select Case LCase(LBL)
Case "mylabel"
'This example returns a "hello" text to show it works
ReturnLabel = "Hello from Extension!"
'Specify whatever and whichever labels you wish to create
'You can add as many as you'd like, and you can process complex labels as long
'as you parse them yourself (i.e. "mycomplexlabel;parameter")
'Case "mycommand2"
'Insert Command code here
End Select
End Function
So first I have to reference the codes from the API, then send those codes as a label to RR with returnlabel right? How do I reference the API in the code?
so if I want to turn Batt_V (from P2140API) into psuBATT_V (in RR) the code might look something like this:
As long as I create the $Batt_V variable from the Batt_V command right?Code:Public Function ReturnLabel(ByRef LBL As String, ByRef FMT As String) As String
Select Case LCase(LBL)
Case "psuBATT_V"
ReturnLabel = $Batt_V
End Select
End Function
Or, am I way off base?
Yep, you seem to have the idea.
Thanks, I feel like I might have a grasp on this, but then again, a fellow forum member had an idea about solar panels, it's all about the practice though. If I can't practice the idea, it means nothing.
I think I can get it, but how do I reference the P2140API.dll in the code so that the variables actually work?
Have you
1. registered te dll
2. added it in Project --> references
?