A Go based API for a DIY internet controlled thermostat.
- Raspberry Pi (Model B) - Sainsmart 4 Relay Module - DS18B20 Temperature Sensor- Download and mount the arm5 crosscompile toolchain
$ script/build_for_pi
Note: The toolchain is only needed if there is a cgo dependency.
- Create
./api_key
see./api_key.example
- Edit
script/deploy
variables as needed $ script/deploy
Note: Currently termo-api is deployed as root so as to interface with GPIO pins, this is awful, and will be remedied soon.
$ API_KEY=foo ./termo-api
- Permissions issues are preventing running the server as a non superuser
- Hardware build needs to be documented.
- No unit tests
{
"targetTemp": 20,
"heaterStatus" : true,
"currentTemp": 18
}
set the target temperature
{
"targetTemp": 30
}