I’m looking for a current state-of-the-art webhook to upload data to plotly.
I just want to graph some time-series variables, the examples using Librato are not of direct use to me, because I don’t want to pay to graph these after the trial period with Librato.
I have 4 values that I report every 5 minutes via Spark.publish(), I currently format the 4 values as a single JSON payload. Now I’m looking to dump them into plotly for storage and viewing.
If all you want is a simple realtime plotting for field values, then ThingSpeak is a decent option. It is free, you can have up to 8 channels, I believe, but they do have a 1/15sec POST limit–shouldn’t matter for your POST every few minutes. We at glowfi.sh support webhooks to ThingSpeak for our machine learning returns, and have used it for up to 6 fields in 1 channel (more is possible, I believe). The http requests are pretty straight forward:
The Json data is of the form: { “field1”: [1.0], “field2”: [3.6] }
Headers:
X-THINGSPEAKAPIKEY = {YOUR API KEY}
Content-Type = “application/json”
You can find out more from ThingSpeak docs here. It is worth noting that in our experience, ThingSpeak will only allow 1 field value per field key in each post–no lists.
News from plotly - they don’t have a restriction on the free tier, per se - but they do have some technical limitations that top out around 5000 data points. So, depending how they count things, that would be approx 17 or 3 1/2 days worth of data if I’m reporting 5 temperatures every 5 minutes.
Their suggestion was to record/downsample the data elsewhere and then dump it into plotly for display purposes.
Hi Andy, you might like to take a look at Tinamous.com. (Heads up, I’m the founder)
We integrate with the Particle API to connect your devices into the Tinamous environment where you can track sensor measurements through the use of either Spark.Variable and Spark.Publish methods. No need for webhooks, once you connect your Particle account your devices get linked and we start collecting the measurements automatically.
From Tinamous you can control if and how often variables are collected and call exposed functions on the device, from the device you can push status posts and senml formatted measurements into Tinamous.
@TinamousSteve How long should it take my devices to show up after adding the ParticleBot? It’s probably been an hour so far and nothing is showing up. I have 2 cores and a photon that are online.
Excellent - if a photon was publishing an already formatted json string, what would the syntax be to simple pass it through the webhook, without substitution ?
@Fragma It should be quick (10ish minutes). I hadn’t realised spaces are allowed in Particle device names which messed up adding them, I’ve pushed a fix for that and it appears they have been added now, you will need to click the refresh icon in the devices list for now as that doesn’t auto-update yet.
I’m not sure, I don’t have much experience with JSON. I tried a dozen variations but in every case what thingspeak received was:
field1: {
field2: s
field3: o
field4: m
…
basically 1 char each of “{some_magic_string}”. It’s like the webhook engine didn’t like what I sent in via publish and thus didn’t do the replacement.
{some_magic_string} was a placeholder for some webhooks magical keyword that I don’t think I know yet. I was kinda hoping one of the webhooks developers might chime in.