Generate javascript includes programmatically.
Only save measurements once per half hour.
Save the last measurement to Redis.