makidoja Posted March 7, 2017 Share Posted March 7, 2017 Hi all Im trying to get Amazon Echo to set the volume level of the Onkyo AVR with a "Alexa Set AVR to ## " voice command. Selecting the Onkyo TX-NR646 actions, in programming, I can program a "set the volume on Main Output" to a predefined value, say 50, but there is no option to use the Amazon Echo SET_VALUE_NUMBER string So is it possible to write an XML instruction to achieve this please? Im not great with XML but was thinking something like this may work <cutitems><item><Proxy>receiver</Proxy><Type>Command</Type><DeviceID>400</DeviceID><Description>Set NAME->SET_VOLUME_LEVEL to the value of Amazon Echo->SET_VALUE_NUMBER</Description><XmlData><devicecommand owneridtype="variable" owneriditem="1133" name="="><param name="variable" type="int" /><param name="deviceid" type="int">440</param><param name="variableid" type="int">1001</param></devicecommand></XmlData></item></cutitems> However the XML string from the "set volume level to" from the device actions on the AVR is <cutitems><item><Proxy>receiver</Proxy><Type>Command</Type><DeviceID>400</DeviceID><Description>Set the volume on Main Output to 50 on the NAME</Description><XmlData><devicecommand owneridtype="" owneriditem="-1"><command>SET_VOLUME_LEVEL</command><params><param><name>OUTPUT</name><value type="INTEGER"><static>4000</static></value></param><param><name>LEVEL</name><value type="INTEGER"><static>50</static></value></param></params></devicecommand></XmlData></item></cutitems> Any ideas / pointers on this please? Mak Link to comment Share on other sites More sharing options...
makidoja Posted March 7, 2017 Author Share Posted March 7, 2017 Or would this work maybe? <cutitems><item><Proxy>receiver</Proxy><Type>Command</Type><DeviceID>400</DeviceID><Description>Set the volume on Main Output to the value of Amazon Echo->SET_VALUE_NUMBER on the NAME</Description><XmlData><devicecommand owneridtype="" owneriditem="-1"><command>SET_VOLUME_LEVEL</command><params><param><name>OUTPUT</name><value type="INTEGER"><static>4000</static></value></param><param><name>LEVEL</name><value type="INTEGER"><static>Amazon Echo->SET_VALUE_NUMBER</static></value></param></params></devicecommand></XmlData></item></cutitems> Mak Link to comment Share on other sites More sharing options...
msgreenf Posted March 7, 2017 Share Posted March 7, 2017 what driver are you using? Link to comment Share on other sites More sharing options...
makidoja Posted March 7, 2017 Author Share Posted March 7, 2017 Epic systems Amazon Echo Link to comment Share on other sites More sharing options...
South Africa C4 user Posted March 7, 2017 Share Posted March 7, 2017 This is possible. If I recall correctly there is a number value which you want to use rather than the string variable. Link to comment Share on other sites More sharing options...
makidoja Posted March 7, 2017 Author Share Posted March 7, 2017 2 minutes ago, South Africa C4 user said: This is possible. If I recall correctly there is a number value which you want to use rather than the string variable. The Epic Systems driver has SET_VALUE_NUMBER SET_VALUE_STRING STE_VALUE_FLOAT Im trying to work out what the format of the XML should be Would it be something like <cutitems><item><Proxy>receiver</Proxy><Type>Command</Type><DeviceID>400</DeviceID><Description>Set NAME->SET_VOLUME_LEVEL to the value of Amazon Echo->SET_VALUE_NUMBER</Description><XmlData><devicecommand owneridtype="variable" owneriditem="1133" name="="><param name="variable" type="int" /><param name="deviceid" type="int">440</param><param name="variableid" type="int">1001</param></devicecommand></XmlData></item></cutitems> OR <cutitems><item><Proxy>receiver</Proxy><Type>Command</Type><DeviceID>400</DeviceID><Description>Set the volume on Main Output to the value of Amazon Echo->SET_VALUE_NUMBER on the NAME</Description><XmlData><devicecommand owneridtype="" owneriditem="-1"><command>SET_VOLUME_LEVEL</command><params><param><name>OUTPUT</name><value type="INTEGER"><static>4000</static></value></param><param><name>LEVEL</name><value type="INTEGER"><static>Amazon Echo->SET_VALUE_NUMBER</static></value></param></params></devicecommand></XmlData></item></cutitems> Or am I completely wrong in both the above .. this is my first attempt at modifying the XML programming so I'm not sure. Mak Link to comment Share on other sites More sharing options...
makidoja Posted March 7, 2017 Author Share Posted March 7, 2017 OK so this didn't work <cutitems><item><Proxy>receiver</Proxy><Type>Command</Type><DeviceID>400</DeviceID><Description>Set the volume on Main Output to the value of Amazon Echo->SET_VALUE_NUMBER on the NAME</Description><XmlData><devicecommand owneridtype="" owneriditem="-1"><command>SET_VOLUME_LEVEL</command><params><param><name>OUTPUT</name><value type="INTEGER"><static>4000</static></value></param><param><name>LEVEL</name><value type="INTEGER"><static>Amazon Echo->SET_VALUE_NUMBER</static></value></param></params></devicecommand></XmlData></item></cutitems> The LUA debug on the AVR showed the following ReceivedFromProxy(): SET_VOLUME_LEVEL on binding 5001; Call Function PRX_CMD.SET_VOLUME_LEVEL() . LEVEL: 50 ReceivedFromProxy(): SET_VOLUME_LEVEL on binding 5001; Call Function PRX_CMD.SET_VOLUME_LEVEL() LUA_ERROR: [string "Lua Code"]:545: attempt to perform arithmetic on field 'OUTPUT' (a nil value) . OUTPUT: 4000 LEVEL: Amazon Echo->SET_VALUE_NUMBER LUA_ERROR: [string "Lua Code"]:666: attempt to perform arithmetic on local 'volLevel' (a nil value) Any ideas? Link to comment Share on other sites More sharing options...
makidoja Posted March 7, 2017 Author Share Posted March 7, 2017 Also tried this <cutitems><item><Proxy>receiver</Proxy><Type>Command</Type><DeviceID>400</DeviceID><Description>Set NAME->SET_VOLUME_LEVEL to the value of Amazon Echo->SET_VALUE_NUMBER</Description><XmlData><devicecommand owneridtype="variable" owneriditem="1133" name="="><param name="variable" type="int" /><param name="deviceid" type="int">440</param><param name="variableid" type="int">1001</param></devicecommand></XmlData></item></cutitems> The LUA debug on the AVR showed the following ReceivedFromProxy(): SET_VOLUME_LEVEL on binding 5001; Call Function PRX_CMD.SET_VOLUME_LEVEL() . LEVEL: 20 LUA_ERROR: [string "Lua Code"]:545: attempt to perform arithmetic on field 'OUTPUT' (a nil value) Again any ideas please? Link to comment Share on other sites More sharing options...
makidoja Posted March 8, 2017 Author Share Posted March 8, 2017 I guess this is outside most people's knowledge of C4 programming? Mak Link to comment Share on other sites More sharing options...
dew1551 Posted March 8, 2017 Share Posted March 8, 2017 You need to program a voice scene Link to comment Share on other sites More sharing options...
msgreenf Posted March 8, 2017 Share Posted March 8, 2017 Just now, dew1551 said: You need to program a voice scene he isn't using Control4 driver. He is using Ari's Link to comment Share on other sites More sharing options...
dew1551 Posted March 8, 2017 Share Posted March 8, 2017 Ok Link to comment Share on other sites More sharing options...
makidoja Posted March 8, 2017 Author Share Posted March 8, 2017 We have everything working, this is more about getting the programming in Control4 to send the information to the AVR as there is currently no option to do this so I was looking for a back door. I've emailed Ari see if anything gives there It's just knowing the variable and how to correctly put this into the XML for programming. Mak Link to comment Share on other sites More sharing options...
South Africa C4 user Posted March 8, 2017 Share Posted March 8, 2017 Sorry... I must be missing something obvious here... but why not simply set the room volume variable to the value of SET_VALUE_NUMBER? One line of code in Composer... Clearly I am missing something obvious! Link to comment Share on other sites More sharing options...
makidoja Posted March 8, 2017 Author Share Posted March 8, 2017 1 minute ago, South Africa C4 user said: Sorry... I must be missing something obvious here... but why not simply set the room volume variable to the value of SET_VALUE_NUMBER? One line of code in Composer... Clearly I am missing something obvious! The room volume variable does not alter the volume level from the AVR (Onkyo via TCP/IP) I have tired this. Should the room volume level work? if so why doesn't it? Mak Link to comment Share on other sites More sharing options...
South Africa C4 user Posted March 8, 2017 Share Posted March 8, 2017 Now that question is above my pay grade... I use the room volume for pretty much everything but clearly my setup is different from yours... Link to comment Share on other sites More sharing options...
makidoja Posted March 8, 2017 Author Share Posted March 8, 2017 It certainly doesn't work with my AVR and I don't think it has on others I've installed, with C4 matrix amps and audio matrix I know it works. All the connections etc are correct for the AVR, volume up down mute works with the SR260 and C4 app but if I try using the CURRENT_VOLUME room variable and try to set this to say 50, stick it in the programming and execute it does nothing. Hence my trying to use the set the volume level on AVR but I just cant work it out in code, maybe it cant be done but I doubt it. Mak Link to comment Share on other sites More sharing options...
msgreenf Posted March 8, 2017 Share Posted March 8, 2017 does the AVR support discrete volume? it sounds like it may not. Link to comment Share on other sites More sharing options...
makidoja Posted March 8, 2017 Author Share Posted March 8, 2017 Hmmm, surely if I can send a Set Volume to 50 and the AVR volume goes to 50 it's discrete? Link to comment Share on other sites More sharing options...
msgreenf Posted March 8, 2017 Share Posted March 8, 2017 1 minute ago, makidoja said: Hmmm, surely if I can send a Set Volume to 50 and the AVR volume goes to 50 it's discrete? yes, but not all AVR's support this, so i'm just confirming that is the case. The other way to see that is in the control4 UI on the volume when the source is on do you have JUST the + - or do you have a volume # Link to comment Share on other sites More sharing options...
makidoja Posted March 8, 2017 Author Share Posted March 8, 2017 In a navigator UI click on the speaker for the room and I have + - and the level set as a number like 50 if it press plus it increases as does the AVR etc Link to comment Share on other sites More sharing options...
makidoja Posted March 12, 2017 Author Share Posted March 12, 2017 Ok so Ari has replied and the driver for the onkyo AVR has a major bug in the descrete volume that's never been fixed, so I had to do a workaround See the image for the code I ended up with, this will allow me to set the volume level in steps of 5, easy to remember and works great. Mak Link to comment Share on other sites More sharing options...
South Africa C4 user Posted March 12, 2017 Share Posted March 12, 2017 Glad you are sorted! Weird bug! Link to comment Share on other sites More sharing options...
sonic30101 Posted March 13, 2017 Share Posted March 13, 2017 On 3/12/2017 at 0:22 PM, makidoja said: Ok so Ari has replied and the driver for the onkyo AVR has a major bug in the descrete volume that's never been fixed, so I had to do a workaround See the image for the code I ended up with, this will allow me to set the volume level in steps of 5, easy to remember and works great. Mak Exactly what i did with google home and the ifttt driver in 5 db increments. Using an Integra DTR50.2 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.