Announcement

Collapse
No announcement yet.

Automatic lights off

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guest's Avatar
    Guest replied
    Yup, I'd be interested in seeing those scripts Rich.

    Ta

    JQ

    Leave a comment:


  • Guest's Avatar
    Guest replied
    I use a "soak time" approach because I also have audio announcements for my motion detectors over the house intercom.

    Basically, my motion detectors send an ON every time they see motion. My motion script will announce motion only if the soak timer is off. If motion is seen, the soak timer is turned on. If the soak timer is on, then there will be no audio annoucement. This way, if I am hanging out in the family room, I won't here "Motion in the family room, motion in the family room, motion in the family room....", etc.

    Once there is no motion for N continuous minutes, my noMotion script will turn the lights off, and say "No motion detected in the family room", and then turn the soak flag to off. The soak flags are just virtual devices.

    Pretty easy idea. I assume other folks have done the same thing. I'll post the scripts if anyone is interested.

    Thanks, rich

    Leave a comment:


  • Stuart
    replied
    Hi,
    Strange thing,
    after seeing the above script, I want to mention that this script I run, I had to stop using. It had been triggered about 20 times in one hour and the memory usage of homeseer increased from about 30k to 90k. It has taken a good two days for the memory usage to get back to about 41k right now. I sent in a helpdesk ticket about this.
    Stuart
    The below script was triggered by a motion detector.

    sub main()
    If hs.isoff("A9") then
    hs.execx10 "A9", "on",0,0
    end if
    hs.removedelayedevent "A9",""
    hs.delaytrigger 120,"hall night light off"
    end sub

    Leave a comment:


  • tyke
    replied
    No credit here, something I learned years ago on this board.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Tyke,
    There's something vaguely ingenious about that. I'm sure that given a few dozen monkeys and enough time I could'a come up with something similar.

    Thanks

    JQ

    Leave a comment:


  • tyke
    replied
    Here is my similar script


    Create two events, one triggered by motion sensor, running the script below.

    sub main()
    hs.RemoveDelayedEvent "","Off front of house"
    hs.DelayTrigger 300, "Off front of house"
    end sub

    The second, called Off_front_of_house, (in my example) that actually turns off whatever devices you want.

    The first line of the script deletes any running delayed event (reset the clock everytime motion is detected). The second line creates a delayed event to run the event that turns off the light, the number is in seconds.

    Make sense?

    Leave a comment:


  • Czechmarty
    replied
    That is a great idea Michael and I'll definitely try it, but for learning purposes I'd still like to see Smee's script.
    Smee? Would you be willing to share it?

    Thanks

    Marty

    Leave a comment:


  • Michael McSharry
    replied
    If it is a homeseer device then it can be managed by mcsMovement. It can use either the status of the device or the value associated with a device, depending upon how the device operates. They can be real or virtual devices.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    I'm home now and having a play with creating events with scripts... Could do with a few pointers if anyone can help.

    Thanks

    JQ

    P.S. Had a look at the mcsMovement plugin, looks amazing, and very complex, unfortunatley my sensors do not create X10 themselves, so are not devices, they tell the burglar alarm to create x10, so I don;t reckon I can use it. Still gonna play a bit more though, look slike I can work out how often people wander up and down the stairs ;-)

    Leave a comment:


  • Michael McSharry
    replied
    I believe the effect you are trying to achieve can also be done with mcsMovement without any scripting. mcsMovement is free from the updater.

    In essence an Area device is used to define the set of motion sensors that comprise the hallway area. This can be 1 or more.

    The device is setup to turn on immediately with motion and a minimum off time to be 6 minutes. The area device will now be on as long as there has been motion within the last 6 minutes.

    The area device will then be used to perform the device action of turning on and off the light in the hallway.

    Leave a comment:


  • motorbortniker
    replied
    I'm planning on doing about the same thing, only with the ActiveEye motion sensors (on order from AO). The documentation says it will send an "on" signal command when it detects motion and an "off" command after x minutes of no motion. Those commands trigger HS events.

    Jeff

    Leave a comment:


  • Czechmarty
    replied
    Wow
    Smee, that is exactly what i was working on. Would you be willing to share the script? I'm pretty bad with scripting and this would help me to learn creation and deleting events from scripts.

    Thanks

    Marty

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Nice simple idea Smee,
    I've not used delayed events before so I'll need to have a look into that, thanks for the info.

    JQ

    Leave a comment:


  • Guest's Avatar
    Guest replied
    I described my approach in a reply to this thread:

    turn-light-off script

    Leave a comment:


  • Guest's Avatar
    Guest started a topic Automatic lights off

    Automatic lights off

    Hi all,
    I use the "has been on for at least..." function to turn off my hall lights after they've been on for 6 minutes. However, this means that if I'm working in the hallway they are constantly turning on and off. What I'd like to do is turn them off if the X-10 command H1 On has not been received for six minutes.
    Anyone got any idea how to do this?

    Thanks

    John
Working...
X