krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: November 11 2007 at 06:03 | IP Logged
|
|
|
These 2 Macros simulate Sun-Up and Sun-Down with a Standard X-10-Dimmer:
Code:
insert into macroheader values ('SIMSUNDOWN','SIMSUNDOWN',0,0,1);
insert into macrodetail values ('SIMSUNDOWN',1,9,'',NULL,'"Program DIM started"',1,'');
insert into macrodetail values ('SIMSUNDOWN',2,26,'',NULL,'Start',0,'');
insert into macrodetail values ('SIMSUNDOWN',3,31,'',NULL,'90',0,'');
insert into macrodetail values ('SIMSUNDOWN',4,38,'',0,'ph_devicebtn(x10,"M2",adim,string(p h_getx10level("M2") - 10))',0,'');
insert into macrodetail values ('SIMSUNDOWN',5,27,'',NULL,'if(ph_getx10level("M2") = 0,"Finish","Start") ',0,'');
insert into macrodetail values ('SIMSUNDOWN',6,36,'',NULL,'ph_getx10level ("M2")',0,'');
insert into macrodetail values ('SIMSUNDOWN',7,39,'',NULL,'',0,'');
insert into macrodetail values ('SIMSUNDOWN',8,26,'',NULL,'Finish',0,'');
insert into macrodetail values ('SIMSUNDOWN',9,9,'',NULL,'"Lamp Dimmed to 0%"',1,'');
insert into macrodetail values ('SIMSUNDOWN',10,39,'',NULL,'',0,'');
|
|
|
Here is Macro no. 2:
Code:
insert into macroheader values ('WAKEUP','wakeup',0,0,1);
insert into macrodetail values ('WAKEUP',1,26,'',NULL,'Start',0,'');
insert into macrodetail values ('WAKEUP',2,31,'',NULL,'90',0,'');
insert into macrodetail values ('WAKEUP',3,38,'',0,'ph_devicebtn(x10,"M2",adim,string(ph_ge tx10level("M2") + 10))',0,'');
insert into macrodetail values ('WAKEUP',4,27,'',NULL,'if(ph_getx10level("M2") = 100,"Finish","Start") ',0,'');
insert into macrodetail values ('WAKEUP',5,36,'',NULL,'ph_getx10level ("M2")',0,'');
insert into macrodetail values ('WAKEUP',6,39,'',NULL,'',0,'');
insert into macrodetail values ('WAKEUP',7,26,'',NULL,'Finish',0,'');
insert into macrodetail values ('WAKEUP',8,39,'',NULL,'',0,'');
|
|
|
replace the House-code and Unit-code with your own.
Peter
|