This is not the vlc component integration to play audio on the home assistant machine, but to trigger home assistant to play audio on a remote vlc player (home theater pc suuuround sound) to play siren or warning when an alarm is triggered.
I dont see anyone using the vlc_telnet platform for media player component so wanted to share for anyone else.
Before i found vlc_telnet i found THIS post with a custom component to control VLC via http. After hours of noobishly trying to get play_media service to work with a recent version of hass i almost gave up so I started browsing the gibhub built in components for ideas why the custom one wasnât working and then I saw it, âvlc_telnetâ.
there is actually a component page that shows how to use it that unfortunately failed to show up on my many google searches for home assistant vlc remote. This page has one fatal flaw. a typo for the platform name.
on the page it calls the platform âvlc-telnetâ when in fact it should be âvlc_telnetâ
First step is to configure VLC management interface to allow telnet. link on the component page for how to do so. basically enable it and add a passowrd.
Second, the sound files can be hosted anywhere. I choose to keep them on hass in the www folder but can also be local to the vlc player.
# configuration.yaml config for media_player:
media_player:
- platform: vlc_telnet
name: HTPCvlc
host: 192.168.3.111
password: password
Add sound and config then reboot, you should see a new entity under media_player.
To test it you can use the services in dev tab.
service: media_player.play_media
entity: media_player.HTPCvlc
# here is JSON for service call:
{
"entity_id": "media_player.HTPCvlc",
"media_content_id": "http://HASSIO:8123/local/barkbark.mp3",
"media_content_type": "music"
}
special note: the vlc_telnet component only allows content_type music
HTH anyone else!