I have a Grafana dashboard , version v8.1.6 (4a4083716c),where I display the output voltage, current and power of a solar panel. I am using the watt2kwh node to convert my power reading that is in Watt to Watt-Hour. The interval between successive measurements is 10 seconds. Node-Red, version 2.0.6, is used to populate my database.
In Grafana I would like to show the total accumulated power for the current day from 00:00 to 00:00 of the next day. I am successfully doing this with the query below:
SELECT sum("value") FROM "solar/ina219/energy" WHERE time> '2021-10-10 00:00:00' AND time< '2021-10-11 00:00:00'
But each day I must manually change the dates. Can I automate the changing of the dates using InfluxQL? (or pure SQL) Or would it be easier implementing this in Node-Red and then just fetching the accumulated energy from the database?
Below is a screenshot of the simple panel:
Any help will be appreciated! Thank you.