dbus2mqtt 0.4.2__tar.gz → 0.4.4__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.

Files changed (84) hide show
  1. dbus2mqtt-0.4.4/.github/workflows/deploy-docs.yml +29 -0
  2. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.github/workflows/docker-dev.yml +3 -0
  3. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.github/workflows/docker-stable.yml +1 -1
  4. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.github/workflows/pre-commit.yml +7 -5
  5. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.github/workflows/publish.yml +1 -1
  6. dbus2mqtt-0.4.4/.github/workflows/trivy.yml +35 -0
  7. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.gitignore +1 -3
  8. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.pre-commit-config.yaml +9 -4
  9. dbus2mqtt-0.4.4/.vscode/settings.json +16 -0
  10. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/PKG-INFO +16 -12
  11. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/README.md +8 -6
  12. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/docker/Dockerfile.dev +1 -1
  13. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/docker/Dockerfile.pypi +1 -1
  14. dbus2mqtt-0.4.2/docs/debugging.md → dbus2mqtt-0.4.4/docs/developer/debugging_dbus.md +9 -12
  15. dbus2mqtt-0.4.4/docs/developer/index.md +15 -0
  16. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/docs/examples/bluez.md +18 -10
  17. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/docs/examples/dbus2mqtt_internal_state.md +12 -2
  18. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/docs/examples/home_assistant_media_player.md +54 -31
  19. dbus2mqtt-0.4.4/docs/examples/index.md +9 -0
  20. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/docs/examples/linux_desktop.md +11 -4
  21. dbus2mqtt-0.4.4/docs/flows/flow_actions.md +44 -0
  22. dbus2mqtt-0.4.4/docs/flows/flow_triggers.md +72 -0
  23. dbus2mqtt-0.4.4/docs/flows/index.md +33 -0
  24. dbus2mqtt-0.4.4/docs/hooks.py +16 -0
  25. dbus2mqtt-0.4.4/docs/index.md +1 -0
  26. dbus2mqtt-0.4.4/mkdocs.yml +144 -0
  27. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/pyproject.toml +18 -11
  28. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/renovate.json +12 -4
  29. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/config/jsonarparse.py +2 -1
  30. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/mqtt/mqtt_client.py +7 -7
  31. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/template/templating.py +3 -2
  32. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/config/fixtures/payload_template_jinja_expressions.yaml +7 -2
  33. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/config/test_config.py +5 -0
  34. dbus2mqtt-0.4.4/uv.lock +1153 -0
  35. dbus2mqtt-0.4.2/.vscode/settings.json +0 -4
  36. dbus2mqtt-0.4.2/docs/examples.md +0 -5
  37. dbus2mqtt-0.4.2/docs/flows.md +0 -149
  38. dbus2mqtt-0.4.2/uv.lock +0 -744
  39. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.dockerignore +0 -0
  40. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.env.example +0 -0
  41. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  42. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  43. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.github/release-drafter.yml +0 -0
  44. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.github/scripts/release-versions.py +0 -0
  45. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.github/workflows/ci.yml +0 -0
  46. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.github/workflows/release-drafter.yml +0 -0
  47. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.python-version +0 -0
  48. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.vscode/launch.json +0 -0
  49. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/.yamllint.yml +0 -0
  50. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/LICENSE +0 -0
  51. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/docs/examples/bluez.yaml +0 -0
  52. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/docs/examples/dbus2mqtt_internal_state.yaml +0 -0
  53. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/docs/examples/home_assistant_media_player.yaml +2 -2
  54. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/docs/examples/linux_desktop.yaml +0 -0
  55. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/__init__.py +0 -0
  56. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/__main__.py +0 -0
  57. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/config/__init__.py +0 -0
  58. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/dbus/dbus_client.py +0 -0
  59. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/dbus/dbus_types.py +0 -0
  60. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/dbus/dbus_util.py +0 -0
  61. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/dbus/introspection_patches/mpris_playerctl.py +0 -0
  62. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/dbus/introspection_patches/mpris_vlc.py +0 -0
  63. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/event_broker.py +0 -0
  64. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/flow/__init__.py +0 -0
  65. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/flow/actions/context_set.py +0 -0
  66. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/flow/actions/log_action.py +0 -0
  67. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/flow/actions/mqtt_publish.py +0 -0
  68. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/flow/flow_processor.py +0 -0
  69. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/main.py +0 -0
  70. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/src/dbus2mqtt/template/dbus_template_functions.py +0 -0
  71. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/__init__.py +0 -0
  72. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/config/fixtures/payload_template_off.yaml +0 -0
  73. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/config/fixtures/schedule_cron_trigger.yaml +0 -0
  74. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/config/test_examples.py +0 -0
  75. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/conftest.py +0 -0
  76. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/dbus/test_dbus_client.py +0 -0
  77. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/dbus/test_dbus_client_mqtt_command.py +0 -0
  78. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/flow/actions/test_context_set.py +0 -0
  79. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/flow/actions/test_log.py +0 -0
  80. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/flow/actions/test_mqtt_publish.py +0 -0
  81. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/flow/test_flow_processor.py +0 -0
  82. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/flow/triggers/test_dbus_client_triggers.py +0 -0
  83. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/template/test_templating.py +0 -0
  84. {dbus2mqtt-0.4.2 → dbus2mqtt-0.4.4}/tests/template/test_templating_config.py +0 -0
@@ -0,0 +1,29 @@
1
+ name: deploy-docs
2
+
3
+ "on":
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ deploy-docs:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0
18
+ - name: Configure Git Credentials
19
+ run: |
20
+ git config user.name github-actions[bot]
21
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v6
24
+ with:
25
+ activate-environment: true
26
+ enable-cache: true
27
+ - name: gh-deploy
28
+ run: |
29
+ uv run mkdocs gh-deploy --force
@@ -6,7 +6,10 @@ name: docker-dev
6
6
  - main
7
7
  paths-ignore:
8
8
  - 'docs/**'
9
+ - 'tests/**'
9
10
  - '.pre-commit-config.yaml'
11
+ - 'README.md'
12
+ - 'renovate.json'
10
13
  workflow_dispatch:
11
14
 
12
15
  jobs:
@@ -26,7 +26,7 @@ jobs:
26
26
  - name: Determine supported release versions
27
27
  id: supported_release_versions
28
28
  run: |
29
- SUPPORTED_CYCLES=("0.1" "0.2" "0.3" "0.4" "0.5" "0.6" "0.7" "0.8" "0.9" "1.0" "2.0")
29
+ SUPPORTED_CYCLES=("0.4" "0.5" "0.6" "0.7" "0.8" "0.9" "1.0" "2.0")
30
30
 
31
31
  VERSIONS_JSON=$(python3 .github/scripts/release-versions.py "${SUPPORTED_CYCLES[@]}")
32
32
 
@@ -17,11 +17,13 @@ jobs:
17
17
 
18
18
  - name: Install uv
19
19
  uses: astral-sh/setup-uv@v6
20
-
21
- # - name: "Set up Python"
22
- # uses: actions/setup-python@v5
23
- # with:
24
- # python-version-file: ".python-version"
20
+ with:
21
+ activate-environment: true
22
+ enable-cache: true
23
+ cache-dependency-glob: |
24
+ **/uv.lock
25
+ **/pyproject.toml
26
+ **/.pre-commit-config.yaml
25
27
 
26
28
  - name: Uv sync
27
29
  run: uv sync
@@ -48,7 +48,7 @@ jobs:
48
48
 
49
49
  steps:
50
50
  - name: Retrieve release distributions
51
- uses: actions/download-artifact@v4
51
+ uses: actions/download-artifact@v5
52
52
  with:
53
53
  name: release-dists
54
54
  path: dist/
@@ -0,0 +1,35 @@
1
+ name: trivy
2
+
3
+ "on":
4
+ schedule:
5
+ - cron: '15 10 * * 1'
6
+ workflow_dispatch: {}
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ scan:
13
+ permissions:
14
+ contents: read # for actions/checkout to fetch code
15
+ security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
16
+ actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
17
+ name: Scan
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Run Trivy vulnerability scanner
24
+ uses: aquasecurity/trivy-action@0.32.0
25
+ with:
26
+ image-ref: ghcr.io/jwnmulder/dbus2mqtt:latest
27
+ format: 'sarif'
28
+ output: 'trivy-results.sarif'
29
+ severity: 'CRITICAL,HIGH'
30
+ ignore-unfixed: true
31
+
32
+ - name: Upload Trivy scan results to GitHub Security tab
33
+ uses: github/codeql-action/upload-sarif@v3
34
+ with:
35
+ sarif_file: 'trivy-results.sarif'
@@ -1,6 +1,3 @@
1
- # https://github.com/github/gitignore/blob/main/Python.gitignore
2
- # https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
3
-
4
1
  # Byte-compiled / optimized / DLL files
5
2
  __pycache__/
6
3
  *.py[cod]
@@ -8,6 +5,7 @@ __pycache__/
8
5
 
9
6
  # Distribution / packaging
10
7
  dist/
8
+ site/
11
9
 
12
10
  # Environments
13
11
  .env
@@ -1,6 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v5.0.0
3
+ rev: v6.0.0
4
4
  hooks:
5
5
  - id: check-case-conflict
6
6
  - id: check-executables-have-shebangs
@@ -33,7 +33,7 @@ repos:
33
33
  - --strict
34
34
 
35
35
  - repo: https://github.com/astral-sh/ruff-pre-commit
36
- rev: v0.12.2
36
+ rev: v0.12.10
37
37
  hooks:
38
38
  - id: ruff
39
39
  args:
@@ -42,11 +42,16 @@ repos:
42
42
  - I
43
43
 
44
44
  - repo: https://github.com/astral-sh/uv-pre-commit
45
- rev: 0.7.19
45
+ rev: 0.8.13
46
46
  hooks:
47
47
  - id: uv-lock
48
48
 
49
49
  - repo: https://github.com/RobertCraigie/pyright-python
50
- rev: v1.1.403
50
+ rev: v1.1.404
51
51
  hooks:
52
52
  - id: pyright
53
+
54
+ - repo: https://github.com/fpgmaas/deptry
55
+ rev: "0.23.1"
56
+ hooks:
57
+ - id: deptry
@@ -0,0 +1,16 @@
1
+ {
2
+ "python.testing.unittestEnabled": false,
3
+ "python.testing.pytestEnabled": true,
4
+ "yaml.schemas": {
5
+ "https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
6
+ },
7
+ "yaml.customTags": [
8
+ "!ENV scalar",
9
+ "!ENV sequence",
10
+ "!relative scalar",
11
+ "tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg",
12
+ "tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji",
13
+ "tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format",
14
+ "tag:yaml.org,2002:python/object/apply:pymdownx.slugs.slugify mapping"
15
+ ]
16
+ }
@@ -1,13 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dbus2mqtt
3
- Version: 0.4.2
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
- Project-URL: Repository, https://github.com/jwnmulder/dbus2mqtt.git
3
+ Version: 0.4.4
4
+ Summary: General purpose DBus to MQTT bridge - expose signals, methods and properties over MQTT - featuring jinja based templating, payload enrichment and MPRIS / BlueZ / Home Assistant ready examples
5
+ Project-URL: Documentation, https://jwnmulder.github.io/dbus2mqtt
6
+ Project-URL: Source, https://github.com/jwnmulder/dbus2mqtt
6
7
  Project-URL: Issues, https://github.com/jwnmulder/dbus2mqtt/issues
7
8
  License-Expression: MIT
8
9
  License-File: LICENSE
9
- Keywords: dbus,home-assistant,mpris,mqtt,python
10
- Classifier: Development Status :: 4 - Beta
10
+ Keywords: bluez,bridge,dbus,home-assistant,jinja2,mpris,mqtt,python
11
+ Classifier: Development Status :: 5 - Production/Stable
11
12
  Classifier: Intended Audience :: Developers
12
13
  Classifier: License :: OSI Approved :: MIT License
13
14
  Classifier: Operating System :: POSIX :: Linux
@@ -16,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
16
17
  Classifier: Programming Language :: Python :: 3.11
17
18
  Classifier: Programming Language :: Python :: 3.12
18
19
  Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Home Automation
19
21
  Requires-Python: >=3.10
20
22
  Requires-Dist: apscheduler>=3.11.0
21
23
  Requires-Dist: colorlog>=6.9.0
@@ -27,7 +29,7 @@ Requires-Dist: jsonargparse>=4.38.0
27
29
  Requires-Dist: paho-mqtt>=2.1.0
28
30
  Requires-Dist: pydantic>=2.11.3
29
31
  Requires-Dist: python-dotenv>=1.1.0
30
- Requires-Dist: schedule>=1.2.2
32
+ Requires-Dist: pyyaml>=6.0.2
31
33
  Description-Content-Type: text/markdown
32
34
 
33
35
  # dbus2mqtt
@@ -37,7 +39,7 @@ It lets you forward Linux D-Bus signals and properties to MQTT topics, call D-Bu
37
39
 
38
40
  This makes it easy to integrate Linux desktop services or system signals into MQTT-based workflows - including **Home Assistant**.
39
41
 
40
- ## Features
42
+ ## Features
41
43
 
42
44
  * 🔗 Forward **D-Bus signals** to MQTT topics.
43
45
  * 🧠 Enrich or transform **MQTT payloads** using Jinja2 templates and additional D-Bus calls.
@@ -49,11 +51,11 @@ This makes it easy to integrate Linux desktop services or system signals into MQ
49
51
 
50
52
  **dbus2mqtt** is considered stable for the use-cases it has been tested against, and is actively being developed. Documentation is continuously being improved.
51
53
 
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)
54
+ Initial testing has focused on MPRIS integration. A table of tested MPRIS players and their supported methods can be found here: [Mediaplayer integration with Home Assistant](https://jwnmulder.github.io/dbus2mqtt/examples/home_assistant_media_player/)
53
55
 
54
56
  ## Getting started with dbus2mqtt
55
57
 
56
- Create a `config.yaml` file with the contents shown below. This configuration will expose all bus properties from the `org.mpris.MediaPlayer2.Player` interface to MQTT on the `dbus2mqtt/org.mpris.MediaPlayer2/state` topic. Have a look at [docs/examples](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples.md) for more examples
58
+ Create a `config.yaml` file with the contents shown below. This configuration will expose all bus properties from the `org.mpris.MediaPlayer2.Player` interface to MQTT on the `dbus2mqtt/org.mpris.MediaPlayer2/state` topic.
57
59
 
58
60
  ```yaml
59
61
  dbus:
@@ -92,6 +94,7 @@ MQTT__USERNAME=
92
94
  MQTT__PASSWORD=
93
95
  ```
94
96
 
97
+
95
98
  ### Install and run dbus2mqtt
96
99
 
97
100
  ```bash
@@ -129,7 +132,8 @@ sudo docker logs dbus2mqtt -f
129
132
 
130
133
  ## Examples
131
134
 
132
- 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)
135
+ More dbus2mqtt examples can be found here: [examples](https://jwnmulder.github.io/dbus2mqtt/examples/).
136
+ The most complete one being [MPRIS to Home Assistant Media Player integration](https://jwnmulder.github.io/dbus2mqtt/examples/home_assistant_media_player/)
133
137
 
134
138
  ## Configuration reference
135
139
 
@@ -226,8 +230,8 @@ dbus:
226
230
 
227
231
  ## Flows
228
232
 
229
- A reference of all supported flow triggers and actions can be found on [Flows](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/flows.md)
233
+ A reference of all supported flow triggers and actions can be found on [Flows](https://jwnmulder.github.io/dbus2mqtt/flows/)
230
234
 
231
235
  ## Jinja templating
232
236
 
233
- 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
237
+ TODO: Document Jinja templating, for now see the [MPRIS to Home Assistant Media Player integration](https://jwnmulder.github.io/dbus2mqtt/examples/home_assistant_media_player/) example
@@ -5,7 +5,7 @@ It lets you forward Linux D-Bus signals and properties to MQTT topics, call D-Bu
5
5
 
6
6
  This makes it easy to integrate Linux desktop services or system signals into MQTT-based workflows - including **Home Assistant**.
7
7
 
8
- ## Features
8
+ ## Features
9
9
 
10
10
  * 🔗 Forward **D-Bus signals** to MQTT topics.
11
11
  * 🧠 Enrich or transform **MQTT payloads** using Jinja2 templates and additional D-Bus calls.
@@ -17,11 +17,11 @@ This makes it easy to integrate Linux desktop services or system signals into MQ
17
17
 
18
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
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)
20
+ Initial testing has focused on MPRIS integration. A table of tested MPRIS players and their supported methods can be found here: [Mediaplayer integration with Home Assistant](https://jwnmulder.github.io/dbus2mqtt/examples/home_assistant_media_player/)
21
21
 
22
22
  ## Getting started with dbus2mqtt
23
23
 
24
- Create a `config.yaml` file with the contents shown below. This configuration will expose all bus properties from the `org.mpris.MediaPlayer2.Player` interface to MQTT on the `dbus2mqtt/org.mpris.MediaPlayer2/state` topic. Have a look at [docs/examples](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples.md) for more examples
24
+ Create a `config.yaml` file with the contents shown below. This configuration will expose all bus properties from the `org.mpris.MediaPlayer2.Player` interface to MQTT on the `dbus2mqtt/org.mpris.MediaPlayer2/state` topic.
25
25
 
26
26
  ```yaml
27
27
  dbus:
@@ -60,6 +60,7 @@ MQTT__USERNAME=
60
60
  MQTT__PASSWORD=
61
61
  ```
62
62
 
63
+
63
64
  ### Install and run dbus2mqtt
64
65
 
65
66
  ```bash
@@ -97,7 +98,8 @@ sudo docker logs dbus2mqtt -f
97
98
 
98
99
  ## Examples
99
100
 
100
- 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)
101
+ More dbus2mqtt examples can be found here: [examples](https://jwnmulder.github.io/dbus2mqtt/examples/).
102
+ The most complete one being [MPRIS to Home Assistant Media Player integration](https://jwnmulder.github.io/dbus2mqtt/examples/home_assistant_media_player/)
101
103
 
102
104
  ## Configuration reference
103
105
 
@@ -194,8 +196,8 @@ dbus:
194
196
 
195
197
  ## Flows
196
198
 
197
- A reference of all supported flow triggers and actions can be found on [Flows](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/flows.md)
199
+ A reference of all supported flow triggers and actions can be found on [Flows](https://jwnmulder.github.io/dbus2mqtt/flows/)
198
200
 
199
201
  ## Jinja templating
200
202
 
201
- 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
203
+ TODO: Document Jinja templating, for now see the [MPRIS to Home Assistant Media Player integration](https://jwnmulder.github.io/dbus2mqtt/examples/home_assistant_media_player/) example
@@ -25,7 +25,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
25
25
  uv sync --frozen --no-dev
26
26
 
27
27
  # Then, use a final image without uv
28
- FROM python:3.13-slim-bookworm@sha256:6544e0e002b40ae0f59bc3618b07c1e48064c4faed3a15ae2fbd2e8f663e8283
28
+ FROM python:3.13-slim-bookworm@sha256:9b8102b7b3a61db24fe58f335b526173e5aeaaf7d13b2fbfb514e20f84f5e386
29
29
  # It is important to use the image that matches the builder, as the path to the
30
30
  # Python executable must be the same, e.g., using `python:3.12-slim-bookworm`
31
31
  # will fail.
@@ -1,4 +1,4 @@
1
- FROM python:3.13-slim-bookworm@sha256:6544e0e002b40ae0f59bc3618b07c1e48064c4faed3a15ae2fbd2e8f663e8283
1
+ FROM python:3.13-slim-bookworm@sha256:9b8102b7b3a61db24fe58f335b526173e5aeaaf7d13b2fbfb514e20f84f5e386
2
2
 
3
3
  WORKDIR /app
4
4
 
@@ -1,23 +1,20 @@
1
- # Debugging
1
+ # Debugging dbus
2
2
 
3
- ## Running from source
3
+ Useful snippets for checking what's going on on dbus
4
4
 
5
5
  ```bash
6
- uv run main.py --config config.yaml
7
- ```
8
-
9
- ## dbus debugging
10
-
11
- ```bash
12
- uv run dbus2mqtt
13
-
14
- # https://dbus.freedesktop.org/doc/dbus-tutorial.html
15
- # https://dbus.freedesktop.org/doc/dbus-specification.html
6
+ # monitor all dbus traffic
16
7
  dbus-monitor
17
8
 
9
+ # show introspection data for dbus objects
18
10
  busctl --user introspect org.freedesktop.DBus /org/freedesktop/DBus
11
+ ```
12
+
13
+ Useful snippts for MPRIS debugging
19
14
 
15
+ ```bash
20
16
  playerctl -l
17
+
21
18
  busctl --user introspect org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2
22
19
 
23
20
  dbus-send --print-reply --session --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep mpris
@@ -0,0 +1,15 @@
1
+ # Developer guide
2
+
3
+ ## Specifications
4
+
5
+ Generic DBus specifications:
6
+
7
+ * [D-Bus Tutorial](https://dbus.freedesktop.org/doc/dbus-tutorial.html)
8
+ * [D-Bus Specification](https://dbus.freedesktop.org/doc/dbus-specification.html)
9
+
10
+
11
+ ## Running from source
12
+
13
+ ```bash
14
+ uv run main.py --config config.yaml
15
+ ```
@@ -1,5 +1,12 @@
1
+ ---
2
+ hide:
3
+ - toc
4
+ ---
5
+
1
6
  # Bluez
2
7
 
8
+ ## Introduction
9
+
3
10
  This configuration file demonstrates how to use dbus2mqtt to bridge D-Bus events from BlueZ (the official Linux Bluetooth protocol stack) to MQTT topics. It subscribes to relevant D-Bus signals and properties for both the Bluetooth adapter (`hci0`) and all Bluetooth devices managed by BlueZ. The configuration defines flows that:
4
11
 
5
12
  * Monitor property changes and object lifecycle events (added/removed) for the Bluetooth adapter and devices.
@@ -8,7 +15,7 @@ This configuration file demonstrates how to use dbus2mqtt to bridge D-Bus events
8
15
 
9
16
  This setup allows MQTT clients to receive updates about Bluetooth adapter and device states, as well as notifications when devices are removed, making it easier to integrate Bluetooth events into broader automation workflows.
10
17
 
11
- Configuration activities
18
+ ## Setup activities
12
19
 
13
20
  * dbus2mqtt setup using the supplied [bluez.yaml](https://github.com/jwnmulder/dbus2mqtt/blob/main/docs/examples/bluez.yaml)
14
21
 
@@ -24,14 +31,15 @@ The following table lists commands, their descriptions, and an example JSON payl
24
31
 
25
32
  Dbus methods can be invoked by sendig the JSON payload to MQTT topic `dbus2mqtt/bluez/hci0/command`. Method calls will be done for all matching dbus objects.
26
33
 
27
- | Interface | Method<br />Property | Description | Example MQTT JSON Payload |
28
- |----------------------|-----------------------|--------------------------------------|-------------------------------------------------|
29
- | `org.bluez.Adapter1` | `StartDiscovery` | Starts bluetooth discovery | `{ "method": "StartDiscovery" }` |
30
- | `org.bluez.Adapter1` | `StopDiscovery` | Stops bluetooth discovery | `{ "method": "StopDiscovery" }` |
31
- | `org.bluez.Device1` | `Connect` | | `{ "method": "Connect", "path": "/org/bluez/hci0/dev_A1_A2_A3_A4_A5_A6" }` |
32
- | `org.bluez.Device1` | `Disconnect` | | `{ "method": "Disconnect", "path": "/org/bluez/hci0/dev_A1_A2_A3_A4_A5_A6" }` |
33
- | `org.bluez.Device1` | `Pair` | | `{ "method": "Pair", "path": "/org/bluez/hci0/dev_A1_A2_A3_A4_A5_A6" }` |
34
- | `org.bluez.Device1` | `CancelPairing` | | `{ "method": "CancelPairing", "path": "/org/bluez/hci0/dev_A1_A2_A3_A4_A5_A6" }` |
34
+ | Method<br />Property | Description | Example MQTT JSON Payload |
35
+ |-----------------------|--------------------------------------|-------------------------------------------------|
36
+ | `StartDiscovery` | Starts bluetooth discovery | `#!json { "method": "StartDiscovery" }` |
37
+ | `StopDiscovery` | Stops bluetooth discovery | `#!json { "method": "StopDiscovery" }` |
38
+ | `Connect` | | `#!json { "method": "Connect", "path": "/org/bluez/hci0/dev_A1_A2_A3_A4_A5_A6" }` |
39
+ | `Disconnect` | | `#!json { "method": "Disconnect", "path": "/org/bluez/hci0/dev_A1_A2_A3_A4_A5_A6" }` |
40
+ | `Pair` | | `#!json { "method": "Pair", "path": "/org/bluez/hci0/dev_A1_A2_A3_A4_A5_A6" }` |
41
+ | `CancelPairing` | | `#!json { "method": "CancelPairing", "path": "/org/bluez/hci0/dev_A1_A2_A3_A4_A5_A6" }` |
35
42
 
43
+ ## References
36
44
 
37
- https://manpages.ubuntu.com/manpages/noble/man5/org.bluez.
45
+ * <https://manpages.ubuntu.com/manpages/noble/man5/org.bluez>
@@ -1,4 +1,15 @@
1
- # dbus2mqtt internal state example
1
+ ---
2
+ hide:
3
+ - toc
4
+ ---
5
+
6
+ # dbus2mqtt internal state (WIP)
7
+
8
+ ## Introduction
9
+
10
+ This will publish the dbus2mqtt's internal state to the `dbus2mqtt/state` MQTT topic every 5 seconds
11
+
12
+ ## Setup activities
2
13
 
3
14
  Execute the following command to run dbus2mqtt with the example configuration in this repository.
4
15
 
@@ -6,7 +17,6 @@ Execute the following command to run dbus2mqtt with the example configuration in
6
17
  dbus2mqtt --config docs/examples/dbus2mqtt_internal_state.yaml
7
18
  ```
8
19
 
9
- This will publish the dbus2mqtt's internal state to the `dbus2mqtt/state` MQTT topic every 5 seconds
10
20
 
11
21
  ```json
12
22
  {"now": "2025-04-23T16:01:34.985452", "dbus_list": ["org.freedesktop.systemd1", "org.gnome.SessionManager"]}