Write playlist,albums,etc... to NFC tags, Read playlist,albums,etc... from NFC tags. And play it.
Clone or download
Pull request Compare This branch is 23 commits ahead of tschuehly:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
templates
.gitignore add .DS_Store Dec 14, 2018
README.md Update README.md Dec 24, 2018
Reader.py print com Dec 9, 2018
add_card.py
box.py カードを置いたとき離したときの冪等性を強化 Dec 12, 2018
musiccards.service nfcに書き換え。環境整備 Dec 6, 2018
musiccardshttp.service WEBからNFCタグを書き換えるプログラムを追加 Dec 9, 2018
web_add_card.py WEBページ名変更 Dec 17, 2018

README.md

music-cards(nfcpy)

Write playlist,albums,etc... to NFC tags, Read playlist,albums,etc... from NFC tags. And play it.

NFC tag set.      -> play music.
NFC tag released. -> pause music.
Same NFC tag set. -> play music. From the time of pause.
Another tag set.  -> clear queue. and play music.

https://youtu.be/s8S5DVblT0k

need to buy

  • NFC read/write device(Work with nfcpy)
  • NFC tags(read/write)

#NFCタグにプレイリストを書き込んで、それで音楽を再生するやつ
必要なもの(以下で動作確認済み)

How to install

  • install nfcpy
sudo pip install nfcpy
  • install python-mpd2
sudo pip install python-mpd2
git clone https://github.com/senyoltw/music-cards

How to USE

#ClIでNFCに音楽URLを書き込む. CLI Write [musiclist] to NFC tags.
cd music-cards/
sudo python add_card.py  
#mpc add [musiclist] で再生キューにいれられるものは大丈夫。
#Working with mpc add [musiclist]. ex. spotify:playlist:37i9dQZF1DWUpdd1oGKt2o

#Read NFC tags. and Play. NFCの読み込みと再生確認。
sudo python box.py

Daemonization

cd music-cards/
sudo cp musiccards.service /etc/systemd/system/musiccards.service
sudo systemctl daemon-reload
sudo systemctl start musiccards.service
sudo systemctl enable musiccards.service

NFCの書き込みもWEBで実行したい場合
When you want to execute NFC writing on WEB

sudo pip install flask
cd music-cards/
sudo cp musiccardshttp.service /etc/systemd/system/musiccardshttp.service
sudo systemctl daemon-reload
sudo systemctl start musiccardshttp.service
sudo systemctl enable musiccardshttp.service

#and acsess http://[your IP]:5000