LNXlink
GitHubDiscordPayPal
  • đŸŒŠī¸LNXlink
  • đŸ–Ĩī¸Setup
  • 📂Configuration
  • đŸŽŦMedia Player
  • 🔗Modules Settings
  • 🔱Modules Usage
  • đŸ¤¯Automations
  • đŸ› ī¸Development
Powered by GitBook
On this page
  • Text To Speech
  • Play Media
  • Stream Camera
  • Volume change by a predefined step

Media Player

Control your media

PreviousConfigurationNextModules Settings

Last updated 13 days ago

Note: Home Assistant does not natively support MQTT integration for media players, so a custom add-on must be installed. Using HACS, you can install the MQTT Media Player integration to create a new media_player entity.

After installation, restart your Home Assistant instance and add the MQTT Media Player integration from the Devices & Services page. You can find the correct input name by checking the LNXlink logs.

This setup supports playing both local and remote media using one of the following backends: cvlc, gst-play-1.0, ffplay, mpv, or vlc — make sure at least one of these is installed on your system.

Text To Speech

service: tts.google_say
data:
  entity_id: media_player.desktop_linux
  message: Hello world!

Play Media

service: media_player.play_media
data:
  media_content_id: /home/user/imag.jpg
  media_content_type: media  # Not used, but required by home assistant
target:
  entity_id: media_player.desktop_linux

Stream Camera

service: camera.play_stream
data:
  media_player: media_player.desktop_linux
target:
  entity_id: camera.demo_camera

Volume change by a predefined step

service: media_player.volume_set
data:
  volume_level: '{{ state_attr("media_player.desktop_linux", "volume_level") - 0.01 }}'
target:
  entity_id: media_player.desktop_linux
đŸŽŦ