Please login or register.

Login with username, password and session length

Author Topic: Anyone have a "System Status" macro?  (Read 8894 times)

PajamaGuy

  • Hero Member
  • *****
  • Helpful Post Rating: 32
  • Posts: 522
Anyone have a "System Status" macro?
« on: August 09, 2008, 07:15:55 AM »

Suppose you had 10 monitored modules and you wanted to check the status of each one.  Suppose they were all DS10A's and you had them either as Security sensors, or via a V572, transceived to a monitored HC. 

So you have 10 modules, G1 - G10, and ON=Open, OFF=Closed.  You've already made 10 .bat files for the x10WavePlayer ("Door 1 is open.", Door 2 is open", etc)

You want to press 1 button and hear if a door is open (don't care about closed).  If all doors are open, all 10 batch files will play.

Can it be done within AHP and without using 10 flags and 10 macros?
Logged
PajamaGuy
Win-7 - Dell XPS -Automation
VA12a on a dedicated desktop - Video
XTB-IIR & V572RF32

Remote via LogMeIn (FREE) and Ignition

Elvis666

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 20
  • X10 Beginner - Computer Old-Timer
Re: Anyone have a "System Status" macro?
« Reply #1 on: August 09, 2008, 09:28:44 AM »

Why not put the if statement in another batch file(s)? I have not experience with DS10A, since I'm just getting into X10, but I have a lot of experience with batch files. If you will post one of your current batch files that check the individual modules, I think I could help you create a "master" batch file that check all 10, but only announces the open ones.

Elvis666
Logged
Coding since 1979

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: Anyone have a "System Status" macro?
« Reply #2 on: August 09, 2008, 11:09:44 AM »

PajamaGuy: Because ELSE macros tend to check each condition as oppose to stopping at the fist one that is true, I use a similar status set up for when I arm my security. On my security CM15A, all my doors & window sensors are on the monitored house code, so during my arming sequence it runs a macro that checks the state of each sensor. If any are open, then it sends my cell a text message for each one, and I have it set a flag to prevent the security system from continuing the arming process.

So far this has worked well. I have not tried it with running a ".bat" file for X10WavPlayer, so I don't know if it would run them all simultaneous or consecutive.
Logged

PajamaGuy

  • Hero Member
  • *****
  • Helpful Post Rating: 32
  • Posts: 522
Re: Anyone have a "System Status" macro?
« Reply #3 on: August 10, 2008, 11:36:03 AM »

Some people never learn – I’ve been typing a post for an hour – then I hit a wrong key and it’s gone = POOF.  So now I’m in Word – I’ll cut & paste.

Mr Puck!  You’re a genius!  Now I can run a status of my entire system with using only ONE address! 

“Multiple ELSE’s”
[/color][/size]
 - The oldtimers and other high-IQ folks can jus skip this.  For NewBee’s and those who are a tad slower, please read on.

…so you’re in bed and your wife says, “Did you close the garage door?” ………or you’re at work and you get a text message from your system saying, “Every Ting’s cool mon!”……….   

For any number of reasons, you want a macro that checks your system and reports back via a light flash, an email, BVC, whatever.  But you have 5 doors, 6 windows, and 3 lights you want to check – all at once, and you don’t want to write 14 different macros, with 14 addresses, 14 triggers, and 14 x howmany timers.

Here’s how – and it’s Mr. Puck’s idea, not mine – and it works!

Assumptions:

Always-on, Internet-connected PC running AHP with Smart Macros, On-Alert, and MyHouse Online plug-ins, with the CM15A connected.

You know a little about the 16 FLAGS, 16 MONITORED UnitCodes, and I-don’t-know-the-limit-of Installed Security Sensors.

You know that you can NOT test a conditional macro by clicking on it in AHP – you MUST trigger it by either a switch, or another macro (via an appliance call).

So here you go:

BACK-UP your AHX file.
Make a room called System Check (no you don’t have to – it’s just cleaner.
Pick an un-used, and un-MONITORED HC/UC – I’m using M3
If you want to only use 1 address, add a simple AM486 Appliance Module and give it “M3” as an address. 

Name it SystemCheckTrigger

Add a macro
================
Name is “AlwaysRun”
Trigger is M3-ON
Condition is NOTHING – this will always run
   
   DELAY – 1 Minute (More or less, the object is to delay long enough for all of the ELSE’s to complete)
   Set M3-OFF
Set M4-ON  (I’m not going to write it, but Switch M4 or an “Appliance Call” here is a trigger to a macro that looks at FLAG#6 (below) and performs an action, like flashing a light, to indicate that one of the ELSEs tested abnormal and you need to take further action)
================

Add an ELSE

================
Name is “Open Back Door”
Trigger is M3-ON
Condition is Security Sensor “Back Door” is TRIGGERED
   Send Email saying “Back Door Open”
      -or-
   Start x10WavPlayer
      -or-
   Use BVC to announce the door is open
      -or-
   Set FLAG #6 (or whatever FLAG you have available) -  Indicates you’ll need a light-flash when complete
================

Add an ELSE

================
Name is “Garage Light On”
Trigger is M3-ON
Condition is MONITORED module status for “Garage Light” is ON
   Send an Email
      -or-
   Do whatever you want
-or-
   Set FLAG #6 (or whatever FLAG you have available) -  Indicates you’ll need a light-flash when complete
================

Add an ELSE

================
Name is “The Liquor Cabinet Was Opened”
Trigger is M3-ON
Condition is FLAG #2 –SET  (FLAG #2 was set by a DS10A [mounted inside the cabinet] when the door was opened)
   Send an Email
      -or-
   Do whatever you want
-or-
   Set FLAG #6 (or whatever FLAG you have available) -  Indicates you’ll need a light-flash when complete
================

There's a lot more you can do with this concept - and I don't know how many simoultaneous macros will run.  And then there's those who want positive feedback - tell me if the door is CLOSED, the window SHUT, etc.

Can you imagine the bar bets - especially with BVC is your house was within site!
Logged
PajamaGuy
Win-7 - Dell XPS -Automation
VA12a on a dedicated desktop - Video
XTB-IIR & V572RF32

Remote via LogMeIn (FREE) and Ignition

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Anyone have a "System Status" macro?
« Reply #4 on: August 10, 2008, 12:46:58 PM »


“Multiple ELSE’s”
[/color][/size]

There's a lot more you can do with this concept - and I don't know how many simoultaneous macros will run.  And then there's those who want positive feedback - tell me if the door is CLOSED, the window SHUT, etc.

Can you imagine the bar bets - especially with BVC is your house was within site!

Brillant! I've been using BVC and a garage door reminder  for many months and love never again needing to check the garage door. Could your macro (or a version of it) be run [triggered] by a BVC Talking-Clock macro? Just thinking... out loud (in type).
« Last Edit: October 15, 2009, 01:56:00 AM by -Bill- (of wgjohns.com) »
Logged
Home Automation is an always changing technology
 

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