Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Macros, Scripts, and Formulas Repository
 PowerHome Messageboard : PowerHome Macros, Scripts, and Formulas Repository
Subject Topic: Simulated Sun-UP and Down Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: November 11 2007 at 06:03 | IP Logged Quote krommetje

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
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum