You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-20Lines changed: 14 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Python FHEM (home automation server) API
9
9
10
10
Simple API to connect to the [FHEM home automation server](https://fhem.de/) via sockets or http(s), using the telnet or web port on FHEM with optional SSL (TLS) and password or basicAuth support.
11
11
12
-
**Note:** Python 2.x deprecation warning. `python-fhem` versions 0.6.x will be the last versions supporting Python 2.x.
12
+
**Note:**Starting with verson 0.7.0, Python 2.x is no longer supported with `python-fhem`. If you still require support for Python 2, use versions 0.6.5.
13
13
14
14
## Installation
15
15
@@ -23,28 +23,22 @@ pip install [-U] fhem
23
23
24
24
### From source
25
25
26
-
In `python-fhem/fhem`:
27
-
28
-
Get a copy of README for the install (required by setup.py):
29
-
30
-
```bash
31
-
cp ../README.md .
32
-
```
33
-
34
-
then:
26
+
To build your own package, install `python-build` and run:
35
27
36
28
```bash
37
-
pip install [-U] .
29
+
cd fhem
30
+
python -m build
38
31
```
39
32
40
-
or, as developer installation, allowing inplace editing:
33
+
This will create a `dist` directory with the package. Install with:
41
34
42
35
```bash
43
-
pip install [-U] -e .
36
+
pip install [-U] dist/fhem-<version>.tar.gz
44
37
```
45
-
38
+
46
39
## History
47
40
41
+
* 0.7.0 (2023-08-17): [unpublished] Ongoing: move Travis CI -> Github actions, Python 2.x support removed, modernize python packaging, global states for SSL and authentication removed (support for multiple sessions).
48
42
* 0.6.6 (2022-11-09): [unpublished] Fix for new option that produces fractional seconds in event data.
49
43
* 0.6.5 (2020-03-24): New option `raw_value` for `FhemEventQueue`. Default `False` (old behavior), on `True`, the full, unparsed reading is returned, without looking for a unit.
50
44
* 0.6.4 (2020-03-24): Bug fix for [#21](https://github.com/domschl/python-fhem/issues/21), Index out-of-range in event loop background thread for non-standard event formats.
@@ -141,12 +135,7 @@ The library can create an event queue that uses a background thread to receive
141
135
and dispatch FHEM events:
142
136
143
137
```python
144
-
try:
145
-
# Python 3.x
146
-
import queue
147
-
except:
148
-
# Python 2.x
149
-
import Queue as queue
138
+
import queue
150
139
import fhem
151
140
152
141
que = queue.Queue()
@@ -159,6 +148,11 @@ while True:
159
148
que.task_done()
160
149
```
161
150
151
+
## Selftest
152
+
153
+
For a more complete example, you can look at [`selftest/selftest.py`](https://github.com/domschl/python-fhem/tree/master/selftest). This automatically installs an FHEM server, and runs a number of tests,
154
+
creating devices and checking their state using the various different transports.
0 commit comments