Announcement

Collapse
No announcement yet.

Is there a way to run one event once after HS3 has started?

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

    Is there a way to run one event once after HS3 has started?

    Is there a way to run an event only once after Homeseer has started?

    I am currently running a bash script which talks to another RPi2 starting a plugin remotely to Zee2.

    I want to be able to wait a minute or two after HS3 is running then enable the remote plugin.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    #2
    Pete;

    I don't know if this is what you are asking for, but I call a single event "Reboot Occurred" every time HomeSeer is started with this line in the startup.vb file:

    hs.triggerevent("Reboot Occurred")

    There are some items I want to delay for a minute or so and I spin them off as delayed events from the above primary event. I also call all of my cleanup events to get devices back in sync if HomeSeer is down for an extended period.

    The original event was in post 3 of this thread, but I have since revised it somewhat. I used a wait in the event initially so I could stop it if needed, but I have found no need.
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Pete, I am doing the same thing Randy is doing and it works great.

      I run a startup event when HomeSeer starts and one when it shuts down...

      Actually, in HomeSeer on the Setup, Custom tab, I named my own startup and shutdown scripts, just in case HomeSeer decided to over write them in a future upgrade...

      My startup script is named bjd_startup.vb and the shutdown is named (you guessed it) bjd_shutdown.vb

      In the startup script I run hs.triggerevent("90 Home Automation System Startup")

      In the shutdown script I run hs.triggerevent("90 Home Automation System Shutdown")
      Billy

      Comment


        #4
        Originally posted by bdraper View Post
        Pete, I am doing the same thing Randy is doing and it works great.

        I run a startup event when HomeSeer starts and one when it shuts down...

        Actually, in HomeSeer on the Setup, Custom tab, I named my own startup and shutdown scripts, just in case HomeSeer decided to over write them in a future upgrade...

        My startup script is named bjd_startup.vb and the shutdown is named (you guessed it) bjd_shutdown.vb

        In the startup script I run hs.triggerevent("90 Home Automation System Startup")

        In the shutdown script I run hs.triggerevent("90 Home Automation System Shutdown")
        Good idea on the rename, I'm going to do that now. I also run a shutdown script. It appears the shutdown script needs to be lean as HomeSeer continues to shutdown no matter what the shutdown script wants to do. It would be nice if it would process the script and run any events called before it finalizes shutdown.
        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          Thank-you Randy and Billy!
          - Pete

          Auto mator
          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
          Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
          HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

          HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
          HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

          X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

          Comment


            #6
            I have mine renamed as well, but still keep a startup.vb in the scripts folder that contains the following:

            Code:
            Sub Main(Parm As Object)
                
                hs.WriteLog("Startup", "Startup.vb script is now running")
                hs.WriteLog("ERROR", "Settings.ini is likely corrupt")
            	
            End Sub
            Cheers
            Al
            HS 4.2.8.0: 2134 Devices 1252 Events
            Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

            Comment


              #7
              I have often looked for a similar method, it's compared to an HTML command called ONLOAD.

              Sometimes in designer there is some housekeeping or setup to do as soon as a page loads.

              Anyone have a hint how to tell when a page is done loading?
              Blair

              HomeSeer: HS3 Pro | Blue-Iris 4 on Windows10Pro
              | Devices: 832 | Events: 211 |
              Plug-Ins: Z-Wave | RFXCOM | UltraRachio3 | Sonos
              BLLAN | BLLOCK | NetCAM | Global Cache Pro | Blue-Iris4

              Comment


                #8
                Well with the same above mentioned startup script you do have some TTS that announces the port number of the web server as it has started. You could maybe put the housekeeping there.

                Here just been testing remote running of plugins; baby steps first to see how they ran and now automating it. (Linux to Linux or Windows to Linux).

                I have too staggered some events that were configured to run at the same time as I saw some stuff relating to thing with updating the HS3 base.

                Unrelated to this updated the Z-Wave plugin (to V3.0.1.80) a couple of days ago. Weird then when I disabled the remote X10 plugin it also disconnected the Z-Wave plugin. After a couple of reboots and testing this it didn't do it any more. I have gone too now to doing symlinks on the USB connected hardware per ID as defined in Linux. (sure bet methodology of always connecting to the designated device - IE: do not see this using Digi Edgeport but only with single USB to serial devices).

                Thanks guys for the suggestions relating to using the startup script / events thing.

                I see the same relating to shutting down Homeseer and some plugins which take a while to shut down.
                - Pete

                Auto mator
                Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                Comment


                  #9
                  Originally posted by rprade View Post
                  Good idea on the rename, I'm going to do that now. I also run a shutdown script. It appears the shutdown script needs to be lean as HomeSeer continues to shutdown no matter what the shutdown script wants to do. It would be nice if it would process the script and run any events called before it finalizes shutdown.
                  No problem Randy, glad to help when I can. I appreciate all the work you have done in the HomeSeer Event clinic, I follow it closely and appreciate your time and attention to detail. I have been using HomeSeer for sometime and seem to have a good grasp on creating events, however it is always nice to get a different perspective.

                  Originally posted by Pete View Post
                  Thank-you Randy and Billy!
                  Anytime Pete, hope this helps. Thanks again for all your post, I gleam a lot of creative ideas from you. I agree with Randy that the shutdown script needs to be as lean as possible because HomeSeer continues to shutdown even if the shutdown event has not completed running. My shutdown event is very lean. It closes some communication ports, logs the shutdown event and speaks that HA is going offline. So far, I have not had any issues with it completing successfully. I guess they had to do this in case someone had a shutdown event that took a long time to complete and possibly stopped HomeSeer from stopping in a reasonable amount of time.
                  Billy

                  Comment

                  Working...
                  X