Casting Video to VLC via Home Assistant
Home Assistant offers an integration with VLC via Telnet. It uses VLC's telnet capabilities to control it. However, the integration is geared towards VLC being run on the command line in headless mode, for audio only applications.
I had a different problem to solve: I have a Raspberry Pi running the VLC GUI on a full blown desktop, and want to be able to "cast" videos to it using the Media Player built into Home Assistant.
This essentially allows you to make the device running VLC with a screen attached a Chromecast-like media player, with the most powerful media player out there as its driver.
Enabling Telnet via the VLC GUI
First, head over to the VLC preferences:
At the bottom of the settings pane, select all preferences:
In the sidebar, head to Interface > Main Interfaces:
Enable the telnet
underneath "Extra Interface Modules" (do NOT change the Interface module from default).
In the sidebar, now head to Interface > Main Interfaces > Lua:
In this menu, you must configure telnet - enter telnet
into the Lua interface option at the top:
Underneath "Lua Telnet", enter a password - this is not required by VLC, but is required by Home Assistant and cannot be left empty:
That's it! Hit Save on the Advanced Preferences window, and VLC should now respond to telnet on this host.
Home Assistant VLC Telnet Integration
Follow the instructions on this page, entering the address + password for the VLC machine: https://www.home-assistant.io/integrations/vlc_telnet/.
The device will show up in Home Assistant as a normal media player.
Playing Media
You can now use the "Play media" service in Home Assistant to control media on the machine running VLC, a bit like a normal TV. See this example, where I tell VLC to start streaming a TV channel stream URL:
You MUST specify that the Content type is music. I think the author of this integration didn't appreciate the GUI + video use case (the intention was probably to use it only as a headless audio server).
However, VLC doesn't seem to care about the media type hint and will play videos fine. 😊
🏷️ vlc media assistant telnet interface video integration player gui lua headless audio device sidebar password
Please click here to load comments.