PowerPi service which controls Logitech Harmony devices over the local network.
The service is built using python, with dependencies using poetry. It is also dependant on a local common library powerpi_common, and testing library powerpi_common_test.
This controller service supports the following Logitech Harmony devices (any including a WiFi smart hub):
The Docker container can be built utilising buildx as described in the project documentation.
This service expects the following environment variables to be set before it will start successfully. When using kubernetes these are already configured in the helm chart, however when running locally for testing we need to define these:
- MQTT_ADDRESS - The URI to the MQTT instance to use, e.g. mqtt://POWERPI_URL:1883
- USE_CONFIG_FILE - Use local config files instead of the files downloaded from GitHub by config-server (default false).
- DEVICES_FILE - When USE_CONFIG_FILE is true, load the devices.json from this path.
This service requires one configuration file, as described in the following config-server page.
This service can be tested by executing the following commands.
# From the controllers/harmony directory in your PowerPi checkout
# Download the dependencies
poetry install
# Run the tests
poetry run pytest
The service can be started locally with the following commands.
# From the controllers/harmony directory in your PowerPi checkout
# Download the dependencies
poetry install
# Run the service locally
poetry run python -m harmony_controller