From b27156742830e6bdbe11e52ab697d3a04d2188aa Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 16 Mar 2023 09:37:25 -0700 Subject: [PATCH] server: Fix device initialization on first report --- server/src/plugin/plugin-host-api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/plugin/plugin-host-api.ts b/server/src/plugin/plugin-host-api.ts index dbe67c59ee..b23398c9f2 100644 --- a/server/src/plugin/plugin-host-api.ts +++ b/server/src/plugin/plugin-host-api.ts @@ -141,7 +141,8 @@ export class PluginHostAPI extends PluginAPIManagedListeners implements PluginAP for (const upsert of deviceManifest.devices) { upsert.providerNativeId = deviceManifest.providerNativeId; - await this.pluginHost.upsertDevice(upsert); + const id = await this.pluginHost.upsertDevice(upsert); + this.scrypted.getDevice(id)?.probe().catch(() => { }); } }