prokosna / sola_mpd

MIT License
12 stars 0 forks source link

home assistant addon? #81

Closed Bram-diederik closed 6 months ago

Bram-diederik commented 9 months ago

Hi, I'm on a quest making a great on the road speaker. You know bluetooth speakers but normally on the road you connect your phone to it and play that way. Only then the music stops when you do stuff with your phone. so in the field i encountered peeps using a tablet for it.

My device is a raspberry pi zero. with MPD and snapcast and wireguard vpn. I use snapcast for a easy spotify connection and possibility to sink other speakers to the same music. mopidy just takes to much cpu.

For control i have a mpd client on my phone and home assistant integration. I have a script that makes shuffeld playlists of all main folders of the mpd music dir. (making playlists for artists and genres) home assistant has a poor integration.

so i tried to make a iframe with my web client mympd and try to secure it. I want to setup a special home assistant instance for this pi so that i can add users to it. with out seeing my whole home system. but browers no longer send Hey im comming from this iframe so i cant secure it. home assistant has addons i tried to create a http proxy addon but that failed.

Now i came across your nice repo. That allows the web client to run on a other system then the mpd server that is great news because there is a big change this can be a successful home assistant addon

I took the liberty to take your code and try it out. I got more then halve way. but i off to bed soon so i wait for the latest build. (this project takes its time) I'm just a simple tester that finds lacking software disturing so i only do it then my self.

are you intrested in adding code that this git repo can be used as a addon.

Or can i just fork it. and set my own files and i can get updates trough this repo. Im not that well known into github.

prokosna commented 9 months ago

Hi, thanks for finding this repo and reaching out to me. Is home assistant this oss? I didn't know that and am not familier with how it could work with MPD client, but it might be possible. I would be able to figure out how I can support you if you could share a specific use case with an add-on in your current setup.

Actually I'm slowly working on refactoring whole of this proj on weekend: fixing unnecessary use of Next.js, big React components, slow build time and lack of tests. So this repo will be significantly updated in the near future and codebase will be more usable hopefully. (GUI and API for plugins will remain the same) I don't have much time to work on this use case soon, but nothing blocks you freely fork this repository or just copy any pieces of the code.

Bram-diederik commented 9 months ago

Well home assistant is the most fun i had with oss for a long time.

It is a home automation system with many integrations and even more community integrations.

I have the addon running except for ingress proxy. That translates a url inside home assistant to the docker addon.

No clew how to resolve that

prokosna commented 6 months ago

I have finished my planned refactoring and read through the document about add-on now.

It would be possible to just host Sola MPD as an Home Assistant add-on, but it won't be much different from just deploying the current docker container on a server. But I don't have clear understanding about your requirements yet.

Now this project has clear separation between backend and frontend, so it is even possible to deploy them separately. Hope this could help your use cases.

I will close the issue for now, but please feel free to re-open with more detailed requirements if you are still struggling with your setup.