pysaeco 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pysaeco-0.1.0/.gitignore +8 -0
- pysaeco-0.1.0/PKG-INFO +63 -0
- pysaeco-0.1.0/README.md +39 -0
- pysaeco-0.1.0/pyproject.toml +57 -0
- pysaeco-0.1.0/src/pysaeco/__init__.py +6 -0
- pysaeco-0.1.0/src/pysaeco/avanti.py +616 -0
- pysaeco-0.1.0/src/pysaeco/cli.py +110 -0
- pysaeco-0.1.0/src/pysaeco/client.py +279 -0
- pysaeco-0.1.0/src/pysaeco/homeassistant/__init__.py +4 -0
- pysaeco-0.1.0/src/pysaeco/homeassistant/discovery.py +297 -0
- pysaeco-0.1.0/src/pysaeco/server.py +531 -0
- pysaeco-0.1.0/tests/test_avanti.py +130 -0
- pysaeco-0.1.0/tests/test_client.py +220 -0
- pysaeco-0.1.0/tests/test_homeassistant_discovery.py +123 -0
- pysaeco-0.1.0/tests/test_models.py +127 -0
- pysaeco-0.1.0/tests/test_server.py +289 -0
- pysaeco-0.1.0/uv.lock +644 -0
pysaeco-0.1.0/.gitignore
ADDED
pysaeco-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pysaeco
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Library and CLI for communicating with Saeco-family coffee machines over BLE, with MQTT discovery for Home Assistant.
|
|
5
|
+
Project-URL: Homepage, https://github.com/mikekap/pysaeco
|
|
6
|
+
Project-URL: Issues, https://github.com/mikekap/pysaeco/issues
|
|
7
|
+
Author: pysaeco contributors
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: ble,coffee,home-assistant,mqtt,saeco
|
|
10
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Topic :: Home Automation
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Requires-Dist: anyio>=4.6.2
|
|
17
|
+
Requires-Dist: bleak>=0.22.3
|
|
18
|
+
Requires-Dist: paho-mqtt>=2.1.0
|
|
19
|
+
Requires-Dist: pydantic>=2.9.2
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: pytest>=8.3.3; extra == 'dev'
|
|
22
|
+
Requires-Dist: ruff>=0.7.0; extra == 'dev'
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# pysaeco
|
|
26
|
+
|
|
27
|
+
`pysaeco` is an early-stage Python library and CLI for communicating with Saeco-family
|
|
28
|
+
coffee machines over Bluetooth LE.
|
|
29
|
+
|
|
30
|
+
It uses [`bleak`](https://github.com/hbldh/bleak) for cross-platform BLE support and
|
|
31
|
+
can emit Home Assistant MQTT discovery payloads.
|
|
32
|
+
|
|
33
|
+
## Install for development
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
uv sync --extra dev
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## CLI
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
uv run pysaeco-server
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
By default the server scans for BLE machines, publishes MQTT/Home Assistant discovery to
|
|
46
|
+
`localhost:1883`, and serves the HTTP API/status page at `http://127.0.0.1:8080`.
|
|
47
|
+
|
|
48
|
+
## Library sketch
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from pysaeco import SaecoClient
|
|
52
|
+
from pysaeco.avanti import Espresso
|
|
53
|
+
|
|
54
|
+
with SaecoClient("AA:BB:CC:DD:EE:FF", pin=1234) as client:
|
|
55
|
+
status = client.read_status()
|
|
56
|
+
client.brew(Espresso(coffee_ml=45))
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Development notes
|
|
60
|
+
|
|
61
|
+
- Keep BLE client details in `pysaeco.client`.
|
|
62
|
+
- Keep Avanti protocol packets, responses, recipes, and parsed status in `pysaeco.avanti`.
|
|
63
|
+
- Put Home Assistant discovery entities in `pysaeco.homeassistant.discovery`.
|
pysaeco-0.1.0/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# pysaeco
|
|
2
|
+
|
|
3
|
+
`pysaeco` is an early-stage Python library and CLI for communicating with Saeco-family
|
|
4
|
+
coffee machines over Bluetooth LE.
|
|
5
|
+
|
|
6
|
+
It uses [`bleak`](https://github.com/hbldh/bleak) for cross-platform BLE support and
|
|
7
|
+
can emit Home Assistant MQTT discovery payloads.
|
|
8
|
+
|
|
9
|
+
## Install for development
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv sync --extra dev
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## CLI
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
uv run pysaeco-server
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
By default the server scans for BLE machines, publishes MQTT/Home Assistant discovery to
|
|
22
|
+
`localhost:1883`, and serves the HTTP API/status page at `http://127.0.0.1:8080`.
|
|
23
|
+
|
|
24
|
+
## Library sketch
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from pysaeco import SaecoClient
|
|
28
|
+
from pysaeco.avanti import Espresso
|
|
29
|
+
|
|
30
|
+
with SaecoClient("AA:BB:CC:DD:EE:FF", pin=1234) as client:
|
|
31
|
+
status = client.read_status()
|
|
32
|
+
client.brew(Espresso(coffee_ml=45))
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Development notes
|
|
36
|
+
|
|
37
|
+
- Keep BLE client details in `pysaeco.client`.
|
|
38
|
+
- Keep Avanti protocol packets, responses, recipes, and parsed status in `pysaeco.avanti`.
|
|
39
|
+
- Put Home Assistant discovery entities in `pysaeco.homeassistant.discovery`.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "pysaeco"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Library and CLI for communicating with Saeco-family coffee machines over BLE, with MQTT discovery for Home Assistant."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
license = { text = "MIT" }
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "pysaeco contributors" }
|
|
10
|
+
]
|
|
11
|
+
keywords = ["saeco", "coffee", "ble", "mqtt", "home-assistant"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3.13",
|
|
17
|
+
"Topic :: Home Automation",
|
|
18
|
+
]
|
|
19
|
+
dependencies = [
|
|
20
|
+
"anyio>=4.6.2",
|
|
21
|
+
"bleak>=0.22.3",
|
|
22
|
+
"paho-mqtt>=2.1.0",
|
|
23
|
+
"pydantic>=2.9.2",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
dev = [
|
|
28
|
+
"pytest>=8.3.3",
|
|
29
|
+
"ruff>=0.7.0",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.scripts]
|
|
33
|
+
pysaeco-server = "pysaeco.cli:main"
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://github.com/mikekap/pysaeco"
|
|
37
|
+
Issues = "https://github.com/mikekap/pysaeco/issues"
|
|
38
|
+
|
|
39
|
+
[build-system]
|
|
40
|
+
requires = ["hatchling"]
|
|
41
|
+
build-backend = "hatchling.build"
|
|
42
|
+
|
|
43
|
+
[tool.hatch.build.targets.wheel]
|
|
44
|
+
packages = ["src/pysaeco"]
|
|
45
|
+
|
|
46
|
+
[tool.pytest.ini_options]
|
|
47
|
+
testpaths = ["tests"]
|
|
48
|
+
|
|
49
|
+
[tool.ruff]
|
|
50
|
+
line-length = 100
|
|
51
|
+
target-version = "py311"
|
|
52
|
+
|
|
53
|
+
[tool.ruff.lint]
|
|
54
|
+
select = ["E", "F", "I", "UP", "B", "SIM"]
|
|
55
|
+
|
|
56
|
+
[dependency-groups]
|
|
57
|
+
dev = []
|