| krommetje Super User
 
  
  
 Joined: December 29 2004
 Location: Netherlands
 Online Status: Offline
 Posts: 695
 | 
          Hey Guys,
           | Posted: October 19 2013 at 11:20 | IP Logged |   |  
           | 
 |  
 I want your opinion on a matter I have been working on.
 My eagleeye sends an x10-on when we enter the house, this in turn triggers a macro which has to find out the following:
 
 My phone has to be on the network
 AND / OR
 My Wife's phone has to be on the network
 AND / OR
 in certain matters my mother in-law can enter the house
 
 The network-part of the Macro is ready....
 
 So far I have come up with this code:
 
 
 
| Code: 
 
    
    | 
      
       | insert into macroheader values ('K9ONANDROID','K9ONANDROID',0,0,1);
 insert into macrodetail values  ('K9ONANDROID',1,38,'',0,'ph_setglobal_a("COUNTDOWN",30)',0, '','');
 insert into macrodetail values ('K9ONANDROID',2,26,'',NULL,'INCREMENT',0,'','');
 insert into macrodetail values ('K9ONANDROID',3,31,'',NULL,'1',0,'','');
 insert into macrodetail values ('K9ONANDROID',4,38,'',0,'ph_addtoglobal("COUNTDOWN", - 1)',0,'','');
 insert into macrodetail values ('K9ONANDROID',5,16,'',NULL,'if([X10STATK6]=2, 1,6)',0,'','');
 insert into macrodetail values ('K9ONANDROID',6,27,'',NULL,'if([X10STATV5]=2, "END","INCREMENT")',0,'','');
 insert into macrodetail values ('K9ONANDROID',7,27,'',NULL,'if([X10STATV7]=2, "END","INCREMENT")',0,'','');
 insert into macrodetail values ('K9ONANDROID',8,27,'',NULL,'if([X10STATV6]=2, "END","INCREMENT")',0,'','');
 insert into macrodetail values  ('K9ONANDROID',9,27,'',NULL,'if({COUNTDOWN}=0,"END","INCREME NT")',0,'','');
 insert into macrodetail values ('K9ONANDROID',10,26,'',NULL,'END',0,'','');
 insert into macrodetail values ('K9ONANDROID',11,38,'',0,'ph_setglobal_a("COUNTDOWN"," ")',0,'','');
 insert into macrodetail values ('K9ONANDROID',12,1,'K9ON',0,'',0,'','');
 insert into macrodetail values ('K9ONANDROID',13,36,'',NULL,'"Camera is off"',0,'','');
 
 |  |  |  
 K6 is the surveillancecam
 V5,6 and 7 are Virtual X10's for Android phones.
 The macro for the status of the phones on the network runs every mimnute....
 if one of the phones is on the network when a K9on is received, the macro has 30sec to do this, e.g. the surveillance camera has to be turned off, else an alarm has to be given...
 
 Do you understand what I am getting at?
 
 the last line of code is a temporary line to allow for more code.
 
 What can I do to extend this macro?
 
 
 Edited by krommetje - October 19 2013 at 12:04
 |