yuefeiluo
(yufeiluo)
1
The vlc_telnet can play music on website:
service: media_player.play_media
target:
entity_id: media_player.vlc_telnet
data:
media_content_type: music
media_content_id: "http://www.soundjay.com/nature/sounds/rain-07.mp3"
I set local mp3 file in media_content_id as below:
service: media_player.play_media
target:
entity_id: media_player.vlc_telnet
data:
media_content_type: music
media_content_id: "/home/homeassistant/.homeassistant/media/test.mp3"
How can play local mp3 with vlc_telnet?
nickrout
(Nick Rout)
2
media_content_id: "/home/homeassistant/.homeassistant/media/test.mp3"
Try
media_content_id: "/local/media/test.mp3"
or perhaps
media_content_id: "/media/test.mp3"
yuefeiluo
(yufeiluo)
3
None of them!Solved it this way:
sudo apt install apache2
sudo cp test.mp3 /var/www/html
Fix the configuration.yaml
service: media_player.play_media
target:
entity_id: media_player.vlc_telnet
data:
media_content_type: music
media_content_id: http://127.0.0.1/test.mp3
Is there another way to play local music file without installing web server(apache or nginx) ?
yuefeiluo
(yufeiluo)
5
It can’t work!The local point to /home/homeassistant/.homeassistant/media in configuration.yaml:
homeassistant:
media_dirs:
local: /home/homeassistant/.homeassistant/media
No matter what i write ,it can’t work!
media_content_id: "/local/test.mp3"
media_content_id: "local/test.mp3"
media_content_id: "/media/test.mp3"
media_content_id: "/local/media/test.mp3"
media_content_id: http://127.0.0.1:8123/media-browser/media_player.vlc_telnet/app%2Cmedia-source%3A%2F%2Fmedia_source/test.mp3
None of them can work!Had you made experiments in your homeassistant?
tom_l
6
How did you install Home Assistant, which method?
nickrout
(Nick Rout)
8
Home assistant has a web browser, so an alternative way is to put it in config/www and access it via http://127.0.0.1/local/test.mp3
yuefeiluo
(yufeiluo)
9
sudo systemctl stop apache2
sudo systemctl restart home-assistant #I set the service name as home-assistant.
Had a try in my homeassistant,it can’t get access it via http://127.0.0.1/local/test.mp3.
nickrout
(Nick Rout)
10
And where is test.mp3 when you tried?