Multiple instances of a plugin

19 views
Skip to first unread message

Phil

unread,
May 21, 2022, 4:29:52 AM5/21/22
to Signal K
Has any one come across wanting to have multiple instances of one plugin such as having multiple modbus networks? Is there a straight forward way to install the plugin multiple times?

Teppo Kurki

unread,
May 22, 2022, 2:17:55 AM5/22/22
to signalk
No there isn't.

You can 
- checkout a local copy, from npm or git
- change the plugin id in package.json and in plugin code
- npm pack and then npm install from the result tar file

Longer explanation: 
- The server keeps plugin settings and status identified by the plugin id (in the plugin code) and can not manage multiple settings for one plugin. This is fixable, but requires also UI work and is non trivial
- Some plugins make the assumption that there is ever going to be only one instance of it and trying to create multiple will mess things up by some data being shared. This varies plugin by plugin. We'd need to create some kind of marker "safe to create multiple instances" and plugins would need to updated by their authors to add that.

So doable, but not trivial.

Each plugin could do the same individually, by supporting multiple top level plugin configurations. Some already do. Did you have a particular plugin in mind?

On Sat, May 21, 2022 at 11:29 AM Phil <phil...@gmail.com> wrote:
Has any one come across wanting to have multiple instances of one plugin such as having multiple modbus networks? Is there a straight forward way to install the plugin multiple times?

--
You received this message because you are subscribed to the Google Groups "Signal K" group.
To unsubscribe from this group and stop receiving emails from it, send an email to signalk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/signalk/9e3b865d-1389-40ed-a96d-622720fec158n%40googlegroups.com.

Phil

unread,
May 22, 2022, 2:35:11 AM5/22/22
to Signal K
I thought this would be the case, which isn’t the end of the world. For this use I was talking about the modbus plugin. However was also thinking of InfluxDB to have one storing locally and one cloud based.
Reply all
Reply to author
Forward
0 new messages