Onkyo Volume Switch

Moderator: leecollings

Post Reply
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Onkyo Volume Switch

Post 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.
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: Onkyo Volume Switch

Post by Lyrex »

Did no one ever done it? :/
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: Onkyo Volume Switch

Post by Skippiemanz »

Maybe with the multi selector switch?

Verstuurd vanaf mijn SM-G925F met Tapatalk
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: Onkyo Volume Switch

Post 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 :evil: ) 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 :lol:
DarkFoxDK
Posts: 26
Joined: Saturday 02 January 2016 2:22
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Onkyo Volume Switch

Post 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.
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: Onkyo Volume Switch

Post by Lyrex »

hm okay then i will do it like you as well. Thank you :)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest