Magic Cards - Queue music, play movies, or trigger events with RFID cards

Did it work once you used data_template?

Also, you should be adding a custom URI to the cards and using the property instead. That’s what that field is for. You can create your own little serialization technique.

Yes it works like a charm now. Using the URI now as well, that‘s a really great feature. Thanks again for your effort!

@maddox I have got magic cards set up on the raspberry pi and am able to access it via my main computer. I was beginning to create cards and created a sample one to test. When clicking the test button I do not seem to get any feedback from home assistant. Where is the magic_card_scanned supposed to be logged so that I can see if I am getting the information to home assistant?

This could be a great addon for hassio

It’d be a little awkward. True, you COULD do it. But most people have their hass set up near their routers or other server infra.

Magic Cards is designed to be installed on a Raspberry Pi Zero and placed somewhere in your home that’s accessible so you can tap the cards.

I’m having trouble getting this setup. When doing the git clone [email protected]:maddox/magic-cards-docker.git I get a:

Permission denied (publickey).

fatal: Could not read from remote repository.

Can anyone help me? =(

You need to add an SSH key to GitHub if you’re going to clone via SSH.

Instead, you can clone via https with this url:

Saw the magic cards video and it have led me to learn about himeassistant - thank you :smile:

Unfortunately I’m in Switzerland/Europe - I haven’t found the printable cards and plates for printers here. Anyone know of sellers in Switzerland or nearby countries ?


Cool, thank you. So if I need the docker, I just use ?

If you use docker, you don’t clone the repo at all. You just run the docker command described in the README.

Aaah I see. I followed this guide:

Will try the right way, then :sweat_smile:

Any recommendations for RFID readers since the one that Maddox recommended is no longer available?

There’s clones out there like this one:

I’m sure it’ll work

got the printer (canon pixma TS8151), got the tray and got two cards to test on.

Printing from any other app with tray: CD result in the printer insisiting on printing on A4 paper from the normal tray. Only way I can get it to print on the label tray is via canon image garden app - but that only has CD layout support.

anyone struggled with similar and might found a solution ?

If you’re printing with macOS, there’s some tips listed in the docs -

thanks, but I tried those and my pixma TS8150/151 is not listed in there ;/

tried a few random ones but when printing to these the print job just disappears.

The weird thing is that image garden CAN print to cd tray when physically connected with USB cable - I even can see the CD tray as output option in other apps but no luck ;/

I am having issues with connecting magic cards to my home assistant instance.

The error in the log is

Processing action: Home Assistant

[0] 401: Unauthorized

My action.json is:

    "Home Assistant": {
    "type": "home_assistant",
    "host": "",
    "port": "8123",
    "ssl": true,
    "password": "my_api_password"

My home assistance instance should still accept the api password, since my config for the auth_providers looks like follows:

   - type: homeassistant
   - type: legacy_api_password


  api_password: my_api_password

Any idea what the issue might be in this case?

The home assistant log says:

Login attempt or request with invalid authentication from magic_cards_host_ip

You’ll need to authenticate with a long-lived token now.


This looks like a great project. I have set up Magic Cards and HTTP Sonos API and am trying to get a card to play an album from spotify. I’m using pretty much the same actions and config set-up as the example configs. I’ve set up some test cards and when I trigger them from the Magic Cards UI it passes the request to HTTP Sonos and I can see the album is queued in my Sonos controller app but it does not start playing.

I assume I am missing a parameter in the actions config to trigger that so that the request passed from HTTP Sonos includes the play command, but I can’t see how to do that.

Please can anyone point me in the right direction?


Just checking back to see if anyone can help me with a pointer on this. I’ve since rebuild this from scratch using the combined Magic-Cards and Sonos-HTTP-API docker install. Again this works as far as adding an album to my Sonos queue, replacing what is currently playing, but it does not start the album / track.

I’ve tested playing a track using Sonos-HTTP-API to trigger a track from Spotify and that works fine.

I’m sure I am missing something obvious and would really appreciate any suggestions.

I’m running this on a Pi3 and get the same results whether using the test function in the Magic-Cards web interface or using an actual card.