Learning When to See for Long-term Traffic Data Collection on Power-constrained Devices