mirror of
https://github.com/jwetzell/q-sys-plugin-novastar.git
synced 2026-09-02 10:49:09 +00:00
Initial working state
This commit is contained in:
+111
-28
@@ -1,12 +1,12 @@
|
|||||||
-- Plugin for NovaStar Video Wall controllers
|
-- Plugin for NovaStar Video Wall controllers
|
||||||
-- Built in Lua
|
-- 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 = {
|
PluginInfo = {
|
||||||
Name = "NovaStar~VX4S/VX6S/ProHD/ProHDJr/MCTRL4K", -- The tilde here indicates folder structure in the Shematic Elements pane
|
Name = "NovaStar~VX4S/VX6S/ProHD/ProHDJr/MCTRL4K", -- The tilde here indicates folder structure in the Shematic Elements pane
|
||||||
Version = "0.0.0-master",
|
Version = "0.1.0-master",
|
||||||
Id = "novastar.plugin.0.0.0-master", -- show this is just a unique id. Show some commented out 'fun' unique ids
|
Id = "novastar.plugin.0.1.0-master",
|
||||||
Description = "Plugin for controlling NovaStar video wall controllers",
|
Description = "Plugin for controlling NovaStar video wall controllers",
|
||||||
ShowDebug = true,
|
ShowDebug = true,
|
||||||
Author = "Joel Wetzell"
|
Author = "Joel Wetzell"
|
||||||
@@ -35,7 +35,14 @@ function GetProperties()
|
|||||||
props = {
|
props = {
|
||||||
{
|
{
|
||||||
Name = "IP Address",
|
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
|
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.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)
|
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
|
--First row of input buttons
|
||||||
controls['IN1'] = {
|
controls['IN1'] = {
|
||||||
Style = "Button",
|
Style = "Button",
|
||||||
ButtonType = "Trigger",
|
ButtonType = "Trigger",
|
||||||
Legend = "1",
|
Legend = InputLabels[props['Model'].Value][1] ~= nil and InputLabels[props['Model'].Value][1] or "1" ,
|
||||||
UnlinkOffColor = true,
|
UnlinkOffColor = true,
|
||||||
OffColor = Colors.White,
|
OffColor = Colors.White,
|
||||||
Color = Colors.Red,
|
Color = Colors.Red,
|
||||||
@@ -206,7 +256,7 @@ function GetControlLayout(props)
|
|||||||
controls['IN2'] = {
|
controls['IN2'] = {
|
||||||
Style = "Button",
|
Style = "Button",
|
||||||
ButtonType = "Trigger",
|
ButtonType = "Trigger",
|
||||||
Legend = "2",
|
Legend = InputLabels[props['Model'].Value][2] ~= nil and InputLabels[props['Model'].Value][2] or "2" ,
|
||||||
UnlinkOffColor = true,
|
UnlinkOffColor = true,
|
||||||
OffColor = Colors.White,
|
OffColor = Colors.White,
|
||||||
Color = Colors.Red,
|
Color = Colors.Red,
|
||||||
@@ -217,7 +267,7 @@ function GetControlLayout(props)
|
|||||||
controls['IN3'] = {
|
controls['IN3'] = {
|
||||||
Style = "Button",
|
Style = "Button",
|
||||||
ButtonType = "Trigger",
|
ButtonType = "Trigger",
|
||||||
Legend = "3",
|
Legend = InputLabels[props['Model'].Value][3] ~= nil and InputLabels[props['Model'].Value][3] or "3" ,
|
||||||
UnlinkOffColor = true,
|
UnlinkOffColor = true,
|
||||||
OffColor = Colors.White,
|
OffColor = Colors.White,
|
||||||
Color = Colors.Red,
|
Color = Colors.Red,
|
||||||
@@ -228,7 +278,7 @@ function GetControlLayout(props)
|
|||||||
controls['IN4'] = {
|
controls['IN4'] = {
|
||||||
Style = "Button",
|
Style = "Button",
|
||||||
ButtonType = "Trigger",
|
ButtonType = "Trigger",
|
||||||
Legend = "4",
|
Legend = InputLabels[props['Model'].Value][4] ~= nil and InputLabels[props['Model'].Value][4] or"4",
|
||||||
UnlinkOffColor = true,
|
UnlinkOffColor = true,
|
||||||
OffColor = Colors.White,
|
OffColor = Colors.White,
|
||||||
Color = Colors.Red,
|
Color = Colors.Red,
|
||||||
@@ -240,7 +290,7 @@ function GetControlLayout(props)
|
|||||||
controls['IN5'] = {
|
controls['IN5'] = {
|
||||||
Style = "Button",
|
Style = "Button",
|
||||||
ButtonType = "Trigger",
|
ButtonType = "Trigger",
|
||||||
Legend = "5",
|
Legend = InputLabels[props['Model'].Value][5] ~= nil and InputLabels[props['Model'].Value][5] or"5",
|
||||||
UnlinkOffColor = true,
|
UnlinkOffColor = true,
|
||||||
OffColor = Colors.White,
|
OffColor = Colors.White,
|
||||||
Color = Colors.Red,
|
Color = Colors.Red,
|
||||||
@@ -255,7 +305,7 @@ function GetControlLayout(props)
|
|||||||
controls['IN6'] = {
|
controls['IN6'] = {
|
||||||
Style = "Button",
|
Style = "Button",
|
||||||
ButtonType = "Trigger",
|
ButtonType = "Trigger",
|
||||||
Legend = "6",
|
Legend = InputLabels[props['Model'].Value][6] ~= nil and InputLabels[props['Model'].Value][6] or"6",
|
||||||
UnlinkOffColor = true,
|
UnlinkOffColor = true,
|
||||||
OffColor = Colors.White,
|
OffColor = Colors.White,
|
||||||
Color = Colors.Red,
|
Color = Colors.Red,
|
||||||
@@ -266,7 +316,7 @@ function GetControlLayout(props)
|
|||||||
controls['IN7'] = {
|
controls['IN7'] = {
|
||||||
Style = "Button",
|
Style = "Button",
|
||||||
ButtonType = "Trigger",
|
ButtonType = "Trigger",
|
||||||
Legend = "7",
|
Legend = InputLabels[props['Model'].Value][7] ~= nil and InputLabels[props['Model'].Value][7] or"7",
|
||||||
UnlinkOffColor = true,
|
UnlinkOffColor = true,
|
||||||
OffColor = Colors.White,
|
OffColor = Colors.White,
|
||||||
Color = Colors.Red,
|
Color = Colors.Red,
|
||||||
@@ -278,7 +328,7 @@ function GetControlLayout(props)
|
|||||||
controls['IN8'] = {
|
controls['IN8'] = {
|
||||||
Style = "Button",
|
Style = "Button",
|
||||||
ButtonType = "Trigger",
|
ButtonType = "Trigger",
|
||||||
Legend = "8",
|
Legend = InputLabels[props['Model'].Value][8] ~= nil and InputLabels[props['Model'].Value][8] or"8",
|
||||||
UnlinkOffColor = true,
|
UnlinkOffColor = true,
|
||||||
OffColor = Colors.White,
|
OffColor = Colors.White,
|
||||||
Color = Colors.Red,
|
Color = Colors.Red,
|
||||||
@@ -289,7 +339,7 @@ function GetControlLayout(props)
|
|||||||
controls['IN9'] = {
|
controls['IN9'] = {
|
||||||
Style = "Button",
|
Style = "Button",
|
||||||
ButtonType = "Trigger",
|
ButtonType = "Trigger",
|
||||||
Legend = "9",
|
Legend = InputLabels[props['Model'].Value][9] ~= nil and InputLabels[props['Model'].Value][9] or"9",
|
||||||
UnlinkOffColor = true,
|
UnlinkOffColor = true,
|
||||||
OffColor = Colors.White,
|
OffColor = Colors.White,
|
||||||
Color = Colors.Red,
|
Color = Colors.Red,
|
||||||
@@ -301,7 +351,7 @@ function GetControlLayout(props)
|
|||||||
controls['IN0'] = {
|
controls['IN0'] = {
|
||||||
Style = "Button",
|
Style = "Button",
|
||||||
ButtonType = "Trigger",
|
ButtonType = "Trigger",
|
||||||
Legend = "0",
|
Legend = InputLabels[props['Model'].Value][10] ~= nil and InputLabels[props['Model'].Value][10] or"0",
|
||||||
UnlinkOffColor = true,
|
UnlinkOffColor = true,
|
||||||
OffColor = Colors.White,
|
OffColor = Colors.White,
|
||||||
Color = Colors.Red,
|
Color = Colors.Red,
|
||||||
@@ -340,20 +390,51 @@ if (Controls) then
|
|||||||
Preamble = {0x55, 0xAA},
|
Preamble = {0x55, 0xAA},
|
||||||
Connect = {0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x57,0x56},
|
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},
|
Brightness = {0x00,0x00,0xFE,0xFF,0x01,0xFF,0xFF,0xFF,0x01,0x00,0x01,0x00,0x00,0x02,0x01,0x00},
|
||||||
VX4S = {
|
Inputs = {
|
||||||
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x10,0xB4,0x56},
|
VX4S = {
|
||||||
{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,0x10,0xB4,0x56}, --DVI
|
||||||
{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,0xA0,0x44,0x57}, --HDMI
|
||||||
{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,0x01,0xA5,0x56}, --VGA1
|
||||||
{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,0x02,0xA6,0x56}, --VGA2
|
||||||
{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,0x71,0x15,0x57}, --CVBS1
|
||||||
{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,0x72,0x16,0x57}, --CVBS2
|
||||||
{0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x2D,0x00,0x20,0x02,0x01,0x00,0x90,0x34,0x57},
|
{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 = {
|
Response = {
|
||||||
Connected = {0xAA,0x55,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x06,0x61,0xBE,0x56}
|
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
|
-- NovaStar.socket.ReadTimeout = 0.5
|
||||||
@@ -460,12 +541,14 @@ if (Controls) then
|
|||||||
NovaStar.setStatus(2,"Timeout in connection to NovaStar")
|
NovaStar.setStatus(2,"Timeout in connection to NovaStar")
|
||||||
end
|
end
|
||||||
|
|
||||||
for k,v in pairs(NovaStar.Commands['VX4S']) do
|
if Properties['Model'].Value ~= '' then
|
||||||
print('Setting up IN' .. k)
|
for k,v in pairs(NovaStar.Commands.Inputs[Properties['Model'].Value]) do
|
||||||
Controls['IN'..k].EventHandler = function()
|
Controls['IN'..k].EventHandler = function()
|
||||||
sendCommand(v)
|
sendCommand(v)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
Controls['Brightness'].EventHandler = function()
|
Controls['Brightness'].EventHandler = function()
|
||||||
sendBrightness(Controls['Brightness'].Value)
|
sendBrightness(Controls['Brightness'].Value)
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
<package >
|
<package >
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>NovaStar</id>
|
<id>NovaStar</id>
|
||||||
<version>0.0.0.0-master</version>
|
<version>0.1.0-master</version>
|
||||||
<title>NovaStar Controller</title>
|
<title>NovaStar Controller</title>
|
||||||
<authors>Joel Wetzell</authors>
|
<authors>Joel Wetzell</authors>
|
||||||
<owners>Joel Wetzell</owners>
|
<owners>Joel Wetzell</owners>
|
||||||
|
|||||||
Reference in New Issue
Block a user