Code running on the base (Raspberry Pi) of the CitizenWatt project.