Closed rockthenet closed 6 years ago
Hi,
Some questions to get a clue of your problem:
Does it happen when the AVR is turned on or off? Do you have network control configured to always on?
Does another device also use a telnet connection to your AVR?
Have you managed to get a stable connection in the past (with a previous version of the adapter)? Because since a while I haven't changed a thing w.r.t. connection handling.
Is the AVR still online when it closes the socket? Otherwise there could be connection problems? E. g. you could try to ping the AVR and see if it is responding
Hi. Thanks for the quick response.
That sounds good.
On which device and OS is ioBroker running? You could try to play with the advanced settings, especially interval between commands.
Another thing would be setting the adapter to debug, requests could be to frequently because the adapter didn't get the correct data from the configuration page. I think I have no hardcoded fallback.
Debug mode seems to be the next step...
Than try to set adapter on debug and post a part of the log here.
Alright. Unfortunately i have almost no experience with the iobroker debug feature - so i just gave a try. Please find attached log
Thanks, it also looks good.
Nothing special until the AVR closes the socket. How high did you set the request interval when you tested it?
Okay. Thank u very much.
Abrufintervall (ms): 7000 to 14000 to 140000
Intervall zwischen den Befehlen (ms): 100 to 200 to 2000
Btw: isn't it unusual that the reconnect part is always listed twice?
...
denon.0 | 2018-09-28 21:37:04.173 | info | [CONNECT] Adapter connected to DENON-AVR: 192.168.178.74:23
denon.0 | 2018-09-28 21:37:04.171 | info | [CONNECT] Trying to connect to 192.168.178.74:23
denon.0 | 2018-09-28 21:37:01.103 | info | [CONNECT] Adapter connected to DENON-AVR: 192.168.178.74:23
denon.0 | 2018-09-28 21:37:01.098 | info | [CONNECT] Trying to connect to 192.168.178.74:23
...
Yes it is. Thanks. I did not see it until now. If it's possible try to restart the raspberry. Should be the safest way to make sure, that the adapter isn't running twice.
Alright. So maybe its just something with (my) denon adapter. So i manually deleted the denon adapter and reinstalled it. Now i had several errors in the log (and again the double connection):
denon.0 | 2018-09-29 18:40:12.428 | info | [CONNECT] Adapter connected to DENON-AVR: 192.168.178.74:23
-- | -- | -- | --
denon.0 | 2018-09-29 18:40:12.423 | info | [CONNECT] Trying to connect to 192.168.178.74:23
denon.0 | 2018-09-29 18:40:11.684 | info | [CONNECT] Adapter connected to DENON-AVR: 192.168.178.74:23
denon.0 | 2018-09-29 18:40:11.679 | info | [CONNECT] Trying to connect to 192.168.178.74:23
denon.0 | 2018-09-29 18:39:42.421 | warn | Connection closed: Error: This socket has been ended by the other party
denon.0 | 2018-09-29 18:39:41.675 | warn | Denon AVR has cancelled the connection
denon.0 | 2018-09-29 18:37:38.996 | info | [CONNECT] Adapter connected to DENON-AVR: 192.168.178.74:23
denon.0 | 2018-09-29 18:37:38.984 | info | [CONNECT] Trying to connect to 192.168.178.74:23
denon.0 | 2018-09-29 18:37:38.981 | info | [START] Starting DENON AVR adapter
denon.0 | 2018-09-29 18:37:38.970 | info | starting. Version 0.4.2 in /opt/iobroker/node_modules/iobroker.denon, node: v8.11.3
denon.0 | 2018-09-29 18:37:07.509 | info | terminating
denon.0 | 2018-09-29 18:37:07.485 | info | [END] Stopping Denon AVR adapter...
denon.0 | 2018-09-29 18:37:07.482 | error | at Manager.ondata (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/manager.js:335:16)
denon.0 | 2018-09-29 18:37:07.482 | error | at Decoder.add (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-parser/index.js:251:12)
denon.0 | 2018-09-29 18:37:07.482 | error | at Decoder.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-emitter/index.js:133:20)
denon.0 | 2018-09-29 18:37:07.482 | error | at Decoder.<anonymous> (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-bind/index.js:21:15)
denon.0 | 2018-09-29 18:37:07.482 | error | at Manager.ondecoded (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/manager.js:345:8)
denon.0 | 2018-09-29 18:37:07.482 | error | at Manager.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-emitter/index.js:133:20)
denon.0 | 2018-09-29 18:37:07.482 | error | at Manager.<anonymous> (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-bind/index.js:21:15)
denon.0 | 2018-09-29 18:37:07.482 | error | at Socket.onpacket (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:244:12)
denon.0 | 2018-09-29 18:37:07.482 | error | at Socket.onack (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:319:9)
denon.0 | 2018-09-29 18:37:07.482 | error | at Socket.adapter.getObject (/opt/iobroker/node_modules/iobroker.denon/main.js:762:66)
denon.0 | 2018-09-29 18:37:07.482 | error | TypeError: Cannot read property 'common' of null
denon.0 | 2018-09-29 18:37:07.480 | error | uncaught exception: Cannot read property 'common' of null
denon.0 | 2018-09-29 18:37:03.400 | info | [CONNECT] Adapter connected to DENON-AVR: 192.168.178.74:23
denon.0 | 2018-09-29 18:37:03.387 | info | [CONNECT] Trying to connect to 192.168.178.74:23
denon.0 | 2018-09-29 18:37:03.384 | info | [START] Starting DENON AVR adapter
denon.0 | 2018-09-29 18:37:03.374 | info | starting. Version 0.4.2 in /opt/iobroker/node_modules/iobroker.denon, node: v8.11.3
denon.0 | 2018-09-29 18:36:59.474 | info | terminating
denon.0 | 2018-09-29 18:36:59.446 | info | [END] Stopping Denon AVR adapter...
denon.0 | 2018-09-29 18:36:49.797 | info | start browse
denon.0 | 2018-09-29 18:35:04.258 | warn | No IP-address set
denon.0 | 2018-09-29 18:35:04.247 | info | starting. Version 0.4.2 in /opt/iobroker/node_modules/iobroker.denon, node: v8.11.3
Any idea?
The error is my fault. But it should only happen at the first start, because I’m calling the callback to early when it’s not sure that the state exists.
Have you done a restart of your host system? How did you install the adapter? Why it logs no ip address set at the end? Did you remove it?
Made the following:
Didn't delete any ip in the log. Just copy paste. Is there any way to check if the adapter is 2 times active /running?
I don’t think it is running twice. Just seems to be that the reconnection is twice their somehow. But when starting the adapter it only connects once and you nevertheless lose the connection.
I will fix the two issues tomorrow, with double connection when avr closes the conn and the cannot read common of null...
But that won‘t solve your issue. I‘m running out of ideas. Is there anything special in your network setup?
I fixed the double reconnection issue as well as the error which occurs once (cannot read property common of null). W.r.t your issue we should focus on your network not on the adapter itself.
Wow - great work. Thanks again for this massive support. :+1: I'll check the new version soon. Further I'll check it with a clean iobroker installation and also in a separate LAN connection. So I'll keep this ticket updated...
Update: Now i have a stable connection! For about >15 Min... and still running. :smiley:
Tested several things:
Official changelog:
last updated:- 08/08/2018
Firmware Vers:1400-0394-7091-6064
**************************************************************
08/08/2018
Firmware Vers: 1400-0394-7091-6064(DZ19-023, , AVR-X2500HBKE2, AVR-X2500HBKE2GB
1) DTS Virtual:X ready.
2) ALLM ( Auto Latency Mode ) is ready
3) Video improvements under certain conditions
4) Apple AirPlay 2
5) Grouping improvements
**6) Other minor bug fixes.**
Filename:-DPMS_AVR-X2500HE2_LEGO_0006.zip
heos_40.prod_1.466.190.zip
**************************************************************
So finally i am happy to have a working Adapter. Sorry for the trouble. Lets say - even the paid developers at Denon produce bugs from time to time... And it's not always the fault of third party developers.
I'm glad that it now works with your AVR. Thanks for providing the detailed information.
And if you have any issues, please let me know.
Hello. First of all - Thanks for good work. Adapter works fine. Except of one issue. The adapter is reconnecting every 2 minutes.
I am using a Denon AVR-X 2500 H (latest FW)
I already tired to downgrade the adapter to 3.x. Cause i had the issue also on the latest 4.1
Any idea how to get a stable connection?