You don't need to take the data from the console, but you can subscribe to the server sent events directly.
You may want to look at the JS SDK provided by Particle.
Particularly this section
https://docs.particle.io/reference/javascript/#get-event-stream
For some background on this have a read here
Here’s a tutorial to get you started using Spark.publish().
Let’s imagine you want to monitor your core’s uptime, that is, how many hours, minutes, and seconds since the last time the core was reset or powered-up and view it on a web page that you can leave open all the time.
You can use the millis() function to measure time and for this example, you can ignore the fact that it can wrap-around back to zero after many days. So you need two things, code for your Spark core and code for a web page…
2 Likes