Home Assistant integration for CamillaDSP
This is a Home Assistant custom integration, that adds a media player entity to control CamillaDSP.
- Get state (Playing, Paused, Idle,...)
- Get and set volume level
- Get and set mute state
- Get and set active file
- Get capture rate
- Install HACS
- Goto "HACS / Integrations"
- Click on the three dots in the top right corner
- Click on "Custom Repositories"
- Add:
- Repository: "kwerner72/homeassistant-camilladsp"
- Category: "Integration"
- Search for "CamillaDSP" in the repositories
- Click on "CamillaDSP"
- Click on "Download" button in the bottom right corner
- Restart Home Assistant
- copy folder
camilladsp
incustom_components
to your home assistant folderconfig/custom_components
- restart Home Assistant
- Goto "Settings / Devices & services"
- Click on "Add integration"
- Search for "CamillaDSP"
- Enter the URL of your CamillaDSP instance (eg. 'http://localhost:5005')
- Select the Area your CamillaDSP is running in
The integration can be configured with its "Configure" button In the dialog, three values can be configured:
- Volume min: lower volume limit (in dB)
- Volume max: upper volume limit (in dB)
- Volume step: volume increase/decrease amount (in dB)
The CamillaDSP entity provides some media player functionality to control CamillaDSP and get status information.
- source_list: list of available config files
- volume_level: current volume level (0..1)
- is_volume_muted: current mute state
- source: currently active config file
- volume_db: current volume level (in dB)
- capturerate: current capture rate
Sets the active config file.
"data.source" must contain the filename.
Example:
type: button
entity: media_player.camilladsp_01234
tap_action:
action: perform-action
perform_action: media_player.select_source
target:
entity_id: media_player.camilladsp_01234
data:
source: default.yml
Increases / decreases current volume level.
Example:
type: button
entity: media_player.camilladsp_01234
tap_action:
action: perform-action
perform_action: media_player.volume_down
target:
entity_id: media_player.camilladsp_01234
icon: mdi:volume-minus
Mutes / unmutes volume.
"data.is_volume_muted" must be either "true" or "false".
Example:
type: button
entity: media_player.camilladsp_01234
tap_action:
action: perform-action
perform_action: media_player.volume_mute
target:
entity_id: media_player.camilladsp_01234
data:
is_volume_muted: true
icon: mdi:volume-mute
Sets the volume to a certain level.
"data.volume_level" must be within 0 and 1.
Example:
type: button
entity: media_player.camilladsp_01234
tap_action:
action: perform-action
perform_action: media_player.volume_set
target:
entity_id: media_player.camilladsp_01234
data:
volume_level: 0.8
Sets the volume to a certain level.
"data.volume_level_db" must be <= 0.
Example:
type: button
entity: media_player.camilladsp_01234
tap_action:
action: perform-action
perform_action: camilladsp.volume_set_db
target:
entity_id: media_player.camilladsp_01234
data:
volume_level_db: -20
States from CamillaDSP will be mapped to Home Assistant states.
CamillaDSP | Home Assistant |
---|---|
INACTIVE | STANDBY |
PAUSED | PAUSED |
RUNNING | PLAYING |
STALLED | IDLE |
STARTING | ON |
not available | OFF |