mclass wrote:Glenn,
That sounds great, thanks.
If the tariff’s in a user defined variable, it should be possible, using Indigo’s actions and schedules, for anyone wanting multiple tariffs to modify the variable outside of the plugin.
mclass
Sent from my iPad using Tapatalk
More thinking out loud follows!
Yep - could use a variable or set up a plugin command to change tariff.
Issue will still be calculating.
Single tariff is easy - can use the enphase reported WattHours for today/7days/lifetime for cost.
Simple WattHours x tarrif == new $ for the time periods
Enphase saves and can be easily repopulated/calculated if/when plugin restarted.
If Time of use/variable tariff - then this data reported by enphase doesn't help at all, and I don't think can be used.
The plugin would likely need to hourly calculate Watts Hours used in that hour (check how to) and check a user-defined schedule and then save that data away from Indigo so isn't lost on restart.
Would then need to read back in on restart to recalculate day/week/month totals...
Glenn