Please login or register.

Login with username, password and session length

Author Topic: Add New Triggers - Power On Reset, Computer OnLine  (Read 20661 times)

OldSalt

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 15
Add New Triggers - Power On Reset, Computer OnLine
« on: March 04, 2011, 09:11:49 AM »


The timers in the interface may keep running, but are the commands stacked until the power is restored?

A Power On Reset trigger would allow us to write a macro to ensure all modules were in a known, desired state.  This trigger should be activated whenever AC power is retored to the CM15A.  Likewise, a computer on macro would allow the same thing to be done when the PC was rebooted.
Logged

dave w

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 139
  • Posts: 6116
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #1 on: March 04, 2011, 09:46:14 AM »

I do not use the CM15A and Active Home Pro any more, but recall that an internal flag in the CM15A is set upon power restoration. I think if you search the forum you will find more information about it.

BTW other automation programs i.e. "HomeSeer" for one, has power restoration routines built in the software.
Logged
"This aftershave makes me look fat"

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #2 on: March 04, 2011, 12:34:03 PM »

This is something I have been asking X10 about since 2004. I have been told that the CM15A does not have a way to detect when power is restored (although it MUST, since it tracks how long it was running on batteries - it just can't trigger a macro based on that).

For my own setup, I got around that limitation by using a PowerFlash module. I set it to "Input B" and "Mode 3," and put a short jumper between the contacts.
When power goes out for a few seconds - long enough for the internal capacitors to discharge - and then comes back on, it sends a single command to the powerline. That command triggers a set of If-Then-Else macros, that turn on or off the appropriate lights, based on the day and time. It works most of the time, but very short "blips" sometimes don't trigger it. I could improve it with a timing circuit, to impose a delay after the power comes back on, but I never got around to working that out.
Logged

OldSalt

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 15
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #3 on: March 09, 2011, 04:34:15 AM »

I saw previous requests for this feature.  I started this thread to add my voice to the crowd.

I'm hoping that eventually they'll listen, and that the CM15A can accept a firmware upgrade.

Some of us (including myself) have the technical savvy to implement work-arounds.  Others will walk away, seeking an easier solution.
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13294
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #4 on: March 09, 2011, 06:27:08 AM »

Firmware updates would be nice.
Though it would require a redesign of the CM15A. As right now it is hard coded in the controller chip. With no programming interface connections. That is if the CY7C63723 chip can be reprogrammed.

You have found the schematics for the CM15A on the FCC web site?
http://www.fcc.gov/oet/ea/fccid/
Grantee B4S
Product CM15A
Details Tab.
Logged

OldSalt

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 15
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #5 on: March 09, 2011, 07:24:31 AM »

The documentation says the CY7C63723 is a OTP (One Time Programmable) device.  Downloading a firmware upgrade is out of the question.  As the chip is soldered in, it's not upgradable by consumers.  The CM15A will need to be replaced to get new features.

This means that for the forseeable future we'll need to use an external trigger for Reset functions.  Rather than using a PowerFlash Module, I'm thinking along the lines of a Window/Door Sensor, coupled with a spare XCam2 Power supply, some timing circuitry and a relay.  The relay may even be present in the supply.  I'll need to look into this later.

As a side note, the 8K EPROM in the CY7C63723 is very likely used to store the Macros and Timers as tokens, with an interpreter to execute them stored in the OTP program memory.
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13294
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #6 on: March 09, 2011, 07:36:15 AM »

Yes that sounds logical.
I also know a few users that added some .1uf 50v caps on the logic power pins and main power supply caps. For possible noise problems.  As X10 left them out.
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #7 on: March 09, 2011, 09:49:38 AM »

For the most part, my PowerFlash solution has worked for me.
I still would like to build a timing circuit for it, so that it will wait a few seconds after power comes back on before triggering, but my dad's the EE, but he didn't have much time several years back to pursue it further, and the PowerFlash has been mostly working for me.
I may try to find some time to work with him again on this, as it would be much better to have an "instant off" and "delayed on" trigger for power outages.
Logged

dave w

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 139
  • Posts: 6116
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #8 on: March 09, 2011, 11:35:14 AM »

For the most part, my PowerFlash solution has worked for me.
I still would like to build a timing circuit for it, so that it will wait a few seconds after power comes back on before triggering, but my dad's the EE, but he didn't have much time several years back to pursue it further, and the PowerFlash has been mostly working for me.
I may try to find some time to work with him again on this, as it would be much better to have an "instant off" and "delayed on" trigger for power outages.

Noam, try Googling "Timer Relays",  There are relays operating on 120VAC that will delay accuation after power-up.
Logged
"This aftershave makes me look fat"

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #9 on: May 05, 2011, 02:03:08 PM »

The other reason I want a delay is that it seems that sometimes the XTB-IIR and CM15A take a few seconds to "boot up" after power comes on. If the PowerFlash sends its command too soon, they don't hear it.

I've been looking into this a bit more, and I'm going to try using a 555 timer circuit to trigger the PowerFlash after a short delay. If that works the way I want it to, then I should be good to go.

However, I think I may have found another solution.
The PC that I have connected to the CM15A is on a UPS, so it stays on through most of the shorter outages. With Windows 7's Tash Scheduler, I can trigger events based on the UPS power state (running on AC or running on battery). I'm currently using those triggers to send me e-mails to let me know when the ups switches to battery, and back to AC power, which is a pretty good indication of a power outage starting and ending.

I was thinking I could use those same triggers to activate my "power is back on" macros. I could have two scripts that run on the PC (not in AHP), one for power going out, and one when it comes back on. Here's how they would work (this is pseudo-code, not the actual CMD scripts):

Script 1: PowerWentOut (triggered by a switch from AC to Battery)
     Copy TempFlag.txt Flag.txt
(this sets a flag, in case power doesn't come back on before the battery gets low enough to shut the PC down)

Script 2: PowerCameBack (triggered by a switch from Battery to AC, AND at system boot-up)
    Pause 20 seconds (to allow more than enough time for the XTB-IIR and CM15A to come back online)
    If Flag.txt exists, then
        Send PLC command M1 On (my trigger address for the macros in the CM15A)
        Delete Flag.txt

The flag file is needed in case the outage lasts long enough for the PC to get shut down.
The second script would also run at startup, so if the flag gets set (start of power outage), and doesn't get cleared before the PC shuts down (during the power outage), then the macros will be run when the Pc boots back up (after power is restored).

It is probably not foolproof, but it is good as a backup for the PowerFlash method.
I don't think I'd implement this unless I can't get the 555 timer to work the way I want it to with the PowerFlash.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #10 on: December 02, 2011, 12:53:55 PM »

I know this is an old topic, but I thought I would post this suggestion in case anyone else comes along and is interested...

If you want to have a delayed action from when power is applied, you might consider just using a relay with a delay.  There are a number of different models available on ebay among other places for a very reasonable price.  I've heard about these being used in other areas very successfully (e.g., turn on a computer and then have the monitor turn on xxx seconds after that so that it only displays once it's ready to be used).

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Add New Triggers - Power On Reset, Computer OnLine
« Reply #11 on: December 02, 2011, 01:23:31 PM »

I know this is an old topic, but I thought I would post this suggestion in case anyone else comes along and is interested...

If you want to have a delayed action from when power is applied, you might consider just using a relay with a delay.  There are a number of different models available on ebay among other places for a very reasonable price.  I've heard about these being used in other areas very successfully (e.g., turn on a computer and then have the monitor turn on xxx seconds after that so that it only displays once it's ready to be used).

I kind of put this on the back burner for a while, although I might revisit it now that I have an Arduino (and I plan to interface it with my XTB-IIR).

I did (briefly) look into time-delay relays, but I couldn't get a definitive answer of what happens if the relay loses power DURING the delay. Does it start again when power is restored, or pick up where it left off?

Frequently, we will get "flickers" that are long enough to disrupt power to most devices (PCs, TV, some light modules), but not others. This can often happen right after the power comes back on (or right before it goes out). Ideally, whatever trigger could reset INSTANTLY when power is lost, so that it would trigger every time there is a momentary interruption.
For example, if my delay is set for 10 seconds, and power comes on, then goes out 4 seconds later for an instant, then comes on again, there should only be 1 trigger sent, 14 seconds AFTER the initial power-on (or 10 seconds after the "blip".

I'm thinking if I can figure out how to get the Arduino to monitor the power line (and send the delayed command via the digital port on the XTB-IIR), then all I need to do is figure out how to power it during an outage. Perhaps I can run it off a 12v battery, with a trickle-charger (poor-man's UPS).
Logged
 

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