Fix a bug that causes the parser to crash when there are 17 hourly readings.

Also, make parsing of the main reading more robust by adding exception
handling.