GithubHelp home page GithubHelp logo

kalkih / forked-daapd-card Goto Github PK

View Code? Open in Web Editor NEW
79.0 11.0 12.0 9 KB

forked daapd card for Home Assistant Lovelace UI

License: MIT License

JavaScript 100.00%
automation home-assistant hassio forked-daapd lovelace lovelace-ui multiroom media-player

forked-daapd-card's Introduction

Lovelace forked daapd card

A lovelace card for Home Assistant to control a forked daapd instance.

This card allow you to control your forked daapd instance through Home Assistant. The following controls are available: master volume, play/pause, next/previous, on/off, output selection, individual output volume.

Preview

Requirements

  • Forked daapd built with websocket support.
  • Forked daapd setup as an media_player (mpd component) in Home Assistant

Install

Simple install

  • Copy forked-daapd-card.js into your config/www ”folder.
  • Add a reference to the forked-daapd-card.js inside your ui-lovelace.yaml.
resources:
  - url: /local/forked-daapd-card.js?v=0.0.2
    type: module

Install using git

  • Clone this repository into your config/www folder using git.
git clone https://github.com/kalkih/forked-daapd-card.git
  • Add a reference to the card in your ui-lovelace.yaml.
resources:
  - url: /local/forked-daapd-card/forked-daapd-card.js?v=0.0.2
    type: module

Updating

  • Locate your forked-daapd-card.js in config/www or wherever you ended up storing it.
  • Replace it with the latest version of forked-daapd-card.js.
  • Add the new version number to the end of the cards reference url in your ui-lovelace.yaml like below.
resources:
  - url: /local/forked-daapd-card.js?v=0.0.2
    type: module

If you went the git clone route, just run git pull from inside your config/www/forked-daapd-card/ directory, to get the latest version of the code. Then add the new version number to the end of the card reference url in your ui-lovelace.yaml like below.

resources:
  - url: /local/forked-daapd-card/forked-daapd-card.js?v=0.0.2
    type: module

Using the card

Options

Name Type Default Since Description
type string required v0.0.1 custom:forked-daapd-card.
entity string required v0.0.1 The entity_id of your forked-daapd media_player (mpd) in home assistant.
ip string required v0.0.1 Set the IP address of your forked-daapd server.
port number 3689 v0.0.1 Set the port of your forked-daapd server.
ws_port number 3688 v0.0.1 Set the websocket port of your forked-daapd server.
name string optional v0.0.1 Set a custom friendly_name which is displayed beside the icon.
icon string optional v0.0.1 set a custom icon from any of the available mdi icons.
outputs list optional v0.0.1 If you want to only show specific outputs, include the id of each one in the list.
  • You can find the outputs ids by accessing http://<forked-daapd-ip>:<port>/api/outputs

Example usage

Normal

- type: "custom:forked-daapd-card"
  entity: media_player.multiroom_audio
  ip: "192.168.1.5"
  name: Multiroom

Show only specified outputs

- type: "custom:forked-daapd-card"
  entity: media_player.multiroom_audio
  ip: "192.168.1.5"
  name: Multiroom
  outputs:
    - "225176710053082"
    - "962995053492"
    - "24918234768"

Getting errors?

Make sure you have javascript_version: latest in your configuration.yaml under frontend:.

Make sure you have the latest versions of forked-daapd-card.js.

If you have issues after updating the card, try clearing your browser cache.

License

This project is under the MIT license.

forked-daapd-card's People

Contributors

kalkih avatar uchagani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forked-daapd-card's Issues

Outputs not showing

Thanks so much for creating this card! I've been using a combination of media player card, switches, rest sensors and automations to control volume of various speakers from Home Assistant front end.

From the readme, I understood that if I do not specify an array of speaker IDs, then it should render all the available speakers in the card. However, I'm not seeing this - when I do not provide a list of speaker IDs, I get no speakers showing in the card. I know the speakers are there and working, as my older integration still exists in lovelace and I can still control speakers using my much-less-reliable method.

Lovalace forked daapd card is not working

Hi,
my server is up and running, works well in the browser. The code on top of ui-lovelace.yaml is:
- url: /local/forked-daapd-card.js?v=0.8.3 type: module
and below:
- type: custom:forked-daapd-card entity: media_player.mpd ip: 192.168.178.$$$ port: 3689 name: Multiroom
The result is:
screenshot 23
Thanx for your help.
Stefan

Allow setting Name of output

I have multiple output devices in the same room and they show up like this:

image

It would be nice if I could change the name of them so I don't have to remember which one Living Room (2) is.

Custom element doesn't exist: forked-daapd-card.

Hello,
I tried to follow the manual but i keep getting error

Custom element doesn't exist: forked-daapd-card.

here is my config
type: "custom:forked-daapd-card" entity: media_player.forked_daapd_server_2 ip: "192.168.1.1" name: Multiroom

I downloaded .js file to www/community/forked-daapd-card, mimicing hacs installation.
and i used locelace resources tab in server setup to add a card as
/hacsfiles/forked-daapd-card/forked-daapd-card.js

I tried with
/local/community/forked-daapd-card/forked-daapd-card.js

with the same result. please help. I run latest home assistant (hassio)

Merging Cards

Hi there,

First of all, thanks so much for your work on this card and the mini-media-player. They are both awesome!

I was curious if you could recommend the best way to combine the two cards? Right now I am using them both in a vertical stack and it works, but it could be better. The mini-media-player provides a number of things the forked doesn't - the artwork, and the ability to select playlist a playlist. But the key thing the forked card has is the outputs and ability to control whole house audio which is great. I would like to have the mini player on top, and then just the outputs below. Right now I essentially have two players on top of each other in order to get the outputs.

image

`type: vertical-stack
title: Music
cards:

  • type: 'custom:mini-media-player'
    entity: media_player.forked_daapd_server
    artwork: cover
    source: icon
    name: Now Playing
    hide:
    shuffle: false
    group: false
    volume_stateless: false
    info: scroll
  • type: 'custom:forked-daapd-card'
    entity: media_player.forked_daapd_server
    ip: 192.168.168.168
    name: Now Playing
    outputs:
    • '24916375876'`

custom element doesn't exist

I have your card configured as described but unfortunately I get Customer element does not exist. Since it's v0.0.1 - is this expected to work already?

would be awesome!

Artwork

Is it possible for this card to show album art like the media-control card does?

Missing control

Thank you for this custom card.

It seems that the control switches and buttons are missing in my setup; I'm only seeing the volume sliders.
The different outputs respond correctly when they are switched on/off from forked-daapd's interface, however the switches to do so from the card itself are missing.

Screen Shot 2021-05-21 at 10 23 23 pm

It looks like the section itself is being rendered (since the slider is being displayed, but other components are not. Looking at the code, I believe this has something to do with using the custom elements (ha-switch, ha-icon-button etc.) in the templates.

Any help would be appreciated.
HA version: core-2021.5.4

Missing info on card

Hi,

I implemnted your forked-daapd Lovelace card, but it seems to miss some info/functions (see screenshot)
Schermafbeelding 2020-09-25 om 16 34 51

I run the the latest version of all related software....

Thanks,
Rien

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.