0
Under review
Volume level - Serial rs-232
I have a project for AV automation and I'm using a global cache driver to control the device trough rs-232 port.
My device has the command "<11VOxx0x0D" to control the volume, where the 'xx' is the level of volume that goes from 00 to 38.
I need to create a level that controls this volume without the need of the creation of 38 buttons for it. Can anyone help me?
Customer support service by UserEcho
Hello.
You can do so:
1) Get the value from the Level.
2) The obtained value to insert in the row of the datagram.
Concatenation in this case is possible only through the script. You can see how it is implemented in the attached project.
level.irpz
level.sirpz
Ok, but I didn't quite understand why do I need a server for it?
Can't I do it with a simple script?
I'm trying to make a script on top of the model you sent but I'm not having any sucess.
When I call this script (by pressing a simple button) the command goes perfectly:
function Volume11(){// Global Cache:
IR.GetDevice("7Port").Send(['<11VOxx', '\r\n'], 1); // .Send command as string
}
But when I try this one by pressing the level nothing happens:
function Volume(){// Global Cache:
volume_value = IR.GetPage("Page Volume").GetItem("Item 1").Value;IR.GetDevice("7Port").Send(['<11VO' + volume_value, '\r\n'], 1); // .Send command as string
}
What am I doing wrong?
I use a server to simplify the testing of a panel project.
What do you have in volume_value comes? Do after:
volume_value = IR.GetPage("Page Volume").GetItem("Item 1").Value;
the output in the log:
IR.Log ("volume_value = " + volume_value);
What you have there is the value? You try to add it to the string and send it.
This has been a great help for me in implementing sliders for volume control. I am a little stumped with this when the product requires a checksum to also be sent. What would be the best way to insert the volume (i.e. 00 - 99) but then also calculate a checksum of part of the string to add at the end?
Hello.
In a custom driver, the checksum must be calculated only by the script.
Read more about the method here.
Thank you for this - I looked into it and ended up making an Excel sheet which made the code for me. I have attached my project for your reference and JS below. It's a bit ugly, but I will test on Friday when i have a Samsung Display to control volume again.Level Test File
I am using a slider and writing the value (0-99) into a project token. I then read this token and call it 'samsungvolume.' Depending on the value (0-99) it will then send the correctly formatted command with checksum to the display to make the volume change when the slider is released.