Updated to fix bug where last value is not updated, updated script must be ran with updated emoncms