Roon Extension: Publish to MQTT broker

I updated the Readme to explain a little bit more about how to control zones and ouputs. See if this answers your question and let me know if not.

Right now I have no plans to create an Openhab binding, but as I am implementing Openhab in my home soon, never say never :wink:

I donā€™t know if it is possible to publish images on MQTT. Something to look into.

Tnx for fast reply! i will look into readmeā€¦ (RtFM! :wink: )
tested and command and volume works fine!
the image Q was more about how to build a ā€œpathā€ to connect a openHAB image to Roon.
like http://roonserver/api/imageid or something (i am migrating from squeezeboxserver to roon).
tnx

It seems you can get the image from a HTTP request. See https://roonlabs.github.io/node-roon-api/RoonApiImage.html

http://IP:PORT/api/image/image_key?scale=XXX&width=XXX&height=XXX&format=XXX

Never tried this though.

1 Like

Hi that probably worksā€¦ but i found an easier and ā€œflashier wayā€ http://roonIP:9100/display/ in a frame in habpanel looks great and auto updates with nowplaying. in combination with MQTT for control it will do. Thanks for your help.

1 Like

Hi. The MQTT extension is now crashing for meā€¦ sometimes several times a dayā€¦ restarting the extension works but its really annoying. Running on windows on a machine with really low load. let me know how i can help to fault findā€¦ logs or anything. running roon extension manager 0.11.5 and MQTT extension 0.1
the error text: ā€œProcess terminated:roon-extension-mqtt(1)ā€
kind regs

Released version 1.0 today. New features include MQTT authentication, TLS options and a Dockerfile.
I will update the Readme on the github page ā€˜soonā€™ :wink: .

Docker is also available from Docker Hub.
Start the extension using docker run fjgalesloot/roon-extension-mqtt or similar.

For troubleshooting you could try enabling the debug (new menu option in version 1.0) and run the extension manually. Start ā€œnode .ā€ in the extension folder. You should be able to see (debug) output from the extension. Post the last several lines here and we can try to find a solution.

I added a Dockerfile with Version 1.0. If you are familiar with running docker and able to do this on your NAS, maybe this is an option for you.

I will try to make time to publish a container image to docker hub soon for convenience.

1 Like

Nice!!! I will give it a try after my holidays :slight_smile:

New beta version available!

Added the option to start a specific item in the library by implementing the RoonBrowseApi. See the github (development branch) Readme for the syntax.

Github: https://github.com/fjgalesloot/roon-extension-mqtt/tree/development
Docker: fjgalesloot/roon-extension-mqtt:beta

I have just finished this functionality and am testing now in my own setup. Use at your own risk :slight_smile:.

Thank you Floris Jan. Iā€™m using roon-extension-mqtt, it works perfectly to retrieve ā€œnow playingā€ data and to control transport (play / pause etc ā€¦). Bravo !

However, using your beta development version with BrowseApi support I canā€™t manage to launch playlist or web radio station (iā€™ve tried with topic and message from your examples):

publish to roon/[zone-name]/internet_radio the message containing radio title starts playing the internet radio station

publish to roon/[zone-name]/playlists the message containing playlist title starts the play list (Play Now)

Any insight on what is going wrong ?
Any change on ROON API ?

PS: My setup: Node-red (mqtt in/out nodes) and mosquitto broker.

Hi volpone, I donā€™t think there is a change in the Roon API that breaks this. At my place it still works like a charm every morning waking me up with the preferred radio channel.

What is the exact topic and message you publish to?

Hi Florian, using your extension 2.0.0b. HQPlayer is my zone name:

  • OK when i publish to topic: roon/HQPlayer/command
    message; play (or any other transport command as a string)

Extension logs:

received mqtt packet: topic=roon/HQPlayer/command, message=play

  • KO when i publish to topic: roon/HQPlayer/internet_radio
    message: RMC (RMC, for example, is an internet live radio station name, as displayed in ROON UI)

Nothing in your extension logs.
Iā€™m probably using wrong topic / message or misunderstood your usage examples ?

Everything else seems rock solid. Again, thank you for you excellent work. Your extension allowed me to build quite easily a customized ā€œnow playingā€ web app using Node-red and Mosquitto !
Regards

Aha. The readme was missing the /browse/ part of the topic.
Could you try to publish to topic

roon/HQPlayer/browse/internet_radio

Bingo ! Thankā€™s a lot.

Version 2.2.0-beta is available now.

This release adds some new functionality to the extension:

  • mute / unmute of outputs
  • unmute on volume set
  • add output to zone (grouping)
  • remove output from zone (ungroup)
  • configurable mqtt-root

NOTE: There has been some changes to the MQTT topics to confirm to MQTT standards. Illegal characters in zone and output names. See Readme for details.

See the github page: https://github.com/fjgalesloot/roon-extension-mqtt/tree/development

Would love to hear your feedback!

Hey Floris,

Iā€™m trying to get your plugin installed but I fail.
After I git clone this into /home/pi and go through
npm install
the next command
nodejs .
fails with
pi@raspberrypi:~/roon-extension-mqtt $ nodejs .
-bash: nodejs: command not found

Any thoughts?

try node . instead of nodejs .

This worked, thanks.
But to get this into systemd I have to change the working directory in the .service file, right?
The extension is running on my RaspPi with runs my Mosquitto and Pimatic Server

Yes, thatā€™s correct.