Metadata-Version: 2.1
Name: lib-heater-control
Version: 0.4.4
Summary: Heater control library
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Linux
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: heatbit-models>=3.2.2

# Heater control library

Don't forget to add `python3-smbus` dependency to your service.

## Installation

```shell
    pip install lib-heater-control
```

or

```shell
    pip install -i https://apt.internal.heatbit.com/pypi/simple/ lib-heater-control
```


## Usage

```python
from heatbit.heater import HeaterControl

heater_control = HeaterControl(False)
rpm = heater_control.get_fan_rpm()
print(rpm)
```

## Fake mode

You can use this library in fake smbus mode. Just init lib with fake_mode=True: `HeaterControl(True)`

After lib initialization it creates 2 files:
1. /tmp/.fake_smbus_out
2. /tmp/.fake_smbus_in

Out file used to output what happens in lib. Input file used fake data from real smbus.

For example you can use `fake_tools`:

```bash
python3 fake_tools/set_rpm.py 2100   # will set fake fan rpm
python3 examples/fake_get_rpm.py  # will read fake fan rpm
```

```bash
python3 fake_tools/set_status.py 25 500 70   # will set fake status
python3 examples/fake_get_status.py  # will read fake status
```

Also `tail -f /tmp/.fake_smbus_out` in another terminal to see what happens in lib.
