Something I'm missing

Discussion in 'C-Bus Wired Hardware' started by trucker01, Feb 19, 2014.

  1. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    Hey guys


    Ive been playing with the piced programming interface and keep getting blocked from actually getting anywhere.

    I can write code and I can schedule it to run. That works fine but I can't get it so that I press a button and it just works.

    For example say I have a module that turns on two lights on my wired and wireless network I can write the code fairly easily that seems to be correct but I don't get how I can attach this to a button press on one of the keypads.

    I understand that I have to create a Trigger group but the process of getting this to work together eludes me.

    This is probably based on the fact I don't really get how trigger groups, action selectors and groups interact.



    One other question I have a keypad with four buttons but I can't seem to use two different applications on a single keypad. I have to select an application (eg lighting) which means I can't use scenes or triggers on that keypad at all. I looked in blocks but the application drop downs has only primary as an option.

    Any hints what I might be missing here?



    ps in the help document they make message of cbus messages from time to time. I assume that is a group command on the network.
     
    trucker01, Feb 19, 2014
    #1
  2. trucker01

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    Hello trucker01.

    Sounds like you have a 2000 series style switch instead of a Saturn, Neo, DLT?
    These ones only accept one application (as you have found), while the Saturn etc can have a primary and secondary application.

    As for your logic, try setting a button up as say 'lighting application', 'logic trigger 1'. I
    In your logic section:
    once GetLightingState("logic trigger 1" = on) then
    begin
    (do stuff here) or
    (run logic module xxx)
    end;
     
    Last edited by a moderator: Feb 19, 2014
    Mr Mark, Feb 19, 2014
    #2
  3. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    Sounds like you have a 2000 series style switch instead of a Saturn, Neo, DLT?
    > I have 2000 series upstairs
    > and wireless Saturn on the ground floor.

    I have a eDLT on order but who knows when that will get here.


    Ill try the code you gave tomorrow I have a meeting in the morning I should be in bed now :)
     
    Last edited by a moderator: Feb 19, 2014
    trucker01, Feb 19, 2014
    #3
  4. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    Couldn't resist having a go now.

    Hmm that didn't work.

    The button press doesn't seem to get to the logic controller. If I put turn on light in the initialization it works fine. But if I do logic to check the state (like you suggested) it doesn't do anything when i press the button.

    I must be missing something obvious
     
    trucker01, Feb 19, 2014
    #4
  5. trucker01

    Roosta

    Joined:
    Nov 22, 2011
    Messages:
    560
    Likes Received:
    1
    Location:
    Australia
    Is any of your logic working?
    You should not need to add the trigger group to initialisation..
    How are you testing if its working or not? Via piced or after transferring to a TS?
     
    Roosta, Feb 19, 2014
    #5
  6. trucker01

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    There is no need to use the trigger application to control logic (you can if you want to but it's not a requirement). Logic can work with any application, and generally it's best just to stick to the lighting application, because as you have found out some switches only support one application and that is generally lighting.

    To trigger logic from a switch create a GA in the lighting application in toolkit (or PICED) called say "My Logic Trigger". Set this up in a switch as a straight ON command (not toggle or bell press).

    Then in logic

    ONCE GetLightingState("My Logic Trigger") = ON then
    begin
    // your logic here
    SetLightingState("My Logic Trigger", OFF);
    end;

    The switch sets the lighting state to ON which triggers the logic, which does its stuff and then resets the trigger for next time. Never use the bell press function as logic only runs every 200mS and it can miss a trigger.

    If this still doesn't work, look in the PICED log to see if you trigger GA is being set.
     
    Ashley, Feb 19, 2014
    #6
  7. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    Its really odd.

    I have a wireless network and a wired network.

    I copied all the group addresses from wired to wireless and wireless to wired so that they were identical.

    But its inconsistent with comms between the two networks.
    All the wired and wireless lights work fine from the wired groups.
    However, on the wireless groups only wireless units work. Seems like traffic is not being pushed oneway through the bridge.

    <SOLVED>
     
    Last edited by a moderator: Feb 20, 2014
    trucker01, Feb 20, 2014
    #7
  8. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    Hang on. Why would there be a disable module command in the initialization code ?
     
    trucker01, Feb 20, 2014
    #8
  9. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    Ok i used the wizard to generate the skeleton of the code. One of the things it put in was disablemodule("my U+_$ing module"); Why would it do that ? ugghhh
     
    trucker01, Feb 20, 2014
    #9
  10. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    I still have a question related to this. Why would the wireless not pass messages back to the wired network?
     
    trucker01, Feb 20, 2014
    #10
  11. trucker01

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Have you selected 'Send to Adjacent Network' on both sides of the wireless gateway?
     
    Ashley, Feb 20, 2014
    #11
  12. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    yeah thats set to on.
    I checked both near and farside.
     
    trucker01, Feb 21, 2014
    #12
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.