RoonCommandLine Version 2.1.2 was released today and includes support for the installation, use, and upgrade of the Roon TUI terminal user interface for Roon
. See this post for further information.
Hi @Ronald_Record ,
Iāve run into a problem with the new version. When I run ./Install I get the following:
djn@trinity RoonCommandLine % ./Install
Install RoonCommandLine version 2.1.2r3 ? ('Y'/'N'): y
/usr/local/share/doc/RoonCommandLine/changelog.gz already exists -- do you wish to overwrite (y or n)? y
sed: 1: "/RoonCorePort.*/a RoonC ...": command a expects \ followed by text
sed: 1: "/RoonCommandLineVersion ...": command a expects \ followed by text
Using djn as the Roon user. 'Y' for OK, 'N' to select a different user:
When I continue with the installation I get ā¦
Restoring saved /usr/local/Roon/etc/pyroonconf
Setting the Python Roon API server IP address to 192.168.68.50
Enabling local access in /usr/local/Roon/etc/pyroonconf
In order to configure the Python Roon API we must set the IP address
of the Roon Core. Discovery will be used to determine the Roon Core IP.
When prompted for authorization, go to a Roon Remote window and click
Settings -> Extensions -> Enable
to authorize discovery
Traceback (most recent call last):
File "/usr/local/Roon/api/get_core_ip.py", line 8, in <module>
tokenfile = config['DEFAULT']['TokenFileName']
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 1273, in __getitem__
raise KeyError(key)
KeyError: 'TokenFileName'
Approval granted, retrieving zones and zone info ...
Traceback (most recent call last):
File "/usr/local/Roon/api/list_zones.py", line 16, in <module>
server = config['DEFAULT']['RoonCoreIP']
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 1273, in __getitem__
raise KeyError(key)
KeyError: 'RoonCoreIP'
Verify the 'server' and 'user' settings in the roon script are correct.
If you wish to deploy RoonCommandLine on other systems, install the package
there or copy the 'roon' frontend shell script to a location in your execution
PATH on those systems from which you wish to control Roon via SSH.
Edit the Roon Command Line configuration settings at:
/usr/local/Roon/etc/roon_api.ini
and verify the settings in the configuration file /usr/local/Roon/etc/pyroonconf
Could you advise?
EDIT: Not sure what the problem was but after I deleted my existing installation I managed to reinstall without any further problems.
@DaveN not sure what the problem was either. Upgrades are tricky and the least well tested path to installation. My guess, from the error output, is your saved and restored roon_api.ini
was corrupted somehow. This could have been the result of a bug I fixed writing out changes to that configuration file. Your previous version of RoonCommandLine may have had that bug, your roon_api.ini
was poorly formed due to that bug, the upgrade attempts to preserver the existing configuration but in this case it restored an incompatible config. Just guessing. The upgrade path works better now so in the future this may not be an issue but uninstalling and reinstalling is always a good alternative to upgrade. You just have to manually save any customization you have done to roon_api.ini
and re-do that.
You may also have hit some code path I have overlooked in testing. I will review these error messages more closely and see if I need to fix something.
Hi @Ronald_Record ,
I just noticed that I could install Roon TUI through RoonCommandLine, which is cool, and works well, but what happens if/when Roon TUI gets an update? Will I be able to run the update from within RoonCommandLine?
On a related note, it would be great if there was an āUpdate RoonCommanLineā option within the terminal output when RoonCommandLine is run.
@DaveN after review it looks like the sed
errors are due to BSD sed
on macOS
not understanding GNU sed
syntax for appending a line. To confirm, you are on macOS
and the command type sed
returns /usr/bin/sed
?
The following errors were a result of the botched sed
creating a malformed roon_api.ini
.
I will have to figure out the BSD sed
syntax to do something similar. Or use awk
.
I use and love Apple products but they are woefully behind in some areas. Still, my bad. I will fix it.
A new release of RoonCommandLine
is available, version 2.1.2 release 4
. This release provides improved info and formatting for now playing and media search. It also fixes issues with upgrades on macOS
.
View the RoonCommandLine v2.1.2r4
release notes and download the installation assets at https://github.com/doctorfree/RoonCommandLine/releases
Yes.
On a related matter, I just tried to install v2.1.2r4 and its failed. I tried what I did last time, i.e. delete everything, but that didnāt work either:
djn@trinity rooncommandline % ./install
Install RoonCommandLine version 2.1.2r4 ? ('Y'/'N'): y
Using djn as the Roon user. 'Y' for OK, 'N' to select a different user: y
Restoring saved /usr/local/Roon/etc/pyroonconf
Setting the Python Roon API server IP address to 192.168.68.50
Enabling local access in /usr/local/Roon/etc/pyroonconf
In order to configure the Python Roon API we must set the IP address
of the Roon Core. Discovery will be used to determine the Roon Core IP.
When prompted for authorization, go to a Roon Remote window and click
Settings -> Extensions -> Enable
to authorize discovery
Traceback (most recent call last):
File "/usr/local/Roon/api/get_core_ip.py", line 8, in <module>
tokenfile = config['DEFAULT']['TokenFileName']
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/configparser.py", line 1224, in __getitem__
raise KeyError(key)
KeyError: 'TokenFileName'
Approval granted, retrieving zones and zone info ...
Traceback (most recent call last):
File "/usr/local/Roon/api/list_zones.py", line 16, in <module>
server = config['DEFAULT']['RoonCoreIP']
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/configparser.py", line 1224, in __getitem__
raise KeyError(key)
KeyError: 'RoonCoreIP'
Verify the 'server' and 'user' settings in the roon script are correct.
If you wish to deploy RoonCommandLine on other systems, install the package
there or copy the 'roon' frontend shell script to a location in your execution
PATH on those systems from which you wish to control Roon via SSH.
Edit the Roon Command Line configuration settings at:
/usr/local/Roon/etc/roon_api.ini
and verify the settings in the configuration file /usr/local/Roon/etc/pyroonconf
On checking /usr/local/Roon/etc/roon_api.ini
it appears that the file is empty.
Any tips on how to get back up and running again?
Panic over: I deleted everything again, and reinstalled, and now itās working again.
@DaveN thanks for reporting these. Yeah, itās a hassle for you to keep re-installing but it is helping me root out problems. My guess is there are more places where BSD sed
on macOS
doesnāt like my GNU sed
syntax, sed
fails and a zero length roon_api.ini
is written out. I will track it down.
If thereās anything I can do to help, let me know. Iām happy to assist.
@DaveN thanks! Can you run the following script on the system where you installed v2.1.2r4
and tell me what is the output? This script wonāt change anything in your setup, it just uses sed
to create a temporary file, diffs that file with the original, and removes the temp file. This will eliminate or highlight that particular use of sed
as the culprit.
Save the following as some file, say /tmp/foo.sh
, make it executable with chmod 755 /tmp/foo.sh
, and run it: /tmp/foo.sh
#!/bin/bash
version="2.3.4"
roonini="/usr/local/Roon/etc/roon_api.ini"
cat ${roonini} | sed -e "/RoonCorePort.*/a\\
Foo = ${version}" > /tmp/a$$
diff ${roonini} /tmp/a$$
rm -f /tmp/a$$
Done.
djn@trinity rooncommandline % /Users/djn/Desktop/test.sh
12a13
> Foo = 2.3.4
Hope that helps.
@DaveN yes, that helps, thanks. Iāve still not found where the installation/upgrade process could produce an empty roon_api.ini
but I have added some checks for that and hopefully catch it and work around it. This is not entirely satisfactory as it loses any customization so I am still debugging in hopes of finding and correcting this type of error. This test eliminates one area of concern. Thanks for your assistance!
No problem. If thereās anything else I can do, let me know.
RoonCommandLine Version 2.1.3 Release 1 has been released today. See the Release Notes for installation/upgrade instructions and download assets. This release adds support to most commands for -z default
and -z last
to specify the default zone or last zone used. For example, the command now_playing -z last
would display info on the song now playing in the last zone used by RoonCommandLine and now_playing -z default
would display info on the song now playing in the RoonCommandLine default zone.
There have been several new releases in the last couple of weeks addressing several issues and adding some new functionality. The biggest change was adding fuzzy search capability to the interactive menu system using fzf
. Hopefully the rate of releases will now resume itās regular pace.
Thanks to everyone who helped in this round of improvements. For those of you who have not yet read the RoonCommandLine README, hereās how it opens:
"The cosmic operating system uses a command line interface. It runs on
something like a teletype, with lots of noise and heat; punched-out bits
flutter down into its hopper like drifting stars. The demiurge sits at his
teletype, pounding out one command line after another, specifying the values
of fundamental constants of physics:
universe -G 6.672e-11 -e 1.602e-19 -h 6.626e-34 -protonmass 1.673e-27
and when heās finished typing out the command line, his right pinky hesitates
above the enter key for an aeon or two, wondering whatās going to happen;
then down it comesāand the whack you hear is another Big Bang."ā Neal Stephenson, In the Beginningā¦Was the Command Line
I feel like RoonCommandLine does the universe
command justice.
RoonCommandLine Version 2.1.3 Release 2 has been released today. See the Release Notes for installation/upgrade instructions and download assets.
This release primarily adds integration of the Roon Community Remote GUI for Linux. With this release of RoonCommandLine you can now install, update, and open both the Roon TUI and Roon GUI with the roon
command via the command line or using the roon
menu system. The TUI and GUI are both based on the rust port of the Roon API and are standalone utilities not requiring RoonCommandLine. The integration of these utilities in this release aims to simplify and ease their installation, management, upgrade, and use.
Several other improvements and bug fixes are in this release. Please enjoy!