Page 4 of 8
Re: Denon AV Reciver - plugin
Posted: Thursday 28 July 2016 10:45
by cattoo
So here is my XML
Code: Select all
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<item>
<Power>
<value>STANDBY</value>
</Power>
<ZonePower>
<value>OFF</value>
</ZonePower>
<InputFuncList>
<value>SOURCE</value>
<value>TUNER</value>
<value>PHONO</value>
<value>CD</value>
<value>DVD</value>
<value>BD</value>
<value>TV</value>
<value>SAT</value>
<value>GAME</value>
<value>M-XPORT</value>
<value>VCR</value>
<value>AUX</value>
<value>NET/USB</value>
<value>CDR</value>
<value>SIRIUS</value>
<value>HDRADIO</value>
</InputFuncList>
<RenameSource>
<value/>
<value>TUNER</value>
<value>PHONO</value>
<value>CD</value>
<value>DVD</value>
<value>BD</value>
<value>TV</value>
<value>SAT</value>
<value>GAME</value>
<value>M-XPort</value>
<value>VCR</value>
<value>AUX1</value>
<value>NET/USB</value>
<value>CDR</value>
<value/>
<value/>
</RenameSource>
<RenameZone>
<value>MAIN ZONE</value>
</RenameZone>
<SourceDelete>
<value>DEL</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>DEL</value>
<value>DEL</value>
</SourceDelete>
<TopMenuLink>
<value>OFF</value>
</TopMenuLink>
<ModelId>
<value>1</value>
</ModelId>
<SalesArea>
<value>1</value>
</SalesArea>
<InputFuncSelect>
<value>TV</value>
</InputFuncSelect>
<NetFuncSelect>
<value>NET/USB</value>
</NetFuncSelect>
<InputFuncSelectMain>
<value>TV</value>
</InputFuncSelectMain>
<VolumeDisplay>
<value>Absolute</value>
</VolumeDisplay>
<MasterVolume>
<value>-38.5</value>
</MasterVolume>
<Mute>
<value>off</value>
</Mute>
<RemoteMaintenance>
<value>OFF</value>
</RemoteMaintenance>
<GameSourceDisplay>
<value>TRUE</value>
</GameSourceDisplay>
<LastfmDisplay>
<value>TRUE</value>
</LastfmDisplay>
</item>
Re: Denon AV Reciver - plugin
Posted: Thursday 28 July 2016 11:21
by trixwood
You should change the source input/surround names to match yours and any other xml change for your model.
And check if you have the files
denon.mainzone.settings
denon.net.settings
after you run denon.sh, that are the files the script downloads, it could be your model has another url for them anyway or the xml is has other options. For comparison my xml files:
http://$DENONIP/goform/formMainZone_MainZoneXml.xml
http://$DENONIP/goform/formNetAudio_StatusXml.xml
av1912 should give xml files:
formMainZone_MainZoneXml.xml
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<item>
<Power><value>STANDBY</value></Power>
<ZonePower><value>OFF</value></ZonePower>
<InputFuncList>
<value>SOURCE</value>
<value>TUNER</value>
<value>CD</value>
<value>NET/USB</value>
<value>DVD</value>
<value>BD</value>
<value>TV</value>
<value>SAT/CBL</value>
<value>DOCK</value>
<value>GAME2</value>
<value>GAME</value>
<value>V.AUX</value>
</InputFuncList>
<RenameSource>
<value></value>
<value>TUNER </value>
<value>CD </value>
<value>NET/USB </value>
<value>DVD </value>
<value>BD </value>
<value>TV </value>
<value>SAT/CBL </value>
<value>DOCK </value>
<value>GAME2 </value>
<value>GAME1 </value>
<value>V.AUX </value>
</RenameSource>
<RenameZone><value>MAIN ZONE
</value></RenameZone>
<SourceDelete>
<value>DEL</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
<value>USE</value>
</SourceDelete>
<TopMenuLink><value>OFF</value></TopMenuLink>
<ModelId><value>1</value></ModelId>
<SalesArea><value>1</value></SalesArea>
<InputFuncSelect><value>BD</value></InputFuncSelect>
<NetFuncSelect><value>RHAPSODY</value></NetFuncSelect>
<InputFuncSelectMain><value>BD</value></InputFuncSelectMain>
<selectSurround><value>DIRECT </value></selectSurround>
<SurroundLists>
<value index='' table='' param=''/>
<value index='DOLBY DIGITAL' table='Standard(Dolby)' param=''/>
<value index='DTS SURROUND' table='Standard(DTS)' param=''/>
<value index='DIRECT' table='Direct' param=''/>
<value index='PURE DIRECT' table='Pure Direct' param=''/>
<value index='STEREO' table='Stereo' param=''/>
<value index='MCH STEREO' table='Multi CH Stereo' param=''/>
<value index='VIRTUAL' table='Virtual' param=''/>
<value index='ROCK ARENA' table='Rock Arena' param=''/>
<value index='JAZZ CLUB' table='Jazz Club' param=''/>
<value index='MONO MOVIE' table='Mono Movie' param=''/>
<value index='VIDEO GAME' table='Video Game' param=''/>
<value index='MATRIX' table='Matrix' param=''/>
</SurroundLists>
<VolumeDisplay><value>Relative</value></VolumeDisplay>
<MasterVolume><value>-40.5</value></MasterVolume>
<Mute><value>off</value></Mute>
<RemoteMaintenance><value>OFF</value></RemoteMaintenance>
<GameSourceDisplay><value>TRUE</value></GameSourceDisplay>
<LastfmDisplay><value>FALSE</value></LastfmDisplay>
<SubwooferDisplay><value>FALSE</value></SubwooferDisplay>
<Zone2VolDisp><value>TRUE</value></Zone2VolDisp>
</item>
formNetAudio_StatusXml.xml
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<item>
<chFlag>
<value>0</value>
<value>8</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
</chFlag>
<szLine>
<value>Stereo</value>
<value>Favorites</value>
<value>Internet Radio</value>
<value>Media Server</value>
<value>Flickr</value>
<value>Napster</value>
<value></value>
<value></value>
<value> [ 1/5 ]</value>
<value></value>
</szLine>
<Art>
<value>0</value>
</Art>
<PartyStatus>
<value>3</value>
</PartyStatus>
<PresetLists>
<value index='0' skip='OFF' table='OFF' param=''/>
<value index='1' skip='' table='P1' param=''/>
<value index='2' skip='' table='P2' param=''/>
<value index='3' skip='' table='P3' param=''/>
<value index='1' skip='' table='A1' param=''/>
<value index='2' skip='' table='A2' param=''/>
<value index='3' skip='' table='A3' param=''/>
<value index='4' skip='' table='A4' param=''/>
<value index='5' skip='' table='A5' param=''/>
<value index='6' skip='' table='A6' param=''/>
<value index='7' skip='' table='A7' param=''/>
<value index='8' skip='' table='A8' param=''/>
<value index='9' skip='' table='B1' param=''/>
<value index='10' skip='' table='B2' param=''/>
<value index='11' skip='' table='B3' param=''/>
<value index='12' skip='' table='B4' param=''/>
<value index='13' skip='' table='B5' param=''/>
<value index='14' skip='' table='B6' param=''/>
<value index='15' skip='' table='B7' param=''/>
<value index='16' skip='' table='B8' param=''/>
<value index='17' skip='' table='C1' param=''/>
<value index='18' skip='' table='C2' param=''/>
<value index='19' skip='' table='C3' param=''/>
<value index='20' skip='' table='C4' param=''/>
<value index='21' skip='' table='C5' param=''/>
<value index='22' skip='' table='C6' param=''/>
<value index='23' skip='' table='C7' param=''/>
<value index='24' skip='' table='C8' param=''/>
<value index='25' skip='' table='D1' param=''/>
<value index='26' skip='' table='D2' param=''/>
<value index='27' skip='' table='D3' param=''/>
<value index='28' skip='' table='D4' param=''/>
<value index='29' skip='' table='D5' param=''/>
<value index='30' skip='' table='D6' param=''/>
<value index='31' skip='' table='D7' param=''/>
<value index='32' skip='' table='D8' param=''/>
<value index='33' skip='' table='E1' param=''/>
<value index='34' skip='' table='E2' param=''/>
<value index='35' skip='' table='E3' param=''/>
<value index='36' skip='' table='E4' param=''/>
<value index='37' skip='' table='E5' param=''/>
<value index='38' skip='' table='E6' param=''/>
<value index='39' skip='' table='E7' param=''/>
<value index='40' skip='' table='E8' param=''/>
<value index='41' skip='' table='F1' param=''/>
<value index='42' skip='' table='F2' param=''/>
<value index='43' skip='' table='F3' param=''/>
<value index='44' skip='' table='F4' param=''/>
<value index='45' skip='' table='F5' param=''/>
<value index='46' skip='' table='F6' param=''/>
<value index='47' skip='' table='F7' param=''/>
<value index='48' skip='' table='F8' param=''/>
<value index='49' skip='' table='G1' param=''/>
<value index='50' skip='' table='G2' param=''/>
<value index='51' skip='' table='G3' param=''/>
<value index='52' skip='' table='G4' param=''/>
<value index='53' skip='' table='G5' param=''/>
<value index='54' skip='' table='G6' param=''/>
<value index='55' skip='' table='G7' param=''/>
<value index='56' skip='' table='G8' param=''/>
</PresetLists>
<ExitPopup><value>0</value></ExitPopup>
<Rhapsody><value>0</value></Rhapsody>
<RhapsodySearch><value>0</value></RhapsodySearch>
<iRadio><value>0</value></iRadio>
<iRadioSearch><value>0</value></iRadioSearch>
<Napster><value>0</value></Napster>
<NapsterSearch><value>0</value></NapsterSearch>
<Flickr><value>0</value></Flickr>
<FlickrSearch><value>0</value></FlickrSearch>
<AddFlickrContact><value>0</value></AddFlickrContact>
<Pandora><value>0</value></Pandora>
<PandoraSearch><value>0</value></PandoraSearch>
<Lastfm><value>1</value></Lastfm>
<LastfmSearch><value>0</value></LastfmSearch>
<ModelId><value>1</value></ModelId>
<SalesArea><value>1</value></SalesArea>
<InputFuncSelect><value>BD</value></InputFuncSelect>
<NetFuncSelect><value>RHAPSODY</value></NetFuncSelect>
<InputFuncSelectMain><value>BD</value></InputFuncSelectMain>
<selectSurround><value>DIRECT </value></selectSurround>
<SurroundLists>
<value index='' table='' param=''/>
<value index='DOLBY DIGITAL' table='Standard(Dolby)' param=''/>
<value index='DTS SURROUND' table='Standard(DTS)' param=''/>
<value index='DIRECT' table='Direct' param=''/>
<value index='PURE DIRECT' table='Pure Direct' param=''/>
<value index='STEREO' table='Stereo' param=''/>
<value index='MCH STEREO' table='Multi CH Stereo' param=''/>
<value index='VIRTUAL' table='Virtual' param=''/>
<value index='ROCK ARENA' table='Rock Arena' param=''/>
<value index='JAZZ CLUB' table='Jazz Club' param=''/>
<value index='MONO MOVIE' table='Mono Movie' param=''/>
<value index='VIDEO GAME' table='Video Game' param=''/>
<value index='MATRIX' table='Matrix' param=''/>
</SurroundLists>
<VolumeDisplay><value>Relative</value></VolumeDisplay>
<MasterVolume><value>-40.5</value></MasterVolume>
<Mute><value>off</value></Mute>
<RemoteMaintenance><value>OFF</value></RemoteMaintenance>
<GameSourceDisplay><value>TRUE</value></GameSourceDisplay>
<LastfmDisplay><value>FALSE</value></LastfmDisplay>
<SubwooferDisplay><value>FALSE</value></SubwooferDisplay>
<Zone2VolDisp><value>TRUE</value></Zone2VolDisp>
</item>
Re: Denon AV Reciver - plugin
Posted: Thursday 28 July 2016 11:36
by cattoo
Well, thats the problem. I dont have theese files because the script dont run when ill try it manually on the pi. So i belive there is something in the script that the pie dont like. But in OSX all the stuffs are working, but need to change the input/surround names. But that i will do after i get it to work on the pi.
Re: Denon AV Reciver - plugin
Posted: Thursday 28 July 2016 11:43
by trixwood
I have no pi running at the moment. Will check when home, probably some incompatible mac/linux parameter in one of the command line utilities.
Re: Denon AV Reciver - plugin
Posted: Thursday 28 July 2016 12:03
by cattoo
So, it seems to be fixed for the moment. Ill took away the empty lines in the script and Voila it downloads the settings and posts in domoticz. Now ill just need to change the things that are not working.
Re: Denon AV Reciver - plugin
Posted: Thursday 28 July 2016 12:10
by trixwood
Re: Denon AV Reciver - plugin
Posted: Friday 29 July 2016 13:46
by gielie
Dear Trixwood,
The code looks really nice and i tried it on my X2100 in combination with my pi and Domoticz but i can't get it to work properly.
When i execute the Denon.sh both zone 1 and 2 goes on, i only want zone 1. Also the volume in my virtual slider goes to 600. When my Denon is already on and i execute the sh script, my Denon goes off and on.
Im able to change the volume via Domoticz but when i change the volume on my Denon the virtual dimmer won't update, it works one way only.
Could you post a more step by step tutorial and explain what kind of switches you create with what curl's in them? Maybe in the WIKI?
I also think not every Denon works the same way.
only one question left, do you now the link/script to select an Internet radio station, id like to change stations in my Domoticz.
Re: Denon AV Reciver - plugin
Posted: Friday 29 July 2016 18:03
by trixwood
Re: Denon AV Reciver - plugin
Posted: Friday 29 July 2016 18:09
by piokuc
Good option will be write widget for domoticz to control as is example for xbmc or panasonic tv
Re: Denon AV Reciver - plugin
Posted: Friday 29 July 2016 18:32
by trixwood
iRadio
I was looking at the iRadio thingy: This one is a newer description of the protocol:
https://github.com/jtangelder/denon-rem ... otocol.pdf
For internet radion look at page 22/23
i think if you have preset you can call the command
Code: Select all
Preset Call
**:00-55 00=CH01,55=CH56
NSB00<CR>
so try:
or
Code: Select all
http://10.0.0.1/goform/formiPhoneAppDirect.xml?NSB00
Re: Denon AV Reciver - plugin
Posted: Friday 29 July 2016 18:37
by trixwood
Widget? Tell me how to do that?
Re: Denon AV Reciver - plugin
Posted: Friday 29 July 2016 19:17
by piokuc
I dont know how do it becuase i dont know programming but i think about write to add control by add hardware and then add devices to tab. And on one widget as for xbmc should be slide all standard button.
I will see it as when we click on icon on widget on tabs light then will show menu/remote to control Denon. This solution is use for control XBMC.
Look like this:
https://www.google.pl/search?q=xbmc+dom ... VZRHTsM%3A
Re: Denon AV Reciver - plugin
Posted: Saturday 27 August 2016 12:36
by simon_rb
Hi all,
I am really confused on how to set this up. First I would like to get the volume and airplay settings working then add to it as I go. I have created a dummy 'Denon Volume' switch and set the on and off to mute the receiver which works correctly. I have created denon.sh, changed the pi and denon ip address then made it executable within domoticz/scripts folder. in domoticz/scripts/lua I have created a script called script_device_denon.lua. If I run the denon.sh manually it doesn't seem to update anything. Have I missed something. I'm using a Denon x2000 amp.
When I run scripts from terminal I get this:-
Code: Select all
pi@raspberrypi:~$ sudo bash /home/pi/domoticz/scripts/denon.sh
1
/home/pi/domoticz/scripts/denon.sh: line 153: bc: command not found
/home/pi/domoticz/scripts/denon.sh: line 161: 23
0
57
1017
100
00
45
0
23
0
23
0
1
0
0
0
0
0
0
2
10
0
1415
0
976
57
94
33
24
55
53
45
32
9606
359
14
0
85
25
31
34
22
14
52
47
2
1
94
18
58
35
41
88
56
43
3
0
90
16
0
25
5
45
16
0
27
0
48+1: syntax error in expression (error token is "0
57
1017
100
00
45
0
23
0
23
0
1
0
0
0
0
0
0
2
10
0
1415
0
976
57
94
33
24
55
53
45
32
9606
359
14
0
85
25
31
34
22
14
52
47
2
1
94
18
58
35
41
88
56
43
3
0
90
16
0
25
5
45
16
0
27
0
48+1")
pi@raspberrypi:~$
Cheers
Re: Denon AV Reciver - plugin
Posted: Saturday 27 August 2016 22:25
by trixwood
I use a math package to do some math...
But I still have to fix the code,

it sometimes switch itself on when it looses a connection... but when I wrote it, I was only a beginner at scripting... now I am a beginner++. And you should check the output of the xml files if the tags corresponds with with your model and change them for your model accordingly.
Re: Denon AV Reciver - plugin
Posted: Sunday 28 August 2016 0:51
by simon_rb
Did the above and the script runs the same and nothing happens lol. Am I missing something? Hmmmm lol The Lua script doesn't run either
2016-08-27 23:50:08.418 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_device_denon.lua: /home/pi/domoticz/scripts/lua/script_device_denon.lua:9: 'then' expected near '~'
Re: Denon AV Reciver - plugin
Posted: Sunday 28 August 2016 5:29
by trixwood
from denon.sh remove all occurences of:
that will show output!
and it if downloads any xml (if you have another model then 1912, urls could be different)
then it will be in these files:
Code: Select all
denon.mainzone.settings
denon.net.settings
The lua, is the virtual device a dimmer?
Re: Denon AV Reciver - plugin
Posted: Sunday 28 August 2016 10:24
by simon_rb
Yes mate is a dimmer.
Sent from my iPhone using Tapatalk
Re: Denon AV Reciver - plugin
Posted: Sunday 28 August 2016 12:37
by trixwood
Code: Select all
commandArray = {}
-- very laze here assume relative volume...
IP = '10.0.0.91'
if devicechanged['Denon Volume'] then
NewLevel = otherdevices_svalues['Denon Volume']
if NewLevel ~= "Off" and NewLevel ~= "0"
then
SendLevel = NewLevel - 79.5
os.execute ("curl http://" .. (IP) .. "/MainZone/index.put.asp?cmd0=PutSystem_OnStandby%2FON")
os.execute ("curl http://" .. (IP) .. "/MainZone/index.put.asp?cmd0=PutVolumeMute%2Foff")
os.execute ("curl http://" .. (IP) .. "/MainZone/index.put.asp?cmd0=PutMasterVolumeSet/" .. (SendLevel))
end
end
return commandArray
for some reason there is a space in the original post between devicechanged and ['Denon Volume']... dunno why... this is an exact copy from my event window... make sure you volume is set to relative,... (i was to lazy to code or test the absolute way, else remove the -79.5) also check if your model support these commands.. by testing it yourself in the browser:
http://10.0.0.91/MainZone/index.put.asp ... umeSet/-40
with your own ip... (please make sure it does not play any sound before testing volumes, you can monitor the volume change by either the denon web portal or if you use hdmi-cec on the display... )
for the denon script, remove what I said... you will see that your model probably has other names for the surround and the...
anyway. alas, support be gone... i am going offline for a while due to illness, (maybe even a very long time). So good luck! God speed and please post fixed for bugs here

Re: Denon AV Reciver - plugin
Posted: Sunday 28 August 2016 12:38
by simon_rb
Thanks for your help mate. Really sorry to hear your not well. From all of us on here, get better soon mate!
Sent from my iPhone using Tapatalk
Re: Denon AV Reciver - plugin
Posted: Monday 29 August 2016 13:24
by baekmark
Hi all
I'm new to Domoticz, but I'm getting there
I have been following this thread the last two month, and I have a Denon AVR-3312 that I would like to integrate into my Domoticz server.
My first question is, how to add the Virtual switches that is shown in this thread?
I like to see something like this.
1) Setup -- Add hardware how to etc
2) add Virtual switches How to
3) Where to place files
4) First Switch "PowerStatus" of Denon
I'm using Ubuntu 16.04 64bit
@trixwood, get well soon
Thanx in advance