Results 1 to 10 of 18

Thread: Help; macro to control manual light switch

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Automated Home Legend Paul_B's Avatar
    Join Date
    Jul 2006
    Location
    Eastbourne, UK
    Posts
    599

    Default Help; macro to control manual light switch

    I am after some help with creating a macro or other solution to control a light from a light switch as well as automatically from sensors. Sounds more simple than it is as I'll try to explain.

    Automatic light control defined by light level sensor, time of day, presence and timer.

    Manual input from digital switch.

    The automatic side works fine, someone enters, its dark, the right time of day the light turns on. They leave and presence removed, light goes off.

    Now to explain what I am trying to do with the manual input from the switch. Basically it should be able to override the current light state regardless of other conditions. So if the light is off and the switch operated the light should come on (regardless of time of day or light level). If the light is on then it can be turned off immediately by pressing the button. However, if the light is left on then the automated presence removal should turn it off after the timer period.

    Now the main problem I have is the macro functionality doesn't allow for state interrogation or extended logic. So I can't do something like.... if light is off then turn on...

    I have made some progress by using two macros; one to switch light on, one to turn light off, both macros are always running and registered against the light condition change. The continuing problem is that when the light conditions would normally have the light off and it is manually turned on the override flag is set and doesn't get reset. Therefore, automatic control no longer works (lights will turn on even when they should be off due to time of day or light level when presence is detected)

    Paul
    Last edited by Paul_B; 8th January 2008 at 11:05 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •