Announcement

Collapse
No announcement yet.

RegisterStatusChangeCB - Multiple instances

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

    RegisterStatusChangeCB - Multiple instances

    At this moment I am using registerstatuschangecb to run a script to store certain device values into an external MySQL database. Because sometimes multiple device changes occur within a short time period, changes are not processed by the script because it is still running.

    Because the script isn't running from an event I have not found an option to enable multiple running instances of the script.

    Is there any way to allow the registered callback-script to have multiple instances running just like it is possible with a homeseer event running a script?

    Regards,

    Peter
    Last edited by psmaaswinkel; January 29, 2017, 01:41 PM.

    #2
    I don't believe there is. I think I found this out in the early development in HS3 but HST did nothing about it.

    You can always run a script from a script so that it executes quickly and terminates i.e.

    PHP Code:
    Sub Main (ByVal Parm As Object)
        
    hs.Runscriptfunc("MyMainScript.vb","Main",Parm,False,False)
    End sub 
    This will not wait for the script to execute and allows multiple instances.
    Jon

    Comment


      #3
      Thanks for the quick reply Jon,

      Never thought of a workaround like that

      I will give it a try and see if it will solve my problems..

      Regars,

      Peter

      Comment


        #4
        Even when using the solution given by John, there are still errors in my log that the callback script is already running.
        If someone has any other idea how to possibly solve this, I would love to hear it.

        Comment

        Working...
        X