Is there a way to use my RTC timestamps instead of plotly's for streaming plots?
Is there a way I can send arduino RTC timestamps and get plotly to use those timestamps instead of plotly's in the streaming plots? millis() is just relative to the most recent initialization of the plot, rather than an absolute time, like unixtime. It would allow the arduino to save the datapoints which, for whatever reason, occasionally fail to post normally to plotly so that the arduino could programmatically add them to plotly at a later time when posting to plotly isn't failing. Not sure if this kind of patch-and-fill can always be accomplished using the arduini api that's currently in place, especially if the datastream gets re-initialized (because then the times that preceed the most recent initialization won't be accessible using the millis() framework, which is the only framework that I know of that's currently in place. The same would also be true if it's a time that preceeds millis() overflowing, as it inevitably will).
Have you finally found any solution? Instead of: graph.plot(millis(), something, tokens[0]); i'm trying to graph something like this: graph.plot(timestamp, something, tokens[0]); with no results.
Where: timestamp could be something like yyyy-mm-dd hh-mm-ss
+1 on this API request. My specific need:
I have a graph of water usage over time at: https://plot.ly/~mattly/103
I’m having a problem with the time axis of my graph. I’m using the Arduino streaming API, but I know that Arduino’s ‘millis()’ call can drift a lot. So, I’ve added a realtime clock shield (RTC) to the Arduino. I record the time the program starts, and then when I call graph.plot, get the RTC offset from that time (in seconds), multiply by 1000 to approximate milliseconds, and call graph:
graph.plot(rtcMillisFromStart, gallons, tokens[0]);
But, over the course a the day, the graph still gets hours ahead. I'd like to have an API that lets me specify the timestamp, rather than have Plotly calculate one on the backend. For example:
graph.plot(char *timestamp, int y, char *token)
...where 'timestamp' is a string in any of plotly's supported formats, such as yyyy-mm-dd HH:MM:SS.ssssss (see http://help.plot.ly/date-format-and-time-series/).
I'm having this problem too. if you look at the header file for plotly_streaming_ethernet.h the plot function can only handle x axis variables that are unsigned long int. :(
I've tried something like this
DateTime timeStampObject; ... unsigned long int datestamp = timePointObject.unixtime(); graph.plot(datestamp, temp, tokens[0];
That seems to run but plotly doesn't recognize the unixtime time format.