That was it. Thanks a lot for your help. I just need to pass in a unique subscription name and it works.
My problem now is there is a limit rate on 15 sub requests per minute and a cap of 20 subs per smart app.
I would like to subscribe to a lot more than 20 devices so I am forced to use a CAPABILITY subscription which is now leading me to the error I’ve described here in this thread.
I’ve raised a ticket but I’m guessing it will be a long while before I get a reply. It seems adding the r:devices permission to the INITIALIZE lifecycle of my app causes it to crash entirely and I need this to add a CAPABILITY subscription.