Initial working state

This commit is contained in:
2021-07-14 21:27:02 -05:00
parent a395db3ba0
commit e19e281655
2 changed files with 112 additions and 29 deletions
+111 -28
View File
@@ -1,12 +1,12 @@
-- Plugin for NovaStar Video Wall controllers
-- Built in Lua
--Layout inspired by VideoHub plugin @ https://github.com/locimation/qsys-plugins
-- Layout inspired by VideoHub plugin @ https://github.com/locimation/qsys-plugins
PluginInfo = {
Name = "NovaStar~VX4S/VX6S/ProHD/ProHDJr/MCTRL4K", -- The tilde here indicates folder structure in the Shematic Elements pane
Version = "0.0.0-master",
Id = "novastar.plugin.0.0.0-master", -- show this is just a unique id. Show some commented out 'fun' unique ids
Version = "0.1.0-master",
Id = "novastar.plugin.0.1.0-master",
Description = "Plugin for controlling NovaStar video wall controllers",
ShowDebug = true,
Author = "Joel Wetzell"
@@ -35,7 +35,14 @@ function GetProperties()
props = {
{
Name = "IP Address",
Type = "string"
Type = "string",
Value = "10.0.0.5"
},
{
Name = 'Model',
Type = 'enum',
Choices = { 'VX4S', 'VX6S', 'PROHD', 'PROUHDJR', 'MCTRL4K' },
Value = 'VX4S'
}
}
return props
@@ -191,11 +198,54 @@ function GetControlLayout(props)
}
SourceButton.Size = {(rackSize[2] - 30 - (SourceButton.Padding * 2))/2, (rackSize[2] - 30 - (SourceButton.Padding * 2))/2}
SourceButton.xStart = inputPosition[1] + ((250 - (((SourceButton.Size[1] * 5) + (SourceButton.Padding * 4))))/2)
local InputLabels = {
VX4S = {
"DVI",
"HDMI",
"VGA1",
"VGA2",
"CVBS1",
"CVBS2",
"SDI",
"DP",
},
VX6S = {
"HDMI1",
"HDMI2",
"SDI1",
"SDI2",
"DVI1",
"DVI2",
"USB",
},
PROHD = {
"SDI",
"DVI",
"HDMI",
"DP",
"VGA",
"CVBS",
},
PROUHDJR = {
"SDI",
"DVI",
"HDMI",
"DP",
},
MCTRL4K = {
"DVI",
"HDMI",
"DP",
}
}
--First row of input buttons
controls['IN1'] = {
Style = "Button",
ButtonType = "Trigger",
Legend = "1",
Legend = InputLabels[props['Model'].Value][1] ~= nil and InputLabels[props['Model'].Value][1] or "1" ,
UnlinkOffColor = true,
OffColor = Colors.White,
Color = Colors.Red,
@@ -206,7 +256,7 @@ function GetControlLayout(props)
controls['IN2'] = {
Style = "Button",
ButtonType = "Trigger",
Legend = "2",
Legend = InputLabels[props['Model'].Value][2] ~= nil and InputLabels[props['Model'].Value][2] or "2" ,
UnlinkOffColor = true,
OffColor = Colors.White,
Color = Colors.Red,
@@ -217,7 +267,7 @@ function GetControlLayout(props)
controls['IN3'] = {
Style = "Button",
ButtonType = "Trigger",
Legend = "3",
Legend = InputLabels[props['Model'].Value][3] ~= nil and InputLabels[props['Model'].Value][3] or "3" ,
UnlinkOffColor = true,
OffColor = Colors.White,
Color = Colors.Red,
@@ -228,7 +278,7 @@ function GetControlLayout(props)
controls['IN4'] = {
Style = "Button",
ButtonType = "Trigger",
Legend = "4",
Legend = InputLabels[props['Model'].Value][4] ~= nil and InputLabels[props['Model'].Value][4] or"4",
UnlinkOffColor = true,
OffColor = Colors.White,
Color = Colors.Red,
@@ -240,7 +290,7 @@ function GetControlLayout(props)
controls['IN5'] = {
Style = "Button",
ButtonType = "Trigger",
Legend = "5",
Legend = InputLabels[props['Model'].Value][5] ~= nil and InputLabels[props['Model'].Value][5] or"5",
UnlinkOffColor = true,
OffColor = Colors.White,
Color = Colors.Red,
@@ -255,7 +305,7 @@ function GetControlLayout(props)
controls['IN6'] = {
Style = "Button",
ButtonType = "Trigger",
Legend = "6",
Legend = InputLabels[props['Model'].Value][6] ~= nil and InputLabels[props['Model'].Value][6] or"6",
UnlinkOffColor = true,
OffColor = Colors.White,
Color = Colors.Red,
@@ -266,7 +316,7 @@ function GetControlLayout(props)
controls['IN7'] = {
Style = "Button",
ButtonType = "Trigger",
Legend = "7",
Legend = InputLabels[props['Model'].Value][7] ~= nil and InputLabels[props['Model'].Value][7] or"7",
UnlinkOffColor = true,
OffColor = Colors.White,
Color = Colors.Red,
@@ -278,7 +328,7 @@ function GetControlLayout(props)
controls['IN8'] = {
Style = "Button",
ButtonType = "Trigger",
Legend = "8",
Legend = InputLabels[props['Model'].Value][8] ~= nil and InputLabels[props['Model'].Value][8] or"8",
UnlinkOffColor = true,
OffColor = Colors.White,
Color = Colors.Red,
@@ -289,7 +339,7 @@ function GetControlLayout(props)
controls['IN9'] = {
Style = "Button",
ButtonType = "Trigger",
Legend = "9",
Legend = InputLabels[props['Model'].Value][9] ~= nil and InputLabels[props['Model'].Value][9] or"9",
UnlinkOffColor = true,
OffColor = Colors.White,
Color = Colors.Red,
@@ -301,7 +351,7 @@ function GetControlLayout(props)
controls['IN0'] = {
Style = "Button",
ButtonType = "Trigger",
Legend = "0",
Legend = InputLabels[props['Model'].Value][10] ~= nil and InputLabels[props['Model'].Value][10] or"0",
UnlinkOffColor = true,
OffColor = Colors.White,
Color = Colors.Red,
@@ -340,20 +390,51 @@ if (Controls) then
Preamble = {0x55, 0xAA},
Connect = {0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x57,0x56},
Brightness = {0x00,0x00,0xFE,0xFF,0x01,0xFF,0xFF,0xFF,0x01,0x00,0x01,0x00,0x00,0x02,0x01,0x00},
VX4S = {
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x10,0xB4,0x56},
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0xA0,0x44,0x57},
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x01,0xA5,0x56},
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x02,0xA6,0x56},
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x71,0x15,0x57},
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x72,0x16,0x57},
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x40,0xE4,0x56},
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x90,0x34,0x57},
Inputs = {
VX4S = {
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x10,0xB4,0x56}, --DVI
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0xA0,0x44,0x57}, --HDMI
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x01,0xA5,0x56}, --VGA1
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x02,0xA6,0x56}, --VGA2
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x71,0x15,0x57}, --CVBS1
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x72,0x16,0x57}, --CVBS2
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x40,0xE4,0x56}, --SDI
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x90,0x34,0x57}, --DP
},
VX6S = {
{0x55,0xAA,0x00,0x88,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x12,0x00,0x02,0x13,0x03,0x00,0x00,0x00,0x11,0x17,0x57}, --HDMI1
{0x55,0xAA,0x00,0xA8,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x12,0x00,0x02,0x13,0x03,0x00,0x01,0x00,0x12,0x39,0x57}, --HDMI2
{0x55,0xAA,0x00,0xC4,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x12,0x00,0x02,0x13,0x03,0x00,0x02,0x00,0x31,0x75,0x57}, --SDI1
{0x55,0xAA,0x00,0xD4,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x12,0x00,0x02,0x13,0x03,0x00,0x03,0x00,0x32,0x87,0x57}, --SDI2
{0x55,0xAA,0x00,0xD6,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x12,0x00,0x02,0x13,0x03,0x00,0x04,0x00,0x01,0x59,0x57}, --DVI1
{0x55,0xAA,0x00,0xD7,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x12,0x00,0x02,0x13,0x03,0x00,0x06,0x00,0x02,0x5D,0x57}, --DVI2
{0x55,0xAA,0x00,0xD9,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x12,0x00,0x02,0x13,0x03,0x00,0x07,0x00,0xA0,0xFE,0x57}, --USB
},
PROHD = {
{0x55,0xAA,0x00,0x2B,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x22,0x00,0x20,0x02,0x01,0x00,0x1A,0xDE,0x56}, --SDI
{0x55,0xAA,0x00,0x34,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x22,0x00,0x20,0x02,0x01,0x00,0x1C,0xE9,0x56}, --DVI
{0x55,0xAA,0x00,0x3F,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x22,0x00,0x20,0x02,0x01,0x00,0x1B,0xF3,0x56}, --HDMI
{0x55,0xAA,0x00,0x51,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x22,0x00,0x20,0x02,0x01,0x00,0x1E,0x08,0x57}, --DP
{0x55,0xAA,0x00,0x48,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x22,0x00,0x20,0x02,0x01,0x00,0x17,0xF8,0x56}, --VGA
{0x55,0xAA,0x00,0x5A,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x22,0x00,0x20,0x02,0x01,0x00,0x02,0xF5,0x56}, --CVBS
},
PROUHDJR = {
{0x55,0xAA,0x00,0x2B,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x22,0x00,0x20,0x02,0x01,0x00,0x1A,0xDE,0x56}, --SDI
{0x55,0xAA,0x00,0x34,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x22,0x00,0x20,0x02,0x01,0x00,0x1C,0xE9,0x56}, --DVI
{0x55,0xAA,0x00,0x3F,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x22,0x00,0x20,0x02,0x01,0x00,0x1B,0xF3,0x56}, --HDMI
{0x55,0xAA,0x00,0x51,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x22,0x00,0x20,0x02,0x01,0x00,0x1E,0x08,0x57}, --DP
},
MCTRL4K = {
{0x55,0xAA,0x00,0x3E,0xFE,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x23,0x00,0x00,0x02,0x01,0x00,0x61,0x18,0x58}, --DVI
{0x55,0xAA,0x00,0x8A,0xFE,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x23,0x00,0x00,0x02,0x01,0x00,0x05,0x08,0x58}, --HDMI
{0x55,0xAA,0x00,0x9D,0xFE,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x23,0x00,0x00,0x02,0x01,0x00,0x5F,0x75,0x58}, --DP
}
}
},
Response = {
Connected = {0xAA,0x55,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x06,0x61,0xBE,0x56}
}
},
}
-- NovaStar.socket.ReadTimeout = 0.5
@@ -460,12 +541,14 @@ if (Controls) then
NovaStar.setStatus(2,"Timeout in connection to NovaStar")
end
for k,v in pairs(NovaStar.Commands['VX4S']) do
print('Setting up IN' .. k)
Controls['IN'..k].EventHandler = function()
sendCommand(v)
if Properties['Model'].Value ~= '' then
for k,v in pairs(NovaStar.Commands.Inputs[Properties['Model'].Value]) do
Controls['IN'..k].EventHandler = function()
sendCommand(v)
end
end
end
Controls['Brightness'].EventHandler = function()
sendBrightness(Controls['Brightness'].Value)
+1 -1
View File
@@ -3,7 +3,7 @@
<package >
<metadata>
<id>NovaStar</id>
<version>0.0.0.0-master</version>
<version>0.1.0-master</version>
<title>NovaStar Controller</title>
<authors>Joel Wetzell</authors>
<owners>Joel Wetzell</owners>