Apologies if this has been covered, I’ve looked high and low.
I have my IoTaWatt setup working well, outputting to emoncms, pvoutput and a local instance of influxdb. I’m looking to get $$$ values of out what I import and export.
So for anything I import it should be $0.40 per kWh, anything I export is $0.20 per kWh
I was hoping to set up an influxdb output where I get my import kWh and just multiply it by $0.40, set the unit as currency and away we go, but I cannot figure it out. I reckon I’m overthinking it, but there’s a decent chance that I’m a dumbarse and have overlooked the obvious.
Export output looks like this:
Watts = ((mains abs + mains) ÷ 2) - main
Import like this:
Watts = (mains abs + mains) ÷ 2
Ideally I’d like a way to present this in grafana so that I have a singlestat of what was imported/exported on a day. Once that’s done, there’s no reason I can’t have a day/week/3month/12 month graph of it all.
Can provide screenshots of outputs if relevant, please let me know.
HHave you looked at the tariff capabilities in PVoutput? I haven’t used them myself, but it looks like you can do a lot with that and report out $$$ nicely.
If you want to do it in influx/grafana, my instinct is to do it by multiplying by the rate in the grafana query.
Btw/ those functions for import/export can now be simplified with the new min/max functions in the IoTaWatt calculator:
Export = mains min 0. (Export is a negative value)
Export =(mains min 0) abs (Export is a positive value)