Please login or register.

Login with username, password and session length

Author Topic: Help with Smart Macros  (Read 5504 times)

orca

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 25
Help with Smart Macros
« on: February 02, 2009, 05:38:07 PM »


Hello all you X10 AHP problem solvers.

I have 2 problems I have not been able to resolve.

I need to know what is the format for comparing dates. One date is a known value being compared to the AHP (CM15A) date.
I have not been able to determine what is the format of the known value date.  I have tried 2009-01-31, 20090131, 2009031,
01-31-2009 and 01312009 none of them have given me any results, that is turn the switch is on.

I have a client that wants to know whether the power has been off and I would like to know if anyone has had that question
before? His problem is on certain days he needs to make sure the lights are on in his house.  I told him to issue a power on
command every half hour through out the evening and that way he is never more than 30 minutes away from having the
lights on should there be a power failure.  Any other suggestions would be appreciated

Does anyone have a complete list of the commands or comparisons that can be used with the Smart Macros?

Thanks in advance for your help.

Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Help with Smart Macros
« Reply #1 on: February 03, 2009, 01:56:43 PM »

There are plenty of (non-x10) solutions for detecting a power failiure. Most UPSs can do it, and can send e-mail alerts (provided your internet connection and router on also on the UPS).
Personally, I found that if you connect a short wire between the contacts of a PowerFlash module, it will send its signal if it loses power, and then power is restored (provided it lost power for more than a few seconds - long enough for the internal capacitors to discharge).
I use this to trigger a whole series of if-then-else macros, based on day and time, to turn on/off the appropriate lights and appliance modules when the power comes back on.
Check out this thread for more details: http://www.x10community.com/forums/index.php?topic=13530.msg75296#msg75296

Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Help with Smart Macros
« Reply #2 on: February 03, 2009, 03:28:02 PM »

Detecting Power outages has been a issue since day one release of AHP!
Doing an advanced search will turn up some other threads with suggestions to detect and how to notify you!

As for dates and comparing, which dates are you looking at and what are you comparing them too?
The activity monitor will display the date & time a device is sent a ON/OFF command ;) Nothing will tell you if it actualy turned on! :(
Nor will anything tell you if the switch was manualy switched on! :(
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Help with Smart Macros
« Reply #3 on: February 03, 2009, 03:53:02 PM »

There are plenty of (non-x10) solutions for detecting a power failiure.

Yes there are Noam... but I really like your idea.
Logged
Home Automation is an always changing technology

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Help with Smart Macros
« Reply #4 on: February 04, 2009, 10:11:33 AM »

I'm glad you like it.
It was an experiment (after a few others failed).
I had looked into other "power failure alarm" devices (including the Sensaphone - which I'd used at work), but they were all WAY too expensive for this. The powerflash was reasonably priced, so I bought that and tried it. It worked for me, so I built the macros to work with it.
The only downside is the need for the power to be out for a few seconds for it to work. That was good enough for me, as the wall switch modules seemed to be able to cover a very brief outage. I've since replaced them all with Smarthome realy switches, which remember their state.
If anyone out there (with circuit experience - something I lack) wants to figure out a way to make the powerflash work EVERY time, even for a half-second outage, I'd be happy to try (especially if it does NOT involve opening the thing up and rewiring it).

Early on (when the AHP/CM15A support team was RESPONSIVE, and many of us were actually trading e-mails with them), I'd had lots of conversations with the X10 folks about this.
I had theorized that the CM15A MUST know when it loses AC power and when it gets it back, because it tracks how many minutes is has been running on battery backup. There MUST to be a way to tap into that signal, and use it as a trigger for a macro.
Mike Cole (Who really was the best help of all when it came to the early days of AHP and the CM15A - I wonder how much better the product might be today if the company had made him a good enough offer to stay around) agreed with me at the time, and had told me it would be passed along to the developers to look into.
I never did get an answer back, but then all of the developers left, too.

Perhaps someone at X10 will see this, and decide that it would be a useful thing to look into.

 
Logged

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: Help with Smart Macros
« Reply #5 on: February 04, 2009, 11:36:20 AM »

Following the long thread on detecting power interruption (Yes I remember it & think I even started one.) I too have a PowerFlash module with a wire bridging the contacts. My experiences are not 100 percent dependable, however.

....Early on (when the AHP/CM15A support team was RESPONSIVE, and many of us were actually trading e-mails with them), I'd had lots of conversations with the X10 folks about this.
I had theorized that the CM15A MUST know when it loses AC power and when it gets it back, because it tracks how many minutes is has been running on battery backup. There MUST to be a way to tap into that signal, and use it as a trigger for a macro.
Mike Cole (Who really was the best help of all when it came to the early days of AHP and the CM15A - I wonder how much better the product might be today if the company had made him a good enough offer to stay around) agreed with me at the time, and had told me it would be passed along to the developers to look into.
I never did get an answer back, but then all of the developers left, too.

Perhaps someone at X10 will see this, and decide that it would be a useful thing to look into.
I think that someone, not at X10, tried to write this off as something that would require a hardware/firmware update to the CM15A. I don't buy it. If a battery life remaining figure can change in AHP, then there should at least be a way to set a flag for that. i.e. There should be a way that software knows there has been a power outage.

Maybe Noam and I are the only ones that think that being able to detect power interruption would be a great idea but it doesn't hurt to bring it up again.

Partly because my computer is backed up for a few minutes with a UPS, for my use I'm more interested in detecting extended power outages. I'd like to be able to wire a Powerflash to send a signal only  after power has been restored for say 10-15 minutes. I'm also not crazy about multiple restore macros running if there are power flickers.

This brings up another question I have. If a macro is started, will it continue executing even if power is interrupted? Will a macro run under the battery backup of the CM15A? i.e. While I realize that the CM15A can't send a PLC when there's no power, does it go through the motions anyway? Will it start/complete macros under battery power? Is there an easy a way to test this?
« Last Edit: February 08, 2009, 02:27:15 AM by steven r »
Logged
BVC let's me tell my camera where to go!
:) Murphy is my beta testing pal. He helps me find problems whether I like it or not. :)

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Help with Smart Macros
« Reply #6 on: February 07, 2009, 07:00:49 PM »

From my testing, a power outage of more than a few seconds will ALWAYS trigger the powerflash. Less than that i when I get mixed results.
I would think (not that I am an electrical engineer, though) that you could build a circuit with a timer in in that would start when the power went back on, and only trigger the Powerflash after a certain number of minutes.
As for testing if the CM15A keeps running macros after power goes out, I guess you could write a macro that cycles a light on anand off every minute, for, say, 25 minutes.
Start it running (make sure it is working), then unplug the CM15a from the wall. Wait a minute or two, and then plug it back in. If it starts flashing the light again, it keeps running the macro. If not, then it stops running the macro when power goes out.
For me, I don't consider it a problem.
The If/then/else macros are written such that generally, only one would meet the proper conditions. Even if power went out in the middle of it running, and then came back, the whole macro only runs for a few seconds, at most.
Logged

nklght

  • Sr. Member
  • ****
  • Helpful Post Rating: 2
  • Posts: 126
Re: Help with Smart Macros
« Reply #7 on: March 29, 2009, 03:23:57 AM »

I use UPS battery backups at several locations, if you are concerned about power notification, I get a message via e-mail, text message, and voice robot, every time my power goes out for longer than 1 seconds and when power is restored.  Using an UPS and a dialer, your client can recieve a message that the house has lost power, and can call the house to turn the lights on after recieving the message that the power has been restored.   
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.