Using Keypad Timers from CGate??

Discussion in 'C-Bus Toolkit and C-Gate Software' started by [email protected], Apr 15, 2007.

  1. Andy@Mandoon

    [email protected]

    Joined:
    Dec 13, 2004
    Messages:
    34
    Likes Received:
    0
    Hi all,

    Is their a way of starting a timer configured on a keypad from CGate?

    I run various pool pumps and more importantly irrigation systems on CBus. They are controlled from home automation software via CGate. In the event of a software/OS/hardware failure of the home automation system, it is very important that items like irrigation/pump controllers are turned off in a timely manner (critical for irrigation!).

    Currently, I have manual control of the equipment via a Saturn keypad button configured with an "off timer." Ideally it would be great to trigger that timer to start. I would then have the backup of the CBus firmware in the case of a failure in my primary automation system.

    So, can I use CGate to start a timer on any of the CBus hardware ie. a Saturn keypad timer????

    Many thanks,
    Andy McCallum.
    Mandoon Technology.
     
    [email protected], Apr 15, 2007
    #1
    1. Advertisements

  2. Andy@Mandoon

    Phil.H

    Joined:
    Jul 29, 2004
    Messages:
    466
    Likes Received:
    0
    Location:
    Sydney
    It is a good point you raise. Have previously designed a system where software (schedule plus) performs a watchdog function on other distributed embedded processors - in this case a B&W C-touch. You will need an intelligent device like a C-Touch and / or a PAC to get this happening. Do you have either of these in the job ???

    To answer your question discrete C-Bus messages usually knock out timers in C-Bus base units like key inputs, PIR's etc...
     
    Last edited by a moderator: Apr 15, 2007
    Phil.H, Apr 15, 2007
    #2
    1. Advertisements

  3. Andy@Mandoon

    [email protected]

    Joined:
    Dec 13, 2004
    Messages:
    34
    Likes Received:
    0
    No, I don't have a PAC or a C-Touch. It is more flexible (and cheaper!) for me to implement all the home automation logic in a generic white box computer - which is already required for many other home automation functions.

    A good suggestion all the same. I guess I should say that the only equipment installed is Saturn keypads, 5 gang DLT, relays, dimmers and a PCI.

    I am hoping CGate might have some functionality to coerce a keypad to start it's timer. Maybe some trick via scenes?

    Hopefully, tomorrow (beginning of the working week) will bring forth our never-say-die developers.
     
    [email protected], Apr 15, 2007
    #3
  4. Andy@Mandoon

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,363
    Likes Received:
    10
    Location:
    Adelaide, South Australia
    Can't be done I'm afraid.

    The only way to start a timer in a keypad is by pressing the button.
     
    ashleigh, Apr 15, 2007
    #4
  5. Andy@Mandoon

    [email protected]

    Joined:
    Dec 13, 2004
    Messages:
    34
    Likes Received:
    0
    Another Solution??

    Ashleigh,

    Thanks for that info.

    Can you think of any other way of getting a relay to be switched off after a certain period of time?

    Would their be some sort of trick using scenes to set an off timer?? Any other way?

    Andy.
     
    [email protected], Apr 17, 2007
    #5
  6. Andy@Mandoon

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    Not 100% sure if it would work but perhaps sending a ramp command over a long period of time. When the ramp time finally reaches zero the relay would shut off. This would all happen from a single command issued from cgate and once sent it wouldn't matter if the cgate PC crashed, the output unit would track the ramp time internally independant of the issuing cgate machine.

    The available ramp times are most likley restrictied to the ramp times available in a normal Key unit. So your "Timer" would be restricted to this time. You could ofcourse simulate longer time by having cgate issue a series of ramps, new one as the old one is close to ending. Seems hackish, but would offer the backup you want.
     
    Richo, Apr 17, 2007
    #6
  7. Andy@Mandoon

    [email protected]

    Joined:
    Dec 13, 2004
    Messages:
    34
    Likes Received:
    0
    Thanks Richo! You have anticipated my next question.

    That is the exact hack that I have been contemplating but was unsure about where the ramp was executed in the CBus/CGate combo. I believe the max ramp that CGate will command is 17 mins (Sourced from the CGate manual).

    This method relies absolutely on the ramp command coming from the relay unit. Can we confirm that the ramp is looked after by the relay unit? And that CGate has no input in the process after the initial command is executed?

    At first I considered this a bit ugly, but now I see it as a beauitful idea. I will set a ramp for 15 mins and retrigger every 14 mins. In a way this will become a supervised relay, with a guaranteed off. The software works a little harder, but I only have to write the code once!

    The other question with this method is what will happen to the original "ramp 0 16m" command when the next "ramp 0 16m" is issued. Should I issue an "on" before the next "ramp" command. Whilst I can test this, I would prefer to have the definitively correct way of doing this. (I hate empircal testing for software performance.)

    Andy.
     
    [email protected], Apr 17, 2007
    #7
  8. Andy@Mandoon

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The ramp rate is totally looked after by the Output unit, so you will get your guaranteed turn off.
    You will have to set the level of the channel back to 100% before issuing the next ramp command or it will keep ramping down from wherever it was at last. A basic On command might not do anything because the channel is already On. You may need to issue a command to explicitly set the level back to 100%.
     
    Newman, Apr 17, 2007
    #8
  9. Andy@Mandoon

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,363
    Likes Received:
    10
    Location:
    Adelaide, South Australia
    Newman: Exactly.

    Andy: The other neat hack you can do is set the ON threshold in the relay unit.

    That way if you want a strange time period that does not correspond to a ramp rate (for example, suppose you want EXACTLY 14 minutes) then you program in a 17 minute ramp from 100% to 0%, but set the relay unit to have an ON threshold of (1-(14/17))*100 = 17%.

    Then when the level reaches 17% of maximum, which will be 14 minutes later, the load will turn off. The ramp will still keep going, but you could stop that happening as well by ramping from 100% down to (say) 16%.

    Naturally, the group is still considered to be ON (because it is not OFF, and OFF is a level of 0). But you can handle that with other things if needed.
     
    ashleigh, Apr 18, 2007
    #9
  10. Andy@Mandoon

    [email protected]

    Joined:
    Dec 13, 2004
    Messages:
    34
    Likes Received:
    0
    Ok. Thanks guys. Appreciate your help.

    Looks like reseting a ramp will be the way to go.

    Anybody using the MisterHouse home automation project should look for "CBus Supervised Relays" in the near future!!

    Andy.
     
    [email protected], Apr 18, 2007
    #10
  11. Andy@Mandoon

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    I have heard about MisterHouse on various linux podcasts I follow, but never used it myself. Was there existing cgate support that you are extending or is the cgate integration all your own work.

    Either way it's great to hear there is support in there.
     
    Richo, Apr 18, 2007
    #11
  12. Andy@Mandoon

    [email protected]

    Joined:
    Dec 13, 2004
    Messages:
    34
    Likes Received:
    0
    There is existing support for CGate 1.5, which requires a few minor mods to get it running with the current CGate versions. It also has a few hard coded numbers (eg. CBus unit address of the PC interface) which need fixing.

    I don't think it will need a rewrite but I hope to make some substantial improvements, especially to take advantage of the latest CGate features (the biggest feature being the wrritten manual for CGate). The module already integrates CBus very nicely into MH. The original author (whom I am talking to) has done a pretty good job.

    The MH support for CBus extends back to Dec 2001!

    Andy.
    Mandoon Technology.
     
    [email protected], Apr 18, 2007
    #12
  13. Andy@Mandoon

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    That's all great stuff to hear. Well if you run into any trouble with C-Gate you know where to ask questions!
     
    Richo, Apr 18, 2007
    #13
    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.