Announcement

Collapse
No announcement yet.

one time start with conditions for Guardian Angel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guest's Avatar
    Guest replied
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Richard G:
    &lt;SNIP&gt;For example a false sunrise loop.


    sub main()
    dim i
    for i=1 to 15

    hs.execx10 "D3","Bright",1
    hs.execx10 "D2","Bright",1
    hs.execx10 "D1","Bright",1
    hs.execx10 "J14","Bright",1
    ' version exec by name type
    'hs.ExecX10ByName "Family Room Lamp","Bright",1

    hs.waitevents
    'hs.WaitSecs 120

    next
    end sub

    &lt;snip&gt; <HR></BLOCKQUOTE>

    Sorry if it sounds like I am butting in, or this is completely irrelevant to you issue... but couldn't this just be an event instead of a script?

    Put each of these devices in the device actions window set them to the starting dim level, then put then in again each set to fire at 2 minutes later set to the next dim level, repeat until desired brightness is achieved. This would be a single event, when fired it would auto-magically create all the necessary delayed events.

    Then fire this event at whatever time you want in the morning.

    (I hate to do things with scripts if you can do it with events, things seem to just run more efficient)

    Leave a comment:


  • Michael McSharry
    replied
    GA

    This is the location in the script library. Invocation option #2 shows how to start it from a .vbs file. Put something similiar in your own file such as "GA.vbs" and then drag a shortcut to this file into your startup folder using windows explorer.

    Leave a comment:


  • Richard
    replied
    Blade was seeing same issue ... where are docs and best way to single start GA ? I searched and just found this similiar part.

    http://ubb.homeseer.com/eve/ubb.x?a=...015#3416016015

    Leave a comment:


  • Richard
    replied
    Thanks MCS,

    I use the waitSecs for loops in scripts ... just a few that I have.

    Then I should have GA reboot the PC ? Can GA do this ? I will need to locate the docs?

    Also the string in the W2K shortcut does not like anything additional other than the exact file name i.e guardianangel.exe if I just add ...

    ","homeseer|98|120|homeseer|D:\Homeseer\homeseer.exe|below_n ormal"

    and you can not apply / save. So I am looking for best place to have GA run at PC startup or if I use PC reboot I can just put in startup script of HS.

    In the overview I think the 160 second again a maximum of waitSecs of 120 will cover a really loaded PC. But the reamining hanging of items that prevent HS from completely stopping and restarting is key. Therefore a PC reboot will clear the whole issue .... BLAM take that !!


    Thanks again.

    Richard G

    Leave a comment:


  • Rupp
    replied
    Richard
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Is the hs.waitevents an important piece in the script for my use / when is it ?
    <HR></BLOCKQUOTE>

    Yes. Keep it there. Without it HS will do no other processing during the wait secs.

    As far as the syntax for GA see Michaels post about that being covered in the GA docs.

    Leave a comment:


  • Michael McSharry
    replied
    Since you seem to have a dependency on mouse actions, my guess is that you pending windows events that are not being satisfied.

    As an example that you may have encountered is like when you close Microsoft Word and a message box pops up asking if you want to save the file. Until you answer the question the command to close down Word will not complete.

    Homeseer plugins generally use COM to bridge between the plugin and Homeseer. Once a communication is initiated it needs to complete. It will not be a user action as in the example I gave above, but some form of invisible handshake.

    There are often dependencies that develop with many things interacting on the same computer. This is especially true many use Homeseer as the hub of activity. GA cannot analyze these relationships. When a single process is restarted then only part of the mess may be cleaned up since other events may still be pending.

    If it is important that order be restored, then it is best to have the GA action be a restart of the PC.

    You do have the threshold set at 2 minutes with a high utilization which in most situations is indicative of something hung up.

    You need to do some role playing as the Sherlock Holmes character to try to isolate.

    You can do a search for waitsecs in all your scripts, but I suspect you will not find any with long waits. Pay attention to loops that may have waitsecs in them that can accumulate the total wait time. You are more likely to have a plugin-related problem.

    I don't recall the exact syntax of the command in the startup folder. What Rupp posted should be close. I believe that the startup folder syntax is provided in the Guardian Angel manual.

    Leave a comment:


  • Richard
    replied
    Rupp
    [Let me clarify a couple of things. The script that you modified will no longer work as you desire if you take out the waitsecs call. This waitsecs causes HS to wait 2 minutes and then loop again. My suggestion would be to do one of two things. Either do not worry about seeing the cpu usage go to 100% during the execution of this script OR set this up in events.

    Looking at this script you posted. What does it do? What does a Bright command do? I have never used it but it appears it must brighten a device in increments.]

    Maybe I can set the GA to 180 seconds to handle the scripts .... waitSecs 120

    Yes bright an increment .

    This is a gradual bright "a false sunrise" to wake lights slowly "waitsecs 120"

    I think modifying the GA to 180 and putting the waitsecs 120 back is a method.

    Also

    1
    Is the hs.waitevents an important piece in the script for my use / when is it ?


    2 How do you set up a shortcut with extended syntax in the shortcut line. As I noted above windows will not accept the long string.

    Thanks

    Richard G

    Leave a comment:


  • Rupp
    replied
    Richard,
    Let me clarify a couple of things. The script that you modified will no longer work as you desire if you take out the waitsecs call. This waitsecs causes HS to wait 2 minutes and then loop again. My suggestion would be to do one of two things. Either do not worry about seeing the cpu usage go to 100% during the execution of this script OR set this up in events.

    Edit...
    After looking at the help file it appears you are dimming in 1% increments.

    Leave a comment:


  • Richard
    replied
    Thanks Rupp, I thought I had a low power CPU but 2.8 and CPU loads like you describe are worth noting. I won't ruch out to get big CPU as a fix now. Thanks for saving me some cash !!

    I had a few waitSecs in some scripts.

    How do I get the full syntax of;

    guardianangel.exe","homeseer|98|120|homeseer|D:\Homeseer\hom eseer.exe|below_normal"

    in a shortcut .....windows will not accept the extended syntax ... says does not exist and wants only guardianangel.exe in the line ?


    For example a false sunrise loop.


    sub main()
    dim i
    for i=1 to 15

    hs.execx10 "D3","Bright",1
    hs.execx10 "D2","Bright",1
    hs.execx10 "D1","Bright",1
    hs.execx10 "J14","Bright",1
    ' version exec by name type
    'hs.ExecX10ByName "Family Room Lamp","Bright",1

    hs.waitevents
    'hs.WaitSecs 120

    next
    end sub

    Is the hs.waitevents an important piece in the script for my use / when is it ?

    Thanks again on the suggestion.

    Richard G

    Leave a comment:


  • Rupp
    replied
    Richard,
    You can create a shortcut and simply past your commands in the target like:
    GuardianAngel.exe","homeseer|98|120|homeseer|D:\Homeseer\hom eseer.exe|below_normal"


    As far as cpu usage and HS goes. HomeSeer will on several occasions use 100% of the cpu. This is not uncommon given the fact that portions of HS were written in VB. I have a 2.8 GHZ machine and HS takes this machine to 100% CPU usage at times. If any of your scripts use hs.waitsecs for example the cpu will goes to 100% guaranteed. This is the first thing to search for and remove if possible from all ASP files and scripts. Another point is 100% cpu usage is not bad as long as it doesn't last for more that a few seconds. So the fact that GA is showing this is not surprising at all. The fat that it is at 96% for 120 seconds is and I'll bet you will find a waitsecs 120 in one of your scripts.

    Leave a comment:


  • Richard
    replied
    GA needs additional syntax / string for configuration setup, for example :

    hs.launch hs.GetAppPath & "\GuardianAngel.exe","homeseer|98|120|homeseer|D:\Homeseer\h omeseer.exe|below_normal"

    ... so how would I put this into a PC startup ....startup ... where ever ??

    HS has CPU needs that seem ... out of bounds !

    I have a this from guardianangel log .... shows CPU at / above 96 % which is my restart threshold.

    5/27/2004 6:05:06 AM Detected 96.25 % for homeseer

    see below

    5/25/2004 12:20:55 AM Reloaded
    5/25/2004 12:21:00 AM Reloaded
    5/25/2004 12:23:12 AM Monitor Process homeseer Utilization at 96% for 120 seconds
    5/25/2004 12:23:12 AM When detected shutdown homeseer
    5/25/2004 12:23:12 AM Then execute D:\Homeseer\homeseer.exe at below_normal priority
    5/25/2004 9:27:36 AM Reloaded
    5/25/2004 9:33:44 AM Monitor Process homeseer Utilization at 96% for 120 seconds
    5/25/2004 9:33:44 AM When detected shutdown homeseer
    5/25/2004 9:33:44 AM Then execute D:\Homeseer\homeseer.exe at below_normal priority
    5/27/2004 6:05:06 AM Detected 96.25 % for homeseer
    5/27/2004 6:05:06 AM Closing with Title homeseer
    5/27/2004 6:05:06 AM Closing with Window Handle 65794
    5/27/2004 6:05:06 AM Closing with PID 1712
    5/27/2004 6:05:06 AM WaitNoProcess 1712
    5/27/2004 6:05:06 AM Close Code Status = 259
    5/27/2004 7:22:46 AM Terminate Code Status = 1
    5/27/2004 7:24:16 AM Monitor Process homeseer Utilization at 96% for 120 seconds
    5/27/2004 7:24:16 AM When detected shutdown homeseer
    5/27/2004 7:24:16 AM Then execute D:\Homeseer\homeseer.exe at below_normal priority
    5/28/2004 6:18:11 AM Detected 96.75 % for homeseer
    5/28/2004 6:18:11 AM Closing with Title homeseer
    5/28/2004 6:18:11 AM Closing with Window Handle 31326480
    5/28/2004 6:18:11 AM Closing with PID 8544
    5/28/2004 6:18:11 AM WaitNoProcess 8544
    5/28/2004 6:18:11 AM Close Code Status = 259
    5/28/2004 7:35:57 AM Terminate Code Status = 1
    5/28/2004 7:36:30 AM Monitor Process homeseer Utilization at 96% for 120 seconds
    5/28/2004 7:36:30 AM When detected shutdown homeseer
    5/28/2004 7:36:30 AM Then execute D:\Homeseer\homeseer.exe at below_normal priority
    5/28/2004 7:55:50 AM Monitor Process homeseer Utilization at 98% for 120 seconds
    5/28/2004 7:55:50 AM When detected shutdown homeseer
    5/28/2004 7:55:50 AM Then execute D:\Homeseer\homeseer.exe at below_normal priority


    Also noted that after GA detects HS problem on CPU levels, the restart sometimes hangs until I "put mouse over taskbar then icon disappears and HS then starts" this might me a MCS question if someone does not know fix.

    Richard G.

    Leave a comment:


  • Rupp
    replied
    Richard,
    Isn't GA simply an executable? Doesn't GA start HS if it doesn't see it? If these 2 are true then why not simply put GA into the startup folder on the PC. Then GA starts doesn't see HS and starts it.

    Take all of the GA "stuff" out of HS and let it manage the starting/re-starting of HS for you.

    Next question. Why do you need GA?

    Leave a comment:


  • Richard
    started a topic one time start with conditions for Guardian Angel

    one time start with conditions for Guardian Angel

    I need to have Guardian Angel (great CPU monitor tool) started and running on PC but .... can not use HS to do this because if HS stops and restarts due to CPU load issues (Guardian Angel working great) then a second event of Guardian Angel also starts.

    I was up to 3 GA running after 3 HS restarts ...that sure created a few problems.

    SO I guess I need HS to start GA once and delete the event (note: I know this is accomplished with the deleteEvent function, but, also need to have the event start GA and run, if PC has been rebooted, which would create a new one time event to start GS ... too complicated?)

    Problem lies in that multiple HS restarts starting multiple GA applications. Probably should start Guardian Angel from PC startup then HS is automatically protected from CPU hangs. A PC autoexec of sorts ?

    Anyone faced this issue and solved it?

    Thanks in advance

    Richard G
Working...
X