FANatic Monitor (2 Viewers)

panni

Portal Member
March 21, 2008
15
6
Looks nice, will include it in 0.0.0.2!
Will take your small "<define>#selecteditem:-</define>" improvement into the standard skin xml, too - just didn't know how to do that :)
 

panni

Portal Member
March 21, 2008
15
6
Your dll stay loaded the whole time, so just add a timer, that checks, lets say every 10 seconds, and if a threshold is exceeded bring up a dialog....pseudocode ahead:

Code:
if(threshholdexceeded)
{
     GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO);
dlgYesNo.SetHeading(GUILocalizeStrings.Get("Warning - PC about to explode")); 
dlgYesNo.SetLine(1, "Warning, Threshold for CPU Temp exceeded - 100°C!!!");
dlgYesNo.SetLine(2, "Want to show the status window?");
dlgYesNo.DoModal(GUIWindowManager.ActiveWindow); // show the dialog
if (dlgYesNo.IsConfirmed) // user clicked yes
{
     GUIWindowManager.ActivateWindow(YOUR_WINDOW_ID); // jump to your plugins window so user can see all values
}
}

I currently am at 95% development of version 0.0.0.2.
The last thing I've added was your threshold alarm dialog idea, which seems to break the whole system.
GUIWindowManager.ActivateWindow(GetID); seems to misallocate the resources needed for FANatic Monitors window - visiting the window manually still works.

Been debugging this the whole night, though my C# skill doesn't seem to be hight enough yet, to fix this problem.
It's not that it's an easy one, because the error resulting after clicking "OK" seems to be random.

Want to have a look?
Possible error 1
Possible error 2
Source (a bit messed up, because of the testing)
Sample config
Skin file
 

gemx

Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Hmm, at first i don't understand this line
    Code:
            public bool showDialogOnThreshold(ArrayList hits)
            {
                if (GUIWindowManager.ActiveWindow != GetID)
    The dialog is only shown if another window than this plugin is shown.
    I would assume that the dialog shows up even if i am already in the plugin screen because i may have forgotten about the exact threshold values.
    Regarding the actual bug, i am not quite sure but it's this is not a good idea:
    Code:
            protected override void OnPageDestroy(int newWindowId)
            {
                if (timer != null && timer.Enabled)
                {
                    timer.Stop();
                }
                Info("PAGEDESTROY");
                if (wantsAlarm)
                    startAlarmTimer();
            }
    You start the timer when the page gets destroyed.
    This might cause issues too.
     

    panni

    Portal Member
    March 21, 2008
    15
    6
    1st code:
    Yes, the dialog is only shown when you're NOT in FANatic's window, that's the alert feature, Inker suggested.
    You don't need an annoying alert dialog if you're just seeing the sensors overview, and the alarm-red threshold reached sensors.

    2nd code:
    Yeah, that's true, the alarm dialog should exclusively be shown if requested by configuration and if not in FANatic's window.

    Am I using the wrong event here?
    Is there something like OnWindowDeactivate?

    [Edit]
    Hmm, a workaround would be to let the timer run all the time but explicitly check the current window ID.

    [Edit2]
    Another exception has been added to the random exception list:
    Code:
    2008-04-01 19:15:24.750000 [Info.][11]: Exception   :Fehler in der Anwendung.
    -2005530516 (D3DERR_INVALIDCALL)
       bei Microsoft.DirectX.Direct3D.Device.BeginScene()
       bei MediaPortalApp.Render(Single timePassed)
    2008-04-01 19:15:24.750000 [Info.][11]: Exception   :Fehler in der Anwendung.
    2008-04-01 19:15:24.750000 [Info.][11]:   site      :Void BeginScene()
    2008-04-01 19:15:24.750000 [Info.][11]:   source    :Microsoft.DirectX.Direct3D
    2008-04-01 19:15:24.750000 [Info.][11]:   stacktrace:   bei Microsoft.DirectX.Direct3D.Device.BeginScene()
       bei MediaPortalApp.Render(Single timePassed)

    [edit4]
    Okay, I've done what you suggested, and added some further debugging to the source.
    I've set the initial timeout of the alarmTimer to 10 seconds, because it seems to hardcrash only, if the timer hits while MediaPortal Window0 (GUIHome) isn't active (being loaded).

    Now the skin doesn't fail with a black screen anymore, but with destroyed controls, reproducably.
    Only after the modal window - manually visiting FANatic's window works, but only after clean start of MP.

    :confused:

    Anyway, here's the updated source
    and the debug build, if you want to try it.
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Hi i have tryed this plugin with the latest speedfan beta version (4.34 beta 51) and i noticed that in the logfiles are only lines like this writen:

    Code:
    SFLog20080413-0001.csv
    --------------------------------------------------------------
    Seconds
    1155
    1157
    1160
    1164
    1167
    1170
    1173
    1176
    1179
    1182
    1185
    1188
    1191
    1194
    1197

    No other informations are in the files !?!?!

    What do i am wrong?

    thanks for any help
    MoPhat

    Sorry, its me again... i had checked the wrong checkbox for logging :oops:

    I hadt not checked on every temp and fan that should be logged...

    MoPhat
     

    NewUser

    Portal Pro
    January 8, 2008
    91
    2
    Home Country
    New Zealand New Zealand
    How about giving an option to rename in the home menu? E.g. I would like to have "System Monitor" instead "FANantic Monitor". I just like to keep things simple.

    Very nice plugin by the way.
     

    PC_Pal68

    Portal Member
    October 2, 2006
    32
    0
    Home Country
    Canada Canada
    I can't wait to install the plugin.

    I've been wanting to monitor my temps. Tried to install MBM, but my mobo is not supported (to new).

    Like all of you, I want to make my HTPC as silent as possible. Because of that, some parts are fanless and most fans have reduce voltage.

    In such an environment, monitoring temps is critical. Having a plugin tan can repport realtime temps is nice and important.

    I'm using LCD Smartie to display info on the lcd panel of my Ahanix case. It would have been nice to display Temps on the case lcd but again MBM most be install / enable (my Asus P5DL2 is not supported).

    As soon as I get a chance to install it I'll report back.

    «Regards.
     

    digitalfm

    Portal Pro
    February 4, 2008
    114
    18
    I agree, I have an Antec Fusion. During a movie it shows the movie time which is ok, but it would be great to have this toggle between movie time and case temps. Anyone think this is possible?
     

    dangerzone

    Portal Pro
    January 12, 2009
    271
    44
    52
    delft
    Home Country
    Netherlands Netherlands
    i love your plugin.
    But... isn't it possible to rename your FANatic monitor to Temp ?
    looks allot better in the mp menu.

    best regards Marco.
     

    Users who are viewing this thread

    Top Bottom