Generic Denon / Marantz python plugin

Python and python framework
FabrizioA
Posts: 1
Joined: Sunday 14 October 2018 12:49
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Generic Denon / Marantz python plugin

Post by FabrizioA » Sunday 14 October 2018 13:03

Hi, currently Marantz/Denon plug-in works ok with my Marantz SR5012 but, if I power on my Marantz from domoticz, either main zone and second zone power on.... there’s a way to force only main zone to power on?
Did you have same situation?


Inviato dal mio iPad utilizzando Tapatalk

autopete
Posts: 10
Joined: Monday 17 July 2017 10:49
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Generic Denon / Marantz python plugin

Post by autopete » Thursday 06 December 2018 22:32

Hi,

Wonder if anyone can help me with a repeated error message below?

Error: (Marantz Amplifier) Telnet has not responded to 10 pings, terminating connection.
Error: (Marantz Amplifier) Disconnected from: 192.168.1.146:23

I have a Melody Stream M-CR510 and most of the time the plugin works fine, however, maybe 1 in 20 it fails. I use it to turn off the amp before lots of other gear and it if fails I get nasty speaker damaging thumps so reliability is important for me.

I'm not sure of the significance of the error message as I'll also see successful connections as below.

2018-12-06 20:23:31.261 Error: (Marantz Amplifier) Telnet has not responded to 10 pings, terminating connection.
2018-12-06 20:23:31.312 Error: (Marantz Amplifier) Disconnected from: 192.168.1.146:23
2018-12-06 20:23:41.325 (Marantz Amplifier) Connected successfully to: 192.168.1.146:23
2018-12-06 20:23:41.387 (Marantz Amplifier) Update 0:'Off' (Marantz Amplifier - Power)
2018-12-06 20:23:41.390 (Marantz Amplifier) Update 0:'0' (Marantz Amplifier - Main Zone)
2018-12-06 20:23:41.401 (Marantz Amplifier) Update 0:'28' (Marantz Amplifier - Main Volume)

Running on a Pi as below

Version: 4.9700
Build Hash: a3a45906
Compile Date: 2018-06-23 15:24:51
dzVents Version: 2.4.6
Python Version: 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170124]

Thanks to the developer and any ideas much appreciated.

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

Re: Generic Denon / Marantz python plugin

Post by Dnpwwo » Friday 07 December 2018 11:55

There are a couple of versions of this plugin kicking around.

Can you supply a link to one you are using?
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

autopete
Posts: 10
Joined: Monday 17 July 2017 10:49
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Generic Denon / Marantz python plugin

Post by autopete » Monday 10 December 2018 0:31

Firstly thanks for replying. Sorry it's a slow reply from me I'll have to work out how to get notifications on update.

I think the URL was https://github.com/dnpwwo/Domoticz-Denon-Plugin and also if I look at the plugin on the the filesystem it matches the source at github with the line plugin key="Denon4306" version="3.2.5".

If there's anything I can do to troubleshoot I'd be keen to try.

Cheers

Pete

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

Re: Generic Denon / Marantz python plugin

Post by Dnpwwo » Monday 10 December 2018 1:57

@autopete,

How often does this happen? It looks like a network issue.

If it happens a lot you could turn debugging on to help work out exactly how often much may help pin point the problem.

Every heartbeat (10 seconds) the plugin polls the amplifier for details about status of various components. After receiving no response after 10 heartbeats it disconnects and attempts to reconnect. This gives you a total of around 110 seconds time if the amplifier stops responding before the plugin reconnects.

You could edit the plugin.py file and change line 363 to make the time it waits be less than 10 heartbeats which might make things better but won't address the underlying problem.
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

autopete
Posts: 10
Joined: Monday 17 July 2017 10:49
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Generic Denon / Marantz python plugin

Post by autopete » Tuesday 11 December 2018 0:25

Thanks again for replying.

Yes it happens all the time. I've wired cat 6 cable between the Marantz amp and the Pi executing the plugin with the other problems, maybe its the amp. I've turned on debug and added a trace from the output. If you have time and spot anything odd be great to know.

I'll have a play with self.oustandingPings > 10 and see what happens.

Cheers !
Attachments
marantz-diagnotics.txt
(12.55 KiB) Downloaded 3 times

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

Re: Generic Denon / Marantz python plugin

Post by Dnpwwo » Tuesday 11 December 2018 12:25

@autopete,

I Don't think playing with outstanding pings will make a difference.

My log looks like this:

Code: Select all

2018-12-11 21:11:44.323 (Denon) Protocol set to: 'Line'.
2018-12-11 21:11:44.323 (Denon) Transport set to: 'TCP/IP', xxx.xxx.xxx.xxx:23.
2018-12-11 21:11:44.323 (Denon) Connect directive received, action initiated successfully.
2018-12-11 21:11:44.374 (Denon) Connected successfully to: xxx.xxx.xxx.xxx:23
2018-12-11 21:11:44.374 (Denon) Sending 4 bytes of data
2018-12-11 21:11:44.374 (Denon) 50 57 3f 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. PW?.
2018-12-11 21:11:44.424 (Denon) Received 10 bytes of data
2018-12-11 21:11:44.425 (Denon) 50 57 53 54 41 4e 44 42 59 0d .. .. .. .. .. .. .. .. .. .. PWSTANDBY.
2018-12-11 21:11:44.425 (Denon) Received 10 bytes of data
2018-12-11 21:11:44.425 (Denon) 53 53 48 44 50 20 4f 46 46 0d .. .. .. .. .. .. .. .. .. .. SSHDP.OFF.
2018-12-11 21:11:44.425 (Denon) onMessage called with Data: 'PWSTANDBY'
2018-12-11 21:11:44.425 ($Denon - Power) Updating device from 0:'Off' to have values 0:'Off'.
2018-12-11 21:11:44.430 (Denon) Update 0:'Off' ($Denon - Power)
2018-12-11 21:11:44.430 (Denon) Updating device from 0:'0' to have values 0:'0'.
2018-12-11 21:11:44.435 (Denon) Update 0:'0' (Denon)
2018-12-11 21:11:44.435 (Denon - Volume) Updating device from 0:'50' to have values 0:'50'.
2018-12-11 21:11:44.449 (Denon) Update 0:'50' (Denon - Volume)
2018-12-11 21:11:44.449 (Denon - Zone 2) Updating device from 0:'0' to have values 0:'0'.
2018-12-11 21:11:44.456 (Denon) Update 0:'0' (Denon - Zone 2)
2018-12-11 21:11:44.456 (Denon - Volume 2) Updating device from 0:'33' to have values 0:'33'.
2018-12-11 21:11:44.460 (Denon) Update 0:'33' (Denon - Volume 2)
2018-12-11 21:11:44.460 (Denon - Zone 3) Updating device from 0:'0' to have values 0:'0'.
2018-12-11 21:11:44.464 (Denon) Update 0:'0' (Denon - Zone 3)
2018-12-11 21:11:44.465 (Denon - Volume 3) Updating device from 0:'43' to have values 0:'43'.
2018-12-11 21:11:44.472 (Denon) Update 0:'43' (Denon - Volume 3)
2018-12-11 21:11:44.472 (Denon) onMessage called with Data: 'SSHDP OFF'
2018-12-11 21:11:44.518 Status: LUA: Device 'Denon' event, status 'Off'.
2018-12-11 21:11:44.537 Status: LUA: Denon event fired on 'Denon', value 'Off', Lounge Kodi state 'Off', Lounge Radio state 'Off'
2018-12-11 21:11:44.576 Status: LUA: Device 'Denon - Volume' event, status 'Off'.
2018-12-11 21:11:44.605 Status: LUA: Device 'Denon - Zone 2' event, status 'Off'.
2018-12-11 21:11:45.025 (Denon) Sending 4 bytes of data
2018-12-11 21:11:45.025 (Denon) 5a 4d 3f 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ZM?.
2018-12-11 21:11:45.075 (Denon) Received 6 bytes of data
2018-12-11 21:11:45.075 (Denon) 5a 4d 4f 46 46 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. ZMOFF.
2018-12-11 21:11:45.076 (Denon) onMessage called with Data: 'ZMOFF'
2018-12-11 21:11:46.028 (Denon) Sending 4 bytes of data
2018-12-11 21:11:46.028 (Denon) 5a 32 3f 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Z2?.
2018-12-11 21:11:46.079 (Denon) Received 6 bytes of data
2018-12-11 21:11:46.079 (Denon) 5a 32 44 56 44 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. Z2DVD.
2018-12-11 21:11:46.079 (Denon) Received 5 bytes of data
2018-12-11 21:11:46.079 (Denon) 5a 32 33 33 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Z233.
2018-12-11 21:11:46.097 (Denon) onMessage called with Data: 'Z2DVD'
2018-12-11 21:11:46.097 (Denon) onMessage called with Data: 'Z233'
2018-12-11 21:11:46.148 (Denon) Received 6 bytes of data
2018-12-11 21:11:46.148 (Denon) 5a 32 4f 46 46 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. Z2OFF.
2018-12-11 21:11:46.148 (Denon) onMessage called with Data: 'Z2OFF'
2018-12-11 21:11:47.049 (Denon) Sending 4 bytes of data
2018-12-11 21:11:47.050 (Denon) 5a 33 3f 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Z3?.
2018-12-11 21:11:47.100 (Denon) Received 6 bytes of data
2018-12-11 21:11:47.100 (Denon) 5a 33 44 56 44 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. Z3DVD.
2018-12-11 21:11:47.100 (Denon) Received 5 bytes of data
2018-12-11 21:11:47.100 (Denon) 5a 33 34 33 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Z343.
2018-12-11 21:11:47.100 (Denon) onMessage called with Data: 'Z3DVD'
2018-12-11 21:11:47.100 (Denon) onMessage called with Data: 'Z343'
2018-12-11 21:11:47.151 (Denon) Received 6 bytes of data
2018-12-11 21:11:47.151 (Denon) 5a 33 4f 46 46 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. Z3OFF.
2018-12-11 21:11:47.151 (Denon) onMessage called with Data: 'Z3OFF'
with debug on while yours has no message handling at all, even though your debug mask has requested it. After connection the plugin goes through a whole bootstrap process to assess the amplifiers capabilities but yours does not.

One difference is that I use network discovery and you don't but that shouldn't matter.
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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests