Jump to content
C4 Forums | Control4

OS3 Volume Slider Issue - Sony Sound Bar


Recommended Posts

I noticed the same thing and I can't see where the `gSystemVolumeDisplay` is being set although you could change it manually by going to the Lua window of the driver and typing gSystemVolumeDisplay = "STEP"

As a side note, I modified the driver by changing the device volume range from 0-50 to -92-23 and that results in a value of -46 being sent to the driver instead which looks like a more appropriate value based on the range specified in the main.volumedb command.  However, I think there's more to this bug beyond just changing the range.

Link to comment
Share on other sites


I just double checked and the volume is definitely getting set 1:1 with the slider setting. If I set the slider to 10, the volume in the Sony goes to 10. Same for any value 0-50. Anything over 50 just keeps the last volume set as the Sony doesn’t accept a value greater than 50. 

Link to comment
Share on other sites

@dinom Try pasting the following commands into the Lua window of the driver and you can verify if there needs to be a conversion from a volume level to a db level

local volumeLevel = 40
local minDeviceLevel = -92
local maxDeviceLevel = 23
local volumeLevel_dB = ConvertVolumeToDevice(volumeLevel, minDeviceLevel, maxDeviceLevel)
tVolumeSetCommandMap_dB[0].value = volumeLevel_dB
local command = tVolumeSetCommandMap_dB[0]

QueueCommand(command)

This is the equivalent of setting the volume level to 40 then converting it to the db scale (-92 to 23) that the API is looking for instead of the 0-50 scale that it's currently using.  Feel free to set the volumeLevel to any number between 0 to 100 and see if you get the desired effect

Link to comment
Share on other sites

So the Lua  command window is present, including a button to "execute", but that command sequence doesn't seem to do anything.

One interesting tidbit I learned from within Composer HE, there is a "virtual" remote control I can use to control the Sony sound bar, and it has a direct volume control.  I can set this to any value from 0 to 50 and it commands the sound bar to the exact same value.  So doesn't that indicate that the driver is setting the volume 1:1 and not scaling by 2x?

Link to comment
Share on other sites

10 minutes ago, dinom said:

So the Lua  command window is present, including a button to "execute", but that command sequence doesn't seem to do anything.

One interesting tidbit I learned from within Composer HE, there is a "virtual" remote control I can use to control the Sony sound bar, and it has a direct volume control.  I can set this to any value from 0 to 50 and it commands the sound bar to the exact same value.  So doesn't that indicate that the driver is setting the volume 1:1 and not scaling by 2x?

But look at the control4 app or a touchpanel with a slider and it shows double the amount on your soundbar

Link to comment
Share on other sites

This is what I see

start both tp and soundbar at level 0 -- 

Raise volume with remote control and the volume on the TP increases in 2x what is shown on the Soundbar level

If I

Raise the volume on the TP slider (from 0) the volume level matches all the way to 50 on the TP and the soundbar is maxed at 50 

 

 

 

Link to comment
Share on other sites

39 minutes ago, jakblak said:

@dinom Try pasting the following commands into the Lua window of the driver and you can verify if there needs to be a conversion from a volume level to a db level


local volumeLevel = 40
local minDeviceLevel = -92
local maxDeviceLevel = 23
local volumeLevel_dB = ConvertVolumeToDevice(volumeLevel, minDeviceLevel, maxDeviceLevel)
tVolumeSetCommandMap_dB[0].value = volumeLevel_dB
local command = tVolumeSetCommandMap_dB[0]

QueueCommand(command)

This is the equivalent of setting the volume level to 40 then converting it to the db scale (-92 to 23) that the API is looking for instead of the 0-50 scale that it's currently using.  Feel free to set the volumeLevel to any number between 0 to 100 and see if you get the desired effect

Jakblak here is my Lua output after entering that command

ProcessVolumeLevel(level in=40, level out=-46)
--- Queue ---
  first = 2526
  last = 2525
  number in queue = 0
  maximum size = 100
 next value =
SendCommand(), sCommand =
QueueCommand(), sCommand =
SendToNetwork(6000, {"feature":"main.volumedb","id":2529,"type":"set","value":-46})
Starting Timer: SendCommand
ReceivedFromNetwork(), idBinding = 6000, nPort = 33336, sData = {
   "id" : 2529,
   "type" : "result",
   "value" : "ERR"
}
GetMessage()
HandleMessage({
   "id" : 2529,
   "type" : "result",
   "value" : "ERR"
})
GetMessage()
Send Timer expired
Send Timer expired - Pop Command:, Send Next Command
 

Link to comment
Share on other sites

Strange, the API documentation does indicate that -46 should be a valid value at least when volume display is "DB".  @Cartnj, would you mind trying the snippet below and then replying with the output from the log?.  It's the same as above but this time it's explicitly setting the display to "DB"

gSystemVolumeDisplay = DB
local volumeLevel = 40
local minDeviceLevel = -92
local maxDeviceLevel = 23
local volumeLevel_dB = ConvertVolumeToDevice(volumeLevel, minDeviceLevel, maxDeviceLevel)
tVolumeSetCommandMap_dB[0].value = volumeLevel_dB
local command = tVolumeSetCommandMap_dB[0]

QueueCommand(command)

 

Link to comment
Share on other sites

Just now, jakblak said:

Strange, the API documentation does indicate that -46 should be a valid value at least when volume display is "DB".  @Cartnj, would you mind trying the snippet below and then replying with the output from the log?.  It's the same as above but this time it's explicitly setting the display to "DB"


gSystemVolumeDisplay = DB
local volumeLevel = 40
local minDeviceLevel = -92
local maxDeviceLevel = 23
local volumeLevel_dB = ConvertVolumeToDevice(volumeLevel, minDeviceLevel, maxDeviceLevel)
tVolumeSetCommandMap_dB[0].value = volumeLevel_dB
local command = tVolumeSetCommandMap_dB[0]

QueueCommand(command)

 

Thanks Jak here is the output

LUA_ERROR [id: 275][name: Sony HT-NT3][file: receiver_HT-NT3_Network_DriverWorks__Sony.c4i]: [string "C4Commands"]:1: unexpected symbol near ' '
 

Link to comment
Share on other sites

OK after several seconds it shows this

 

LUA_ERROR [id: 275][name: Sony HT-NT3][file: receiver_HT-NT3_Network_DriverWorks__Sony.c4i]: [string "C4Commands"]:1: unexpected symbol near ' '
Polling Timer expired
QueueCommand(), sCommand =
--- Queue ---
  first = 2610
  last = 2609
  number in queue = 0
  maximum size = 100
 next value =
SendCommand(), sCommand =
SendToNetwork(6000, {"feature":"system.volumedisplay","id":2613,"type":"get"})
Starting Timer: PollingTimer
Starting Timer: SendCommand
ReceivedFromNetwork(), idBinding = 6000, nPort = 33336, sData = {
   "feature" : "system.volumedisplay",
   "id" : 2613,
   "type" : "result",
   "value" : "step"
}
GetMessage()
HandleMessage({
   "feature" : "system.volumedisplay",
   "id" : 2613,
   "type" : "result",
   "value" : "step"
})
DEV_MSG.systemvolumedisplay(), value = STEP
GetMessage()
Send Timer expired
Send Timer expired - Pop Command:, Send Next Command
 

Link to comment
Share on other sites

Ok, looks like maybe it there was a problem with the snippet because I had edited it on my Mac.  Anyway, here's a new one

gSystemVolumeDisplay = "DB"
local output = 0
local volumeLevel = 40
local minDeviceLevel = -92
local maxDeviceLevel = 23
local volumeLevel_dB = ConvertVolumeToDevice(volumeLevel, minDeviceLevel, maxDeviceLevel)
tVolumeSetCommandMap_dB[output].value = volumeLevel_dB
command = tVolumeSetCommandMap_dB[output]
QueueCommand(command)

 

Link to comment
Share on other sites

QueueCommand(), sCommand =
--- Queue ---
  first = 2685
  last = 2684
  number in queue = 0
  maximum size = 100
 next value =
SendCommand(), sCommand =
SendToNetwork(6000, {"feature":"main.volumedb","id":2688,"type":"set","value":-46})
Starting Timer: SendCommand
ReceivedFromNetwork(), idBinding = 6000, nPort = 33336, sData = {
   "id" : 2688,
   "type" : "result",
   "value" : "ERR"
}
HandleMessage({
   "id" : 2688,
   "type" : "result",
   "value" : "ERR"
})
GetMessage()
GetMessage()
Send Timer expired
Send Timer expired - Pop Command:, Send Next Command
 

Link to comment
Share on other sites

Feel free to also try this one which uses the STEP scale instead of the DB scale

gSystemVolumeDisplay = "STEP"
local output = 0
local volumeLevel_Step = 80
tVolumeSetCommandMap_Step[output].value = volumeLevel_Step
command = tVolumeSetCommandMap_Step[output]
QueueCommand(command)

 

Link to comment
Share on other sites

2 minutes ago, jakblak said:

Feel free to also try this one which uses the STEP scale instead of the DB scale


gSystemVolumeDisplay = "STEP"
local output = 0
local volumeLevel_Step = 80
tVolumeSetCommandMap_Step[output].value = volumeLevel_Step
command = tVolumeSetCommandMap_Step[output]
QueueCommand(command)

 

QueueCommand(), sCommand =
--- Queue ---
  first = 2736
  last = 2735
  number in queue = 0
  maximum size = 100
 next value =
SendCommand(), sCommand =
SendToNetwork(6000, {"feature":"main.volumestep","id":2739,"type":"set","value":80})
Starting Timer: SendCommand
ReceivedFromNetwork(), idBinding = 6000, nPort = 33336, sData = {
   "id" : 2739,
   "type" : "result",
   "value" : "ERR"
}
GetMessage()
HandleMessage({
   "id" : 2739,
   "type" : "result",
   "value" : "ERR"
})
GetMessage()
Send Timer expired - Pop Command:, Send Next Command
Send Timer expired
 

 

Link to comment
Share on other sites

2 minutes ago, jakblak said:

@Cartnj: will you try changing the value of volumeLevel_Step to something under 50 and try again?

this changed the volume on the soundbar this time. I set it to 20

QueueCommand(), sCommand =
--- Queue ---
  first = 2792
  last = 2791
  number in queue = 0
  maximum size = 100
 next value =
SendCommand(), sCommand =
SendToNetwork(6000, {"feature":"main.volumestep","id":2795,"type":"set","value":20})
Starting Timer: SendCommand
Send Timer expired
Send Timer expired - Pop Command:, Send Next Command
ReceivedFromNetwork(), idBinding = 6000, nPort = 33336, sData = {
   "feature" : "main.volumestep",
   "type" : "notify",
   "value" : "20"
}
GetMessage()
HandleMessage({
   "feature" : "main.volumestep",
   "type" : "notify",
   "value" : "20"
})
DEV_MSG.mainvolumestep(), value = 20
ProcessVolumeLevel(level in=20, level out=40)
handle_volume_message(output=0, c4_level=40, sony_value=20)
SendToProxy(5001, VOLUME_LEVEL_CHANGED)
OUTPUT:  4000
LEVEL:  40
GetMessage()
ReceivedFromNetwork(), idBinding = 6000, nPort = 33336, sData = {
   "feature" : "main.mute",
   "type" : "notify",
   "value" : "off"
}
GetMessage()
HandleMessage({
   "feature" : "main.mute",
   "type" : "notify",
   "value" : "off"
})
SendToProxy(5001, MUTE_CHANGED)
DEV_MSG.mainmute(), value = off
OUTPUT:  4000
MUTE:  False
ReceivedFromNetwork(), idBinding = 6000, nPort = 33336, sData = {
   "id" : 2795,
   "type" : "result",
   "value" : "ACK"
}
GetMessage()
GetMessage()
HandleMessage({
   "id" : 2795,
   "type" : "result",
   "value" : "ACK"
})
GetMessage()
 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.