Turn one light on, another turns off

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • neilhooper
    Automated Home Guru
    • Oct 2008
    • 124

    Turn one light on, another turns off

    Hi All,

    Is it possible to turn a light on and another turned off automatically and when needed both turned off but never both on at the same time.

    - Neil
  • chris_j_hunter
    Automated Home Legend
    • Dec 2007
    • 1713

    #2
    yep, easy, surely - via their Connections options, and maybe a Macro and/or a General Logic object - depending on how & on what trigger(s) you want it to happen ...
    Our self-build - going further with HA...

    Comment

    • neilhooper
      Automated Home Guru
      • Oct 2008
      • 124

      #3
      Here's the scenario.

      I have some wall lights with RGB LEDs in them together with some much brighter white LEDs. They are dual wired so independent control is possible.

      When it gets dark enough and of course if someone is present we want the RGB on, if then we want some brighter light then obviously we would turn on the white ones. I don't want to run the RGB at the same time as the white as it's obviously pointless so when the white gets switched on which will be manually, the RGB needs to go off.

      If the white gets switched off the RGB needs to come back on, or if it's easier, switch the RGB on and the white goes off. Then at the end of the day at bedtime they both end up being off.

      Hope that makes sense.

      I haven't got a clue where to start.

      - Neil

      Comment

      • toscal
        Moderator
        • Oct 2005
        • 2061

        #4
        In the past when I have been asked to program various controllers.
        I start off small then expand.
        So to use your example;
        I would start with;
        When RGB is ON then White is OFF then When White ON then RGB OFF.
        Once this works as intended then add the based on time stuff then add the room occupancy.
        I find breaking things down into smaller bits helps.
        Don't know how relevant doing it this way is for Cortex etc.
        Last edited by toscal; 30 March 2012, 11:39 PM.
        IF YOU CAN'T FIX IT WITH A HAMMER, YOU'VE GOT AN ELECTRICAL PROBLEM.
        Renovation Spain Blog

        Comment

        • Viv
          Automated Home Ninja
          • Dec 2004
          • 284

          #5
          First automate your RGB lights as required.
          That is light level, time of day, presence etc.
          So you visit room, its evening, dark outside, RGB light comes on.

          Next you need to configure your White light. I assume from your description it is to be manually operated via some button. However for energy efficiency you might want it also to only be operated with presence e.g. if you leave room the white lights go out eventually.
          So ensure in behaviour menu for Huristic Request - Require presence is checked, this is the default.

          Now the automation the behaviour you want?
          In RGB Light connections 'Override mode' port add...
          Set Filter to Value
          A connection from White Light - Set On (output), set value to 5 (which means keep off).
          Add another connection to the same 'Override mode' port...
          Set Filter to Value
          A connection from White Light - Set Off (output), set value to 1 (which means None).

          And thats it.

          So you turn White Light on. Its Set On (output) connections is triggered which passes a value of 5 to the RGB light Override mode input. This makes RGB light 'Keep Off'.

          If you turn White Light off. Its Set Off (output) connections is triggred which passes a value of 1 to the RGB Light Override mode input. This makes the RGB light return to normal operation (Override mode=None).

          Should you leave the room whilst the White Light is on it will turn off and the RGB will also stay off.

          If you have white light on when you go to bed then it will turn off as expected.

          To ensure normal operation is restored when you go to bed or leave room for long period (that is RGB automated, white off) then check the 'Auto set override to default options..' in both lights.

          So to summarise you can automate your lights as required by adding two connections, no Scheduler, macros or logic gates required.

          Viv.

          Comment

          • chris_j_hunter
            Automated Home Legend
            • Dec 2007
            • 1713

            #6
            OK, took me less than a minute to set up something that possibly does what you want ...

            but it would take rather more than that to explain it ...

            plus it's best you have a go yourself ...

            so, some pointers ...

            assign a relay to switch each light on & off, one each (not sure which modules you have but for a DRB you'd right-click on the Relays sub-element in the Structure list, and select Connections, and then assign each relay to switch a load on & off and select lamp from the type list) ...

            then, one level down in the Structure list, right-click on each Relay / Load & select Connections again and click in a box - they have names something like Toogle, On, Off, State, etc - and when that's highlighted click Add & wait for a list to come up, which should include the other Relay / Load & a host of other options (if there's not one you want, click General or Global at the bottom, for a more complete list) one of which you select, then click the Add... box to get it entered into the right-hand column, and ...

            have a play with the various options, and you'll soon see all the possibilities & have one lamp switching off when the other comes on, with time of day, with light level, whatever ...

            PS: the above, obviously, was written before Viv's reply came-through ... not sure at what level you're coming from, so will leave my more basic reply untouched !
            Last edited by chris_j_hunter; 1 April 2012, 10:52 AM. Reason: typo's
            Our self-build - going further with HA...

            Comment

            • neilhooper
              Automated Home Guru
              • Oct 2008
              • 124

              #7
              Viv

              I think I've got as you've said, I've sent a screenshot by email to you.

              However it doesn't work. If the RGB light is on and I turn the White on the RGB stays on and both stay on until the light timer turns them off.

              - Neil
              Last edited by neilhooper; 31 March 2012, 10:42 PM.

              Comment

              • Viv
                Automated Home Ninja
                • Dec 2004
                • 284

                #8
                Originally posted by neilhooper View Post
                If the RGB light is on and I turn the White on the RGB stays on and both stay on until the light timer turns them off.
                - Neil
                I have received your database. I did not need to modify it as you have no Idratek hardware at present and the RGB wall light is xAP enabled.

                I toggled the RGB wall light 'on' via the behaviour menu. RGB wall Light comes on in plan view. xAP message sent out...

                I toggled the Wall 1 White light via behaviour menu. Wall 1 White Light comes on in plan view. No Wall 1 White Light packet sent as not xAP enabled. However RGB Wall Light goes off as expected and xAP packet sent for RGB Wall Light as expected. Can see current override mode in behaviour menu for RGB Wall Light change to 'keep off' as expected.

                So this appears to me to be working correctly.

                Viv

                Comment

                • neilhooper
                  Automated Home Guru
                  • Oct 2008
                  • 124

                  #9
                  Viv,

                  A thousand apologies, the White Wall light that I was supposed to be switching is "Wall 1 White R2" and not "Wall 1 White".

                  In a fit of absent mindedness I chose the wrong light, it was late !!!

                  Anyway no excuses I should have double checked.

                  I won't be making that mistake again.

                  Thanks for your help.

                  - Neil

                  Comment

                  Working...
                  X