Hey Folks. Wanted to share a small project that I’ve made recently. Background: I’m using a Mopidy for a few years now. It is connected to a home grown Raspberry Media center, that is in turn push audio to PCM5100 DAC, and then to the commercial JVC stereo system from the 90’s.
Recently I’ve added a standalone Mopidy monitor that stands on the top and controls playback via home Assistant integration.
But let me go step by step.
Hardware is also home-grown Loud ESP board with dual MAX98357 DAC and TFT display with touchscreen, as well as few more peripherals.
The loud-esp-mopidy-monitor config is there to implement
media_player
publishes the media player into the Home assistant, so I can use it together with the native player or Music Assistant or voice announcements.- Volume set up to 50% on player start. You can change that, but for me, it is too loud by default
display
andtouchscreen
components configure the onboard display- shows the current Mopidy playback item, Artist, and Title.
- three playback buttons allow Play/Pause track and move back and forward along the playlist via
touchscreen
controls - on the top of there is a volume indicator with two buttons to change it
- the progress bar shows the current progress of the track
- on the bottom there is playlist progress with the current item highlighted (first out of four)
- current hour for practicality
remote_receiver
exposes the IR reader. I use Samsung TV remote to control Mopidy playback and volume.light
component exposes onboard RGB LED for use in integrations. I light up an LED when TTS announcement is made.psram
enabled for smooth out playback
Currently, no component can display live track images, but it seems like it will be added soon
On the home assistant side, I did a few scripts to support touch buttons
mopidy_volume_up:
alias: Mopidy Volume Up
sequence:
- service: media_player.volume_up
data: {}
target:
entity_id:
- media_player.mopidy
mode: restart
icon: mdi:volume-plus
mopidy_volume_down:
alias: Mopidy Volume down
sequence:
- service: media_player.volume_down
data: {}
target:
entity_id:
- media_player.mopidy
mode: restart
icon: mdi:volume-minus
mopidy_next_track:
alias: Mopidy Next Track
sequence:
- service: media_player.media_next_track
data: {}
target:
entity_id:
- media_player.mopidy
mode: restart
icon: mdi:skip-next
mopidy_prev_track:
alias: Mopidy Prev Track
sequence:
- service: media_player.media_previous_track
data: {}
target:
entity_id:
- media_player.mopidy
mode: restart
icon: mdi:skip-previous
mopidy_play_pause:
alias: Mopidy Play Pause
sequence:
- service: media_player.media_play_pause
data: {}
target:
entity_id:
- media_player.mopidy
mode: restart
icon: mdi:play-pause
mopidy_stop:
alias: Mopidy Stop
sequence:
- service: media_player.media_stop
data: {}
target:
entity_id:
- media_player.mopidy
mode: restart
icon: mdi:stop
Last piece is an automation that switches JVC amp on and off based on playback status with WiFi smart socket (to save electricity, old amps are quite thirsty)
I think this should also work with native media player or Spotify, but I didn’t check, since Mopidy I’m using most.