Hi Duanbui
Here is the way how to install upmpdcli in SMPD.
1. Activate port 6000
edit /lib/systemd/system/mpd.socket as follows to enable port 6600.
# for Web UI
ListenStream=%t/mpd/socket
# for Any other mpd clients
ListenStream=6600
2. Install the upmpdcli related libraries.
app install jsoncpp
app install libmicrohttpd
app install libupnpp
app install npupnp
app install upmpdcli
3. Create upmpdcli.conf.
#
# (Reference) /etc/upmpdcli.conf setting
#
#mpdhost = 127.0.0.1 (default)
#mpdport = 6600 (default)
friendlyname = SymphonicMPD (Any renderer name)
checkcontentformat = 0
openhome = 1
lumincompat = 1
ohproductroom = SymphonicMPD
ohmetapersist = 1
logfilename=/var/log/upmpdcli.log (Specifies that it should be logged)
loglevel = 3 (It won't start if you get a level 1 error)
4. Add to mpd.conf lines below.
#
# Setting of /etc/mpd.conf (Added the following)
#
input {
plugin "curl"
# proxy "127.0.0.1:8123" (No polipo in use, comment in)
}
5. Create a user named "upmpdcli" as it doesn't work as root.
useradd upmpdcli
touch /var/cache/upmpdcli
6. Confirm it's working properly.
upmpdcli -D -c /etc/upmpdcli.conf -l 1
7. Register upmpdcli to systemd.
- Cteate file
touch /lib/systemd/system/upmpdcli.service
- Edit
#
# (Reference)/lib/systemd/system/upmpdcli.service setting
#
[Unit]
Description=UPnP Renderer front-end to MPD
After=network.target mpd.service
[Service]
Type=simple
# Note: if start fails check with "systemctl status upmpdcli"
ExecStart=/usr/bin/upmpdcli -c /etc/upmpdcli.conf
Restart=always
RestartSec=1min
[Install]
WantedBy=multi-user.target
- Confirm
cat /lib/systemd/system/upmpdcli.service
8. Start and activate the upmpdcli.service
systemctl daemon-reload (Load the created umpdcli.service)
systemctl start upmpdcli.service (Simple activation, now you can use it)
systemctl enable upmpdcli.service (Activate at boot time, you can use it always)
Click here for the Japanese reference page.
ゴンザエモンのオーディオ日記 第48章 妄想と葛藤
yo