- è€æ°ã®éšå±ïŒããã¯ã°ã©ãŠã³ããã¥ãŒãžãã¯ïŒã§åããªãŒãã£ãªä¿¡å·ãåçãã
- åéšå±ã§ç¬èªã®ãªãŒãã£ãªä¿¡å·ãåçããæ©èœ
- éç¥ã®åæ£åçã®å¯èœæ§ïŒããšãã°ããã¢ãã«ãå šé³éã§ãã¢ã®è¿ãã§ã¯ãªãããã¹ãŠãŸãã¯ç¹å®ã®ã¹ããŒã«ãŒããå°é³éã§é³ŽãïŒã
ãã®èšäºã§ã¯ãèªåã®ã¢ããŒãã«ãã«ãã«ãŒã ã·ã¹ãã ãæ§ç¯ããäŸã玹ä»ããŸããå ã®ã¢ã€ãã¢ã¯ãé³éãäžããå¿ èŠããã1ç®æã§ã¯ãªãããã¹ãŠã®éšå±ã§å°é³éã§BGMïŒéžæããã©ãžãªå±ïŒãäœæããããšã§ããã
ãã«ãã«ãŒã ã·ã¹ãã ã®åºç€ã¯ãç¡æã®Snapcastãœãªã¥ãŒã·ã§ã³ã§ããããµãŒããŒéšåã¯ããŒã ãµãŒããŒäžã§èµ·åãããã¢ã¯ãã£ãã¹ããŒã«ãŒãæ¥ç¶ãããOrange PI zeroããã³ã³ãã¥ãŒã¿ãŒããŸãã¯Kodiã¡ãã£ã¢ãã¬ãŒã€ãŒïŒãã£ã¹ããªãã¥ãŒã¿ãŒLibreelecïŒãã€ã³ã¹ããŒã«ããããã匷åãªRasberry PIãéšå±ããšã«ã¯ã©ã€ã¢ã³ããšããŠæ©èœããŸãã
å®æããã·ã¹ãã ã®äž»ãªæ©èœ
- ããã¯ã°ã©ãŠã³ãã§ã€ã³ã¿ãŒãããã©ãžãªå±ãåçãã
- AirplayãUPnPããŸãã¯Plexãã¬ãŒã€ãŒã䜿çšããŠããã«ãã«ãŒã ïŒãŸãã¯åå¥ã«éžæããã¯ã©ã€ã¢ã³ãïŒã§é³æ¥œãåçããæ©èœãBluetoothãµããŒããè¿œå ããäºå®ããããŸãããããã¯ç¹ã«ç§ã«ã¯é¢ä¿ãããŸãã
- Webã€ã³ã¿ãŒãã§ã€ã¹ãä»ããŠã³ã³ãã¥ãŒã¿ãŒããä»»æã®ã³ã³ãã³ããåçãã
- çŸåšåçäžã®ã©ãžãªå±ã®æåãŸãã¯ã¹ã±ãžã¥ãŒã«ã«ããå€æŽ
- ä»»æã®ãœãŒã¹ã®åã¯ã©ã€ã¢ã³ããžã®å²ãåœãŠ
- ããªã¥ãŒã ã³ã³ãããŒã«ã¯ãªãŒãã£ãªããã€ã¹ããšã«åå¥ã«èšå®ãããŸãïŒããã¯æ¬¡ã®ããã«æ©èœããŸãïŒç¬èªã®ãªãŒãã£ãªã·ã¹ãã ã³ã³ãããŒã«ãæ倧ã«èšå®ãããå¿ èŠã«å¿ããŠåsnapclientã®ããªã¥ãŒã ããµãŒããŒãã調æŽããïŒéåžžã¯æ倧ã«ãèšå®ãããŸãïŒãå šäœã®ããªã¥ãŒã ã¬ãã«ã¯åçã®ãœãŒã¹ãã調æŽãããŸã-é»è©±ãã³ã³ãã¥ãŒã¿ãã¬ãŒã€ãŒãŸãã¯MPDïŒ
ããã§ã¯ã©ã€ã¢ã³ãã¯é£Ÿãæ°ãªãã§å®äºããŸãã-shairportãšsnapclientãã€ã³ã¹ããŒã«ãããŠããarmbianããããupmpdcliãšplexampãæäŸããèšç»ããããããåã¯ã©ã€ã¢ã³ãã¯ããããå¯èœãªãããã³ã«ã䜿çšããŠãµãŠã³ããåçŸãããŠãããŒãµã«ãã€ã³ããšããŠæ©èœããŸããããããŸã è¡ãããªãäž»ãªåé¡ã¯ãLinuxãè€æ°ã®ããã°ã©ã éã§1ã€ã®ALSAãªãŒãã£ãªããã€ã¹ãå ±æããããšãèš±å¯ããŠããªãããšã§ããããã§ã¯ã1ã€ã®ãµãŒãã¹ã§ãµãŠã³ããåçããŠããéãä»ã®ãªãŒãã£ãªããã€ã¹ããªãã«ããããSnapclientïŒSnapcastã®å Žåã¯äžå¯èœïŒã䜿çšããå¿ èŠããããŸããé 延ãæå°éã«æããããã«ãããã¹ãŠã®ãœãŒã¹ã®ãµãŠã³ããå®å šã«åæããŠãããããALSAãéããŠã®ã¿æ©èœããŸãã詳现ã¯ãSnapcastã®ããã¥ã¡ã³ããåç §ããŠãã ããïŒã
ãµãŒããŒåŽã¯ãããã€ãã®Dockerã³ã³ãããŒãã¹ã¿ãã¯ã«çµåãã圢ã®ãã€ã¯ããµãŒãã¹ãšããŠèšèšãããŠããŸããåœåãSwarmã¯ã©ã¹ã¿ãŒã§ã³ã³ãããŒãèµ·åããèšç»ããããŸããïŒã¯ããç§ã¯èªå® ã«2å°ã®ã³ã³ãã¥ãŒã¿ãŒãSwarmã¯ã©ã¹ã¿ãŒã«çµåããŠãããå¿ èŠãªãã¹ãŠã®ãµãŒãã¹ãå®è¡ããå®éã«ã¯èªå® ã§ã¯å¿ èŠãããŸããïŒããã®ã¢ã€ãã¢ã¯ç Žæ£ããdocker-compose .ymlãã¡ã€ã«ã¯ãããããã®ã³ã³ãã¥ãŒã¿ãŒã§å®è¡ãããŸããä¿¡é Œæ§ã¯ãã¡ããäžååã§ããã家åºã«ã¯ååã§ããã¯ã©ã¹ã¿ãŒã§éå§ã§ããªãçç±ã¯ãSnapcastãµãŒããŒãfifoã䜿çšããŠãªãŒãã£ãªã¹ããªãŒã ãåä¿¡ããããã§ãïŒéåžžããã§ãŒã³ã¯æ¬¡ã®ããã«æ©èœããŸã-ãµãŠã³ãã¯mpdã䜿çšããŠåçãããfifoã¯åºåããã€ã¹ã§ãããsnapserverãã¹ããªãŒã ãèªã¿åã£ãŠãã¹ãŠã®ã¯ã©ã€ã¢ã³ãã«éä¿¡ããŸãïŒãããããã¯ã©ã¹ã¿ãŒãããªã¥ãŒã ãå ±æã§ããªããšããäºå®ã«ãããè€æ°ã®ããŒãéã§fifoããã¹ãããŸãïŒãã¹ãã§fifoã䜿çšããåæ£ãã¡ã€ã«ã·ã¹ãã ã䜿çšããŠããã転éããããšãã§ããŸãããnfsã§å¯èœãããããŸãããããŸã è©ŠããŠããŸããïŒããŸãã1ã€ã®ããŒãã§ãã¹ãŠã®ã³ã³ãããå®è¡ããããã«swarmã¯ã©ã¹ã¿ã匷å¶ããããšãã§ããŸããããã¹ãŠã®ãµãŒãã¹ã«fifoãžã®ã¢ã¯ã»ã¹ãèš±å¯ããå¯äžã®æ¹æ³ã¯ããã¹ãŠã1ã€ã®ããŒãã§å®è¡ããããšã§ãïŒãã¡ãããä»®æ³ãã·ã³ããŸãã¯1ã€ã®å·šå€§ãªã³ã³ãããŒãäœæã§ããŸããããã§ã¯ãå¯èœãªãã¹ãŠã®ãã®ãã¹ãŒããŒãã€ã¶ãŒçµç±ã§èµ·åãããŸãããç§ã¯ãããããªãããšã«ããŸããïŒããã¹ãŠã®ãµãŒãã¹ã«fifoãžã®ã¢ã¯ã»ã¹ãèš±å¯ããå¯äžã®æ¹æ³ã¯ããã¹ãŠã1ã€ã®ããŒãã§å®è¡ããããšã§ãïŒãã¡ãããä»®æ³ãã·ã³ããŸãã¯1ã€ã®å·šå€§ãªã³ã³ãããŒãäœæã§ããŸããããã§ã¯ãå¯èœãªãã¹ãŠã®ãã®ãã¹ãŒããŒãã€ã¶ãŒãä»ããŠèµ·åãããŸãããç§ã¯ãããããªãããšã«ããŸããïŒããã¹ãŠã®ãµãŒãã¹ã«fifoãžã®ã¢ã¯ã»ã¹ãèš±å¯ããå¯äžã®æ¹æ³ã¯ã1ã€ããã¹ãŠã®ããŒãã§å®è¡ããããšã§ãïŒãã¡ããããã¹ãŠãã¹ãŒããŒãã€ã¶ãŒçµç±ã§èµ·åããä»®æ³ãã·ã³ãŸãã¯1ã€ã®å·šå€§ãªã³ã³ãããŒãäœæã§ããŸãããç§ã¯ãããããªãããšã«ããŸããïŒã
ã¹ã¿ãã¯æ§æ
1ïŒSnapserverãSnapcastãµãŒããŒã³ã³ãããŒãããã¯ãããŒã1704ã1705ãããã³ããŒã ãããã¯ãŒã¯ã§äœ¿çšã§ããDNSãžã®åŒã³åºãã¯ãdnsåsnapserver.localãçµç±ããŸããAvahiãä»ããŠããèªäœãã¢ããŠã³ã¹ããæ¹æ³ãç¥ã£ãŠããŸãããavahi Dockerã§äœæ¥ããŠããå Žåãã¢ããŠã³ã¹ã¯å¥ã®ã³ã³ãããŒãçµç±ããŸãïŒãã®ã¹ã¿ãã¯ã«ã¯å«ãŸããŠããŸããïŒã
2ïŒSnapcastrãSnapserver WebãµãŒãã¹ãããŒã5011ã§å©çšå¯èœïŒããŒã«ã«ãªããŒã¹ãããã·çµç±ã§snapcastr.localãšããŠå©çšå¯èœïŒã
3ïŒã¹ããããã§ã³ãžã£ãŒããªãŒãã£ãªãœãŒã¹ã解æããã¯ã©ã€ã¢ã³ããçŸåšã¢ã¯ãã£ããªæé«åªå 床ã®ãªãŒãã£ãªãœãŒã¹ã«åãæ¿ããPythonã¹ã¯ãªãããããšãã°ãã€ã³ã¿ãŒãããã©ãžãªã¯åªå é äœãæãäœããåžžã«åçãããŸãã Airplayãä»ããŠé»è©±ããé³æ¥œãåçãããšããã®ã¹ããªãŒã ã«åãæ¿ãããçŸæç¹ã§ã¹ããŒãããŒã ããã®ä¿¡å·ãããå Žåã¯ãããã«åãæ¿ãããŸããã¹ããªãŒã ãåæ¢ãããšãåªå é äœãæãé«ãã¢ã¯ãã£ããªã¹ããªãŒã ã«æ»ããŸããã¯ã©ã€ã¢ã³ãããšã«ãã¹ã¬ããã®ãªã¹ããšãããã®åªå é äœãæå®ã§ããŸãã
4ïŒSnapcronãç¹å®ã®æéã«ã¹ã¯ãªãããå®è¡ã§ããcronãå«ãã³ã³ãããŒãããšãã°ãã¯ã©ã€ã¢ã³ãã®é³éãå€æŽããŸãïŒå€ã«å¯å®€ã®é³æ¥œãå®å šã«ãªãã«ããŸãïŒã
5ïŒmpdãã€ã³ã¿ãŒãããã©ãžãªãåçããããã®mpdã€ã³ã¹ã¿ã³ã¹ãéæšæºããŒã36602ã§ããŒã ãããã¯ãŒã¯ã«è»¢éãããŸãã6
ïŒç¡ç·ãã©ãžãªãåžžã«åçãããããšã確èªããpyhthonã¹ã¯ãªããïŒæ¥ç¶ãäžæãããããæ¥ç¶ãååšããŠããããã«èŠããŠããé³ãåçãããªãå ŽåããããŸãïŒãããã³ã©ãžãªå±ãšé³éãæå»ã«å¿ããŠåãæ¿ããŸãã
7-8ïŒmpd.fmããã³pifi-ã©ãžãªå±ãåçããããã®Webã·ã§ã«ãå®éšçšã«åãã¿ã€ãã®2åã
9ïŒã¢ãã£ããŒãé³æ¥œãåçããããã®å¥ã®ã·ã§ã«ïŒå¥ã®mpdãµãŒããŒïŒãç¬ç«ããmpdãµãŒããŒãšããŠæ©èœããæšæºã®mpdããŒã-6600ã«å¿çããŸããé³æ¥œãèŽãããã«äœ¿çšã§ããŸããç¬èªã®ã¹ããªãŒã ã䜿çšããã©ãžãªå±ã®mpdãšã¯ç¬ç«ããŠåäœããŸãã
10-12ïŒshairport-syncãupmpdcliãplexamp-察å¿ããã¯ã©ã€ã¢ã³ããæã€ã³ã³ãããŒãåã³ã³ãããŒã¯ãç¬èªã®mpdã®ã€ã³ã¹ã¿ã³ã¹ã䜿çšããŠãç¬èªã®fifoã«æžã蟌ã¿ãŸãããããã£ãŠãåã¯ã©ã€ã¢ã³ãã«ã¯ç¬èªã®ç¬ç«ããã¹ããªãŒã ããããŸãã
ãããã£ãŠãã¹ã¿ãã¯ã¯æ¬¡ããµããŒãããŸãã
- ããã€ãã®ç¬ç«ããé³æºããããã®éã§ä»»æã®éžæ-ããã©ã«ããuPnPãMopidyãPlexampãAirPlayããã³ã€ã³ã¿ãŒãããã©ãžãªã
- Snapcastrã䜿çšããSnapcastãµãŒããŒèªäœã®ç®¡çã
- ä¿¡é Œæ§ãé«ããäžæãããªãããã¯ã°ã©ãŠã³ãã©ãžãªãµãŠã³ããä¿èšŒããã¹ã¯ãªããã®ã»ããã
- pi-fiãŸãã¯mpd.fmã䜿çšããã©ãžãªåçã®å¶åŸ¡ïŒããã«ãããŒã ãªãŒãã¡ãŒã·ã§ã³ã§äœ¿çšãããŠããNode-redã䜿çšããŠããã®mpdã€ã³ã¹ã¿ã³ã¹ã®å¶åŸ¡ãæ§æããŸããïŒã
ãªããžããªãªã³ã¯