Announcement

Collapse
No announcement yet.

Stop a running script...?

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

  • Stop a running script...?

    The HS2 version of my sunshine alarm clock was pretty easy. Just a simple timer that increased the device value at a given interval. You can find it here:
    http://board.homeseer.com/showpost.p...4&postcount=30

    I'm learning HS3 scripting (and plugin writing) so I'm converting my old scripts to HS3.

    HS2 would only run one instance of the above mentioned script, meaning to stop it I could just call the Main sub again with a different parameter (to run it for another room, I had to make duplicates of the script).

    However, that doesn't work anymore. So, how can I now terminate a running script?
    HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
    Running on Windows 10 (64) virtualized
    on ESXi (Fujitsu Primergy TX150 S8).
    WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

    Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

  • #2
    Hi Moskus,

    I would set up a virtual device with two possible values: run and stop. Have your script check the value in its loop and if the value has changed to stop then terminate the script.

    Cheers
    Al
    HS 3.0.0.548: 1976 Devices 1156 Events
    Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

    Comment


    • #3
      Originally posted by sparkman View Post
      Hi Moskus,

      I would set up a virtual device with two possible values: run and stop. Have your script check the value in its loop and if the value has changed to stop then terminate the script.

      Cheers
      Al
      Yes, that's the solution I can think of too (or use a Global Variable), but I would suspect there is another way. It should be possible to do it using code.
      HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
      Running on Windows 10 (64) virtualized
      on ESXi (Fujitsu Primergy TX150 S8).
      WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

      Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

      Comment

      Working...
      X