Hi!
I have developed a, still to be released, plugin to talk to serial devices.
Now I want to develop two plugins to talk to my beamer and screen over serial, and I want to do that by extending the SerialDevice plugin.
pimatic-serial defines the SerialDevice
class SerialPlugin extends env.plugins.Plugin
init: (app, @framework, @config) =>
deviceConfigDef = require('./device-config-schema')
@framework.deviceManager.registerDeviceClass('SerialDevice', {
configDef: deviceConfigDef.SerialDevice,
createCallback: (config, lastState) =>
device = new SerialDevice(config, lastState)
return device
})
class SerialDevice extends env.devices.Device
...
return new SerialPlugin
pimatic-benqbeamer does the following:
class BenQBeamerPlugin extends env.plugins.Plugin
init: (app, @framework, @config) =>
deviceConfigDef = require('./device-config-schema')
@framework.deviceManager.registerDeviceClass('BenQBeamerController', {
configDef: deviceConfigDef.BenQBeamerController,
createCallback: (config, lastState) =>
device = new BenQBeamerController(config, lastState)
return device
})
class BenQBeamerController extends SerialDevice
...
return new BenQBeamerPlugin
However this does not work. How could I make this work?