Announcement

Collapse
No announcement yet.

RegisterStatusChangeCB

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

  • RegisterStatusChangeCB

    Getting the following occasionally in the HS log:
    May-29 11:17:03 AM Warning Not running script since its already running: statusCallBack.vb Single instance option enabled in event properties
    This thing isn't being run from an event. It's being called by HS when a device status changes. Is there a way to enable multiple instances?
    Regards,
    Michael

    HS3, W10 Home, HSTouch, W800, Z-Stick+

  • #2
    Stop RegisterStatusChangeCB being single instance

    Due to other issues (long story, but looks to be a plugin problem which isn't getting resolved despite providing all debug logs), I'm experimenting with using a callback to run a script based on a device value changing. This is looking promising, but I'm seeing other problems.

    The callback is registered in startup.vb using
    hs.RegisterStatusChangeCB("test.vb", "StatusChangeCB")

    StatusChangeCB does something like the following (cut down code)

    Sub StatusChangeCB(ByVal Parm AsObject())
    Dim Ref AsInteger
    SelectCase Parm(4)
    Case 148
    MyFunction(
    Parm(2))
    EndSelect
    EndSub

    MyFunction() is a complex function which also changes device values. However, whenever it changes a device value (CAPI or not) I get this in the Homeseer Log:

    Not running script since its already running: test.vb Single instance option enabled in event properties

    Is there anyway to stop this behaviour? As in get the CB called recursively, or triggered later? I'm relying also on getting those other device changes to do more processing. (Minor nag - log event is very noisy when you're changing 5 or 6 devices in MyFunction())

    (Aside but minor, it would be SOOOOOO useful if that message actually indicated WHAT event it is referring to. It took me an hour or more to work out what was causing this message to appear as none of my events are single instance. At least not anymore - plenty were before I started debugging this).

    HS3 3.0.0.96

    Thanks,
    John.

    Comment


    • #3
      I also have the same. Bug reported here: http://homeseer.com/bugzilla/show_bug.cgi?id=2107

      Comment

      Working...
      X