-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Denon AVR-X4300H is unstable #32
Comments
I've also been trying to debug my X4300H because the telnet interface is pretty unreliable. I took a tcpdump of some traffic between the Denon app and the receiver where I changed the source, power cycled, changed the volume, and muted/unmuted: Looks like the HTTP interface is still there, albeit without a UI and with a few syntactical changes. For example, it now uses port 8080, and certain commands like power on/off use a POST to AppCommand.xml with the command and zone encoded in the XML. My python skills are pretty mediocre, but I can try out some changes later this week. In the meantime, let me know if you need any further network captures. |
@arseneyr, that's great. I've been meaning to try to get a network capture done somehow, but my work hasn't provided any time in the past 6 months. I figured it was likely web based API's it was calling to be stable and responsive. How did you grab the captures? I'll stay tuned to this, and if my work ever lets up a little I'll help iron out some of the python code too; though like you, Python isn't my strongest language. |
is the publish control protocol not complete? |
@Ltek That's the telnet interface the @raerae1616 I had to improvise the network capture by running |
I will have a look at this. If the old interface is still available on port 8080 it should not be too complicated. |
If there is any need for testing I'm more than happy to help. I attached some test I from the tcpdump data To turn it On and Off those Uri worked Mute On/Off |
Consistent and reliable Power On/Standby, and Volume control and detection (for automations) is the biggest concern for me personally. Because the input selection and other elements can be well controlled via my Harmony Hub. But this looks REALLY PROMISING, now that we know a working endpoint per @f-bader post above and the TcmDump from @arseneyr! This is super useful info. now that I've had time to dig in a little over the holidays. IA quick google and I found this other spec. info. on the Denon AVR Protocol spec sheet that is working well with the spec sheet (it's the same as that posted above by @Ltek, but I found this copy first and it's a little easier to read (likely because it's older): The following commands worked successfully on my AVR-X4300H, and resulted in fast updates to the Mobil App when I send the commands via Postman (e.g. the HEOS app gets the events raised by changing the values on the REST endpoint (Note: of these are using the same simple REST endpoint and the command spec above):
BUT, the following does NOT work as expected to query the current values:
But this is promising . . . even for simple REST buttons in HomeAssistant. I'm not sure why the RESPONSE's are not returned for the above command queries, the Http response code is 200 OK, but no content in the response. I'll keep fiddling with that. I also found that the AVR-X4300H supports the (very robust) HEOS protocol documented here, and useable via SSDP and RESTFul calls, but not much info. on how to call the commands, but its seems to be a flavor of JSONRPC. I have not tested this out because the SSDP process is more involved than simple REST endpoint. |
So, it appears like the RESTFul capabilities are all actually here, but perhaps the actual mechanisms have changed slightly from the older Denon models. Per my post above the RESTFul GET querystring requests for Status did NOT work for me, and this was also confirmed this person in German (Google Translated to English): He provided lots of great information that was also confirmed in the TCP dump from @arseneyr above! So the following WILL Work and I validated them on my Denon AVR-X4300H via Postman: GET requests to get Device Info does work but the Url is case sensitive (woohoo): http://{{DENON_AVR_IP_ADDRESS}}:8080/goform/Deviceinfo.xml And retrieving status of Volume, Zone power, etc. can all be done with an Xml POST of valid xml commands as follows:
And Response will be something like this (containing pertinent information retrieved):
There are other commands that are valid, but I simply tried out the primary ones to retrieve critical Media Player values such as (Power status, source input, Volume, etc.). |
So, I don't know how HomeAssistant components work yet (don't have time to learn that with my current workload) . . . so I'm not able to jump into trying to fix the DenonAVR component itself. But, for now I was able to get my Denon AVR-X4300H working with spectacular responsiveness for On/Off control, input control, and finally direct Volume Control -- I always hoped it would/could work this well! The beset thing so far has been the amazing integration with a Lutron Caseta Pico remote using REST Commands for the Denon, and Python_Script for logic, and the custom SmartBridge Pro hub component with details outlined here! |
Hey well done raerae1616, I have a Marantz SR7012 which seems to work the same as your AVR (your commands above also work). Hoping someone finds the time to update the component in HA, or create a new one if need be :) |
Would be really nice to have these models working on HA as well, as my AVR-X1400H does not work well in HA now. Hope that someone will be able to add compatibility for these newer models! Tested above commands, and work as well on my receiver! |
Can confirm this also works for my AVR-X2400H. 👍 |
Man I wish I had the time, I'd love to either a) create a new custom component or b) try to merge into the existing denonavr component . . . if anything it'd be a chance to improve my limited python skills. For me, I don't fully understand how components in Home Assistant are designed to work and are intended to be designed/deployed, etc.... I have a lot to learn there. I'm just sooo swamped with the day job pulling 15 hour coding for clients on top of other stuff, not sure when I'd have the chance... @bartberden: Per your message, just in case you didn't see my link above, I've posted some samples of how to get the reciever working well with the use of REST Commands! I even sorted out passing volume as a parameter, and integrating with Python Scripts... so honestly I'm not even missing much from the denonavr component anymore; sure it's a little more automation work, but it does work very well and stable now. Even in the UI, the Volume, etc. can be easily solved with an input_slider, input_boolean, etc. and some automations with parameters, or Python Script, etc. Check out my post here to get you started, I hope it helps: |
hey guys, |
@scarface-4711 Hi. I tried testing the changes, but the library still seems to use the old URLs (or do I somehow need specify the receiver type in the constructor?). This is the console output from python:
|
Both are used because the pre 2016 receivers are working better with the other ones. The right URLs should be determined automatically in method _get_receiver_sources The URLs are more or less the same, the major difference is that the post 2016 devices are listening to port 8080 instead of 80 and that some interfaces are disabled. |
Thank you for the explanations. That's good to know. I can confirm that the new version works with an X-1400H on the command line. I suppose the first error message is still excepted. Not sure about the receiver name, I have something else set up as "Friendly name" in the "Network" settings, but I'm not sure if that is supposed to be the same thing. I'm going to try it in HomeAssistant later tonight if I get to it. For reference, this is the output of my tests:
|
I tried the latest master branch in Home Assistant and I'm happy to report that power on/off, mute/unmute, volume up/down, setting source all work with my X-1400H. Great work, thank you. |
I'm glad to here that. |
The new version works as expected for me and the error messages are also gone. Thank you. |
Looks promising! I wanted to try it out, but currently have no clue how to test this in home assistant. Could someone tell me how to import this into homeassistant? Thanks in advance! |
The easiest way would be to wait for HA 0.64 which should be released soon.
|
Well, just a heads up that with the new version, it doesn't seem to work with a Marantz 6012. I get: Host 192.168.1.98 returned HTTP status code 403 to GET request at end point /goform/formMainZone_MainZoneXmlStatus.xml |
I'm having trouble following... I have a Denon AVRX4300H (maybe I'm in the wrong thread?). I'm wanting to control it with siri/homekit. Is there a simple command and string to add to config.json? something like: thanks in advance! |
@mreassassin you won't be able to use this library to connect a Denon receiver to Homekit. It is primarly built to integrate those receivers to Homeassistant. |
Instead of getting the power on status using POST request method, you could also use GET with the following url (for Zone 1/Main Zone): Zone2: |
Where's that stored in Hass.io scarface-4711 (that file I mean)? |
Can't find it but I think that'll work. Trying it in a browser works anyway (80 just gives the same error as above (a 403), 8080 seems the go for the new Marantz. |
Never used hass.io, thus I don‘t know where to find the library there. |
Why don't we just unit test the REST url that the old code used, to see if the method works on the newer models? Just like we have with several REST Api's above.... I don't have the time to read over the original Python code and find the Url, but if someone wasn't to find the base REST url used to retrieve that data, I"m happy to test it out a little on my AVR-X4300H... |
@simonk83 you could also run the python script you find in the following repository and upload the .xml files it saves in its directory here. Those are the responses of your receiver. https://github.com/scarface-4711/misc_python_tools/tree/master/denonavr |
Here you go. 403 for everything aside from: AVR-AppCommand-8080-200.xml |
@simonk83 yes most of the endpoints are not available at your receiver. Thus, it makes no sense for me to change anything here because of this. |
@scarface-4711: I tried many endpoints that I was able to find and listed the results of my investigation above int his thread. Also, I have run that script for you before also, but am happy to run it again. Have you changed it to use port 8080, and/or added other ednpoints to test? I'll try to run it again in the next several days. |
Yes, it is querying each endpoint which is in use here on both ports, 80 and 8080. |
@scarface-4711 What's the latest update with support for the X4300h? Is there anything further we can do to help test things? |
@andrewsayre, nice thanks 👍🏻 |
Are there any updates on this? @scarface-4711 @raerae1616 |
My X6300H is working fine with Home Assistant. Starting with HASS 0.92 you'll also get HEOS support :) |
@wilmardo my Denon AVR-X1400H does work fine HA 0.91.3. Did not yet try Heos in 0.92 |
@wilmardo to be honest my Denon has been rock solid with REST commands and python scripts (after sorting out the key rest api calls I needed; outlines in my investigations above)...so I haven’t switched back to the component since... More info here: But I’m always monitoring the updates and it does seem like most of the needed apis and component updates have all been made... It’s Great that others like @klada and @f-bader were able to confirm above! |
I have the SR7011 working with the denonavr component. I had to change this line in the denonavr.py file found in /srv/homeassistant/lib/python3.5/site-packages/denonavr: DEVICEINFO_AVR_X_PATTERN = re.compile( I changed SR60 to SR70 and everything works. The SR7011 is then using port 8080 instead of 80. The only problem I have right now is that my main home assistant device is using docker. And I cannot find the denonavr.py file in the docker system. @scarface-4711 could you please add the 7011 to the denonavr component using port 8080 |
To add to the mess Denon is making: full web interface is now on ### port 10080 The cute thing is, this isn't referenced in the manual at all. Did a portscan to find it... |
For some reason my Harmony Hub will randomly not turn off my receiver (even with a hardwired IR wire connected to the receiver; uggg)... so I've moved back to using the component with a nifty automation to validate the Receiver is always off when the Harmony status switches to "PowerOFF" . . . |
Sorry to revive this ancient issue. Just tried to set up a script in Home-Assistant for my X4500H using denonavr.get_command service. Did get EDIT: HA is 0.108.2 |
@iophobia could you please run this python script and upload the XML files it is generating in its directory? |
Hi @scarface-4711. I did so and zipped the xmls to be found here. Thanks for your help and looking forward to your response. |
Good day to all! Guys help! Where can I find the firmware for the 4300, to download from USB flash. My receiver went crazy. Resets don't help. The network doesn't see it. Digital formats greater than 5.1 do not understand (no sound). You need to re-flash (lower the firmware). Thank you for any advice! |
Hi, Actually I run HASSIO 0.111.4 and I still has a problem with Marantz NR1609. When device comes online it wouldn't be recognised by HA and only way to get it up and running is restarting the HA. After HA restart it works normally. I reported this issue here https://github.com/scarface-4711/denonavr/issues/133 but it has been closed and forwarded to this thread. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I have a newer Denon AVR-X4300H model. Apparently the new models no longer support the web interface supported by older models (uggggg--- why remove the web or RESTFul interface). But the mobile app for the reciever works fantastically so there is definitely a stable mechanism to connect to these.
The original "denon" component does kinda sorta work -- via telnet access. But it's very unreliable. For example the volume change will work about 1 out of 5 times. The pattern I've seen is that once you set it via HomeAssistant it won't respond again for some timeout period . . . which is minutes. This miraculously it might respond and work at some later time.
So, I would MUCH rather get the denonavr component working well, so that it could be as stable as the mobile app is when changing volume, inputs, etc.! This is really a bummer because the Onkyo reciever this one replaced was very very stable and worked very well with HomeAssistant.
At this time I've fallen back to basic on/off automation using my Harmony remote integration with HomeAssistant and it's working well. But, is very very limited. Being able to set the volume and sources with HomeAssistant is a fantastic automation that I'm very much missing.
We were previously corresponding on this thread:
home-assistant/core#7645
But, per the recommendation over there I wanted ot open a ticket here and offer my help in testing /debugging however I can to get the latest series of AVR's working!
I've attached the results of the python test script you posed on the other thread here as well to provide the Xml files that it saved out:
Denon Python Requests - AVR-X4300H.zip
Unfortunately I don't think the web interface that is used by the denonavr platform is available on the higher end newer (2016+) models anymore.
On my AVR-X4300H, the urls you posted all return:
This is also documented on AVS Forums:
http://www.avsforum.com/forum/90-receivers-amps-processors/2444306-official-2016-denon-s-series-x-series-avr-owner-s-thread-faq.html
Please let me know what else I can do to help. I'll try to pay more attention and be more prompt than I was before on that last thread!
The text was updated successfully, but these errors were encountered: