Skip to content

Commit 4d71711

Browse files
committed
doc: updated README
Added more information and examples.
1 parent 931bddb commit 4d71711

1 file changed

Lines changed: 80 additions & 4 deletions

File tree

README.md

Lines changed: 80 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,84 @@
11
![CI tests](https://github.com/TionAPI/tion_python/workflows/CI%20tests/badge.svg?branch=master&event=push)
22

3-
You should pair Tion S3 device with your bluetooth host by two steps:
4-
1. pressing for 5 second poer button at device
5-
2. running ./pair.py device_mac_address while button blinks
6-
before use this module!
3+
# About
4+
This module will allow you to control your Tion S3 or Tion Lite breezer via bluetooth.
75

86
If you want to use MagicAir API please follow https://github.com/airens/tion
7+
# Installation
8+
```bash
9+
pip3 install tion-btle
10+
```
11+
# Usage
12+
Use class according to the breezer type. For example for Tion S3 you should use
13+
```python
14+
from tion_btle import S3 as Breezer
15+
```
16+
# Documentation
17+
## init
18+
You must provide device's MAC-address to the constructor
19+
```python
20+
from tion_btle import S3 as Breezer
21+
mac: str=str("XX:XX:XX:XX:XX:XX")
22+
device = Breezer(mac)
23+
```
24+
## get
25+
Use `get()` function to get current state of the breezer.
26+
It will return json with all available attributes.
27+
```python
28+
print(device.get())
29+
```
30+
Result will depend on the breezer model
31+
#### All models
32+
* state -- current breezer state (on/off)
33+
* heater -- current heater status (on/off)
34+
* heating -- is breezer heating right now (on/off). For example, if the output temerature is 25 and target temperature 21, then heater may be ON, but heating will be OFF
35+
* sound -- current sound mode (on/off)
36+
* mode -- current air source (depend on model: outside/recirculation for all plus mixed for S3)
37+
* out_temp -- air temperature at the outlet of the device
38+
* in_temp -- air temperature at the inlet to the device
39+
* heater_temp -- target temperature for device
40+
* fan_speed -- current fan speed (1..6)
41+
* filter_remain
42+
* time -- time when parameters were taken. May be different from the current time. Depends on breezer time for S3
43+
* request_error_code -- error code for the request (0 if all goes well)
44+
* code -- response code (200 if all goes well)
45+
* model -- breezer model (S3/Lite)
46+
#### S3
47+
This parameters are available only for S3:
48+
* productivity -- current flow in m^3/h
49+
* fw_version -- breezer firmware version
50+
* timer -- timer state (on/off)
51+
#### Lite
52+
This parameters are available only for Lite:
53+
* device_work_time
54+
* electronic_work_time
55+
* electronic_temp
56+
* co2_auto_control -- co2 auto control status (on/off). When breezer is used with MagicAir
57+
* filter_change_required -- is filter change required (on/off)
58+
* light -- light state (on/off)
59+
## set
60+
Use `set({parameter1: value, parameter2: value, ...})` to set breezer parameters that may be changed. It depends on the breezer model.
61+
```python
62+
device.set({
63+
'fan_speed': 4,
64+
'heater_temp': 21,
65+
'heater': 'on'
66+
})
67+
```
68+
### All models
69+
* state -- current breezer state (on/off)
70+
* heater -- current heater status (on/off)
71+
* sound -- current sound mode (on/off)
72+
* mode -- current air source (depend on model: outside/recirculation for all plus mixed for S3)
73+
* heater_temp -- target temperature for the device
74+
* fan_speed -- current fan speed (1..6)
75+
### Lite
76+
This parameters may be set only for Tion Lite
77+
* light -- light state (on/off)
78+
* co2_auto_control -- co2 auto control status (on/off). When breezer is used with MagicAir
79+
80+
## pair
81+
To pair device turn breezer to pairing mode and call
82+
```python
83+
device.pair()
84+
```

0 commit comments

Comments
 (0)