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: Denon, RS232 and PH Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: December 19 2008 at 13:40 | IP Logged Quote nadler

My Denon AVR-3805 Receiver is connected from its RS232
port to an RS232 port on my PH PC.

PH controls the Receiver using the following macros. In
my case the the RS232 Port on my PC is Com Port 1 (the
second parameter in the ph_comopen function). You
should
change it to your correct Com Port.

This should work with most Denon receivers and it's
easily modifiable to work with other equipment you want
to control with RS232 commands.

To Turn Denon On

Code:
insert into macroheader values ('RPOWER
ON','RECEIVER POWER ON',0,0,1);
insert into macrodetail values ('RPOWER
ON',1,38,'',NULL,'ph_comopen(2,1,9600,"N",8,1,1,0,0,0,0,
0,0,"?","")',0,'');
insert into macrodetail values ('RPOWER
ON',2,38,'',NULL,'ph_comsendstring(2,"PWON\013")',0,'');
insert into macrodetail values ('RPOWER
ON',3,38,'',NULL,'ph_comclose(2)',0,'');


To Turn Denon to Standby
Code:

insert into macroheader values ('RPOWER
STANDBY','RECEIVER STANDBY',0,0,1);
insert into macrodetail values ('RPOWER
STANDBY',1,38,'',NULL,'ph_comopen(2,1,9600,"N",8,1,1,0,0
,0,0,0,0,"?","")',0,'');
insert into macrodetail values ('RPOWER
STANDBY',2,38,'',NULL,'ph_comsendstring(2,"PWSTANDBY\013
")',0,'');
insert into macrodetail values ('RPOWER
STANDBY',3,38,'',NULL,'ph_comclose(2)',0,'');


To Turn Denon Volume Up
(Note create a global variable RVOL first to hold the
vol number)
Code:

insert into macroheader values ('RVOL UP','RECEIVER MUTE
OFF',0,0,1);
insert into macrodetail values ('RVOL
UP',1,38,'',0,'ph_comopen(2,1,9600,"N",8,1,1,0,0,0,0,0,0
,"?","")',0,'');
insert into macrodetail values ('RVOL
UP',2,15,'[LOCAL2]',NULL,'"MV"+(ph_getglobal_n("RVOL")+5
)+"\013"',0,'');
insert into macrodetail values ('RVOL
UP',3,38,'',1,'ph_comsendstring(2,"[LOCAL2]")',0,'');
insert into macrodetail values ('RVOL
UP',4,10,'RVOL',NULL,'(ph_getglobal_n("RVOL")+5)',0,'');
insert into macrodetail values ('RVOL
UP',5,38,'',NULL,'ph_comclose(2)',0,'');
insert into macroheader values ('RVOL UP','RECEIVER MUTE
OFF',0,0,1);
insert into macrodetail values ('RVOL
UP',1,38,'',0,'ph_comopen(2,1,9600,"N",8,1,1,0,0,0,0,0,0
,"?","")',0,'');
insert into macrodetail values ('RVOL
UP',2,15,'[LOCAL2]',NULL,'"MV"+(ph_getglobal_n("RVOL")+5
)+"\013"',0,'');
insert into macrodetail values ('RVOL
UP',3,38,'',1,'ph_comsendstring(2,"[LOCAL2]")',0,'');
insert into macrodetail values ('RVOL
UP',4,10,'RVOL',NULL,'(ph_getglobal_n("RVOL")+5)',0,'');
insert into macrodetail values ('RVOL
UP',5,38,'',NULL,'ph_comclose(2)',0,'');


To Turn Denon Volume Down
Code:

insert into macroheader values ('RVOL DOWN','RECEIVER
MUTE OFF',0,0,1);
insert into macrodetail values ('RVOL
DOWN',1,38,'',0,'ph_comopen(2,1,9600,"N",8,1,1,0,0,0,0,0
,0,"?","")',0,'');
insert into macrodetail values ('RVOL
DOWN',2,15,'[LOCAL1]',NULL,'"MV"+(ph_getglobal_n("RVOL")
-5)+"\013"',0,'');
insert into macrodetail values ('RVOL
DOWN',3,38,'',1,'ph_comsendstring(2,"[LOCAL1]")',0,'');
insert into macrodetail values ('RVOL
DOWN',4,10,'RVOL',NULL,'(ph_getglobal_n("RVOL")-
5)',0,'');
insert into macrodetail values ('RVOL
DOWN',5,38,'',1,'ph_comclose(2)',0,'');
insert into macrodetail values ('RVOL
DOWN',6,39,'',NULL,'',0,'');


Mute On and Mute Off

Code:

insert into macroheader values ('RMUTE TOGGLE','RECEIVER
MUTE OFF',0,0,1);
insert into macrodetail values ('RMUTE
TOGGLE',14,38,'',NULL,'ph_comopen(2,1,9600,"N",8,1,1,0,0
,0,0,0,0,"?","")',0,'');
insert into macrodetail values ('RMUTE
TOGGLE',15,38,'',NULL,'ph_comsendstring(2,"MUON\013")',0
,'');
insert into macrodetail values ('RMUTE
TOGGLE',16,38,'',NULL,'ph_comclose(2)',0,'');
insert into macrodetail values ('RMUTE
TOGGLE',21,38,'',NULL,'ph_comopen(2,1,9600,"N",8,1,1,0,0
,0,0,0,0,"?","")',0,'');
insert into macrodetail values ('RMUTE
TOGGLE',22,38,'',NULL,'ph_comsendstring(2,"MUOFF\013")',
0,'');
insert into macrodetail values ('RMUTE
TOGGLE',23,38,'',NULL,'ph_comclose(2)',0,'');


To Tune Denon Down 1 station
Code:

insert into macroheader values ('RTUNER DOWN','RECEIVER
TUNER- DOWN',0,0,1);
insert into macrodetail values ('RTUNER
DOWN',2,38,'',0,'ph_comopen(2,1,9600,"N",8,1,1,0,0,0,0,0
,0,"?","")',0,'');
insert into macrodetail values ('RTUNER
DOWN',3,38,'',0,'ph_comsendstring(2,"TPDOWN\013")',0,'')
;
insert into macrodetail values ('RTUNER
DOWN',4,38,'',0,'ph_comclose(2)',0,'');


Noel

Edited by nadler - December 19 2008 at 13:43
Back to Top View nadler's Profile Search for other posts by nadler
 

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