Plugins are software components that cover one module or interface.
Plugins were introduced Oct. 2013 based on an idea of Teun Hagen and coded by Alexander Kuiper.

Before there were plugins, all code was in Gamba modules. With the switch to plugins, code was also moved into Gamba objects which has as advantage that code and data can be kept better together enabling for example an easier way to "instantiate" two instances of an interface type.

Aug 2014 there are 75 plugins and 13 modules still waiting to be converted to a plugin.

Structure of a plugin

The plugin should consist of a class named CPlugin, for example CProwl.

During initialization, a cPluginList is created that is a Collection that has for every plugin a "plugin#0" and "plugin#1" key and for plugins with more than one instantiation there is a "plugin#2" and possibly "plugin#3" etc. key.

Working with plugins

The plugin module provides following functions:

Public Sub Register(sPluginName As String, sClassName As String, Optional iSubType As Integer = 0)
Public Sub StartAll()
Public Sub StopAll()
Public Sub Restart(sPluginName As String, Optional iInstance As Integer = 1)
Public Sub IsPluginRegistered(sPluginName As String, Optional iInstance As Integer = 1) As Boolean
Public Sub IsPluginEnabled(sPluginName As String, Optional iInstance As Integer = 1) As Boolean
Public Sub IsPluginRunning(sPluginName As String, Optional iInstance As Integer = 1) As Boolean
Public Sub GetPluginEnabledList(sPluginName As String) As Integer[]
Public Sub GetPluginObject(sPluginName As String, Optional iInstance As Integer = 1) As Object
Public Sub SendCommand(sPluginName As String, iInstance As Integer, sAddress As String, sCmd As String) As Boolean
Public Sub TableExists(sTableName As String) As Boolean
Public Sub GetSettingsTable(sTableName As String, Optional iRow As Integer = -1) As Result
Public Sub RunTask()

The first three functions (Register, StartAll and StopAll) are for internal use.
You can use GetPluginObject to call functions/methods/sub defined in the class, for instance:

Plugin.GetPluginObject("LEDMatrix", 1).Interface.DisplayMessage(vbID.Value, hTextBox.Text)
bDebug = Plugin.GetPluginObject("Bluetooth", 1).Settings["debug"]

Current list of plugins

You can find a current list of plugins (Aug 2014) by looking in the Init sub of the Plugin module:

Public Sub Init()

  Register("Asterisk", "CAsterisk")
  Register("Bluetooth", "CBluetooth")
  Register("BwiredMap", "CBwiredMap")
  Register("CTX35", "CCTX35")
  Register("CUL", "CCUL")
  Register("CurrentCost", "CCurrentCost")
  Register("Denon", "CDenon")
  Register("Digitemp", "CDigitemp")
  Register("DMXPlayer", "CDMXPlayer")
  Register("Domotica", "CDomotica")
  Register("DSC", "CDSC")
  Register("EIB", "CEIB")
  Register("ELVMAX", "CELVMAX")
  Register("EZcontrol", "CEZcontrol")
  Register("FritzBox", "CFritzBox")
  Register("GenericIO", "CGenericIO")
  Register("GMail", "CGMail")
  Register("GPS", "CGPS")
  Register("HDDTemp", "CHDDTemp")
  Register("HomeMatic", "CHomeMatic")
  Register("IPort", "CIPort")
  Register("IRMan", "CIRMan")
  Register("IRTrans", "CIRTrans")
  Register("IViewer", "CIViewer")
  Register("JeeLabs", "CJeeLabs")
  Register("Jerome", "CJerome")
  Register("JSONRPC", "CJSONRPC")
  Register("K8055", "CK8055")
  Register("KMTronicUDP", "CKMTronicUDP")
  Register("LEDMatrix", "CLEDMatrix")
  Register("LGTV", "CLGTV")
  Register("LIRC", "CLIRC")
  Register("Meteohub", "CMeteohub")
  Register("Mochad", "CMochad")
  Register("MQTT", "CMQTT")
  Register("Ncid", "CNcid")
  Register("NMA", "CNMA")
  Register("Onkyo", "COnkyo")
  Register("OpenTherm", "COpenTherm")
  Register("OpenZWave", "COpenZWave", SubType_OpenZWave)
  Register("OWFS", "COWFS")
  Register("OWW", "COWW")
  Register("P2000", "CP2000")
  Register("Pachube", "CPachube")
  Register("Ping", "CPing")
  Register("Pioneer", "CPioneer")
  Register("PLCBUS", "CPLCBUS")
  Register("Plugwise", "CPlugwise")
  Register("Prowl", "CProwl")
  Register("PVoutput", "CPVoutput")
  Register("Pushover", "CPushover")
  Register("PwrCtrl", "CPwrCtrl")
  Register("RaZberry", "CRaZberry")
  'Register("RRDTool", "RRDTool", RRDTool)
  Register("RFXComRX", "CRFXComRX")
  Register("RFXComTRX", "CRFXComTRX")
  Register("RFXComTX", "CRFXComTX")
  'Register("RFXComxPL", "CRFXComxPL")
  'Register("ServerStats", "ServerStats", ServerStats)
  Register("SharpTV", "CSharpTV")
  'Register("Shell", "Shell", Shell)
  Register("SmartMeter", "CSmartMeter")
  Register("SmartVISUServer", "CSmartVISUServer")
  Register("SMS", "CSMS")
  'Register("Sounds", "Sounds", Sounds)
  Register("SqueezeServer", "CSqueezeServer")
  Register("TelnetServer", "CTelnetServer")
  Register("Temp08", "CTemp08")
  Register("TemperaturNu", "CTemperaturNu")
  'Register("Thermostat", "Thermostat", Thermostat)
  'Register("TVGuide", "TVGuide", TVGuide)
  Register("Toon", "CToon")
  Register("Twitter", "CTwitter")
  Register("UPS", "CUPS")
  Register("Velbus", "CVelbus")
  'Register("VideoServer", "VideoServer", VideoServer)
  Register("Viera", "CViera")
  Register("VISCA", "CVISCA")
  Register("Visonic", "CVisonic")
  'Register("VoiceText", "VoiceText", VoiceText)
  'Register("WeatherUG", "WeatherUG", WeatherUG)
  Register("Weeder", "CWeeder")
  Register("Wirelesstags", "CWirelesstags")
  Register("X10Cmd", "CX10Cmd")
  'Register("XBMCxPL", "CXBMCxPL")
  'Register("XMLRPC", "CXMLRPC")
  'Register("xPL", "CxPL")
  Register("YouLess", "CYouLess")


Lines starting with a ' are commented out and give modules that still should be converted into plugins.

    Updated by: danfos, Updated about 5 years ago
    Access count: 49086 since 2014-08-09

    Attached Files

    Also available in: PDF HTML TXT