mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-08-07 06:43:39 +00:00
load plugin info when device is created
This commit is contained in:
+3
-1
@@ -66,6 +66,8 @@ function registerDevice(newDevice) {
|
||||
},
|
||||
};
|
||||
|
||||
devices[id].plugin = PLUGINS.all[newDevice.type];
|
||||
|
||||
if(PLUGINS.all[newDevice.type].config.fields){
|
||||
PLUGINS.all[newDevice.type].config.fields.forEach(field => {
|
||||
devices[id].fields[field.key] = field.value;
|
||||
@@ -199,7 +201,7 @@ function initDeviceConnection(id) {
|
||||
|
||||
device.send = (data) => {};
|
||||
}
|
||||
device.plugin = plugins[type];
|
||||
//device.plugin = plugins[type];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user