Plugin Denon AVR-X2100W
Moderator: leecollings
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Plugin Denon AVR-X2100W
@l00pz,
@oohlaf reported the -273.1499 bug in Domoticz (not the plugin) and suggested a fix, a pull request is waiting to be merged.
Can you give the next beta version a go and I will have another look at the plugin if it still doesn't work.
@oohlaf reported the -273.1499 bug in Domoticz (not the plugin) and suggested a fix, a pull request is waiting to be merged.
Can you give the next beta version a go and I will have another look at the plugin if it still doesn't work.
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
- gielie
- Posts: 290
- Joined: Tuesday 12 January 2016 11:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest β
- Location: The Netherlands (Alkmaar)
- Contact:
Re: Plugin Denon AVR-X2100W
I tried the new beta but still no luck with the volume.
And neither with the input selector
Another error in the script
Code: Select all
2017-02-21 16:21:24.073 User: Machiel initiated a switch command (301/Denon AVR X-2100 - Main Volume/Set Level)
2017-02-21 16:21:24.079 (Denon AVR X-2100) Calling message handler 'onCommand'.
2017-02-21 16:21:24.080 (Denon AVR X-2100) onCommand called for Unit 3: Parameter 'Set Level', Level: -273.1499938964844
2017-02-21 16:21:24.080 (Denon AVR X-2100) Sending data: 'MV-273.1499938964844 '.
Code: Select all
2017-02-21 16:22:36.185 User: Machiel initiated a switch command (300/Denon AVR X-2100 - Main Zone/Set Level)
2017-02-21 16:22:36.222 (Denon AVR X-2100) Calling message handler 'onCommand'.
2017-02-21 16:22:36.223 (Denon AVR X-2100) onCommand called for Unit 2: Parameter 'Set Level', Level: -273.1499938964844
2017-02-21 16:22:36.223 Error: (Denon AVR X-2100) 'onCommand' failed 'KeyError'.
2017-02-21 16:22:36.223 Error: (Denon AVR X-2100) ----> Line 213 in /home/pi/domoticz/plugins/Denon/plugin.py, function onCommand
Another error in the script
Code: Select all
2017-02-21 16:37:17.202 User: Machiel initiated a switch command (300/Denon AVR X-2100 - Main Zone/Set Level)
2017-02-21 16:37:17.247 (Denon AVR X-2100) Calling message handler 'onCommand'.
2017-02-21 16:37:17.247 (Denon AVR X-2100) onCommand called for Unit 2: Parameter 'Set Level', Level: -273.1499938964844
2017-02-21 16:37:17.248 Error: (Denon AVR X-2100) 'onCommand' failed 'KeyError'.
2017-02-21 16:37:17.248 Error: (Denon AVR X-2100) ----> Line 213 in /home/pi/domoticz/plugins/Denon/plugin.py, function onCommand
2017-02-21 16:37:18.450 (Denon AVR X-2100) Calling message handler 'onHeartbeat'.
2017-02-21 16:37:18.451 (Denon AVR X-2100) onHeartbeat: lastMessage PW, Sending 'ZM'.
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
-
- Posts: 42
- Joined: Wednesday 01 April 2015 11:52
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: Plugin Denon AVR-X2100W
@gielie The latest Pull Request hasn't been merged yet, so we need to wait for this.
- gielie
- Posts: 290
- Joined: Tuesday 12 January 2016 11:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest β
- Location: The Netherlands (Alkmaar)
- Contact:
Re: Plugin Denon AVR-X2100W
Oh haha, ill wait.
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
-
- Posts: 42
- Joined: Wednesday 01 April 2015 11:52
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: Plugin Denon AVR-X2100W
@Dnwwwo the Plugin seems to be working now in the latest commit! Thanks 

- gielie
- Posts: 290
- Joined: Tuesday 12 January 2016 11:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest β
- Location: The Netherlands (Alkmaar)
- Contact:
Re: Plugin Denon AVR-X2100W
I updated to the latest beta and its working, yeah, tanks.
There is only 1 inconvenience, when I turn on the main device, zone 2 turns on. And when I turn off the main device, zone 2 won't turn off. I have to manually turn off zone 2.
I created a script when main zone is off turn zone 2 off.
Is there a better solution?
There is only 1 inconvenience, when I turn on the main device, zone 2 turns on. And when I turn off the main device, zone 2 won't turn off. I have to manually turn off zone 2.
I created a script when main zone is off turn zone 2 off.
Is there a better solution?
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
-
- Posts: 71
- Joined: Monday 12 October 2015 15:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10232
- Contact:
Re: Plugin Denon AVR-X2100W
I can confirm the same, briliant !l00pz wrote:@Dnwwwo the Plugin seems to be working now in the latest commit! Thanks
Any plans to add Surround Modes into a Selector switch too? I'm not up to speed on python, but it would seems possible to do this same way as the Source Input selector.
Have this plugin running on a Marantz NR1602 without flaws now. Previously had a lot of LUA and xml parsing done to get this same result.
Great work ! Save me a bunch.
Ray
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Plugin Denon AVR-X2100W
@gielie,
Although my amp has 3 zones I only use 1. I just added the other code in there to show what could be done. I've had a look at the code and there is nothing obvious so you will need to post a log with debug turned on to help me spot the problem.
I thought I was treating the zones as separate so the amp shouldn't turn off until all zones are turned off (which seems to line up with what you are seeing) but if the power is off and a command is recieved, I send Power On which I thought would restore it to the last state. This works for one zone but maybe not multi-zone.
Perhaps I should try sending the specific zone on command not Power On to see if that works better. The manual is rubbish unfortunately so I'll need to play a bit.
@raymond,
Didn't realise this would work on Marantz as well. Happy days !
Is that set per zone or just at the amp level? There is no reason it wouldn't work
Although my amp has 3 zones I only use 1. I just added the other code in there to show what could be done. I've had a look at the code and there is nothing obvious so you will need to post a log with debug turned on to help me spot the problem.
I thought I was treating the zones as separate so the amp shouldn't turn off until all zones are turned off (which seems to line up with what you are seeing) but if the power is off and a command is recieved, I send Power On which I thought would restore it to the last state. This works for one zone but maybe not multi-zone.
Perhaps I should try sending the specific zone on command not Power On to see if that works better. The manual is rubbish unfortunately so I'll need to play a bit.
@raymond,
Didn't realise this would work on Marantz as well. Happy days !
Is that set per zone or just at the amp level? There is no reason it wouldn't work
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
-
- Posts: 71
- Joined: Monday 12 October 2015 15:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10232
- Contact:
Re: Plugin Denon AVR-X2100W
Yes works on Marantz also
. The protocol and Parameter list is exactly the same, though SOURCE names are different, but that is also true for different Denon models I believe.
The Selector Switch for SOURCES and the SI command work the same way on my Marantz NR1602, same goes for MV, PW and ZM/Z2 commands.
Selecting the surround mode would work like the SOURCE INPUT you already have implemented. Creating another Selector Switch like the SOURCE INPUT but with different names (DOLBY, DTS, STEREO, AUTO etc.) would do the trick, along with the MS command sent instead of SI (Page 12 and 29 of the protocol.pdf shared earlier)
I'm happy as is, but if you're looking to implement more features, this would be on my list. I've seen folks getting into the PS command which handles all equalizer stuff, but that wouldn't have my initial interest.
Cheers,
Ray

The Selector Switch for SOURCES and the SI command work the same way on my Marantz NR1602, same goes for MV, PW and ZM/Z2 commands.
Selecting the surround mode would work like the SOURCE INPUT you already have implemented. Creating another Selector Switch like the SOURCE INPUT but with different names (DOLBY, DTS, STEREO, AUTO etc.) would do the trick, along with the MS command sent instead of SI (Page 12 and 29 of the protocol.pdf shared earlier)
I'm happy as is, but if you're looking to implement more features, this would be on my list. I've seen folks getting into the PS command which handles all equalizer stuff, but that wouldn't have my initial interest.
Cheers,
Ray
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: Plugin Denon AVR-X2100W
I am using the script for my Marantz NR1604 and it all seems to work.
I only get the error messages in the log like: Unknown message '@P' ignored. See the detailled log below.
I am using the latest beta v3.6807 and updated the Sources field with the right sources from my Marantz (copied the names from the web gui of the Marantz).
Any ideas how to fix this? Or is this something specific for the Marantz?
I only get the error messages in the log like: Unknown message '@P' ignored. See the detailled log below.
I am using the latest beta v3.6807 and updated the Sources field with the right sources from my Marantz (copied the names from the web gui of the Marantz).
Any ideas how to fix this? Or is this something specific for the Marantz?
Code: Select all
2017-02-28 22:54:12.908 (Marantz) onMessage called with Data: '@PWR:1'
2017-02-28 22:54:12.908 Error: (Marantz) Unknown message '@P' ignored.
2017-02-28 22:54:22.324 (Marantz) Calling message handler 'onHeartbeat'.
2017-02-28 22:54:22.324 (Marantz) onHeartbeat: lastMessage PW, Sending 'ZM'.
2017-02-28 22:54:22.324 (Marantz) Sending data: 'ZM? '.
2017-02-28 22:54:22.375 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:22.375 (Marantz) onMessage called with Data: 'ZMOFF'
2017-02-28 22:54:22.375 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:22.375 (Marantz) onMessage called with Data: '@PWR:1'
2017-02-28 22:54:22.375 Error: (Marantz) Unknown message '@P' ignored.
2017-02-28 22:54:32.359 (Marantz) Calling message handler 'onHeartbeat'.
2017-02-28 22:54:32.359 (Marantz) onHeartbeat: lastMessage ZM, Sending 'SI'.
2017-02-28 22:54:32.359 (Marantz) Sending data: 'SI? '.
2017-02-28 22:54:32.427 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:32.427 (Marantz) onMessage called with Data: 'SITV'
2017-02-28 22:54:32.427 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:32.427 (Marantz) onMessage called with Data: '@SRC:11'
2017-02-28 22:54:32.427 Error: (Marantz) Unknown message '@S' ignored.
2017-02-28 22:54:32.427 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:32.427 (Marantz) onMessage called with Data: 'PSMDAX OFF'
2017-02-28 22:54:32.477 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:32.477 (Marantz) onMessage called with Data: '@MDA:1'
2017-02-28 22:54:32.477 Error: (Marantz) Unknown message '@M' ignored.
2017-02-28 22:54:32.527 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:32.527 (Marantz) onMessage called with Data: 'SVOFF'
2017-02-28 22:54:42.344 (Marantz) Calling message handler 'onHeartbeat'.
2017-02-28 22:54:42.344 (Marantz) onHeartbeat: lastMessage SI, Sending 'MV'.
2017-02-28 22:54:42.344 (Marantz) Sending data: 'MV? '.
2017-02-28 22:54:42.394 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:42.394 (Marantz) onMessage called with Data: 'MV56'
2017-02-28 22:54:42.394 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:42.394 (Marantz) onMessage called with Data: '@VOL:-240'
2017-02-28 22:54:42.394 Error: (Marantz) Unknown message '@V' ignored.
2017-02-28 22:54:42.462 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:42.462 (Marantz) onMessage called with Data: 'MVMAX 97'
2017-02-28 22:54:42.462 (Marantz) Unknown: Action MV, Detail 'MAX 97' ignored.
2017-02-28 22:54:52.329 (Marantz) Calling message handler 'onHeartbeat'.
2017-02-28 22:54:52.329 (Marantz) onHeartbeat: lastMessage MV, Sending 'MU'.
2017-02-28 22:54:52.329 (Marantz) Sending data: 'MU? '.
2017-02-28 22:54:52.379 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:52.379 (Marantz) onMessage called with Data: 'MUOFF'
2017-02-28 22:54:52.379 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:54:52.379 (Marantz) onMessage called with Data: '@AMT:1'
2017-02-28 22:54:52.379 Error: (Marantz) Unknown message '@A' ignored.
2017-02-28 22:55:02.361 (Marantz) Calling message handler 'onHeartbeat'.
2017-02-28 22:55:02.361 (Marantz) onHeartbeat: lastMessage MU, Sending 'PW'.
2017-02-28 22:55:02.361 (Marantz) Sending data: 'PW? '.
2017-02-28 22:55:02.428 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:55:02.428 (Marantz) onMessage called with Data: 'PWSTANDBY'
2017-02-28 22:55:02.428 (Marantz) Calling message handler 'onMessage'.
2017-02-28 22:55:02.428 (Marantz) onMessage called with Data: '@PWR:1'
2017-02-28 22:55:02.428 Error: (Marantz) Unknown message '@P' ignored.
Not using Domoticz anymore
-
- Posts: 71
- Joined: Monday 12 October 2015 15:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10232
- Contact:
Re: Plugin Denon AVR-X2100W
I have the same thing on my NR1602 indeed. I do not know if I did something wrong or if it's just the Marantz. Everything else works flawless.G3rard wrote:I am using the script for my Marantz NR1604 and it all seems to work.
I only get the error messages in the log like: Unknown message '@P' ignored. See the detailled log below.
I am using the latest beta v3.6807 and updated the Sources field with the right sources from my Marantz (copied the names from the web gui of the Marantz).
Any ideas how to fix this? Or is this something specific for the Marantz?
Ray
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Plugin Denon AVR-X2100W
@raymond & @G3rard,
The plugin will be fine because this is just the warning when it sees something unexpected and isn't in 'ignoreMessages' on line 57.
Given that it appears more amps than I expected can use this maybe 'ignoreMessages' should be a parameter. I'm a little tied up on something else at the moment and can look at it in a few days maybe.
The plugin will be fine because this is just the warning when it sees something unexpected and isn't in 'ignoreMessages' on line 57.
Given that it appears more amps than I expected can use this maybe 'ignoreMessages' should be a parameter. I'm a little tied up on something else at the moment and can look at it in a few days maybe.
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
-
- Posts: 71
- Joined: Monday 12 October 2015 15:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10232
- Contact:
Re: Plugin Denon AVR-X2100W
I don't mind the message, it clogs up the log a bit, but all works fine!
Ray
Ray
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: Plugin Denon AVR-X2100W
@Dnpwwo, I have added @P|@M|@S|@V|@A to the ignoreMessages in the plugin and then it's working fine
Also tried to add that field to the parameters by adding
and on line 57
but that gives a NameError in the log.
Can you point me in the right direction (sorry no Python knowledge yet...).

Also tried to add that field to the parameters by adding
Code: Select all
<param field="Ignore" label="Ignore Messages" width="550px" required="true" default="|SS|SV|SD|MS|PS|CV|@P|@M|@S|@V|@A|"/>
Code: Select all
ignoreMessages = str(Parameters["Ignore"])
Code: Select all
2017-03-09 00:27:48.637 Error: (Denon4306) failed to load 'plugin.py', Python Path used was '/home/gerard/domoticz/plugins/Denon/:/usr/lib/python3.4/:/usr/lib/python3.4/plat-x86_64-linux-gnu:/usr/lib/python3.4/lib-dynload'.
2017-03-09 00:27:48.637 Error: (Marantz) Module Import failed, exception: 'NameError'
Not using Domoticz anymore
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Plugin Denon AVR-X2100W
@G3rard,
The field name needs to be one that Domoticz knows about. Have a look at http://www.domoticz.com/wiki/Developing ... Definition for the list of valid values.
I'm working on another version and was going to do a simpler fix which was to make it just log the message when debugging was turned on (which is probably when it is more useful than the current one)
The field name needs to be one that Domoticz knows about. Have a look at http://www.domoticz.com/wiki/Developing ... Definition for the list of valid values.
I'm working on another version and was going to do a simpler fix which was to make it just log the message when debugging was turned on (which is probably when it is more useful than the current one)
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
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: Plugin Denon AVR-X2100W
Thanks, didn't read that part of the wiki indeed...
However after changing the name to Mode4 or Mode5 I still get the same error
I will just wait for your new version.
However after changing the name to Mode4 or Mode5 I still get the same error

I will just wait for your new version.
Not using Domoticz anymore
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Plugin Denon AVR-X2100W
@G3rard,
You need to do the assignment inside onStart (or any other callback). When Python imports a file it also executes it so everything outside a function is evaluated (standard behaviour I can't stop it) but the Domoticz values have not been set up at that point so the Parameters dictionary does not exist (hence the NameError)
Just initialise it to "" on line 57 and then update it in a callback.
You need to do the assignment inside onStart (or any other callback). When Python imports a file it also executes it so everything outside a function is evaluated (standard behaviour I can't stop it) but the Domoticz values have not been set up at that point so the Parameters dictionary does not exist (hence the NameError)
Just initialise it to "" on line 57 and then update it in a callback.
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
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: Plugin Denon AVR-X2100W
@Dnpwwo,
Thanks, I added the ignoreMessages to onStart and then it works.
However when I click on Update in the Hardware tab I get the following error.
This is my plugin.py code.
Thanks, I added the ignoreMessages to onStart and then it works.
However when I click on Update in the Hardware tab I get the following error.
Code: Select all
2017-03-11 23:42:59.671 Error: PluginList: Error 'Error document empty.' at line 0 column 0 in XML ''.
2017-03-11 23:43:02.699 (Marantz) Exiting work loop...
2017-03-11 23:43:02.700 Error: Plugin: Async Read Exception: 125, Operation canceled
2017-03-11 23:43:02.701 (Marantz) Denon device has disconnected.
2017-03-11 23:43:02.783 (Marantz) Stopped.
2017-03-11 23:43:02.845 (Marantz) Initialized version 2.2.0, author 'dnpwwo'
2017-03-11 23:43:02.896 (Marantz) Connected successfully to: 192.168.1.138:23
- Spoiler: show
Not using Domoticz anymore
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Plugin Denon AVR-X2100W
@G3rard,
The "Async Read Exception: 125, Operation canceled" is nothing to worry about, Unix seems to throw that during a plugin forced shutdown sometimes but it isn't a problem.
I haven't seen the "PluginList: Error 'Error document empty.' at line 0 column 0 in XML'." error. How many plugins do you have on your system? Is it just the one?
The "Async Read Exception: 125, Operation canceled" is nothing to worry about, Unix seems to throw that during a plugin forced shutdown sometimes but it isn't a problem.
I haven't seen the "PluginList: Error 'Error document empty.' at line 0 column 0 in XML'." error. How many plugins do you have on your system? Is it just the one?
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
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: Plugin Denon AVR-X2100W
@Dnpwwo,
I have some other plugins on the system (Sonos, Kodi, Rain prediction (Buienradar)).
The pluginlist error appeared for the first time after I changed the Denon script regarding the ignoredMessages.
I have some other plugins on the system (Sonos, Kodi, Rain prediction (Buienradar)).
The pluginlist error appeared for the first time after I changed the Denon script regarding the ignoredMessages.
Not using Domoticz anymore
Who is online
Users browsing this forum: No registered users and 1 guest