dbus2mqtt 0.1.0__tar.gz → 0.1.2__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.
Potentially problematic release.
This version of dbus2mqtt might be problematic. Click here for more details.
- dbus2mqtt-0.1.2/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- dbus2mqtt-0.1.2/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- dbus2mqtt-0.1.2/.github/release-drafter.yml +34 -0
- dbus2mqtt-0.1.0/.github/workflows/main.yml → dbus2mqtt-0.1.2/.github/workflows/ci.yml +13 -6
- dbus2mqtt-0.1.2/.github/workflows/docker-latest.yml +74 -0
- dbus2mqtt-0.1.2/.github/workflows/docker-publish-pypi-release.yml +69 -0
- dbus2mqtt-0.1.2/.github/workflows/publish.yml +56 -0
- dbus2mqtt-0.1.2/.github/workflows/release-drafter.yml +26 -0
- dbus2mqtt-0.1.2/.gitignore +25 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/.pre-commit-config.yaml +1 -1
- dbus2mqtt-0.1.2/.python-version +1 -0
- dbus2mqtt-0.1.2/.vscode/launch.json +13 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/PKG-INFO +21 -17
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/README.md +15 -15
- dbus2mqtt-0.1.0/Dockerfile → dbus2mqtt-0.1.2/docker/Dockerfile.latest +5 -3
- dbus2mqtt-0.1.2/docker/Dockerfile.pypi +10 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/docs/examples/home_assistant_media_player.md +51 -25
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/docs/examples/home_assistant_media_player.yaml +10 -7
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/pyproject.toml +5 -1
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/renovate.json +2 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/config.py +1 -1
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/dbus/dbus_client.py +11 -9
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/dbus/dbus_util.py +1 -1
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/event_broker.py +1 -2
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/tests/__init__.py +18 -1
- dbus2mqtt-0.1.2/tests/dbus/test_dbus_client.py +49 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/tests/flow/triggers/test_dbus_client_triggers.py +6 -25
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/uv.lock +105 -1
- dbus2mqtt-0.1.0/.github/workflows/publish.yml +0 -127
- dbus2mqtt-0.1.0/.gitignore +0 -6
- dbus2mqtt-0.1.0/.python-version +0 -1
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/.dockerignore +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/.env.example +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/.github/workflows/pre-commit.yml +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/.vscode/settings.json +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/.yamllint.yml +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/LICENSE +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/config-test.yaml +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/docs/debugging.md +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/docs/examples/linux_desktop.md +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/docs/examples/linux_desktop.yaml +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/docs/examples.md +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/__init__.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/__main__.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/dbus/dbus_types.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/flow/__init__.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/flow/actions/context_set.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/flow/actions/mqtt_publish.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/flow/flow_processor.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/main.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/mqtt/mqtt_client.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/template/dbus_template_functions.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/src/dbus2mqtt/template/templating.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/tests/config/test_examples.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/tests/flow/actions/test_context_set.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/tests/flow/actions/test_mqtt_publish.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/tests/flow/test_flow_processor.py +0 -0
- {dbus2mqtt-0.1.0 → dbus2mqtt-0.1.2}/tests/template/test_templating.py +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Desktop (please complete the following information):**
|
|
27
|
+
- OS: [e.g. iOS]
|
|
28
|
+
- Browser [e.g. chrome, safari]
|
|
29
|
+
- Version [e.g. 22]
|
|
30
|
+
|
|
31
|
+
**Smartphone (please complete the following information):**
|
|
32
|
+
- Device: [e.g. iPhone6]
|
|
33
|
+
- OS: [e.g. iOS8.1]
|
|
34
|
+
- Browser [e.g. stock browser, safari]
|
|
35
|
+
- Version [e.g. 22]
|
|
36
|
+
|
|
37
|
+
**Additional context**
|
|
38
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name-template: 'v$RESOLVED_VERSION 🌈'
|
|
2
|
+
tag-template: 'v$RESOLVED_VERSION'
|
|
3
|
+
exclude-labels:
|
|
4
|
+
- dependencies
|
|
5
|
+
categories:
|
|
6
|
+
- title: '🚀 Features'
|
|
7
|
+
labels:
|
|
8
|
+
- 'feature'
|
|
9
|
+
- 'enhancement'
|
|
10
|
+
- title: '🐛 Bug Fixes'
|
|
11
|
+
labels:
|
|
12
|
+
- 'fix'
|
|
13
|
+
- 'bugfix'
|
|
14
|
+
- 'bug'
|
|
15
|
+
- title: '🧰 Maintenance'
|
|
16
|
+
label: 'chore'
|
|
17
|
+
exclude-contributors:
|
|
18
|
+
- jwnmulder
|
|
19
|
+
version-resolver:
|
|
20
|
+
major:
|
|
21
|
+
labels:
|
|
22
|
+
- 'major'
|
|
23
|
+
minor:
|
|
24
|
+
labels:
|
|
25
|
+
- 'minor'
|
|
26
|
+
patch:
|
|
27
|
+
labels:
|
|
28
|
+
- 'patch'
|
|
29
|
+
default: patch
|
|
30
|
+
change-template: '* $TITLE (#$NUMBER)'
|
|
31
|
+
template: |
|
|
32
|
+
## Changes
|
|
33
|
+
|
|
34
|
+
$CHANGES
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: CI
|
|
2
2
|
|
|
3
3
|
"on":
|
|
4
4
|
push:
|
|
@@ -12,19 +12,26 @@ name: main
|
|
|
12
12
|
jobs:
|
|
13
13
|
test:
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version:
|
|
18
|
+
- "3.10"
|
|
19
|
+
- "3.11"
|
|
20
|
+
- "3.12"
|
|
21
|
+
- "3.13"
|
|
22
|
+
|
|
15
23
|
steps:
|
|
16
24
|
- uses: actions/checkout@v4
|
|
17
25
|
|
|
18
26
|
- name: Install uv
|
|
19
27
|
uses: astral-sh/setup-uv@v5
|
|
28
|
+
with:
|
|
29
|
+
enable-cache: true
|
|
20
30
|
|
|
21
31
|
- name: "Set up Python"
|
|
22
32
|
uses: actions/setup-python@v5
|
|
23
33
|
with:
|
|
24
|
-
python-version
|
|
25
|
-
|
|
26
|
-
- name: Uv sync
|
|
27
|
-
run: uv sync
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
28
35
|
|
|
29
36
|
- name: Run tests
|
|
30
|
-
run: uv run pytest
|
|
37
|
+
run: uv run --python ${{ matrix.python-version }} pytest
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
name: Build and Push Docker latest
|
|
2
|
+
|
|
3
|
+
"on":
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
docker:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
packages: write
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v5
|
|
20
|
+
with:
|
|
21
|
+
enable-cache: true
|
|
22
|
+
|
|
23
|
+
- name: "Set up Python"
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version-file: ".python-version"
|
|
27
|
+
|
|
28
|
+
- name: Determine version from hatch
|
|
29
|
+
id: version
|
|
30
|
+
run: echo "PRETEND_VERSION=$(uvx hatch version)" >> "$GITHUB_OUTPUT"
|
|
31
|
+
|
|
32
|
+
- name: Docker meta
|
|
33
|
+
id: meta
|
|
34
|
+
uses: docker/metadata-action@v5
|
|
35
|
+
with:
|
|
36
|
+
images: |
|
|
37
|
+
jwnmulder/dbus2mqtt
|
|
38
|
+
ghcr.io/jwnmulder/dbus2mqtt
|
|
39
|
+
tags: |
|
|
40
|
+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
|
41
|
+
labels: |
|
|
42
|
+
org.opencontainers.image.source=https://github.com/jwnmulder/dbus2mqtt
|
|
43
|
+
|
|
44
|
+
- name: Set up QEMU
|
|
45
|
+
uses: docker/setup-qemu-action@v3
|
|
46
|
+
|
|
47
|
+
- name: Set up Docker Buildx
|
|
48
|
+
uses: docker/setup-buildx-action@v3
|
|
49
|
+
|
|
50
|
+
- name: Login to DockerHub
|
|
51
|
+
if: github.event_name != 'pull_request'
|
|
52
|
+
uses: docker/login-action@v3
|
|
53
|
+
with:
|
|
54
|
+
username: jwnmulder
|
|
55
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
56
|
+
|
|
57
|
+
- name: Login to GHCR
|
|
58
|
+
if: github.event_name != 'pull_request'
|
|
59
|
+
uses: docker/login-action@v3
|
|
60
|
+
with:
|
|
61
|
+
registry: ghcr.io
|
|
62
|
+
username: jwnmulder
|
|
63
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
64
|
+
|
|
65
|
+
- name: Build and push
|
|
66
|
+
uses: docker/build-push-action@v6
|
|
67
|
+
with:
|
|
68
|
+
context: .
|
|
69
|
+
file: ./docker/Dockerfile.latest
|
|
70
|
+
push: ${{ github.event_name != 'pull_request' }}
|
|
71
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
72
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
73
|
+
build-args: |
|
|
74
|
+
PRETEND_VERSION=${{ steps.version.outputs.PRETEND_VERSION }}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Build and Push Docker Images for Released Versions
|
|
2
|
+
|
|
3
|
+
"on":
|
|
4
|
+
# push:
|
|
5
|
+
# branches:
|
|
6
|
+
# - main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
docker:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
packages: write
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
version:
|
|
17
|
+
- 0.1
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Docker meta
|
|
24
|
+
id: meta
|
|
25
|
+
uses: docker/metadata-action@v5
|
|
26
|
+
with:
|
|
27
|
+
images: |
|
|
28
|
+
jwnmulder/dbus2mqtt
|
|
29
|
+
ghcr.io/jwnmulder/dbus2mqtt
|
|
30
|
+
tags: |
|
|
31
|
+
type=pep440,pattern={{major}},value=${{ matrix.version }},enable=${{ !startsWith(matrix.version, '0.') }}
|
|
32
|
+
type=pep440,pattern={{major}}.{{minor}},value=${{ matrix.version }}
|
|
33
|
+
# type=ref,event=branch
|
|
34
|
+
# type=ref,event=pr
|
|
35
|
+
# type=semver,pattern={{version}},value=${{ matrix.version }}
|
|
36
|
+
labels: |
|
|
37
|
+
org.opencontainers.image.source=https://github.com/jwnmulder/dbus2mqtt
|
|
38
|
+
|
|
39
|
+
- name: Set up QEMU
|
|
40
|
+
uses: docker/setup-qemu-action@v3
|
|
41
|
+
|
|
42
|
+
- name: Set up Docker Buildx
|
|
43
|
+
uses: docker/setup-buildx-action@v3
|
|
44
|
+
|
|
45
|
+
- name: Login to DockerHub
|
|
46
|
+
if: github.event_name != 'pull_request'
|
|
47
|
+
uses: docker/login-action@v3
|
|
48
|
+
with:
|
|
49
|
+
username: jwnmulder
|
|
50
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
51
|
+
|
|
52
|
+
- name: Login to GHCR
|
|
53
|
+
if: github.event_name != 'pull_request'
|
|
54
|
+
uses: docker/login-action@v3
|
|
55
|
+
with:
|
|
56
|
+
registry: ghcr.io
|
|
57
|
+
username: jwnmulder
|
|
58
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
59
|
+
|
|
60
|
+
- name: Build and push
|
|
61
|
+
uses: docker/build-push-action@v6
|
|
62
|
+
with:
|
|
63
|
+
context: .
|
|
64
|
+
file: ./docker/Dockerfile.pypi
|
|
65
|
+
push: ${{ github.event_name != 'pull_request' }}
|
|
66
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
67
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
68
|
+
build-args: |
|
|
69
|
+
DBUS2MQTT_VERSION=${{ matrix.version }}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Upload Python Package
|
|
2
|
+
|
|
3
|
+
"on":
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release-build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
persist-credentials: false
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v5
|
|
21
|
+
with:
|
|
22
|
+
enable-cache: true
|
|
23
|
+
|
|
24
|
+
- name: "Set up Python"
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version-file: ".python-version"
|
|
28
|
+
|
|
29
|
+
- name: Build
|
|
30
|
+
run: uv build
|
|
31
|
+
|
|
32
|
+
- name: Store the distribution packages
|
|
33
|
+
uses: actions/upload-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: release-dists
|
|
36
|
+
path: dist/
|
|
37
|
+
|
|
38
|
+
pypi-publish:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
needs:
|
|
41
|
+
- release-build
|
|
42
|
+
permissions:
|
|
43
|
+
id-token: write
|
|
44
|
+
environment:
|
|
45
|
+
name: pypi
|
|
46
|
+
url: https://pypi.org/p/dbus2mqtt
|
|
47
|
+
|
|
48
|
+
steps:
|
|
49
|
+
- name: Retrieve release distributions
|
|
50
|
+
uses: actions/download-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: release-dists
|
|
53
|
+
path: dist/
|
|
54
|
+
|
|
55
|
+
- name: Publish release distributions to PyPI
|
|
56
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Release Drafter
|
|
2
|
+
|
|
3
|
+
"on":
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [opened, reopened, synchronize]
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
update_release_draft:
|
|
16
|
+
permissions:
|
|
17
|
+
# write permission is required to create a github release
|
|
18
|
+
contents: write
|
|
19
|
+
# write permission is required for autolabeler
|
|
20
|
+
# otherwise, read permission is required at least
|
|
21
|
+
pull-requests: write
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: release-drafter/release-drafter@v6
|
|
25
|
+
env:
|
|
26
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# https://github.com/github/gitignore/blob/main/Python.gitignore
|
|
2
|
+
# https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
|
3
|
+
|
|
4
|
+
# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
dist/
|
|
11
|
+
|
|
12
|
+
# Environments
|
|
13
|
+
.env
|
|
14
|
+
.venv
|
|
15
|
+
|
|
16
|
+
# Ruff stuff:
|
|
17
|
+
.ruff_cache/
|
|
18
|
+
|
|
19
|
+
### VisualStudioCode ###
|
|
20
|
+
.vscode/*
|
|
21
|
+
!.vscode/settings.json
|
|
22
|
+
!.vscode/tasks.json
|
|
23
|
+
!.vscode/launch.json
|
|
24
|
+
!.vscode/extensions.json
|
|
25
|
+
*.code-workspace
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "dbus2mqtt - home_assistant_media_player",
|
|
6
|
+
"type": "debugpy",
|
|
7
|
+
"request": "launch",
|
|
8
|
+
"module": "dbus2mqtt",
|
|
9
|
+
"console": "integratedTerminal",
|
|
10
|
+
"args": "--config docs/examples/home_assistant_media_player.yaml"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbus2mqtt
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: A Python tool to expose Linux D-Bus signals, methods and properties over MQTT - featuring templating, payload enrichment and Home Assistant-ready examples
|
|
5
5
|
Project-URL: Repository, https://github.com/jwnmulder/dbus2mqtt.git
|
|
6
6
|
Project-URL: Issues, https://github.com/jwnmulder/dbus2mqtt/issues
|
|
@@ -9,10 +9,14 @@ License-File: LICENSE
|
|
|
9
9
|
Keywords: dbus,home-assistant,mpris,mqtt,python
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
13
|
Classifier: Operating System :: POSIX :: Linux
|
|
13
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Requires-Python: >=3.10
|
|
16
20
|
Requires-Dist: apscheduler>=3.11.0
|
|
17
21
|
Requires-Dist: colorlog>=6.9.0
|
|
18
22
|
Requires-Dist: dbus-next>=0.2.3
|
|
@@ -28,8 +32,6 @@ Description-Content-Type: text/markdown
|
|
|
28
32
|
|
|
29
33
|
# dbus2mqtt
|
|
30
34
|
|
|
31
|
-
> **⚠️ Warning:** This project has no releases yet. Running from source works. Docker images and Python packages are planned but not yet available.
|
|
32
|
-
|
|
33
35
|
**dbus2mqtt** is a Python application that bridges **Linux D-Bus** with **MQTT**.
|
|
34
36
|
It lets you forward D-Bus signals and properties to MQTT topics, call D-Bus methods via MQTT messages, and shape payloads using flexible **Jinja2 templating**.
|
|
35
37
|
|
|
@@ -43,10 +45,15 @@ This makes it easy to integrate Linux desktop services or system signals into MQ
|
|
|
43
45
|
* 📡 Expose **D-Bus methods** for remote control via MQTT messages.
|
|
44
46
|
* 🏠 Includes example configurations for **MPRIS** and **Home Assistant Media Player** integration.
|
|
45
47
|
|
|
48
|
+
## Project status
|
|
49
|
+
|
|
50
|
+
**dbus2mqtt** is considered stable for the use-cases it has been tested against, and is actively being developed. Documentation is continuously being improved.
|
|
51
|
+
|
|
52
|
+
Initial testing has focused on MPRIS integration. A table of tested MPRIS players and their supported methods can be found here: [home_assistant_media_player.md](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/home_assistant_media_player.md)
|
|
53
|
+
|
|
54
|
+
|
|
46
55
|
TODO list
|
|
47
56
|
|
|
48
|
-
* Create a release on PyPI
|
|
49
|
-
* Release a docker image
|
|
50
57
|
* Improve error handling when deleting message with 'retain' set. WARNING:dbus2mqtt.mqtt_client:on_message: Unexpected payload, expecting json, topic=dbus2mqtt/org.mpris.MediaPlayer2/command, payload=, error=Expecting value: line 1 column 1 (char 0)
|
|
51
58
|
* Property set only works the first time, need to restart after which the first set will work again
|
|
52
59
|
|
|
@@ -91,17 +98,17 @@ MQTT__USERNAME=
|
|
|
91
98
|
MQTT__PASSWORD=
|
|
92
99
|
```
|
|
93
100
|
|
|
94
|
-
###
|
|
95
|
-
|
|
96
|
-
To run dbus2mqtt from source (requires uv to be installed)
|
|
101
|
+
### Install and run dbus2mqtt
|
|
97
102
|
|
|
98
103
|
```bash
|
|
99
|
-
|
|
104
|
+
python -m pip install dbus2mqtt
|
|
105
|
+
dbus2mqtt --config config.yaml
|
|
100
106
|
```
|
|
101
107
|
|
|
108
|
+
|
|
102
109
|
### Run using docker with auto start behavior
|
|
103
110
|
|
|
104
|
-
To build and run dbus2mqtt using Docker with the [home_assistant_media_player.yaml](docs/examples/home_assistant_media_player.yaml) example from this repository
|
|
111
|
+
To build and run dbus2mqtt using Docker with the [home_assistant_media_player.yaml](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/home_assistant_media_player.yaml) example from this repository.
|
|
105
112
|
|
|
106
113
|
```bash
|
|
107
114
|
# setup configuration
|
|
@@ -109,9 +116,6 @@ mkdir -p $HOME/.config/dbus2mqtt
|
|
|
109
116
|
cp docs/examples/home_assistant_media_player.yaml $HOME/.config/dbus2mqtt/config.yaml
|
|
110
117
|
cp .env.example $HOME/.config/dbus2mqtt/.env
|
|
111
118
|
|
|
112
|
-
# build image
|
|
113
|
-
docker build -t jwnmulder/dbus2mqtt:latest .
|
|
114
|
-
|
|
115
119
|
# run image and automatically start on reboot
|
|
116
120
|
docker run --detach --name dbus2mqtt \
|
|
117
121
|
--volume "$HOME"/.config/dbus2mqtt:"$HOME"/.config/dbus2mqtt \
|
|
@@ -130,7 +134,7 @@ sudo docker logs dbus2mqtt -f
|
|
|
130
134
|
|
|
131
135
|
## Examples
|
|
132
136
|
|
|
133
|
-
This repository contains
|
|
137
|
+
This repository contains examples under [docs/examples](https://github.com/jwnmulder/dbus2mqtt/blob/main//docs/examples.md). The most complete one being [MPRIS to Home Assistant Media Player integration](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/home_assistant_media_player.md)
|
|
134
138
|
|
|
135
139
|
## Configuration reference
|
|
136
140
|
|
|
@@ -213,8 +217,8 @@ dbus:
|
|
|
213
217
|
|
|
214
218
|
## Flows
|
|
215
219
|
|
|
216
|
-
TODO: Document flows, for now see the [MPRIS to Home Assistant Media Player integration](docs/examples/home_assistant_media_player.md) example
|
|
220
|
+
TODO: Document flows, for now see the [MPRIS to Home Assistant Media Player integration](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/home_assistant_media_player.md) example
|
|
217
221
|
|
|
218
222
|
## Jinja templating
|
|
219
223
|
|
|
220
|
-
TODO: Document Jinja templating, for now see the [MPRIS to Home Assistant Media Player integration](docs/examples/home_assistant_media_player.md) example
|
|
224
|
+
TODO: Document Jinja templating, for now see the [MPRIS to Home Assistant Media Player integration](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/home_assistant_media_player.md) example
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# dbus2mqtt
|
|
2
2
|
|
|
3
|
-
> **⚠️ Warning:** This project has no releases yet. Running from source works. Docker images and Python packages are planned but not yet available.
|
|
4
|
-
|
|
5
3
|
**dbus2mqtt** is a Python application that bridges **Linux D-Bus** with **MQTT**.
|
|
6
4
|
It lets you forward D-Bus signals and properties to MQTT topics, call D-Bus methods via MQTT messages, and shape payloads using flexible **Jinja2 templating**.
|
|
7
5
|
|
|
@@ -15,10 +13,15 @@ This makes it easy to integrate Linux desktop services or system signals into MQ
|
|
|
15
13
|
* 📡 Expose **D-Bus methods** for remote control via MQTT messages.
|
|
16
14
|
* 🏠 Includes example configurations for **MPRIS** and **Home Assistant Media Player** integration.
|
|
17
15
|
|
|
16
|
+
## Project status
|
|
17
|
+
|
|
18
|
+
**dbus2mqtt** is considered stable for the use-cases it has been tested against, and is actively being developed. Documentation is continuously being improved.
|
|
19
|
+
|
|
20
|
+
Initial testing has focused on MPRIS integration. A table of tested MPRIS players and their supported methods can be found here: [home_assistant_media_player.md](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/home_assistant_media_player.md)
|
|
21
|
+
|
|
22
|
+
|
|
18
23
|
TODO list
|
|
19
24
|
|
|
20
|
-
* Create a release on PyPI
|
|
21
|
-
* Release a docker image
|
|
22
25
|
* Improve error handling when deleting message with 'retain' set. WARNING:dbus2mqtt.mqtt_client:on_message: Unexpected payload, expecting json, topic=dbus2mqtt/org.mpris.MediaPlayer2/command, payload=, error=Expecting value: line 1 column 1 (char 0)
|
|
23
26
|
* Property set only works the first time, need to restart after which the first set will work again
|
|
24
27
|
|
|
@@ -63,17 +66,17 @@ MQTT__USERNAME=
|
|
|
63
66
|
MQTT__PASSWORD=
|
|
64
67
|
```
|
|
65
68
|
|
|
66
|
-
###
|
|
67
|
-
|
|
68
|
-
To run dbus2mqtt from source (requires uv to be installed)
|
|
69
|
+
### Install and run dbus2mqtt
|
|
69
70
|
|
|
70
71
|
```bash
|
|
71
|
-
|
|
72
|
+
python -m pip install dbus2mqtt
|
|
73
|
+
dbus2mqtt --config config.yaml
|
|
72
74
|
```
|
|
73
75
|
|
|
76
|
+
|
|
74
77
|
### Run using docker with auto start behavior
|
|
75
78
|
|
|
76
|
-
To build and run dbus2mqtt using Docker with the [home_assistant_media_player.yaml](docs/examples/home_assistant_media_player.yaml) example from this repository
|
|
79
|
+
To build and run dbus2mqtt using Docker with the [home_assistant_media_player.yaml](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/home_assistant_media_player.yaml) example from this repository.
|
|
77
80
|
|
|
78
81
|
```bash
|
|
79
82
|
# setup configuration
|
|
@@ -81,9 +84,6 @@ mkdir -p $HOME/.config/dbus2mqtt
|
|
|
81
84
|
cp docs/examples/home_assistant_media_player.yaml $HOME/.config/dbus2mqtt/config.yaml
|
|
82
85
|
cp .env.example $HOME/.config/dbus2mqtt/.env
|
|
83
86
|
|
|
84
|
-
# build image
|
|
85
|
-
docker build -t jwnmulder/dbus2mqtt:latest .
|
|
86
|
-
|
|
87
87
|
# run image and automatically start on reboot
|
|
88
88
|
docker run --detach --name dbus2mqtt \
|
|
89
89
|
--volume "$HOME"/.config/dbus2mqtt:"$HOME"/.config/dbus2mqtt \
|
|
@@ -102,7 +102,7 @@ sudo docker logs dbus2mqtt -f
|
|
|
102
102
|
|
|
103
103
|
## Examples
|
|
104
104
|
|
|
105
|
-
This repository contains
|
|
105
|
+
This repository contains examples under [docs/examples](https://github.com/jwnmulder/dbus2mqtt/blob/main//docs/examples.md). The most complete one being [MPRIS to Home Assistant Media Player integration](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/home_assistant_media_player.md)
|
|
106
106
|
|
|
107
107
|
## Configuration reference
|
|
108
108
|
|
|
@@ -185,8 +185,8 @@ dbus:
|
|
|
185
185
|
|
|
186
186
|
## Flows
|
|
187
187
|
|
|
188
|
-
TODO: Document flows, for now see the [MPRIS to Home Assistant Media Player integration](docs/examples/home_assistant_media_player.md) example
|
|
188
|
+
TODO: Document flows, for now see the [MPRIS to Home Assistant Media Player integration](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/home_assistant_media_player.md) example
|
|
189
189
|
|
|
190
190
|
## Jinja templating
|
|
191
191
|
|
|
192
|
-
TODO: Document Jinja templating, for now see the [MPRIS to Home Assistant Media Player integration](docs/examples/home_assistant_media_player.md) example
|
|
192
|
+
TODO: Document Jinja templating, for now see the [MPRIS to Home Assistant Media Player integration](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/home_assistant_media_player.md) example
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# First, build the application in the `/app` directory.
|
|
4
4
|
# See `Dockerfile` for details.
|
|
5
|
-
FROM ghcr.io/astral-sh/uv:python3.
|
|
5
|
+
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS builder
|
|
6
6
|
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
|
7
7
|
|
|
8
|
+
ARG PRETEND_VERSION
|
|
9
|
+
ENV SETUPTOOLS_SCM_PRETEND_VERSION=${PRETEND_VERSION}
|
|
10
|
+
|
|
8
11
|
# Disable Python downloads, because we want to use the system interpreter
|
|
9
12
|
# across both images. If using a managed Python version, it needs to be
|
|
10
13
|
# copied from the build image into the final image; see `standalone.Dockerfile`
|
|
@@ -21,9 +24,8 @@ ADD src/ pyproject.toml uv.lock .python-version README.md /app
|
|
|
21
24
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
22
25
|
uv sync --frozen --no-dev
|
|
23
26
|
|
|
24
|
-
|
|
25
27
|
# Then, use a final image without uv
|
|
26
|
-
FROM python:3.
|
|
28
|
+
FROM python:3.13-slim-bookworm
|
|
27
29
|
# It is important to use the image that matches the builder, as the path to the
|
|
28
30
|
# Python executable must be the same, e.g., using `python:3.12-slim-bookworm`
|
|
29
31
|
# will fail.
|