I want to use the application emoncms to read data from a file with the format:
time, voltage, current1, current2, current3, current4
12:10:00,231,1,4,8,12
12:11:00,231,1,3,6,11
12:12:00,230,2,3,5,10
12:13:00, .........
know of any manual or help understanding how to do it?
thanks
Re: working with file data.dat?
My suggestion is you need to write a script that reads your file, parses it and submits the data to emoncms in the format that's described here: http://openenergymonitor.org/emon/emoncms/using-emoncms#Sending_data_to_... or there's some more here: http://openenergymonitor.org/emon/node/1065
If you search for "emoncms data" you might find some more useful leads. I'm fairly certain I've seen at least one script to do a similar job.
Re: working with file data.dat?
OK, get it data from an application in "c", you know like could send directly to emoncms? (application c->json->emoncms).
I've solved this way:
#include <stdlib.h>
#include <stdio.h>
int main(){
#define link "http://localhost/emoncms/"
#define apikey "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
char datos[6][10]={"tension","intensida1","intensida2","intensida3","intensida4","intensida5"};
int valor=5;
char cmd[256];
sprintf(cmd, "wget -o /dev/null -O /dev/null \"%s/api/post?apikey=%s&json={%s:%d}\"", link, apikey, datos[0],valor);
system(cmd);
return 0;
}