For Cloud functions, the firmware documentation states “Up to 15 cloud functions may be registered”. Is this also true for Particle Product? If so, how does the Cloud handle different Particle Product firmware versions (PRODUCT_VERSION( ) ) containing more than 15 distinct Cloud functions?
For example if PRODUCT_VERSION(10) has functions 1 through 15, but an updated PRODUCT_VERSION(11) retains functions 1 though 14, deletes function 15, and then adds a new function 16, will the Cloud allow function 16 to exist?
If you can provide a link to the place in the docs you are refering to we know what exactly to talk about.
But I guess you are refering to the per device limit, which is … well … per device, not shared across devices or products.
My question stems from the assumption that the Particle Cloud wouldn’t “want” to keep storage space to “remember” 15 different, distinct Cloud functions for each individual device that is part of a Particle Product group.
The 15 functions are sort of printed on a blueprint which only exists once and each device of that product just carries a tag the tells the cloud to apply that blueprint.
Each version has its own “interface blueprint”.
But changing an existing interface after product release doesn’t sound like good practice.
At the stage of public release, some things should only be changed if absolutely necessary.
BTW, having to use all 15 possible function slots also suggests to rethink the design and consider multiplexing.
You can pass a command string to the functions, so based on that you can reuse one function for different (but related) actions by just embedding an action indicator into the command and checking that inside the “multiplexed” function.