Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: SiriusXM support?
#10
(10-19-2021, 01:55 PM)TheOldPresbyope Wrote:
(10-18-2021, 09:01 PM)jmperagine Wrote:
(10-17-2021, 07:43 PM)TheOldPresbyope Wrote: A few postnotes:

...blah blah blah...

wow, thanks again Kent for all this.

I am having a bit of trouble starting the sxm-player when Moode boots.

I added
# start the SiriusXM proxy
/usr/local/bin/sxm-player -U <my sxm username> -P <my sxm password> &   (using my credentials of course)

I get a compatibility error, literal screen shot attached 
or not, picture not uploading.

[FAILED] Failed to start /etc/rc.local Compatibility.

Hmmm. This is systemd saying it has a problem with the contents or permissions of the /etc/rc.local file. (The use of rc.local is a throwback to old-school SystemV Unix. It's now handled by a compatibility mechanism in systemd.)

Quote:and then the whole thing fails to boot up the rest of the way.

I'm not sure what "the rest of the way" means.

Quote:I can SSH in and start sxm-player and then load a channel via the Moode interface, Firstwave, Tom Petty Radio, etc. all work and sound very good.

and I can then switch to regular internet radio like JazzGroove.org and back. It's just the loading at boot that is not working.

This suggests moOde did boot 'the rest of the way".

1. check the ownership/permissions of /etc/rc.local. They should look like
Code:
pi@rpi3bp:~ $ ls -l /etc/rc.local
-rwxr-xr-x 1 root root 1202 Oct  2 07:57 /etc/rc.local

2. post the /etc/rc.local file contents

3. test that the file is basically ok
Code:
sudo killall sxm-player
sudo /etc/rc.local

In the above, the first line makes sure there are no copies of sxm-player running. The second line should run without errors, ending with a cleared screen showing lines like
Code:
2021-10-19 09:37:42 rpi4b2 sxm_player[8457] INFO Attempting to connect SXM Client (next in 10 seconds)
2021-10-19 09:37:44 rpi4b2 sxm_player.sxm[8478] INFO sxm has started on http://127.0.0.1:9999
2021-10-19 09:37:45 rpi4b2 sxm_player[8457] INFO SXM Client started. 412 channels available

You'll have to hit <enter> to regain the command line prompt.

If you get this far, then

4. reboot

5. capture and post the command-line output from
Code:
sudo systemctl status rc-local

As an example of this last, here's the output for me on an moOde 7.4.1 player running on an RPi4B.
Code:
pi@rpi4b2:~ $ sudo systemctl status rc-local
Warning: The unit file, source configuration file or drop-ins of rc-local.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● rc-local.service - /etc/rc.local Compatibility
  Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)
 Drop-In: /usr/lib/systemd/system/rc-local.service.d
          └─debian.conf
          /etc/systemd/system/rc-local.service.d
          └─ttyoutput.conf
  Active: active (running) since Mon 2021-10-18 22:45:21 EDT; 3min 8s ago
    Docs: man:systemd-rc-local-generator(8)
 Process: 522 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
   Tasks: 29 (limit: 4323)
  CGroup: /system.slice/rc-local.service
          ├─ 530 /usr/bin/udisks-glue --config=/etc/udisks-glue.conf
          ├─ 559 /usr/bin/php /var/www/command/worker.php
          ├─ 563 /usr/bin/python3 /usr/local/bin/sxm-player -U xxxxx -P xxxxx
          ├─ 752 /usr/bin/python3 /usr/local/bin/sxm-player -U xxxxx -P xxxxx
          ├─ 753 /usr/bin/python3 /usr/local/bin/sxm-player -U xxxxx -P xxxxx
          ├─1140 sudo /usr/local/bin/shairport-sync -a rpi4b2 Airplay -- -d _audioout
          ├─1142 sudo librespot --name rpi4b2 Spotify --bitrate 160 --format S16 --initial-volume 0 --volume-ctrl log --cache /var/local/www/spotify_cache --disable-aud
          ├─1144 /usr/local/bin/shairport-sync -a rpi4b2 Airplay -- -d _audioout
          ├─1146 librespot --name rpi4b2 Spotify --bitrate 160 --format S16 --initial-volume 0 --volume-ctrl log --cache /var/local/www/spotify_cache --disable-audio-ca
          ├─1189 /bin/bash /var/www/command/watchdog.sh
          └─2136 sleep 6

Oct 18 22:45:19 rpi4b2 systemd[1]: Starting /etc/rc.local Compatibility...
Oct 18 22:45:21 rpi4b2 systemd[1]: Started /etc/rc.local Compatibility.
Oct 18 22:45:25 rpi4b2 rc.local[522]: 2021-10-18 22:45:25 rpi4b2 sxm_player[563] INFO Attempting to connect SXM Client (next in 10 seconds)
Oct 18 22:45:26 rpi4b2 rc.local[522]: 2021-10-18 22:45:26 rpi4b2 sxm_player.sxm[753] INFO sxm has started on http://127.0.0.1:9999
Oct 18 22:45:27 rpi4b2 rc.local[522]: 2021-10-1

(Take care not to post your SiriusXM credentials)

Another possibility is that on your system the rc.local commands are being executed too early in the boot sequence. This can happen because systemd starts processes in parallel whereas the old SystemV initialization started them serially. Hence the rc.local commands are no longer guaranteed to be performed after all the other init processes. We'll wait to cross this bridge until we get to it.

If we do get to it, you probably should post the output from
Code:
moodeutl -i

so we can see your system hardware/software configuration.

Regards,
Kent


[[Following response edited by @TheOldPresbyope to set off command-line output in code blocks]]

1. 

Code:
pi@moode:/etc $ ls -l rc.local 
-rwxr-xr-x 1 root root 1283 Oct 22 20:12 rc.local

2.

Code:
#!/bin/sh -e

SQLDB=/var/local/www/db/moode-sqlite3.db

# Unblock WiFi
/usr/sbin/rfkill unblock wifi > /dev/null 2>&1

# Set cpu govenor
CPU_GOV=$(sqlite3 $SQLDB "select value from cfg_system where param='cpugov'")
echo "$CPU_GOV" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

# USB storage auto-mounter
/usr/bin/udisks-glue --config=/etc/udisks-glue.conf > /dev/null 2>&1
#/usr/bin/devmon --exec-on-drive "/var/www/command/util.sh smb_add %d %f" --exec-on-remove "/var/www/command/util.sh smb_remove %f" --always-exec --no-gui > /dev/null 2>&1 &

# Work around for Katana driver load failure on Pi-4B
AUDIO_DEVICE=$(sqlite3 $SQLDB "select value from cfg_system where param='i2sdevice'")
PI_REVNUM_SEGMENT=$(awk '{if ($1=="Revision") print substr($3,3,3)}' /proc/cpuinfo)

if [ "$AUDIO_DEVICE" = "Allo Katana DAC" ] && [ $PI_REVNUM_SEGMENT = "311" ]; then
        rmmod snd_soc_allo_katana_codec
        rmmod snd_soc_audio_graph_card
        modprobe snd_soc_audio_graph_card
        modprobe snd_soc_allo_katana_codec
    echo `date +'%Y%m%d %H%M%S'` "rc.local ran Katana|Pi-4B driver reload" > /home/pi/katana.log
fi

# moOde startup and job processor daemon
/var/www/command/worker.php > /dev/null 2>&1

# start the SiriusXM proxy
#/usr/local/bin/sxm-player -U username -P PassWord &

exit 0


3.

Code:
pi@moode:/ $ sudo killall sxm-player
sxm-player: no process found
pi@moode:/ $ sudo /etc/rc.local
ondemand

4.

Code:
pi@moode:/ $ sudo systemctl status rc.local
Warning: The unit file, source configuration file or drop-ins of rc-local.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)
  Drop-In: /usr/lib/systemd/system/rc-local.service.d
           └─debian.conf
           /etc/systemd/system/rc-local.service.d
           └─ttyoutput.conf
   Active: active (running) since Fri 2021-10-22 20:09:24 EDT; 11min ago
     Docs: man:systemd-rc-local-generator(8)
  Process: 521 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
    Tasks: 8 (limit: 4915)
   CGroup: /system.slice/rc-local.service
           ├─ 530 /usr/bin/udisks-glue --config=/etc/udisks-glue.conf
           ├─ 554 /usr/bin/php /var/www/command/worker.php
           ├─ 850 sudo /var/www/command/gpio-buttons.py
           ├─ 853 /usr/bin/python /var/www/command/gpio-buttons.py
           ├─ 950 /bin/bash /var/www/command/watchdog.sh
           └─2805 sleep 6

Oct 22 20:09:23 moode systemd[1]: Starting /etc/rc.local Compatibility...
Oct 22 20:09:24 moode systemd[1]: Started /etc/rc.local Compatibility.


5.

Code:
pi@moode:/ $ find /moodeutl
find: ‘/moodeutl’: No such file or directory


Hardware is a Raspberry Pi 4 Model B 4GB
no audio card yet
connected to the official Raspberry Pi 7" touchscreen
Reply


Messages In This Thread
SiriusXM support? - by jmperagine - 08-14-2021, 07:15 PM
RE: Siriusxm support? - by TheOldPresbyope - 08-15-2021, 01:18 PM
RE: Siriusxm support? - by jmperagine - 10-14-2021, 12:23 AM
RE: Siriusxm support? - by TheOldPresbyope - 10-14-2021, 03:43 AM
RE: Siriusxm support? - by TheOldPresbyope - 10-14-2021, 02:20 PM
RE: Siriusxm support? - by jmperagine - 10-14-2021, 06:33 PM
RE: Siriusxm support? - by TheOldPresbyope - 10-17-2021, 07:43 PM
RE: Siriusxm support? - by jmperagine - 10-18-2021, 09:01 PM
RE: Siriusxm support? - by TheOldPresbyope - 10-19-2021, 01:55 PM
RE: Siriusxm support? - by jmperagine - 10-23-2021, 12:36 AM
RE: Siriusxm support? - by TheOldPresbyope - 10-23-2021, 02:29 PM
RE: Siriusxm support? - by TheOldPresbyope - 10-24-2021, 07:51 PM
RE: Siriusxm support? - by jmperagine - 10-24-2021, 09:04 PM
RE: Siriusxm support? - by jmperagine - 10-24-2021, 09:58 PM
RE: Siriusxm support? - by TheOldPresbyope - 10-25-2021, 01:56 AM
RE: Siriusxm support? - by jmperagine - 10-27-2021, 02:01 AM
RE: Siriusxm support? - by TheOldPresbyope - 10-27-2021, 03:03 AM
RE: Siriusxm support? - by jmperagine - 10-30-2021, 05:39 PM
RE: Siriusxm support? - by jmperagine - 12-01-2023, 08:47 PM
RE: Siriusxm support? - by TheOldPresbyope - 12-02-2023, 02:46 PM
RE: Siriusxm support? - by TheOldPresbyope - 12-02-2023, 02:57 PM
RE: Siriusxm support? - by jmperagine - 12-02-2023, 05:08 PM
RE: Siriusxm support? - by TheOldPresbyope - 12-02-2023, 07:02 PM
RE: Siriusxm support? - by jmperagine - 12-02-2023, 08:04 PM
RE: Siriusxm support? - by jmperagine - 12-02-2023, 08:07 PM
RE: Siriusxm support? - by jmperagine - 12-02-2023, 08:10 PM
RE: Siriusxm support? - by Nutul - 12-02-2023, 09:25 PM
RE: Siriusxm support? - by TheOldPresbyope - 12-02-2023, 09:52 PM
RE: Siriusxm support? - by TheOldPresbyope - 12-03-2023, 12:45 AM
RE: Siriusxm support? - by jmperagine - 12-03-2023, 08:38 PM
RE: Siriusxm support? - by TheOldPresbyope - 12-03-2023, 11:52 PM
RE: Siriusxm support? - by jmperagine - 12-05-2023, 03:31 PM

Forum Jump: