Closed chetstone closed 2 years ago
Thanks for report this, first of all please update the plugin to the latest one it’s fixed some network problems and stability. Next please look in readme or config the plugin using GUI because some properties like ‘refreshInterval’, ‘branding’ are not used anymore. Also the min. node.js >=14.0. After this Please test and report back. On my side all working fine without any problem since 1 month.
Thanks I'll try that. Is there any way to change the logging verbosity? With Homebridge Debug mode off, there is not enough information to tell when there is a problem. But with Debug mode on, there is way too much info. By the time I realize there is a problem, when I go to look at the log, the first instance of the problem has disappeared from the log.
Please use plugin built in debug mode, go to plugin settings Advanced Section >> Enable Debug Mode
it seems i had the same problem today.. homebridge don't reconize any avr changes until i put the avr off and on via the remote control. I turned now the debug mode on in advanced settings and hope some info appears next time the behavior appears.
I have observed same behavior. Looks like the AVR server stop responding or the network card freezes because in same time also the original app from denon not working. After power cycle ON/OFF all start working fine.
i think my problem is a other issue. Maybe i open a another issue if i can reproduce the behavior. Today i put on airplay and homebridge don't recgonize my avr activity. the device is grey (off) in homebridge -> devices. But activity are registered in the log:
^[[37m[10/02/2022, 08:48:20] ^[[39m^[[36m[DenonTv]^[[39m Device: Denon-AVR-X1600H.fritz.box Denon AVR, debug: Parse state data: { "item": { "Power": [ { "value": [ "OFF" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40.5" ] } ], "Mute": [ { "value": [ "off" ] } ] } } ^[[37m[10/02/2022, 08:48:20] ^[[39m^[[36m[DenonTv]^[[39m Device: Denon-AVR-X1600H.fritz.box Denon AVR, debug: Parse sound mode data: { "rx": { "cmd": [ { "surround": [ "Stereo " ] } ] } }
If try to put the avr on in homebridge -> devices it always send the "POWER value off" signal until i put the AVR via remote control on. After that everthing working fine.
I have the exact same problem, my receiver ( Marantz NR 1607 ) is seen disconnected every minute by home bridge (Device state error: Error: timeout of 2000ms exceeded)
Please try latest beta and let me know
Doesn't work with homebridge-denon-tv v3.16.11-beta.9 either Now logs are: Device state error: Error: timeout of 2500ms exceeded and Check state error: Error: timeout of 2500ms exceeded. every 2min
Your device do not respond at all, are you set correct IP address and Port?
My device icon is on within Home app, disconnects for few seconds and is back again
[2/12/2022, 4:54:25 PM] [homebridge-denon-tv] Device: 192.168.0.170 Ampli, Device state error: Error: timeout of 2500ms exceeded [2/12/2022, 4:54:25 PM] [homebridge-denon-tv] Device: 192.168.0.170 Ampli, Check state error: Error: timeout of 2500ms exceeded. [2/12/2022, 4:54:32 PM] [homebridge-denon-tv] Device: 192.168.0.170 Ampli, Connected. [2/12/2022, 4:54:32 PM] [homebridge-denon-tv] -------- Ampli -------- [2/12/2022, 4:54:32 PM] [homebridge-denon-tv] Manufacturer: Marantz [2/12/2022, 4:54:32 PM] [homebridge-denon-tv] Model: NR1607 [2/12/2022, 4:54:32 PM] [homebridge-denon-tv] Zones: 2 [2/12/2022, 4:54:32 PM] [homebridge-denon-tv] Control: Main Zone [2/12/2022, 4:54:32 PM] [homebridge-denon-tv] Firmware: 00 [2/12/2022, 4:54:32 PM] [homebridge-denon-tv] Api version: 0300 [2/12/2022, 4:54:32 PM] [homebridge-denon-tv] Serialnr: masked [2/12/2022, 4:54:32 PM] [homebridge-denon-tv] ---------------------------------- [2/12/2022, 4:56:54 PM] [homebridge-denon-tv] Device: 192.168.0.170 Ampli, Device state error: Error: timeout of 2500ms exceeded [2/12/2022, 4:56:54 PM] [homebridge-denon-tv] Device: 192.168.0.170 Ampli, Check state error: Error: timeout of 2500ms exceeded. [2/12/2022, 4:57:02 PM] [homebridge-denon-tv] Device: 192.168.0.170 Ampli, Connected. [2/12/2022, 4:57:02 PM] [homebridge-denon-tv] -------- Ampli -------- [2/12/2022, 4:57:02 PM] [homebridge-denon-tv] Manufacturer: Marantz [2/12/2022, 4:57:02 PM] [homebridge-denon-tv] Model: NR1607 [2/12/2022, 4:57:02 PM] [homebridge-denon-tv] Zones: 2 [2/12/2022, 4:57:02 PM] [homebridge-denon-tv] Control: Main Zone [2/12/2022, 4:57:02 PM] [homebridge-denon-tv] Firmware: 00 [2/12/2022, 4:57:02 PM] [homebridge-denon-tv] Api version: 0300 [2/12/2022, 4:57:02 PM] [homebridge-denon-tv] Serialnr: masked [2/12/2022, 4:57:02 PM] [homebridge-denon-tv] ----------------------------------
Plugin is working , just disconnecting a few seconds every 2 min
Check your Network connection, try use lan if use wlan?
I'll try with ethernet instead of wifi and let you know, thanks !
try latest beta too, I have increased timeout
I plugged ethernet instead of wifi: homebridge-denon-tv v3.16.11-beta.13 :works Reverted back to homebridge-denon-tv v3.16.10: works
Looks like this issue is Wlan related since I installed an Unifi AP, sorry for the drill!
OK, thanks for test, try with beta.14 and wifi and let me know,
Installed homebridge-denon-tv v3.16.11-beta.14 and wifi After 10min, so far so good, well done !!!
Spoke too soon [2/12/2022, 6:28:03 PM] [homebridge-denon-tv] Device: 192.168.0.170 Ampli, Check state error: Error: timeout of 2750ms exceeded. [2/12/2022, 6:28:11 PM] [homebridge-denon-tv] Device: 192.168.0.170 Ampli, Connected.
So, definitely you need check your WiFi.
Thank you very much !
if this can help others, I think I fixed my problems by disabling " Multicast enhancement" in unifi wireless settings
I close this with 3.16.11
This is still not fixed. I finally found time to upgrade from 3.15 a few days ago. With 3.16.10 I was seeing the same thing as @darkjlz, except wi-fi is not involved. In my setup everything is connected by ethernet. Upgrading to 3.16.11 helped--- it is no longer disconnecting every two minutes, but it's still happening frequently, seemingly at random, maybe a couple of times per hour on average. When it disconnects, the Marantz tile in the home app changes to say the receiver is off, then after a few seconds it changes to on.
I also experienced a complete loss of connection last night. Although the Home app tile indicated the receiver was on and allowed me to use the controls, they had no effect on the receiver. I had to turn power off and back on with the remote control to reestablish connection (this is an improvement on 3.15 -- I used to have to remove AC power from the receiver for 20 seconds to reset it).
Here is the log info for one of the brief dropouts:
[2/16/2022, 4:05:55 PM] [DenonTv] Device: 192.168.1.208 Marantz, debug: Device state error: Error: timeout of 2750ms exceeded
[2/16/2022, 4:05:55 PM] [Marantz Off] Send notification to Prowl: Marantz Off
[2/16/2022, 4:06:03 PM] [DenonTv] Device: 192.168.1.208 Zone 2, Connected.
[2/16/2022, 4:06:03 PM] [DenonTv] -------- Zone 2 --------
[2/16/2022, 4:06:03 PM] [DenonTv] Manufacturer: Marantz
[2/16/2022, 4:06:03 PM] [DenonTv] Model: NR1711
[2/16/2022, 4:06:03 PM] [DenonTv] Control: Zone 2
[2/16/2022, 4:06:03 PM] [DenonTv] ----------------------------------
[2/16/2022, 4:06:03 PM] [DenonTv] Device: 192.168.1.208 Marantz, debug: Get device info:
[[ 7000 (!!) lines of device info omitted ]]
[2/16/2022, 4:06:03 PM] [DenonTv] Device: 192.168.1.208 Marantz, Connected.
[2/16/2022, 4:06:03 PM] [DenonTv] -------- Marantz --------
[2/16/2022, 4:06:03 PM] [DenonTv] Manufacturer: Marantz
[2/16/2022, 4:06:03 PM] [DenonTv] Model: NR1711
[2/16/2022, 4:06:03 PM] [DenonTv] Zones: 2
[2/16/2022, 4:06:03 PM] [DenonTv] Control: Main Zone
[2/16/2022, 4:06:03 PM] [DenonTv] Firmware: 00
[2/16/2022, 4:06:03 PM] [DenonTv] Api version: 0301
[2/16/2022, 4:06:03 PM] [DenonTv] Serialnr: 00067866BE0C
[2/16/2022, 4:06:03 PM] [DenonTv] ----------------------------------
[2/16/2022, 4:06:06 PM] [DenonTv] Device: 192.168.1.208 Marantz, debug: Parse state data: {
"item": {
"Power": [
{
"value": [
"ON"
]
}
],
"InputFuncSelect": [
{
"value": [
"AUX1"
]
}
],
"VolumeDisplay": [
{
"value": [
"Relative"
]
}
],
"MasterVolume": [
{
"value": [
"-24.0"
]
}
],
"Mute": [
{
"value": [
"off"
]
}
]
}
}
[2/16/2022, 4:06:06 PM] [DenonTv] Device: 192.168.1.208 Marantz, debug: Parse sound mode data: {
"rx": {
"cmd": [
{
"surround": [
"Stereo "
]
}
]
}
}
[2/16/2022, 4:06:06 PM] [Marantz On] Send notification to Prowl: Marantz On
The lines [Marantz On] and [Marantz Off] are coming from the homebridge-pushed-notification plugin. I set this up some time ago to try to help with debugging this problem. It sends me a notification on my phone whenever the Marantz turns on or off. As I mentioned, when I get the Marantz Off notification, the Home app tile also indicates the receiver is off.
@chetstone thanks for report this again, this never happened on my side so its difficult to find what is wrong. I think its just Denon/Marantz server side problem. I have pushed 3.16.12-beta.0 for test, please look at this and let mi know.
Been noticing the same. Symptoms: Device not responding in Home app. Marantz app and website not responsive or slow.
Tried 3.17 but same.
When I disconnect receiver from network, homebridge-denon-tv no longer reports 'disconnected' and then when network is reconnected it repeatedly logs saying its Connected, looping until eventually homebridge crashes due to too many open files.
I've rolled back to 3.16.5 for now.
@badgertastic fixed in 3.17.1
@grzegorz914 Thanks so much for your patience and continued support on this issue.
So 3.16.12-beta.0 fixed the problem of frequent brief disconnects, I haven't seen anything for 24 hours.
Not sure if the original problem, where the connection drops completely, is fixed. I'll need to test with this beta for a couple of weeks (or should I upgrade to 3.17.1?)
Please try 3.17.1, here is also integrated MQTT Client which publish all available data from AVR to the MQTT Broker if needed.
With 3.17.1 the frequent disconnect/reconnect is happening again.
I'm reverting to 3.16.12-beta.0
OK, then try please 3.17.3-beta.0
Unfortunately 3.17.3-beta.0 still has the problem. I wanted to look at the code to see what you're changing to try to fix this issue, but on Github there are no tags or branches for the beta versions. I guess you're changing the timeout, but probably other things as well.
I wonder if you could expose the timeout as an advanced configuration parameter?
At any rate, since 3.16.12-beta.0 seems to work better and I don't need MQTT, I'm going to switch back to that. I'll let you know if the connection drops completely over the next couple of weeks.
Thanks for your help.
Looking at the code of the two beta versions as pulled from npm, I see the main differences:
3.16.12-beta.0 has no axios timeout and it has a longer checkState interval: 3000ms
3.17.3-beta.0 has a 5000ms axios timeout and a checkState interval of 1500ms
I guess the checkState interval is the polling refresh interval. Having the axios timeout longer than the refresh interval could result in requests stacking up and the receiver unable to process them fast enough. I would prefer a longer polling interval. Could you add that back into the advanced configuration options?
Also, it looks like b2268b44eabcf7a41fbc78458ca50d95dfc92698 could be the fix for the "connection dropping completely" issue I was having. So if we stop the frequent timing out that should take care of it.
Check state is TimeOut timer, only called if data from AVR is received, can not generate stacking process. If data is not received in 5sec then error is generated and start reconnect Timer. I do not have this problem like You, my Denon AVR 6300 X always response without any error. I think this is local Network environment problem. In 3.16.12-beta.0 was removed the timeout from Axios, but this is not so good solution because after disconnect the AVR from network will no error generated. Please check Your network please, are you use WiFi or Lab connection?
@chetstone please try 3.17.3-beta.9 probably I'm found the bug
TLDR; After extensive testing with 3.17.3-beta.9 I have concluded that this component is not causing my networking issues. That said, I recommend increasing the axios timeout to 10 seconds and the checkState interval to 3 seconds.
The issues:
Since I am not using wifi, but rather the receiver and server are connected to the same Trendnet TEG-S80g gigabit ethernet switch in my entertainment center, I assumed my network was not the problem. I was wrong. It turns out the Trendnet was causing issue 1.
I had a theory that excess network traffic was causing issues, so I set up Charles proxy on my server to watch the packets. I could see frequent delays of more than one second, and when they were more than 5 seconds, issue 1 would happen. But with Charles I could only see the traffic between the server and receiver, and I wanted to see all the traffic on the receiver interface, so I set up Wireshark on another computer. In order to do that, I had to bypass the Trendnet and connect the receiver directly to my main switch near my router. When I did that, issue 1 completely went away. The longest delays became 100ms, and those were very rare. I'm not a networking expert, but it seems that the receiver and server were losing routing information when connected to the Trendnet. Wireshark was showing ARP and DHCP requests when the delays were happening.
I also saw Issue 2 occur once while connected to Wireshark. Again, I'm not a networking expert, but as far as I could tell, there was no unusual network activity just before the disconnect, so I have to assume that this is an internal issue with the receiver. I'm surprised more people haven't experienced this. I guess I'll just have to live with it– I don't think it's worth reporting to Denon/Marantz, since they probably don't support their API on anything other than their own apps.
Regarding my recommendations, the longest delay I saw was 7 seconds. A 10 second axios timeout would have masked issue 1 completely.
And a couple of times I saw homebridge grab an incorrect value from the Denon because of querying too soon after a change. When using the Home app to turn on the receiver, it takes a couple of seconds to turn on and when checkState queries during this period, the value returned is "OFF" which provides homebridge with the wrong state. Increasing the checkstate interval may be an easy way to remedy this.
Increasing these timeouts would help eliminate some errors and problems and would not in my opinion cause any decrease in the usability of the component.
Thanks again @grzegorz914 for your patience and help with this issue.
Thanks for the long test and investigation, of course I can set the timeout to 10sec. Regarding report wrong state after power ON it can not be happen because the value are only pushed to characteristic if changed and correct data received from AVR. This is other issue which will be fixed in 3.17.5
3.17.4 released with 10sec timeout, please report back after some time.
3.17.5-beta.0 also available for test
Hello, I have the same issue, when adding the AV to Homebridge: [DenonTv] Device: Receiver, debug: Device info error: Error: timeout of 10000ms exceeded
I have already tried some other versions without success.
What a receiver?
Thanks for your quick reply! It's a Denon AVC-X6700H, It was working before but as I had more difficulties than the disconnects, I have removed it and also re-setup my homebridge, now the receiver doesn't get up anymore in Homebridge
Check your config, and network settings, adress IP, port. Ping to AVR.
that's all working, if I try Port 80 instead of 8080 I get a 403 (what is OK, as 8080 is correct). The Web interface is loading as expected
May by Try power cycle the AVR
I completely took it off the power for a few minutes, now it's working, thats weird. Thank you for your help!
The server on AVR side some time freezes, it’s a firmware bug.
Has been a while, with several updates thanks @grzegorz914, so thought I'd try latest 3.17.3. Unfortunately within a day, my Marantz SR-8012 became unresponsive in Home app. Downgraded again to 3.16.5. Seems perfectly stable on this release.
Every week or so, homebridge will say it cannot communicate with the receiver and I have to go unplug the receiver and plug it back in to reset it. I mentioned this in #114 and in that issue I theorized that the problem had to do with either
1) Too frequent polling of the receiver by homebridge. or 2) A problem with HDMI-CEC causing the receiver to become unresponsive to the network.
As you pointed out, polling should not be an issue. I realize now that that is the only way that homebridge can keep the state updated.
I now know that HDMI-CEC is also not the issue. I have turned off all HDMI-CEC functionality in the receiver for several months now and in fact during the month of January all my HDMI-CEC devices were powered off and never used, yet this problem keeps happening.
Here is the relevant lines of the log in debug mode:
And my configuration:
I wonder if this has something to do with my
masterPower: true
setting?I use Homebridge mainly to automating turning the receiver on in the morning and turning it off at bedtime. I rarely use my IR remote to control the receiver except for volume-- I try to use homebridge to change inputs and any other functions. I don't use other Denon apps. Just homebridge.
I don't think the network itself is the problem--- the server and receiver are both connected by GB ethernet to the same switch, and power-cycling the receiver reliably fixes the problem (until the next week)
If I could see the moment in the log when the receiver stops responding, that could be a clue, but the log in Debug mode is just too verbose. It fills up the 2MB homebridge log file in less than an hour. Is there any way to turn down the verbosity?
BTW I'm using homebridge-denon-tv v3.12.17 with Homebridge v1.3.4 on on Apple MacMini (M1 chip) running MacOS 11.6.2. The receiver is a Marantz NR1711. I just updated the firmware last week to 3400-0195-8061-3085, hoping that update would fix the problem, but no.