Hidden Markov models for stochastic thermodynamics