Roon Command Line Control version 2

Thank you both @nihil and @Ronald_Record , works great!

Z

1 Like

I don’t think so judging by the usage info but is it also possible to play or shuffle a bookmark?

I tried to install the .deb file on a raspberry pi but got this:
pi@domoticz ~/Downloads $ sudo apt install ./RoonCommandLine_2.0.5-4.deb
Reading package lists… Error!
E: Sub-process Popen returned an error code (2)
E: Encountered a section with no Package: header
E: Problem with MergeList /home/pi/Downloads/RoonCommandLine_2.0.5-4.deb
E: The package lists or status file could not be parsed or opened.

Fixed this by using the git clone method to install.

Thanks @Bert for the problem report. This appears to be the result of dpkg on Ubuntu using zstd compression while dpkg on Debian not supporting that compression format. There are long threads over many years discussing and rejecting zstd compression support on Debian. At any rate, it appears to be the case that I need to provide both Ubuntu and Raspberry Pi Debian format installation packages.

I don’t know why this problem was not seen earlier. Perhaps the version of dpkg or the other packaging tools I used on Ubuntu were not effected by this schism in compression support across distributions.

I need to research this a little more and update the release assets. Thanks for your help identifying this issue.

@Bert , I was able to fix this issue on my test Raspberry Pi system with a simple repackaging change, specifying the compression format on the dpkg-deb command line when building the package.

I’ve created a new release with this packaging fix. See RoonCommandLine Version 2.0.5 release 5 · Ron Record / RoonCommandLine · GitLab

Let me know if any problems arise using this release.

Seems better, something strange though:

pi@domoticz ~/Downloads $ sudo apt install ./RoonCommandLine_2.0.5-5.deb
[sudo] password for pi: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'rooncommandline' instead of './RoonCommandLine_2.0.5-5.deb'
The following packages were automatically installed and are no longer required:
  libcomerr2 libnftables0
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  adwaita-icon-theme at-spi2-core dbus-user-session dconf-gsettings-backend dconf-service fontconfig fontconfig-config fonts-dejavu-core fonts-hack glib-networking glib-networking-common
  glib-networking-services gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libcairo-gobject2 libcairo2 libcolord2
  libcroco3 libcups2 libdatrie1 libdconf1 libdouble-conversion1 libegl-mesa0 libegl1 libepoxy0 libevdev2 libfontconfig1 libgbm1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common
  libglapi-mesa libgles2 libglvnd0 libgraphite2-3 libgtk-3-0 libgtk-3-bin libgtk-3-common libgudev-1.0-0 libharfbuzz0b libice6 libinput-bin libinput10 libjbig0 libjson-glib-1.0-0
  libjson-glib-1.0-common liblcms2-2 libmtdev1 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpcre2-16-0 libpixman-1-0 libproxy1v5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5
  libqt5svg5 libqt5widgets5 libqt5x11extras5 libqtermwidget5-0 librest-0.7-0 librsvg2-2 librsvg2-common libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5 libutf8proc2
  libwacom-bin libwacom-common libwacom2 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwayland-server0 libwebp6 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-icccm4 libxcb-image0
  libxcb-keysyms1 libxcb-present0 libxcb-randr0 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxcomposite1
  libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon-x11-0 libxkbcommon0 libxrandr2 libxrender1 libxshmfence1 libxtst6 qt5-gtk-platformtheme qterminal qterminal-l10n
  qtermwidget5-data qttranslations5-l10n x11-common
Suggested packages:
  colord cups-common gvfs liblcms2-utils qt5-image-formats-plugins qtwayland5 librsvg2-bin
Recommended packages:
  qtermwidget-l10n
The following NEW packages will be installed:
  adwaita-icon-theme at-spi2-core dbus-user-session dconf-gsettings-backend dconf-service fontconfig fontconfig-config fonts-dejavu-core fonts-hack glib-networking glib-networking-common
  glib-networking-services gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libcairo-gobject2 libcairo2 libcolord2
  libcroco3 libcups2 libdatrie1 libdconf1 libdouble-conversion1 libegl-mesa0 libegl1 libepoxy0 libevdev2 libfontconfig1 libgbm1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common
  libglapi-mesa libgles2 libglvnd0 libgraphite2-3 libgtk-3-0 libgtk-3-bin libgtk-3-common libgudev-1.0-0 libharfbuzz0b libice6 libinput-bin libinput10 libjbig0 libjson-glib-1.0-0
  libjson-glib-1.0-common liblcms2-2 libmtdev1 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpcre2-16-0 libpixman-1-0 libproxy1v5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5
  libqt5svg5 libqt5widgets5 libqt5x11extras5 libqtermwidget5-0 librest-0.7-0 librsvg2-2 librsvg2-common libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5 libutf8proc2
  libwacom-bin libwacom-common libwacom2 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwayland-server0 libwebp6 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-icccm4 libxcb-image0
  libxcb-keysyms1 libxcb-present0 libxcb-randr0 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxcomposite1
  libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon-x11-0 libxkbcommon0 libxrandr2 libxrender1 libxshmfence1 libxtst6 qt5-gtk-platformtheme qterminal qterminal-l10n
  qtermwidget5-data qttranslations5-l10n rooncommandline x11-common
0 upgraded, 121 newly installed, 0 to remove and 0 not upgraded.
Need to get 40.6 MB/40.6 MB of archives.
After this operation, 152 MB of additional disk space will be used.
Do you want to continue? [Y/n] n

That looks fairly normal, albeit with quite a few dependencies, hence the large package list. To clean up after installing just try sudo apt-get autoremove && sudo apt-get autoclean. That’ll get rid of unseeded dependencies and any cruft.

It’s hard for me to say if that dependency list is strange or unexpected. RoonCommandLine does have quite a few dependencies. What gets pulled in is very specific to the target platform and the PPA’s enabled. I don’t believe this dependency list is alarming. If there is a problem with unneeded dependencies, please open an issue.

Love this tool. I’ve set it up with a mini keyboard that that I can move around like a remote with keybinds to trigger commands. However I tried to set a default album and got the following:

Please enter the Album you wish to set as default (numeric or text): 18
Setting Roon Album default to: the record
Traceback (most recent call last):
File “/usr/local/Roon/api/set_default.py”, line 2, in
import configparser
ImportError: No module named configparser

I tried pip install configparser but no luck.

Hi @Paul_McEvoy thanks for the problem report.

My first guess when I read this was that somehow Python 2 was being invoked since configparser used to be named ConfigParser in Python 2 but was renamed for PEP 8 compliance.

Examining the roon command it looks like it is invoking the command:

python ${ROONAPI}/set_default.py

My bet is that the command python on your system is Python 2 and Python 3 is invoked by the command python3. Is that the case?

I can fix this pretty easily and it is a poor assumption since many systems have this type of setup. Thanks for the problem report! I hope it is this simple thing and not something more difficult.

I’ve released RoonCommandLine Version 2.0.8 Release 3 which contains a fix for the configparser error in set_default.py reported above along with other fixes and improvements made over the last few months.

2 Likes

Yup its possible there was a python version bug there. Regardless, I’ve updated to Release 3 and it looks good, almost. It seems it sets the Default Album correctly now as I can run it with

roon -A default

However when I noticed when I set it via the roon menus option here it does not print the default values:

$ roon
 1) Get/Set Defaults	   etc..
Please enter your Roon command choice (numeric or text): 1

Default Album: 
Default Artist: 
Default Composer: 
Default Genre: 
Default Playlist: 
Default Radio: 
Default Tag:

I can see the values updated in roon_api.ini though, so at least its working.

Updated! RoonCommandLine is a great extension to Roon! It comes in action here several times a day to control Roon from Domoticz.

1 Like

@Paul_McEvoy , I will add this to the issues needed to address in the next release. Thanks for letting me know.

@Paul_McEvoy , I looked into the issue of the menu system not displaying the defaults and the problem may be trickier than I expected. My initial investigation indicates the issue is related to the format of the entries in /usr/local/Roon/etc/roon_api.ini.

In a recent release I changed the format of some of the entries, the defaults. But, when RoonCommandLine is upgraded or removed then reinstalled it tries to preserve roon_api.ini and pyroonconf so user configured settings are not clobbered. My format changes broke that.

I still need to do further investigation to confirm my suspicion. If your roon_api.ini has entries like defaultalbum = Catch the Wind rather than DefaultAlbum = Catch the Wind then you are likely suffering from this problem. The latest roon commands and python modules think the entries should be DefaultAlbum etc but what I thought was a cool trick to preserve your configs kept them looking like defaultalbum. I feel like the Golden State Warriors when they get too fancy with their passes.

I hope to sort this out soon. In the mean time you can try Bi-Capitalization of the entries in roon_api.ini. Or, uninstall then sudo rm -f /tmp/*roon*save then install. Sheesh.

I’ve published a new release of RoonCommandLine addressing the issue of upgrading/reinstalling and preserving roon_api.ini as described above. This release of RoonCommandLine is a bug fix release and only preserves an existing roon_api.ini if it is in the current supported format.

See RoonCommandLine Version 2.0.8 release 4.

When I list Playlists in Roon Command Line, only my Qobuz playlists ara shown. My personal playlists are not visible, nor can I choose them for playing on a zone. In the attached example you can see that ‘Chansons’ and ‘Witkamp Radio’ are skipped.


In my setup the only playlists that appear are the ones that are set to be visible to all profiles. Any that are assigned to just my individual profile, as yours appear to be, don’t show up.

For example, only the top three in the following list are visible to Roon Command Line:

1 Like

The underlying python library (which I maintain) doesn’t understand about profiles.

So I’m not sure what profile it will be acting as - but it’s likely to be the default.

So very likely that the @DaveN’s summary is correct.

1 Like

Thanks, that was the ‘problem’. It is now working from the commandline:

pi@domoticz:~ $ roon -l playlists

All Playlists in Library:

Audiophile HQ HiFi Demo Room Playlist | By HighEndAudioUpdates.nl | @JeroenPaul | Audiohuisdelft | RikStoet Audio | Enjoy | High End Audio Playlist
Chanteuse Style
Original Great Sound Quality - High-End - Playlist
Winter Warmers
Witkamp Radio
pi@domoticz:~ $

2 Likes