Connect Spark Core to Exosite


Hi everyone,
Great to see such a vibrant community here using Exosite! I’m trying to get the simple ReadWriteString example working on my photon to push data to the platform. I’m using this example

and from what I can tell this:
if ( exosite.writeRead(writeString+String(millis()), readString, returnString))

always evaluates to false. I’ve double checked my CIK and know that is correct. Is there something I’m missing or ideas on how I could further debug this to find out why this is returning false?


I should also add that I have created both a
"command&uptime" and “uptime=” data source in the the portal for the device.


Hey @justingrammens,

You can try turning on some of the debugging information in the library so that it can tell you what is happening:

Off the top of my head the only thing that I can think of is that your device might not be activated. Are you using a generic device or a client model based device (something that asked you for a serial number)? If it’s the later it needs to be activated before the CIK can be used. Normally the device does this, you can use the provision example to do this automatically or do it manually once by manually making a request to

If it is a generic device or if it’s already activated, let me know and I can look into it deeper. If you want to make a manager of you portal, I can look through things and see if I spot anything.


Hi Patrick,
Thanks for the reply! I’m not sure what you mean about activated. I am using a Spark Photon and when I setup the device on the Exosite side I created a “generic device”. Is that the type of device I should have created or does it not really matter? The portal doesn’t list as being inactive, but it’s easy enough for me to just make that activate resource call as well to ensure it’s all good.
I’ve just forked the library so then I can modify the debugging information when I load it through the spark web based development IDE and we can see what’s going on. Once I can trace into that it will help uncover some things. Hoping to have time for that tonight. I’ll keep you posted on any updates. Thanks again!


Success! I got it working. Operator error on my part. Turning on debugging showed that I was getting a 400 Bad Request so I knew it was something on my side. Digging into the code I noticed that I had misunderstood the data source types and names. After looking at the API docs, I went back and recreated data sources “uptime” and “command” and all is good. I’ve now got data flowing into the portal.
Thanks for the help @Patrick!
Rock on.


Woohoo! Good luck on your project!


Whether you have an example of using the particle webhook with Exosite?
This will be useful because in this way will be used AES encryption for Photon or now DTLS for the ELECTRON through the Particle Cloud.
This would be probably practicable with Lua script.
You can probably achieve two-way communication with GET and POST …