Publish file content as MQTT topic compatible with HomeAssistant.
Project description
HomeAssistant MQTT filesystem publisher
Publish file content as an MQTT topic compatible with HomeAssistant.
It can be useful, e.g., to publish system metrics from /sys
.
Quick start
- Install the Python package:
pip install hamqtt-fs-publisher
. - Create a configuration (example in
config.example.yaml
). It can be either YAML or JSON. There is a pre-generated JSON schema inhamqtt_fs_publisher/configuration.schema.json
, which can be used, e.g., with VS Code (the current repository is pre-configured forconfig.json
andconfig.yaml
). Remember to set proper authorization details for the MQTT broker. If you are using the standard Mosquitto broker add-on in Home Assistant, please refer to the official documentation. - Run
hamqtt_fs_publisher --config <config_file_name>
.
Supported features
- Auto-discovery in HomeAssistant.
- Configuration with a simple YAML/JSON file.
- Possibility to create read-only sensor device entities with values taken from a file and published to the MQTT broker periodically with set intervals.
TODO
- Add a logger to connect/disconnect events.
- Add an option to read a value on a button push in GUI (not only periodically).
- Add a switch endpoint (i.e., a file writer).
- Add a generic writer endpoint.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for hamqtt_fs_publisher-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d8151eceed2d0fee173134c07996116aedf4673a6a823742ed39cb8a6c3e849 |
|
MD5 | 0de01767cdc76992db6a3c55c9bec543 |
|
BLAKE2b-256 | a96d225d06887fe7f87f386d17a5c1353ff14c3d3a8db99ce24953bb4c287e52 |
Close
Hashes for hamqtt_fs_publisher-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 818d3f92bb43ae7e01b1228dc058d94f1b7c2120dc12a3fb253aac2b2a08f3dc |
|
MD5 | 4f3a8373d649c77cab8e7c7cb18de2ab |
|
BLAKE2b-256 | c3017ea72436e3b5538c3ca22bfc2ccb582e9d6fe838b9e58c2f3052c54dc1fe |