But this one doesn’t give mute or volume status, so you also need to query formMainZone_MainZoneXmlStatus.xml - unless there’s another hidden call that does both…
Setting the input function does use PutZoneInputFunction. Oddly, although the media server is NET and SERVER as above, to set it you call MEDIA+SERVER (or MEDIA%20SERVER if you prefer):
Other inputs are CD, TUNER, SPOTIFY, IRADIO (internet radio), USB and I’d guess IPOD, but that will only work with one attached.
So it might - might - still be possible to do it with a common codebase, calling formMainZone_MainZoneXmlStatus.xml if volume and mute aren’t found in formMainZone_MainZoneXml.xml, but for input selection it looks like a hardcoded lookup table is needed. The power on/off will also have to be varied according to model, unless the Marantz version also works on Denon.
Happy to have a go at editing it, either as a Marantz fork or a change to the existing code.
@Kristopher dude I just want to say that you are absolutely KILLING IT with these integrations. You make ST better with every code release, thanks so much for all your work here.
@Kristopher Great work! I have the Device type working with my Denon E400 (power on/off, mute, volume, etc). I am however having a weird issue when trying to tie it to Alexa Helper speaker control. When sending voice commands via the Echo, odd volume inputs are coming in on receiver end. I have tried both modes, -79-18dB and 0-98 with no luck. Any help you may be able to provide would be greatly appreciated
I haven’t forgotten this, but lately my ST has been a bit flaky on lights, let alone anything else, so it’s been hard to know if things not working are the code or the ST platform
Anyway. new discovery - since the iOS app worked, I thought I’d try and point it at my server and see what it called. It calls goform/DeviceInfo.xml, which gives lots of useful info, including all of the sources (it’s a bit long to post here)
The issue I’ve got now is trying to use hubaction to call multiple xml files and combine the results - I don’t even know if that can be done. At the moment I’m thinking it might be simpler to build an API and have ST talk to my server which then talks to the device. Which also gives me an alternative for when ST is playing up
You can make multiple hubAction calls all at once and then piece them together in parse() using state for temporary data storage. Or you can chain hubAction calls together via parse – eg. make the first hubAction call, then in the parse() method for the first response, store the first response in state and make another hubAction() call for the second command… then when you process the second response you can pull the data out of state and combine the results.
I’ve got it working again on the original code by removing and re-adding the device. Does that have to be done after every change of device handler code?
EDIT: scratch that, I changed the IP of the device and although I changed it in ST it didn’t seem to work until I’d re-added it. Changes to the code are immediate once published.
I still can’t get multiple hubActions working. Wherever I put the second call to hubAction, parse only gets called once.
Right, I’ve got a sort of workable Marantz M-CR610 version. Differences from Kristopher’s original are as follows:
Changed the power on/off commands to use standby.
Removed the 0.9 multiplier for volume, as the actual value seems to map to the expected volume.
Temporarily limited the volume range to 0-30, as I was having issues with clumsy fingers and didn’t want to blow up my speakers
Added a hardcoded list of a few functions for test purposes - again, temporary if I can figure out how to get the device capabilities, but this makes the next input button to work.
Removed bits that aren’t relevant to this device for clarity (mainly for my own benefit)
It’s far from perfect, but at the moment it’s working for me so I thought I’d post it in case it helps other Marantz users.
Now, a disclaimer and apology to @Kristopher - I am new to Github and the associated etiquette, so for simplicity I’ve set up a new repository under my own account and renamed the file. Please feel free to PM me if I haven’t gone about it the right way.
Like I say, new to Github, so if you download this and issue pull requests don’t be surprised if it takes me a while to figure out what to do with them!
EDIT: doh! Figured out the multiple hubAction issue and it’s ridiculously simple - you can return an array of actions… github code and comments above amended accordingly
Should the AVR be on wireless network to get the app work? Mine one is on LAN and when trying to configure Button to AV mode the app will not recognize any receiver
basically more control over zone 2 and input switching based on name. next input can cause problems if you have inputs with constant audio feeds. i need zone 2 control so i can control outdoor system and input switch to pandora/network/radio.