Update to new Wattalyst DB API
Implemented KPI storage with new API