Importing annotated csv with multiple measurements into InfluxDB


I would like to import historical consumption data (electricity, energy…) created by my Homeseer software into InfluxDB. The data is in csv format but I need to convert it to annotated csv format for InfluxDB. I can import a test file only with first couple of lines into InfluxDB database using the InfluxDB graphical interface.
My test file has electricity and energy meter data and below is the file which I can import to InfluxDB:


My problem is that I can see only the electricity meter data (e.g. 10652.2) in Data explorer but not the energy meter data (e.g. 16.925). I can also plot the graph for the electricity meter data but not for the energy meter. Below is a screen copy:

Even though I can write to the database it seems that the format of my csv file is not quite correct. So, my question is what is the correct syntax for multiple measurements in an annotated csv file?

I have made some progress but I’m not quite happy with my approach. I split the csv file above in two parts:

For electricity meter data:


and for the energy meter data:


I uploaded these two csv files separately into InfluxDB UI and now I have all the data written into my bucket.

Basically I have created csv files annually in Homeseer, i.e. at the beginning of each year I have created a new csv file. These files contain electricity, energy, water meter data. If I have to write separately the data for my meters then I would have to split the big csv files into three parts which would be rather big job.

My aim is to use the historic data in openHAB.

So, I’m wondering how to write the csv file with data from three meters into InfluxDB bucket in one go, i.e. without splitting the csv file in separate files.

Given that you have a string field named “measurement” containing either
“electricity” or “energy”, which makes each type of record distinct from the
other type/s, what is the problem with simply feeding this entire CSV into

What doesn’t work as you expect it to?


I tried to upload the entire csv file given in my first post into Influx. The problem is that I didn’t see the data for my energy meter, only the data for the electricity meter.