# Sinara 8451 Thermostat

* [Wiki](https://github.com/sinara-hw/Thermostat/wiki)
* [Firmware](https://git.m-labs.hk/M-Labs/thermostat)

## Setup

Attach Ethernet and Micro-USB cables and run:

```shell
git clone gitea@git.m-labs.hk:M-Labs/thermostat.git
cd thermostat
nix develop
nix-shell -p gcc-arm-embedded-10 rlwrap
cargo build --release
arm-none-eabi-objcopy -O binary target/thumbv7em-none-eabihf/release/thermostat thermostat.bin
# turn on Thermostat
rlwrap nc -vv 192.168.1.26 23
# enter `dfu` command end exit rlwrap
dfu-util -a 0 -s 0x08000000:leave -D thermostat.bin
```

Then check that fans are working properly.
You may also check fan controls via `fan` commands (see the firmware documentation).

## Common problems

### Thermostat doesn't connect or doesn't enter DFU mode

Carefully take out Thermostat from its protective box, unscrewed all screws before. Apply jumper and power on the Thermostat.
Now it should be in DFU mode.