Announcement

Collapse
No announcement yet.

Duplicate Script Run, 1st runs ok, 2nd produces an error

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

    Duplicate Script Run, 1st runs ok, 2nd produces an error

    I have an event "toggle" script that ran without issue in HS3, but in HS4, it runs ok, but then runs a 2nd time with error. Note that the event is triggered ONCE and seems to run twice.

    I included in this LOG snippet, several ON and OFF commands triggered from the HS4 DEVICES page.

    What am I missing?

    Time
    From
    Type
    Message

    2/8/2022 4:15:10 PM

    HomeSeer
    Error
    Running script(2) &dvRef = hs.GetDeviceRefByName("Northwest") :if hs.ison(dvRef) then hs.CAPIControlHandler(hs.CAPIGetSingleControl(dvRef, True, "off", False, True)) Else hs.CAPIControlHandler(hs.CAPIGetSingleControl(dvRef, True, "on", False, True)) end if, init error: Syntax error
    2/8/2022 4:15:10 PM

    HomeSeer
    Device Control
    Device: Basement Finished NorthWest to on (1) by/from: CAPI Control Handler
    2/8/2022 4:15:09 PM

    HomeSeer
    Event
    Running script statement immediately (Test 2): &dvRef = hs.GetDeviceRefByName("Northwest") :if hs.ison(dvRef) then hs.CAPIControlHandler(hs.CAPIGetSingleControl(dvRef, True, "off", False, True)) Else hs.CAPIControlHandler(hs.CAPIGetSingleControl(dvRef, True, "on", False, True)) end if
    2/8/2022 4:15:09 PM

    HomeSeer
    Event
    Event Trigger "RF Buttons Events Test 2"
    2/8/2022 4:05:59 PM

    HomeSeer
    Device Control
    Device: Basement Finished NorthWest to off (0) by/from: CAPI Control Handler
    2/8/2022 4:05:22 PM

    HomeSeer
    Device Control
    Device: Basement Finished NorthWest to on (1) by/from: CAPI Control Handler
    2/8/2022 4:05:19 PM

    HomeSeer
    Device Control
    Device: Basement Finished NorthWest to off (0) by/from: CAPI Control Handler
    2/8/2022 4:04:48 PM

    HomeSeer
    Device Control
    Device: Basement Finished NorthWest to off (0) by/from: CAPI Control Handler




Working...
X