Skip to content

Instantly share code, notes, and snippets.

@shelbydz
Created April 19, 2018 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shelbydz/5ba93a77b61a507e643d993e0964fb03 to your computer and use it in GitHub Desktop.
Save shelbydz/5ba93a77b61a507e643d993e0964fb03 to your computer and use it in GitHub Desktop.
gpo driver
--
-- driver.lua
--
-- Serial Commands
CMDS_SERIAL = {
--Power
["ON"] = "F5 88 FF FE FE 01",
["OFF"] = "F5 88 FF FE FE 00",
--Input Toggle
["DP"]= "F5 88 FF FE 01 01",
["HDMI"]= "F5 88 FF FE 01 02"
}
SERIAL_BINDING = 1
function ReceivedFromProxy(idBinding, strCommand, tParams)
if CMDS_SERIAL[strCommand] ~= nil then
C4:SendToSerial(SERIAL_BINDING, tohex(CMDS_SERIAL[strCommand]))
print("sending " .. strCommand)
print("command is " .. CMDS_SERIAL[strCommand])
print("binding id is " .. SERIAL_BINDING)
else
print (strCommand .. " command not found")
end
end
<devicedata>
<version>3</version>
<manufacturer>GPO</manufacturer>
<model>EZ Display Wall</model>
<search_type>c4:av_gen</search_type>
<creator>Complete AV</creator>
<name>GPO EZ Display Wall [Serial]</name>
<small>devices_sm/C4.gif</small>
<large>devices_lg/C4.gif</large>
<control>lua_gen</control>
<controlmethod>serial</controlmethod>
<driver>DriverWorks</driver>
<copyright>Copyright 2018 Complete AV</copyright>
<created>04/18/2018 8:13 AM</created>
<modified>04/18/2018 8:13 AM</modified>
<proxies qty="1">
<proxy proxybindingid="5000" primary="True">tv</proxy>
</proxies>
<config>
<script file="driver.lua"></script>
<power_management_method>DiscreteCodes</power_management_method>
<power_delay>2</power_delay>
<power_command_delay>3</power_command_delay>
<power_command_needed>False</power_command_needed>
<serialsettings>19200 8 none 0 none 232</serialsettings>
</config>
<connections>
<connection>
<type>2</type>
<id>5000</id>
<audiosource>false</audiosource>
<videosource>false</videosource>
<connectionname>TV</connectionname>
<facing>1</facing>
<consumer>false</consumer>
<linelevel>false</linelevel>
<classes>
<class>
<classname>TV</classname>
</class>
</classes>
</connection>
<connection proxybindingid="5000">
<type>1</type>
<id>1</id>
<audiosource>false</audiosource>
<videosource>false</videosource>
<connectionname>RS_232</connectionname>
<facing>1</facing>
<consumer>true</consumer>
<linelevel>false</linelevel>
<classes>
<class>
<classname>RS_232</classname>
</class>
</classes>
</connection>
<connection proxybindingid="5000">
<type>6</type>
<id>3000</id>
<audiosource>false</audiosource>
<videosource>false</videosource>
<connectionname>HDMI</connectionname>
<facing>1</facing>
<consumer>true</consumer>
<linelevel>false</linelevel>
<classes>
<class>
<classname>HDMI</classname>
</class>
</classes>
</connection>
<connection proxybindingid="5000">
<type>5</type>
<id>1000</id>
<audiosource>false</audiosource>
<videosource>false</videosource>
<connectionname>HDMI</connectionname>
<facing>1</facing>
<consumer>true</consumer>
<linelevel>false</linelevel>
<classes>
<class>
<classname>HDMI</classname>
</class>
</classes>
</connection>
<connection proxybindingid="5000">
<type>7</type>
<id>7000</id>
<audiosource>false</audiosource>
<videosource>true</videosource>
<connectionname>VIDEO_SELECTION</connectionname>
<facing>1</facing>
<consumer>false</consumer>
<linelevel>false</linelevel>
<classes>
<class>
<classname>VIDEO_SELECTION</classname>
</class>
</classes>
</connection>
</connections>
<capabilities></capabilities>
</devicedata>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment