Lovelace: Forked daapd card

Hey!

As long as you are able to connect to your forked daapd instance with ssl it should be possible, with a few changes in the code http:// to https:// and ws:// to wss://.

There was a build option for forked daapd for SSL support, not sure if it is still supported though, we couldn’t find it in the docs.

I have given up on using a proxy for now.

Are you planning on a component that handles the communication with the speakers?

No unfortunately not, but I would be willing to update this card if someone else decided to create a forked-daapd component.

fergalom try adding nss-mdns into your docker container and see if it works then - looking at your log:

WARNING: No NSS support for mDNS detected, consider installing nss-mdns!

Let me know if this works

2 Likes

Any ideas on a similar component that might be a good starting point for something like this?

I wouldn’t mind having a bit of a hack at creating a component like this. But I haven’t played with websockets before, which look to work a lot better than periodically polling the API (which I’m currently doing with sensors) to get similar functionality.

Has anyone found a workaround if you’re working with https: and running forked daapd on another machine?

1 Like

Sorry for the late answer but maybe the GPM or kodi components? They use Websockets at least.

If you are running nginx or apache reverse proxy, you could potentially redirect local IPs to http and at least get it working on LAN.

can you shed some light on how to install nginx or apache reverse proxy and redirect local IPs to http?

There are actually a couple of guides in the docs about NGINX. and NGINX Configuration.

And then combine it with something like this

And allow/deny directives.

1 Like

so I have duckdns domain, if I was to install nginx would I be able to redirect https:// to http:// for certain ports and still access my HA on https:// ?

installing nginx, would it cause any issues with my duckdns domain, ssl etc?

I’ve never used duckdns so I’m not sure, but I don’t see why it wouldn’t work :smiley:

As I see there is already a docker image.
Anybody did try to create a hassio add-on yet for forked-daapd? I had mine running on a separate pi but the sd card just crapped out… And of course it would be great to just have forked-daapd as an add-on and not need to install it on a separate rpi…

I think @frenck is working on this.

My question is has anyone got around the issue of using HTTPS (for remote access) AND getting this card working? Thanks all

@kalkih can I ask - as far as you’re aware - is this lovelace integration ONLY possible if you don’t run HTTPS on your Home Assistant install?

Yes, most likely won’t work, you could easily edit the source to make it SSL compatible but I don’t think forked-daapd supports wss, so wouldn’t make a difference.

I had my home assistant set up behind an nginx SSL proxy, so I could connect to my home assistant frontend without SSL while on LAN, and because of this bypass the SSL issues.

Damnit. OK. Thank you so much for the speedy reply.
Now to see if I can use the API directly to open specific files and stream to specific outputs.

Removing all websocket stuff from the card and moving it into a custom component would be ideal.

Hi there,

I seem to be seeing a similar problem - I cannot select sources/destinations from the card, none show up. I do however see the track title, which presumably it’s pulling from fork-daapd, so I think the connection is there?

Running the curl check from my hassio instance for websockets, seems to pass:

HTTP/1.1 101 Switching Protocols
Upgrade: WebSocket
Connection: Upgrade
Sec-WebSocket-Accept: qGEgH3En71di5rrssAZTmtRTyFk=
Sec-WebSocket-Protocol: notify

I also have the below in the frontend configuration:

javascript_version: latest

But unfortunately I end up with no speaker selection. Screenshot attached. I’ve tried manually specifying the output sources, gained from the /api/output

Unable to see anything in the browser console logs either :confused:

EDIT: Not using SSL, deffo websockets support:

[ LOG] main: Forked Media Server Version 26.5 taking off
[ LOG] main: Built with:
[ LOG] main: - ffmpeg
[ LOG] main: - iTunes XML
[ LOG] main: - MPD
[ LOG] main: - Device verification
[ LOG] main: - Websockets
[ LOG] main: - ALSA
[ LOG] main: - Webinterface

Ok, I found my problem. When I ran forked-daapd in the foreground, I saw the below when trying to use the card:

httpd: Web interface request to ‘/api/outputs’ denied: Incorrect password

Not actually a password issue, but my trusted networks in forked-daapd I’d specified in CIDR format “x.x.x.x/24”, when looking at the example it just wants “x.x.x”.

Many thanks, this is the missing link for me - now using librespot piped into forked-daapd, I can control spotify from Home Assistant directly.

1 Like

After a recent update I don´t see any way to turn on individual speakers.

Anyone else have this problem? Running Home assistant 0.100

image