Electrical bill using Node-RED

Hi

I want to use node-Red to calculate my electrical monthy bill.

How can I read the electrical data that’s stored in my emonpi?

Thanks

Using other words, I’m able to read the last emoncms feed value using MQTT, but I don’t know how to read the previous ones. And I prefeer to not have the registers doubled.

I know it’s a basic question, but I’m stuck here and I’ll really appreciate some help.

I have found three possibilities for importing historical data from Emoncms to node red:

  1. Using http api
  2. Accessing the mysql database directly
  3. Using mqtt

What can be the best option?

Thanks