Particle Product Question - products or groups for fleets that share code but serve different customer sets

For my setup, I default it to the most common mode of operation. The first thing the device does when it’s powered on is connect to the cloud and publish an event. The response from that event then sends back a “configuration” parameters which includes “mode” Boron Solar Charging with 1.5.0-rc1 - #60 by jgskarda

So in your case, the first time a device powers up, it could send a publish event and the subscription to that event could then set the group number that device belongs to. As explained in that post, I use a one up number that is initialized to 0 in setup so when that message reaches the cloud, I know it needs new configuration parameters to send down to it. You could probably even make it expandable/generic and use the subscribe event data to set the event name of future publish events or even just concatenate a string with an integer value for “groupNumberX”. This variable is then the event name in particle.Publish(). This way you wouldn’t have to update the device firmware at all if you wanted to go from 5 groups to 10 groups to 50 groups. The event Name just updates automatically based on the response of the first publish event after being powered up. If that makes sense… I haven’t done this myself but is likely the approach I think I’d take or at least try first.

1 Like