You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that when the virtual things adapter is installed and enabled, the adapter sends a bunch of thingAdded IPC messages to the gateway on startup.
The result of this is that when the add-on starts up, it sends a thingAdded message to the gateway for each of the many virtual things exposed by the add-on. For things which have already been added to the gateway this results in its Thing Description being over-written in the gateway's database with the Thing Description provided in the IPC message.
This means that every time the gateway starts up there are multiple database writes happening that don't need to happen.
I think thingAdded messages are only meant to be sent by adapters when the gateway starts the pairing process, so these messages shouldn't be sent at all on startup.
The text was updated successfully, but these errors were encountered:
I've noticed that when the virtual things adapter is installed and enabled, the adapter sends a bunch of
thingAdded
IPC messages to the gateway on startup.I think this is a result of
this.adapter.handleDeviceAdded(this))
being called in the constructor of theVirtualThingsDevice
class https:/WebThingsIO/virtual-things-adapter/blob/master/virtual-things-adapter.js#L1318The result of this is that when the add-on starts up, it sends a thingAdded message to the gateway for each of the many virtual things exposed by the add-on. For things which have already been added to the gateway this results in its Thing Description being over-written in the gateway's database with the Thing Description provided in the IPC message.
This means that every time the gateway starts up there are multiple database writes happening that don't need to happen.
I think
thingAdded
messages are only meant to be sent by adapters when the gateway starts the pairing process, so these messages shouldn't be sent at all on startup.The text was updated successfully, but these errors were encountered: