Roon Extension: Publish to MQTT broker

Hi, Got it working now for simple text items, but can you please explain what I’m trying to get OH to understand when the MQTT item is an object? For example, the topic roon/SOtM/now_playing/three_line/line1 comes through no problem, but changing this to roon/SOtM/now_playing/three_line/line2 results in a Null. I guessed I might be looking to get OH to understand a JSON object so I installed OH’s JSON Transform extension and tried JSONPATH:$.line2 with roon/SOtM/now_playing/three_line but no luck.

Or is it Javascript? Where can I find out?

Since I’m not exactly sure I’m trying to get OH to interpret then I can’t be sure if it’s my implementation that’s wrong or if I’m on completely the wrong track. Any help would be welcome.

the now_playing/three_line topic does not contain JSON, just simple text strings into two three separate topics:

  • …/now_playing/three_line/line1
  • …/now_playing/three_line/line2
  • …/now_playing/three_line/line3

Something similar is happening for the two_line topics.

See screen-snip below from MQTT explorer running an internet radio station:

image

In that example all line1/2/3 topics have a value.
Sometimes roon does not send the line2 and/or line3 data to the extension. The extension in turn sets the corresponding topics to empty. OH probably reports those as null.

For example the next song on the radio station looked like this:
image

Roon did not sent the line3 information, so the topic is empty.

In your OH implementation you should account for that when using the values, or just use the …/one_line/line1 topic, that one should always have a value when something is playing.
Don’t know if that suits your needs though,.

1 Like

Thanks. That’s helpful. I’ll persevere

Hi, got that working now - thanks for your help. So my HABpanel is now controlling and being updated appropriately. Great!

Update I found a workaround to my issue by changing the playlist to be shared rather than owned by one profile - this now works. But I’ve left the original problem below in case someone has the answer to setting the profile using MQTT. Thanks

There’s one hurdle I have right now which is getting Playlists to work and I’m hoping you can help me with this. I’m confident that I’m sending the [playlist title] as a command message to roon/[Zone]/browse/playlists but it’s not starting the playlist to Play now. However, I know I have three profiles set up on my roon core, so I’m wondering if the playlist is not available because the correct profile isn’t set for this extension/browser command. But despite spending time searching for clues I can’t see how to set the profile, or find out what profile is set. Can you help please? Thanks

The MQTT extension does not support switching profiles at the moment.

Good to see you got it working by sharing the playlist!

Hi, is there a way to connect to a broker on a different port than 1883? I configured MQTT extension 2.2.0 to use port 2883 but it still connects to the default port 1883 and - of course - connection fails. Any ideas?

1 Like

Hi @eFJee

I’ve been using your extension for the past few months and it’s working perfectly - many thanks.

With the recent release of 806, I’m interested in the daily mixes and was wondering whether you might consider extending the extension to include these, if the Roon api supports them?

Many thanks again!

Nice to hear you like the extension!

Do you mean support for starting the mixes with the browse functionality?

I’ll try to look into it. Would be a nice addition and probably not a lot of work.

1 Like

Exactly. At the moment I use …/browse/playlists/playlist_name but maybe the daily mix has been added to the hierarchies that browse supports. If I knew more I know I should be able to query the api to list the available hierarchies … but I don’t!

Hello- I’m running 1.0 of ext manager and for some reason I don’t see “Automation” in the list of options so I can install MQTT Broker. Anyone know why this might be?

Thanks in advance for your help.
Scott

On what kind of machine are you running the extension manager? As there is no RPI docker yet, maybe that has something to do with it.

Maybe you can shed some light on this, @Jan_Koudijs?

Ext manager 1.0 is running on a Pi 3 B+ running DietPi v7.4.2.

The point made by @eFJee is correct, the extension is not shown on a RPi because there is no image for the ARM architecture.

So all of the Extensions I see in ext mgr 1.0 have a docker image for ARM and MQTT won’t show up until a Docker image is created for it correct? Are there any plans to add MQTT to the new Ext mgr?

That is correct.

I would like to have it in.

@eFJee, I created the Extension Generator to make it easier to create images for multiple architectures. It can create 32 and 64 bit ARM images without the need to have a RPi to create them on. Maybe you can have a look at it. Alternatively I can create a pool request with the necessary changes and provide you some commands for generation and publishing. Feel free to contact me.

I am using the Docker Hub build from github feature right now and that lacks support for the arm(64) architectures.
Great work on the Extension Generator. I’ll look into it as soon as I can to create the arm(64) docker images.

2 Likes

ARM images have been created by @eFJee, version 1.0.10 of the Extension Repository should allow you to install the MQTT extension.

Hey, just installed the fjgalesloot/roon-extension-mqtt docker container on my unraid Server. Thats exactly the place where my roon Server is installed. The Extension is showing on my roon control Tablet and I filled it with the credentials of my MQTT Broker on ioBroker. The connection is fine, but i don’t get any topic. The only Thing showing up is: roon-extension-mqtt-ahcyw and others with different last 5 letters. I think this is for the possible Roon devices or control panels. The Only topic posted in every subfolder is: alive - indicator.reachable - true
I think its showing me now, that one player or device is currently playing something. The other topics are showing alive: false in fact they are currently not playing.
What could it be, that i don’t get any other Topic ? No Zone, no Names, no Playing status etc.

Sorry for the double post. Tryed to use another MQTT Broker on my ioBroker Server, and in the Settings of the new Broker I gave it port number 8883. In the Roon Extension there is no way to change the original Port 1883. Even If i type in the correct port (8883) it still gives me a message, that no connection possible on IP:Port 1883. Thats not correct. I definitifly typed in to use Port 8883.

I noticed something similar ar my end. I will try to post a fix soon.

Thanks reporting the issue.

1 Like