1.15.0 firmware

Discussion in 'C-Bus Automation Controllers' started by TOAB, Dec 9, 2023.

  1. TOAB

    TOAB

    Joined:
    Nov 16, 2020
    Messages:
    5
    Likes Received:
    0
    Hi, I recently upgraded 1.15.0 firmware for the SHAC and since then all my scripts with pulse command are getting re triggered.

    I have a ga (0, 49, 4) on a toggle in a visualization and this is used for and event script which pulses a light ga on for a period of time and then turns it off. The script also pulses the ga that turns the script on. This worked fine prior to upgrading to new firmware. Script shown below.


    if GetCBusLevel(0, 49, 4) >= 1
    then
    PulseCBusLevel(0, 56, 43, 255, 0, 7200, 0)
    PulseCBusLevel(0, 49, 4, 255, 0, 7200, 0)
    End

    What used to happen is when the toggle switch was put on, the light would turn on for the pulsed period and then turn off. The toggle ga would also be pulse and it too would turn off at the end of the pulsed period. If during the pulsed time the toggle group was turned off by pushing the toggle ga on the visualization page the pulses would be cancelled and the light would turn off.


    What seems to be happening now is the script is being triggered on both the rise and fall of the toggle ga and it runs in a loop tuning the light ga and the toggle ga on and off.


    Any advise on what to do would be greatly appreciated.

    Regards,

    Colin
     
    TOAB, Dec 9, 2023
    #1
  2. TOAB

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,534
    Likes Received:
    175
    Location:
    Adelaide, Australia
    What's supposed to turn the light off? The script doesn't.

    The event is triggered on any change of the ga, so that's what you would expect. And there is nothing in the script to turn the light off except the pulse timing out and if it is cancelled the final level will not be set.

    I suggest you put a log statement in the body of the script to print out the ga trigger value so you can see what's really happening.
     
    Ashley, Dec 9, 2023
    #2
  3. TOAB

    ssaunders

    Joined:
    Dec 17, 2008
    Messages:
    242
    Likes Received:
    35
    Location:
    Melbourne
    Your pulses do not do a ramp, so this is a long shot.

    @TOAB, the only thing I can think of is that 1.15.0 fixed a bug relating to 'execute during ramping' (which I had long needed, and waited to be fixed). The last time this feature worked was 1.6.0, so anyone relatively new to the AC could get bitten by it being fixed.

    This may be involved, and you may have exec during ramp turned off (the default), which could alter your expected behaviour. Did your code ever run okay on that years old 1.6.0 version? Check out the release notes for any other possible related nuggets. It's a short list

    There is a checkbox for event-based script properties for exec during ramping. This causes a script to fire recurrently during a ramp on/off so that the varying level can be reacted to. Before the fix, it did not matter what this was set to. It now does, with the script only firing once at the end of the ramp/level set if un-checked.

    FYI, in an event-based script for 0/49/4 you can get the level using lvl = event.getvalue() and avoid GetCBusLevel(0,49,4), which is slightly more expensive, given you already have the answer in the event table. The event table also contains other goodies (like event.src, event.sender & event.dst).

    As Ashley mentioned, logging things is your friend, and will tell you when and to what level things change. It could be as simple as log(event.getvalue()), or might also need selection of the 'log' checkbox in objects tab to log individual GAs (i.e. 0/56/43 & 0/49/4).

    But I'd try exec during ramping set to yes first, assuming it's currently set to the default of 'off'. This might go back to what 1.14.0/earlier was successfully doing for you.
     
    Last edited: Dec 18, 2023
    ssaunders, Dec 18, 2023
    #3
  4. TOAB

    ssaunders

    Joined:
    Dec 17, 2008
    Messages:
    242
    Likes Received:
    35
    Location:
    Melbourne
    Any joy @TOAB / Colin?
     
    ssaunders, Jan 17, 2024
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.