The project consists of 2 main components, the controller and (optionally) the thermostat.
The controller is connected directly to the Truma E-Kit, and is responsible for driving the fan and heating coils. The controller will create a protected Wifi network, and will host an HTTP server that can be used to request a specific run mode.
Currently the following 4 run modes are supported:
- Off (everything is turned off)
- Half (1 heating coil is turned on, fan is turned on)
- Full (both heating coils are turned on, fan is turned on)
- Cool (only the fan is turned on, both heating coils are turned off)
The thermostat is connected wirelessly to the controller, and is responsible for steering the controller. The thermostat will join the protected Wifi network created by the controller, and based on the actual ambient temperature will request the appropriate run mode on the controller.
The Wifi network can be configured by editing the wifi.rs file.
pub const WIFI_SSID: &str = "truma-ekit";
pub const WIFI_PASS: &str = "truma-ekit-pass";
The treshold for entering and exiting overtemperature protection can be configured by editing the overtemperature_protection.rs file.
/// Cooldown will be entered if the output temperature is greater than or equal to this limit.
const COOLDOWN_ENTER: Temperature = celsius(90.0);
/// Cooldown will be exited if the output temperature is less than than or equal to this limit.
const COOLDOWN_EXIT: Temperature = celsius(50.0);
The treshold for running the controller at full capacity can be configured by editing the thermostat.rs file.
/// The threshold for running the controller at full capacity.
/// If the temperature difference is below this value, the controller will be run at half capacity.
const FULL_CAPACITY_TRESHOLD: Temperature = celsius(1.5);
To run either component, they will have to be flashed onto a suitable microcontroller. At the moment only the ESP32-C3 is supported. To flash a component to the microcontroller, connect the microcontroller to your computer and use either of the following commands:
- flash the controller:
cargo run -p truma-ekit-controller
- flash the thermostat:
cargo run -p truma-ekit-thermostat
The controller consists of the following hardware components:
- TMP36 (temperature sensor) used for overtemperature protection
- 3 relays (one for the fan, and one for each heating coil)
The default configuration assumes the following connections:
- TMP36 connected to GPIO2
- Fan relay connected to GPIO7
- Heating coil #1 relay connected to GPIO8
- Heating coil #2 relay connected to GPIO9
The thermostat consists of the following hardware components:
- TMP36 (temperature sensor) used to measure the ambient temperature
- SSD1306 (display) used to display information
The default configuration assumes the following connections:
- TMP36 connected to GPIO2
- SSD1306 SDA connected to GPIO5
- SSD1306 SCL connected to GPIO6
- SSD1306 VCC connected to GPIO13
Feel free to create an issue, or create a pull request.