Show page with scripting

Discussion in 'C-Bus Automation Controllers' started by Dealbh, Nov 6, 2019.

  1. Dealbh

    Dealbh

    Joined:
    Nov 9, 2016
    Messages:
    1
    Likes Received:
    0
    Location:
    Geelong
    Hi all,

    I'm replacing a C-Touch Colour unit that showed a page when a group changed value. Is there an equivalent to the ShowPage() procedure available in PICED that can be used with a SHAC?

    Brian
     
    Dealbh, Nov 6, 2019
    #1
    1. Advertisements

  2. Dealbh

    lcrowhurst

    Joined:
    Dec 2, 2004
    Messages:
    174
    Likes Received:
    49
    Location:
    Sydney, NSW, Australia
    My Couple of ways :

    option 1:

    If you are using my iOS App

    https://apps.apple.com/au/app/ctc-wiser/id1330538372

    You can send a page (and sound) command to individual or multiple iOS devices.

    info at crowhurst.com.au/scada-vis

    scroll down to the server section

    video demo at :




    option 2:

    on wiser goto scripting, under tool menu select edit custom javascript

    in the window paste and save the following code

    //CODE START

    $(function(){
    //=============================================================
    //
    // CROWHURST TECHNICAL CONSULTING
    //
    // Page Changer
    //
    //=============================================================


    // change controlgroup to the group you want to chgange the page
    // change page to the page no
    // change controllvalue to the value you are looking for

    controlgroup = '0/56/1'
    page = 220
    controlvalue = 255

    grp.listen(controlgroup, function(obj, value) {

    if (obj.value.value == controlvalue) { showPlan(page); }

    });

    });

    //CODE END

    This will cause the page to change on every screen that is running the wiser page
    change the control group,page and controlvalue to you values
     
    lcrowhurst, Nov 8, 2019
    #2
    1. Advertisements

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.