Announcement

Collapse
No announcement yet.

Running an event at startup

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

    Running an event at startup

    I've been searching around for a bit about this. I've found that it's possible to run events at startup by modifying the startup script.

    That's a bit beyond my level right now, and I can't seem to find a "How-To" for it.

    I want to set up an event to set my thermostat to it's last setpoint before it lost power. My stat is powered from the furnace (no batteries). My HS is on a UPS, but if the power is out for maybe an hour, that will shutdown too. I can work something out for if the power drops for just the stat, but what if the HS drops power? Is my only option to change the startup script to run an event I have setup?

    #2
    You can simply add a line line this to your Startup.vb file.
    hs.triggerevent("NameOfEvent")
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      I saw that in various threads, but I don't even know where that file is located, and I couldn't find any type of "How-To edit the startup file" instructions anywhere.

      Comment


        #4
        Originally posted by cahilj View Post
        I saw that in various threads, but I don't even know where that file is located, and I couldn't find any type of "How-To edit the startup file" instructions anywhere.
        It should be located in the scripts directory. If you are running Windows you could try searching for Startup.vb

        Comment


          #5
          As was said it is in the scripts folder. It is a text file that can be edited with notepad under Windows and vi or nano under Linux. You can also install Blade’s BLEditor to edit scripts and files directly from HomeSeer. Simply add the line that Rupp posted within the file then create an event of the same name give run. I wrote about mine here.

          I changed it somewhat since that post now using a second delayed event instead of the Wait.
          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

          Comment


            #6
            Originally posted by rprade View Post
            As was said it is in the scripts folder. It is a text file that can be edited with notepad under Windows and vi or nano under Linux. You can also install Blade’s BLEditor to edit scripts and files directly from HomeSeer. Simply add the line that Rupp posted within the file then create an event of the same name give run. I wrote about mine here.

            I changed it somewhat since that post now using a second delayed event instead of the Wait.
            Yours was the info I had found while searching before.

            I searched for "startup.vb" in Windows, nothing. I installed BLEditor, unless I'm doing something wrong, I have no available directories. I don't know whether or not I should. Like I said, this is a bit beyond my level. My HS is not installed on my PC, it's a Hometroller Zee. I've never done anything with Linux before, so I don't have any idea where to start there.

            Comment


              #7
              Originally posted by cahilj View Post

              I searched for "startup.vb" in Windows, nothing.
              Just a note, the "startup.vb" file is located on the same system that your HS Server is installed on, not your local Windows client.

              But you do not actually need to locate that file. Simply create a dummy event ("manually triggered") with a single action "Run a script". In the script parameter fields, clear the "immediate script" checkbox, press the "Edit" button and you will see a list of existing scripts. Select the "startup.vb" script file, and you will see the contents in the edit text box below the Edit button. You can edit that script, then press the "Save Script" to save the changes.

              Comment


                #8
                Originally posted by aa6vh View Post

                Just a note, the "startup.vb" file is located on the same system that your HS Server is installed on, not your local Windows client.

                But you do not actually need to locate that file. Simply create a dummy event ("manually triggered") with a single action "Run a script". In the script parameter fields, clear the "immediate script" checkbox, press the "Edit" button and you will see a list of existing scripts. Select the "startup.vb" script file, and you will see the contents in the edit text box below the Edit button. You can edit that script, then press the "Save Script" to save the changes.
                Thanks! That got me pointed at the scripting section of the help. I've got a decent handle on it now.

                I figured the file wasn't on my local PC because my HS is standalone. Out of curiosity- Is there a way to access the Zee files through the IP address (which I do everything through)?

                Comment


                  #9
                  Originally posted by cahilj View Post

                  Thanks! That got me pointed at the scripting section of the help. I've got a decent handle on it now.

                  I figured the file wasn't on my local PC because my HS is standalone. Out of curiosity- Is there a way to access the Zee files through the IP address (which I do everything through)?
                  You can access the files on your Zee from Windows using putty for SSH or WinSCP as a file browser.
                  HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                  Comment

                  Working...
                  X