Noob Plugin Design Question

Posted on
Sun Nov 05, 2017 7:29 pm
ColoradoSolar offline
Posts: 1
Joined: Nov 02, 2017

Noob Plugin Design Question

I am new to Indigo. I have been reading the documentation and looking at the examples and I have a plugin design question. I want to write a plugin for an energy monitor that has multiple channels and I am trying to figure out the best way. I was thinking I could use a device factory and create a sensor device per channel. How/where would I have the settings that are common to all the devices (like the IP address of the server, update interval, etc...)

Thanks,
Eric

Posted on
Sun Nov 05, 2017 8:29 pm
FlyingDiver offline
User avatar
Posts: 7211
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Noob Plugin Design Question

Either have a master device that has the common settings, or have those settings as part of the plugin config. If it's possible to have more than one of these devices then go with the master device route.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Nov 05, 2017 8:46 pm
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Noob Plugin Design Question

I would go with the plugin preferences route for anything that is common to all devices. I think this is the behavior that most Indigo users expect.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Nov 06, 2017 4:07 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Noob Plugin Design Question

For Z-Wave devices Indigo stores most of the information on the first device in the group and doesn't create any type of "master device." That said if there are a lot of properties and UI associated with the master/root device it might make sense to create a device instance (in the group) for that information. Putting it at the plugin config level is an option as well, but if the plugin has the ability to support multiple physical devices (each with their own group of Indigo devices) then it should probably be at the device level instead.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests

cron