Announcement

Collapse
No announcement yet.

HS4 4.2.16.7 is ready for Beta testing!

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Any chance there was a change to your firewall? Check the HS setup and make sure ascii is still enabled. We did not make any changes to this support.

    Originally posted by wabbastang View Post
    Went to latest beta and suddenly not able to control via ASCII. Been running home assistant with the marthoc plugin for years. Not seeing anything at all in the HS logs, HA throws this error..
    Error opening connection to HomeSeer ASCII at 192.168.1.50:11000: [Errno 110] Connect call failed
    website | buy now | support | youtube

    Comment


      #32
      Excellent! it's the legacy HS3 plugins that the author is not around to fix that I was concerned about.

      Originally posted by rjh View Post
      We are evaluating first. Most plugins are not using the call in question so it may not be an issue. We are running all the plugins here so we will know for sure. Our intention is to not break user's systems. Also, this issue is with HS4 plugins only.


      Comment


        #33
        Originally posted by randy View Post
        The beta is installed and working properly.

        I set up a test for security offset that will run daily. I'll confirm those results in a few days. The test Event did apply an offset. We'll see if it changes daily. The set trigger time is 3:00PM. It will trigger in 30 minutes and every day.

        Click image for larger version Name:	capture1.png Views:	0 Size:	17.7 KB ID:	1587615
        It looks like the security offset is still not working. The event fired at 3:17 every day.

        1/22/2023 3:17:00 PM HomeSeer Event Event Trigger "HomeSeer Demo securityOffset"
        1/21/2023 3:17:00 PM HomeSeer Event Event Trigger "HomeSeer Demo securityOffset"
        1/20/2023 3:17:00 PM HomeSeer Event Event Trigger "HomeSeer Demo securityOffset"
        1/19/2023 3:17:00 PM HomeSeer Event Event Trigger "HomeSeer Demo securityOffset"​

        Click image for larger version

Name:	2FA86A93-0120-421F-B8D8-7D38FE05FA39.jpg
Views:	254
Size:	11.9 KB
ID:	1588384
        HS4 Pro, Windows 10 pro

        Comment


          #34
          So you have an event that runs multiple other events and in each one of those events you have a wait action? I tried this and it always runs the events in order. There is a flag that is passed to the events you are running that tells the system to not thread the event.

          Here is my main event:

          Click image for larger version

Name:	image.png
Views:	233
Size:	36.7 KB
ID:	1588386

          And here is one of the test events, the others are the same:

          Click image for larger version

Name:	image.png
Views:	225
Size:	19.3 KB
ID:	1588387

          Are you doing something different?

          Originally posted by Walnut2000 View Post
          I must be missing something around Run Events In Order, Randy, because my tests show different results.

          I've installed the Beta and all's well, but "Run Events In Order" still doesn't force events to run in order.

          So, if I have a 10 sec Wait between each "Run Another Event" action that triggers a test event then the wait is honoured, no problem.

          But if I have a 10sec wait inside each of the test events then they all fire at the same time, even with "Run Events In Order" ticked on each test event. It does not wait for the first test event to complete before triggering the second test event.

          If setting the "Run Events In Order" option doesn't delay the following actions until the event completes then what is the purpose of the option?

          I'm sorry if I've misunderstood, but would really appreciate some clarity on this.


          website | buy now | support | youtube

          Comment


            #35
            Originally posted by rjh View Post
            Any chance there was a change to your firewall? Check the HS setup and make sure ascii is still enabled. We did not make any changes to this support.
            Definitely not, ascii enabled, user/pass verified on both ends but again nothing in logs and coincided with the update. But it is always possible something else updated down the line coincidentally at the same time, so with your comment I'll backburner the HS update as the culprit and dig in further. Thx

            Comment


              #36
              Originally posted by rjh View Post
              So you have an event that runs multiple other events and in each one of those events you have a wait action? I tried this and it always runs the events in order. There is a flag that is passed to the events you are running that tells the system to not thread the event.

              Here is my main event:

              Click image for larger version  Name:	image.png Views:	0 Size:	36.7 KB ID:	1588386

              And here is one of the test events, the others are the same:

              Click image for larger version  Name:	image.png Views:	0 Size:	19.3 KB ID:	1588387

              Are you doing something different?
              HomeSeer is now launching called Events in order, which is all you set out to fix.

              He is wanting each Action to wait for the called Event to COMPLETE prior to launching the next Event. If the first Event calls an Event containing a 10 second Wait, the next Event Action should not be started until this one completes. If Action 1 calls an Event with a 10 second Wait, he wants the next Event to be launched only after the 10 second Wait in the first Event.

              What he wants is an option "Wait for Event to complete prior to running the next Action" on each "Run another Event" Action, not to just "Run Events in Order".

              I can envision some real problems with this, though 2 users have stated they need it.
              HS4 Pro, Windows 10 pro

              Comment


                #37
                rjh to add to what randy explained, the idea is to truly single thread execution when needed. If the Main Event executes a Run Event, then the Main Event should not execute the next Action until the called Run Event fully completes all its own actions.

                I use a lot of Run Event (with test for condition true) actions to compensate for the fact we don't have conditional logic at the present. It's a kludge. Having the ability to have conditional logic at the Main Event level, with Run Events in order, would eliminate most of my sub-events needs.

                Comment


                  #38
                  Ok, I see. It's only the wait action that will cause an event to run in a new thread so it runs in parallel with the other actions. A quick fix would be to run a simple script that does the wait. That would cause the events to run in order and honor the waits. An option on the wait action is probably the best way to allow the user to select whether they want to action to thread the entire event.

                  Originally posted by randy View Post
                  HomeSeer is now launching called Events in order, which is all you set out to fix.

                  He is wanting each Action to wait for the called Event to COMPLETE prior to launching the next Event. If the first Event calls an Event containing a 10 second Wait, the next Event Action should not be started until this one completes. If Action 1 calls an Event with a 10 second Wait, he wants the next Event to be launched only after the 10 second Wait in the first Event.

                  What he wants is an option "Wait for Event to complete prior to running the next Action" on each "Run another Event" Action, not to just "Run Events in Order".

                  I can envision some real problems with this, though 2 users have stated they need it.
                  website | buy now | support | youtube

                  Comment


                    #39


                    Not sure if this is related to the beta or not but it sure seems to be.
                    The shutdown script is not able to run any events or control devices on a Linux system.
                    I just upgrade 2 other systems to the latest beta and I'm seeing the same behavior on both.
                    The funny thing is, the original system I saw this on, the shutdown script is now working properly.

                    This is the shutdown script on a 3 systems:
                    Code:
                    sub Main(parm as object)
                    
                        hs.WriteLog("Shutdown", "Scripting is OK and is now running Shutdown.vb")
                        hs.triggerevent("Shutdown Timer")
                    
                    End Sub​
                    2 of the systems are running Ubuntu 22.04 server, the other is Debian 11.
                    One of the Ubuntu servers is the one that is now working.

                    I added the hs.WriteLog just to see if anything would work, it does write to the log fine.
                    I also added a virtual device that I would turn on in the script and it would not work.

                    Pertinent log entries:
                    Code:
                    1/24/2023 12:03:07 HomeSeer Shutdown Shutdown Script Completed
                    1/24/2023 12:03:07 HomeSeer EVENT DEBUG 12:03:07:9821: Event Trigger Event Shutdown Timer
                    1/24/2023 12:03:07 HomeSeer Event Event Trigger "Timers Shutdown Timer"
                    1/24/2023 12:03:07 HomeSeer Device Control Device: Unknown Unknown Shutdown Control to On (100) by/from: CAPI Control Handler
                    1/24/2023 12:03:07 Script   Shutdown Scripting is OK and is now running Shutdown.vb
                    1/24/2023 12:03:07 HomeSeer System Current debug events set: Events
                    1/24/2023 12:03:07 HomeSeer EVENT DEBUG 12:03:07:9456: Calling Main in vb.net script MNRShutDown.vb
                    1/24/2023 12:03:07 HomeSeer Shutdown Running shutdown script ...
                    1/24/2023 12:03:07 HomeSeer Shutdown Application shutdown at 1/24/2023 12:03:07 PM​
                    rjh Any chance you can try there?


                    Just to add, all scripts run fine if I run them from Tools/Script Commands
                    Just to add again 😁 , The events are simply start timer.
                    Just to add again, again, I also noticed on all 3 system the countdown timer when I restart does not show.
                    Looks like something changed with the shutdown because I get this instead:
                    Click image for larger version  Name:	Screenshot 2023-01-24 142905.png Views:	0 Size:	65.6 KB ID:	1588584

                    Comment


                      #40
                      Update, I had to reboot the 1 system that was working today and it didn't work, again.
                      The shutdown timer should be about 4 minutes off from the uptime counter.
                      Click image for larger version

Name:	timer.png
Views:	145
Size:	7.7 KB
ID:	1588709

                      Comment


                        #41
                        Looking at the code it looks like events will not run as events are disabled, then this script is run. What I think we should do is run this script before we shut anything down.
                        Also, if the script runs anything that takes some time, that could be an issue since when the script returns the system continues with the shutdown. So, the script should probably have a wait in it if this is a possibility. Since you are running an event, the event runs off another thread so its possible that the event never gets a chance to run.

                        Originally posted by Demusman View Post
                        Update, I had to reboot the 1 system that was working today and it didn't work, again.
                        The shutdown timer should be about 4 minutes off from the uptime counter.
                        Click image for larger version

Name:	timer.png
Views:	145
Size:	7.7 KB
ID:	1588709
                        website | buy now | support | youtube

                        Comment


                          #42
                          Originally posted by rjh View Post
                          Looking at the code it looks like events will not run as events are disabled, then this script is run. What I think we should do is run this script before we shut anything down.
                          Agreed. That would be the way to go.
                          I was just coming to post another update, it's definitely nothing to do with the beta but, more so, probably never worked with Linux versions.
                          If you can get the script to run first it would work.

                          Comment


                            #43
                            Originally posted by rjh View Post
                            Looking at the code it looks like events will not run as events are disabled, then this script is run. What I think we should do is run this script before we shut anything down.
                            Also, if the script runs anything that takes some time, that could be an issue since when the script returns the system continues with the shutdown. So, the script should probably have a wait in it if this is a possibility. Since you are running an event, the event runs off another thread so its possible that the event never gets a chance to run.


                            It works reliably for me under Windows, but the timing is very tight as you suggest. Mine does run an Event in the shutdown script. I must be catching a very narrow window if my Event is running. It would be better if the script was processed and Event processing continues for a few seconds after. If a Wait in the script is needed, we can do that.
                            HS4 Pro, Windows 10 pro

                            Comment


                              #44
                              Originally posted by randy View Post
                              It works reliably for me under Windows, but the timing is very tight as you suggest. Mine does run an Event in the shutdown script. I must be catching a very narrow window if my Event is running. It would be better if the script was processed and Event processing continues for a few seconds after. If a Wait in the script is needed, we can do that.
                              I'm thinking this only effects Linux versions but I could be wrong.

                              rjh It would also be nice if the Startup script was run first, or at least before loading plugins.
                              Mine takes about 14 seconds from actual startup to when the script runs. I can actually watch it running with the last startup time and then the script runs and it restarts at 0.

                              Comment


                                #45
                                I will make the change to run the shutdown script before actually shutting anything down, I think that makes the most sense as the script could do anything so the full system should be up. Odd this never came up before. I will add a short delay, maybe 5 seconds after executing the script, but the user will need to add their own delay if they are doing something that takes longer than that. Lots of things get queued so there is really no way to know for sure if actions started by a script are finished.

                                Originally posted by randy View Post
                                It works reliably for me under Windows, but the timing is very tight as you suggest. Mine does run an Event in the shutdown script. I must be catching a very narrow window if my Event is running. It would be better if the script was processed and Event processing continues for a few seconds after. If a Wait in the script is needed, we can do that.
                                website | buy now | support | youtube

                                Comment

                                Working...
                                X