Skip to content

Commit 3b8418f

Browse files
Guzz-TBouni
authored andcommitted
issue-85: Update README due to the changes of the interface
1 parent 2afc4d2 commit 3b8418f

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,24 @@ The following example reads in data from the heat pump:
5353
from luxtronik import Luxtronik
5454

5555
l = Luxtronik('192.168.1.23', 8889)
56+
calculations, parameters, visibilities = l.read()
5657

57-
t_forerun = l.calculations.get("ID_WEB_Temperatur_TVL")
58+
t_forerun = calculations.get("ID_WEB_Temperatur_TVL")
5859

5960
# alternatively get also works with numerical ID values
6061

61-
t_forerun = l.calculations.get(10)
62+
t_forerun = calculations.get(10)
6263

6364
print(t_forerun) # this returns the temperature value of the forerun, 22.7 for example
6465
print(t_forerun.unit) # gives you the unit of the value if known, °C for example
6566

66-
# l.calculations holds measurement values
67+
# calculations holds measurement values
6768
# check https://github.com/Bouni/luxtronik/blob/master/luxtronik/calculations.py for values you might need
6869

69-
# l.parameters holds parameter values
70+
# parameters holds parameter values
7071
# check https://github.com/Bouni/luxtronik/blob/master/luxtronik/parameters.py for values you might need
7172

72-
# l.visibilitys holds visibility values, the function of visibilities is not clear at this point
73+
# visibilitys holds visibility values, the function of visibilities is not clear at this point
7374
# check https://github.com/Bouni/luxtronik/blob/master/luxtronik/visibilities.py for values you might need
7475
```
7576

@@ -85,21 +86,28 @@ modifying them) and to get a better understanding about parameters (e.g. by
8586
looking for differences when comparing the output after doing some changes
8687
locally, etc.).
8788

89+
Alternatively, you can use the `dump-changes.py` script to output only changed values:
90+
91+
```python
92+
PYTHONPATH=. ./scripts/dump-changes.py 192.168.1.5
93+
```
94+
8895
### WRITING VALUES TO HEAT PUMP
8996

9097
The following example writes data to the heat pump:
9198

9299
```python
93-
from luxtronik import Luxtronik
100+
from luxtronik import Luxtronik, Parameters
94101

95102
l = Luxtronik('192.168.1.23', 8889)
96103

97-
heating_mode = l.parameters.set("ID_Ba_Hz_akt", "Party")
98-
l.write()
104+
parameters = Parameters()
105+
heating_mode = parameters.set("ID_Ba_Hz_akt", "Party")
106+
l.write(parameters)
99107

100108
# If you're not sure what values to write, you can get all available options:
101109

102-
print(l.parameters.get("ID_Ba_Hz_akt").options) # returns a list of possible values to write, ['Automatic', 'Second heatsource', 'Party', 'Holidays', 'Off'] for example
110+
print(parameters.get("ID_Ba_Hz_akt").options) # returns a list of possible values to write, ['Automatic', 'Second heatsource', 'Party', 'Holidays', 'Off'] for example
103111
```
104112

105113
**NOTE:** Writing values to the heat pump is particulary dangerous as this is

0 commit comments

Comments
 (0)