jakblak Posted July 30, 2019 Share Posted July 30, 2019 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. Quote Link to comment Share on other sites More sharing options...
dinom Posted July 30, 2019 Author Share Posted July 30, 2019 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. Quote Link to comment Share on other sites More sharing options...
jakblak Posted July 30, 2019 Share Posted July 30, 2019 @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 Quote Link to comment Share on other sites More sharing options...
dinom Posted July 30, 2019 Author Share Posted July 30, 2019 I only have Composer HE (I’m and end user). Will this work in HE? Quote Link to comment Share on other sites More sharing options...
jakblak Posted July 30, 2019 Share Posted July 30, 2019 7 minutes ago, dinom said: I only have Composer HE (I’m and end user). Will this work in HE? Sorry @dinom, I'm not sure if that feature (Lua command window) is part of HE or not. Quote Link to comment Share on other sites More sharing options...
dinom Posted July 30, 2019 Author Share Posted July 30, 2019 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? Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 30, 2019 Share Posted July 30, 2019 Tried it here also and no output response Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 30, 2019 Share Posted July 30, 2019 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 Quote Link to comment Share on other sites More sharing options...
dinom Posted July 30, 2019 Author Share Posted July 30, 2019 Correct, the scaling is happening for the display feedback, but not for the volume command being sent. So it’s working properly in one direction only. Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 30, 2019 Share Posted July 30, 2019 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 Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 30, 2019 Share Posted July 30, 2019 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 Quote Link to comment Share on other sites More sharing options...
jakblak Posted July 30, 2019 Share Posted July 30, 2019 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) Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 30, 2019 Share Posted July 30, 2019 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 ' ' Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 30, 2019 Share Posted July 30, 2019 There is a Square symbol between those ' ' Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 30, 2019 Share Posted July 30, 2019 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 Quote Link to comment Share on other sites More sharing options...
jakblak Posted July 30, 2019 Share Posted July 30, 2019 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) Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 30, 2019 Share Posted July 30, 2019 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 Quote Link to comment Share on other sites More sharing options...
jakblak Posted July 31, 2019 Share Posted July 31, 2019 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) Quote Link to comment Share on other sites More sharing options...
dinom Posted July 31, 2019 Author Share Posted July 31, 2019 Maybe the sound bar only supports step and not dB. In the output above I see this is the Lua output: DEV_MSG.systemvolumedisplay(), value = STEP Quote Link to comment Share on other sites More sharing options...
jakblak Posted July 31, 2019 Share Posted July 31, 2019 After seeing the output from those Lua snippets I believe you are correct. This same driver template is probably used for their receivers as well which most likely do display in DB Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 31, 2019 Share Posted July 31, 2019 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 Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 31, 2019 Share Posted July 31, 2019 Should I be changing any values? Because so far, the results are still the same Quote Link to comment Share on other sites More sharing options...
jakblak Posted July 31, 2019 Share Posted July 31, 2019 @Cartnj: will you try changing the value of volumeLevel_Step to something under 50 and try again? Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 31, 2019 Share Posted July 31, 2019 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() Quote Link to comment Share on other sites More sharing options...
JSTRONG Posted July 31, 2019 Share Posted July 31, 2019 Soundbar went to 20 and tp slider to 40 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.