Particle.function for Particle Product

Hello,

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?

Thanks,
shm45

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.

Thanks for the reply @ScruffR – my apologies for the delay in responding.

Particle.function: https://docs.particle.io/reference/firmware/raspberry-pi/#particle-function-

Particle Console / Particle Product: https://docs.particle.io/guide/tools-and-features/console/

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.

It would not need to store X times 15 endpoints.

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.

Ahhh, I see–thank you. Then how many functions can a single Product group contain? Is a Product Group limited to 15 functions?

If the limit is 15 functions, then how can one go about changing the 15 functions between different PRODUCT_VERSION code versions?

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.