# **Server application**

Server application written in Rust, enabling communication with the heat pump (Nulite BKDX30-95) connected over the RS-485 interface. The application provides REST API, which allows retrieving the heat pump state and configuration and changing the configuration.

## **Getting Started**

Application is designed specifically for the Unipi Neuron PLC series. However, it can also be run on any machine or controller with a port capable of communicating with the heat pump.

### **Prerequisites**

Before starting the application, make sure to have installed the following tools:

- Rust ([Installation guide](https://www.rust-lang.org/tools/install))
- Evok ([Installation guide](https://github.com/UniPiTechnology/evok)) (optional) (running on the same machine or a different machine on the network)

### **Installation**

1. Clone this repository to a local machine.
2. Open the terminal and navigate to the repository.
3. Run the following command to install the dependencies:

   ```shell
    cargo build --release
   ```

### **Configuration**

Create a `.env` file in the project's root directory and configure the environment variables. The `.env.template` file describes the variables necessary to set up.

### **Running the application**

After proceeding with the installation and configuration steps, start the application using the following command:

```shell
  cargo run --release
```
