Skip to content

etnarek/mopidy-mqtt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Features

This Mopidy Frontend Extension allows you to control Mopidy with MQTT and retrieve some information from Mopidy via MQTT. The implementation is very basic. Open for any kind of pull requests.

Status update

Mopidy sends an update as soon the playback state changes:

mytopic/state -> 'paused'

When a new title or stream is started Mopidy sends this via nowplaying

mytopic/nowplaying -> 'myradio'

When there is a change in the playlist Mopidy sends the next playing song via nextplaying

mytopic/nextplaying -> 'mynextradio'

Play a song or stream

You can start playback of a song or stream via MQTT. Send the following:

mytopic/play -> 'tunein:station:s48720'

Add a song or stream

You can add a song or a stream via MQTT. Send the following:

mytopic/add -> 'tunein:station:s48720'

It won't clear the playlist nor change the playback status

Stop playback

You can stop the playback via MQTT. Send the following:

mytopic/control -> 'stop'

Change volume

You can change the mixer volume from 0 to 100 via MQTT. Send the following:

mytopic/volume -> '50'

Installation

This is an example how to install on a Raspi:

cd ~
git clone https://github.com/magcode/mopidy-mqtt.git
cd mopidy-mqtt
sudo python setup.py develop

Now configure the following file: /etc/mopidy/mopidy.conf

[mqtthook]
enabled = true
mqtthost = <mqtt host>
mqttport = <mqtt port>
username = <mqtt username> (Optional)
password = <mqtt password> (Optional)
topic = <topic, e.g. home/livingroom/music>

Restart Mopidy with sudo service mopidy restart

To check Mopidy log run sudo tail -f /var/log/mopidy/mopidy.log

About

MQTT features for Mopidy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%