Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Separate server and client functionality #36

Open
mountainsandcode opened this issue Jul 11, 2019 · 3 comments
Open

Idea: Separate server and client functionality #36

mountainsandcode opened this issue Jul 11, 2019 · 3 comments

Comments

@mountainsandcode
Copy link

mountainsandcode commented Jul 11, 2019

Would like to start a discussion on the following use case and to potentially see if I can help implement a solution - splitting the server and reader part into 2 (most likely through a config option that activates/deactivates one part)

  • Having backend/server part run on a central server (e.g., Docker on Synology, etc.) for easy maintenance
  • Using an Rpi (or similar) only as a reader that triggers the server through an HTTP(S) request

I previously hacked something together based on magic-cards but may be interesting to formalize it.

Additional benefit would be that it would be possible to have several readers.

Thoughts and comments welcome.

@maddox
Copy link
Owner

maddox commented Jul 11, 2019

There’s definitely something to this. I have 2 setups myself, and copying the Jason file of the card index over sucks. I never implemented a sync feature.

@mountainsandcode
Copy link
Author

mountainsandcode commented Jul 11, 2019

Great!

I think it should not be too complicated - suggestion:

  • Add a mode variable ("default", "serveronly", "readeronly") to the setup (for standalone) and variable to docker container
  • Based on the variable, only the scanner/server/both services are setup, started, stopped.
  • If it's readeronly, we need to specify a URL in the config
  • In that case, the scanner service triggers an HTTP request to the testCard route (the route is already implemented on the server anyway) rather than

That way you wouldn't have to copy around the json file anymore :)

Wdyt?

@derMick
Copy link

derMick commented Nov 22, 2021

Hi @mountainsandcode great idea! Currently I am thinking about the same way.

My idea / setting:

  • building a rfid / nfc juke box with Sonos boxes in every room and for every room a rfid / nfc tag reader to play Spotify albums or playlists directly (no play position remembering etc)
  • using home assistant as central control unit for all kind of smart devices
  • Running home assistant in docker container on a current synology DS NAS model (e.g. DS220+)
  • tag reader with wemos D1 and some other hardware like this -> https://www.home-assistant.io/blog/2020/09/15/home-assistant-tags/
  • NEW: Running magic-cards in docker on Synology as comfortable GUI and central lookup dictionary for “rfid card number” -> media type / id

What kind of changes has to be made to the magic-cards code / repo?
1.) I think the biggest change would be to switch to external nfc tag reader data and getting this info via wifi (mqtt?)
2.) define and implement the communication handling between nfc tag reader (and config) to first identify the tag reader with the corresponding room / Sonos speaker(s) and second playing the looked up media
Optional: 3.) activate or deactivate this hole feature via config

Wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants