Beetle-II / lumi

MQTT агент для шлюза Xiaomi DGNWG05LM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with lumi/audio/play/set

MiguelCSousa opened this issue · comments

Hello,

When music is playing it's impossible to stop it with lumi/audio/play/set "STOP"

Thanks for your great work!

Regards,

Miguel

you should change mpd configs. after change. restart service /etc/init.d/mpd restart or reboot system
my example
mcedit /etc/mpd.conf.

music_directory "/opt/mp3"
db_file "/opt/mp3/database"
log_file "/opt/mp3/log"
user "root"
group "root"
bind_to_address "0.0.0.0"
port "6600"
log_level "default"
auto_update "yes"
auto_update_depth "3"
follow_outside_symlinks "yes"
follow_inside_symlinks "yes"
input {
plugin "curl"
}

now you can play sounds my mpd like tts
for set playing by mpd you should change string in gateway.js cp.execSync('mpg123 "' + audio.play.value.url + '"'); to string cp.execSync('mpc clear && mpc add ' + audio.play.value.url + ' && mpc play');
and now you can stop playing mp3