pioto/radio-thermostat

Initial Implementation of Basic API

Opened this issue · 3 comments

Issue to track development of a basic API.

Will there be further development with this. Also, what model and version thermostat are you testing with?

Hi,

Yeah, unfortunately this project kinda fell off my radar with other things going on IRL. I'll try to get more work done on it when I can, but patches are always welcome, too.

Model: CT30 V1.94
API Version: 113
Firmware Version: 1.04.84

pioto commented

Hi @2devnull,

You may be interested in this alternative approach I took: https://github.com/pioto/thermostat

The key classes to look at:

  • Tstat - this represents the /tstat endpoint. Using Lombok and Jackson annotations makes this really succinct. Most of the numeric enum-like things are mapped to Java enums, and the booleans are mapped to Boolean types. (e.g. Tmode)
  • ThermostatServiceImpl - this class uses Spring's RestTemplate to make the API calls nice and clean, with all the serializiation/deserialization of the JSON request/response objects being transparent. There's even some caching added so that we don't hit the poor little thermostat's controller too hard if you start mashing refresh or something in your browser