You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have just started using the Octopus app and found the 'Import Go' costs are always £0.00.
I traced the problem to the function graph_load() the code block starting at line 816 tests for solarpv mode. If true it calculates costs for 'Agile' tariff, but not for 'Go' tariff. If solarpv mode is false it calculates for both tariffs.
This revised code block works for me.
if (solarpv_mode) {
// ----------------------------------------------------
// Solar PV agile outgoing
// ----------------------------------------------------
// calculate half hour kwh
let kwh_use = 0;
let kwh_import = 0;
let kwh_solar = 0;
if (use_kwh[z]!=undefined && use_kwh[z-1]!=undefined) kwh_use = (use_kwh[z][1]-use_kwh[z-1][1]);
if (import_kwh[z]!=undefined && import_kwh[z-1]!=undefined) kwh_import = (import_kwh[z][1]-import_kwh[z-1][1]);
if (solar_kwh[z]!=undefined && solar_kwh[z-1]!=undefined) kwh_solar = (solar_kwh[z][1]-solar_kwh[z-1][1]);
// limits
if (kwh_use<0.0) kwh_use = 0.0;
if (kwh_import<0.0) kwh_import = 0.0;
if (kwh_solar<0.0) kwh_solar = 0.0;
// calc export & self consumption
let kwh_solar_used = kwh_use - kwh_import;
let kwh_export = kwh_solar - kwh_solar_used;
// half hourly datasets for graph
data["use"].push([time,kwh_use]);
data["import"].push([time,kwh_import]);
data["export"].push([time,kwh_export*-1]);
data["solar_used"].push([time,kwh_solar_used]);
// energy totals
total_kwh_import += kwh_import
total_kwh_export += kwh_export
total_kwh_solar_used += kwh_solar_used
// costs
let cost_import = data.agile[2*(z-1)][1]*0.01;
let cost_import_go = data.go[2*(z-1)][1]*0.01;
let cost_export = data.outgoing[2*(z-1)][1]*0.01*-1;
// half hourly datasets for graph
data["import_cost"].push([time,kwh_import*cost_import]);
data["import_cost_go"].push([time,kwh_import*cost_import_go]);
data["export_cost"].push([time,kwh_export*cost_export*-1]);
data["solar_used_cost"].push([time,kwh_solar_used*cost_import]);
// cost totals
total_cost_import += kwh_import*cost_import
total_cost_import_go += kwh_import*cost_import_go
total_cost_export += kwh_export*cost_export
total_cost_solar_used += kwh_solar_used*cost_import
if (show_carbonintensity) {
let co2intensity = data.carbonintensity[2*(z-1)][1];
let co2_hh = kwh_import * (co2intensity * 0.001)
total_co2 += co2_hh
sum_co2 += co2intensity
sum_co2_n++;
}
} else {
The text was updated successfully, but these errors were encountered:
I have just started using the Octopus app and found the 'Import Go' costs are always £0.00.
I traced the problem to the function graph_load() the code block starting at line 816 tests for solarpv mode. If true it calculates costs for 'Agile' tariff, but not for 'Go' tariff. If solarpv mode is false it calculates for both tariffs.
This revised code block works for me.
The text was updated successfully, but these errors were encountered: