How virtual storage systems turn buildings into batteries