domoticz an denon

Post Reply
pvklink
Posts: 141
Joined: Wednesday 12 November 2014 16:01
Target OS: Raspberry Pi
Domoticz version:
Contact:

domoticz an denon

Post by pvklink » Wednesday 25 January 2017 14:45

I can send actions to my denon receiver, on off, inputs like ituner etc.
Does anybody know how to acticate a radiochannel with http commands?

I use commands like http://192.168.178.176/MainZone/index.p ... tion/TUNER to control my denon...

User avatar
Egregius
Posts: 2747
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: domoticz an denon

Post by Egregius » Thursday 26 January 2017 0:20

Google or denon protocol and you'll find a pdf with all commands.

pvklink
Posts: 141
Joined: Wednesday 12 November 2014 16:01
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: domoticz an denon

Post by pvklink » Thursday 26 January 2017 21:36

I read the protocol and these are telnet commands i think
for example with ZMFAVORITE1 i can activate my favorite1 or TFAN008750 is to play fm frequency 8750

When combining these commands with HTTP
http://192.168.178.176/MainZone/index.p ... MFAVORITE1
http://192.168.178.176/MainZone/index.p ... TFAN008750
nothings happens !

Are the HTTP commands different then the protocol commands?

User avatar
Dnpwwo
Posts: 767
Joined: Sunday 23 March 2014 10:00
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: domoticz an denon

Post by Dnpwwo » Friday 27 January 2017 1:38

@pvklink,

The protcol commands are completely different from the HTTP interface and are designed to allow the Denon to be automated. They need to be sent over the telnet port (23) not the http port (80).

If you search the forum you will find there a number of solutions out there that may do what you want.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw

User avatar
Egregius
Posts: 2747
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: domoticz an denon

Post by Egregius » Friday 27 January 2017 8:01

In PHP the telnet command would look like:

Code: Select all

<?php

denon('TFAN008750');

function denon($cmd){for($x=1;$x<=10;$x++)if(denontcp($cmd,$x))break;}
function denontcp($cmd,$x){
    $sleep=102000*$x;
    $socket=fsockopen("192.168.2.4","23",$errno,$errstr,2);
    if($socket){fputs($socket, "$cmd\r\n");fclose($socket);usleep($sleep);return true;}
    else{usleep($sleep);echo 'sleeping '.$sleep.'<br>';return false;}
}
?>
Function denon runs in a loop until function denontcp returns true. This because sometimes the interface doesn't respond directly. The 102000 microseconds sleep is then used, found that value by trial/error.

pvklink
Posts: 141
Joined: Wednesday 12 November 2014 16:01
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: domoticz an denon

Post by pvklink » Saturday 28 January 2017 12:58

I have debugged the inside webinterface from my receiver and found some http commands

http://192.168.178.176/MainZone/index.p ... eStatus%2F

change <parameter> for:

PutSurroundMode/DOLBY DIGITAL
PutSurroundMode/MCH STEREO
PutSurroundMode/MOVIE
PutSurroundMode/MUSIC
PutSurroundMode/GAME
PutSurroundMode/PURE DIRECT
PutSurroundMode/DIRECT
PutSurroundMode/STEREO
PutSurroundMode/STANDARD
PutSurroundMode/SIMULATION
PutSurroundMode/AUTO
PutSurroundMode/LEFT
PutSurroundMode/STEREO

PutSystem_OnStandby/ON

PutZone_OnOff/OFF
PutZone_OnOff/ON
PutZone_InputFunction/GAME
PutZone_InputFunction/SAT%2FCBL
PutZone_InputFunction/FMPLAY
PutZone_InputFunction/DVD
PutZone_InputFunction/TUNER
PutZone_InputFunction/TV
PutZone_InputFunction/MPLAY
PutZone_InputFunction/IRADIO
PutZone_InputFunction/NETHOME


http://192.168.178.176/Tuner/TUNER/inde ... eStatus%2F

change <parameter> for:
PutTunerFrequency%2F009540

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests