Page 1 of 1
Onkyo Volume Switch
Posted: Monday 23 May 2016 17:28
by Lyrex
hey guys,
is ist possible to create a volume slider for my onkyo avr? Im using the python implementation auf eiscp and atm im using two switches as push on buttons with this lua script:
Code: Select all
if devicechanged['Volume Up']=="On" then
onkyo_change('volume:level-up')
else
if devicechanged['Volume Down']=="On" then
onkyo_change('volume:level-down')
end
end
Reasons:
1. the push on buttons are very sluggish
2. With a slider i can move to the position i want and the receiver is doing stuf..
Additional Info:
its possible to set the volume directly withe volume:0-100 and you can get the current volume with volume:query.
Re: Onkyo Volume Switch
Posted: Tuesday 24 May 2016 20:54
by Lyrex
Did no one ever done it? :/
Re: Onkyo Volume Switch
Posted: Wednesday 25 May 2016 18:48
by Skippiemanz
Maybe with the multi selector switch?
Verstuurd vanaf mijn SM-G925F met Tapatalk
Re: Onkyo Volume Switch
Posted: Wednesday 25 May 2016 19:34
by Lyrex
What i tried:
if i create a virtual sensor as Selector Switch => edit the Switch and change the type from Selector Switch to Dimmer (i realy want a slider

) the switch is not editable oder deletable anymore... The point is.. MAYBE (i did not test it yet) i can use this wonky created switch for what i want but im unable to edit or delete this button in the future.
I saw via google (i search a solution since a week..) pictures with what i want. A slider named Volume for avr's but no one say how this is possible

Re: Onkyo Volume Switch
Posted: Thursday 26 May 2016 0:33
by DarkFoxDK
I've done this with my Bravia TV. I can't get the current volume for it, so I've had to make it change the volume relatively.
The only way I've found as well, is the Selector switch method. You just gotta get all the settings set before you change it to Dimmer. You can delete it from the Devices page, if need be. My main issue with it, is that the slider doesn't show up for it, on the floorplan.
As for the volume changing, I've solved it in this way:
Code: Select all
commandArray = {}
remoteScript = '/home/pi/domoticz/scripts/remote.sh'
for deviceName,deviceValue in pairs(devicechanged) do
if (deviceName=='Bravia TV') then
if (deviceValue == 'On') then
commandArray['TV'] = 'Set Level: 50 %'
else
commandArray['TV'] = 'Off'
end
end
if (deviceName=='TV') then
deviceSValue = otherdevices_svalues["TV"]
if (deviceValue == 'Off') then
if (otherdevices['Bravia TV'] ~= 'Off') then
os.execute(remoteScript..' Mute &')
commandArray['TV'] = 'Set Level: 50 %'
end
elseif (tonumber(deviceSValue) ~= 50) then
if tonumber(deviceSValue) < 50 then
times = 50 - deviceSValue
os.execute(remoteScript..' VolumeDown '..times..' &')
elseif tonumber(deviceSValue) > 50 then
times = deviceSValue - 50
os.execute(remoteScript..' VolumeUp '..times..' &')
end
commandArray['TV'] = 'Set Level: 50 %'
end
end
end
return commandArray
(Bravia TV is a pinger that pings the TV's IP. TV is the virtual switch.)
If you don't need to display on/off status, just remove the Bravia TV bits.
Re: Onkyo Volume Switch
Posted: Friday 27 May 2016 10:33
by Lyrex
hm okay then i will do it like you as well. Thank you
