Thank you for your donation!


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


Instruction Guide How to setup SiriusXM - UPDATED June 2024
#1
Install successful on v.9.0.8 RPI 4B 4GB and updated to v.9.1.5

This was successful on 8.3.7 64bit running on a RPI 4B 4GB.
Install as root. A shout out to Kent for figuring out 95% of this!


Step 1) for MoOde v8.3.7   SSH into your machine and install the sxm-player.

Code:
sudo pip3 install sxm-player


Step 1) for MoOde V9.0.8   SSH into your machine and install the sxm-player.
Code:
sudo pip3 install sxm-player --break-system-packages


2) Use your favorite editor, to create a file named sxm-player.service in the default user's (user pi in following example) home directory on the moOde player. The content of this file should be (note that this content is case sensitive)

Code:
[Unit]
Description=sxm-player
After=network-online.target
Requires=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/bin/sxm-player -U your-SXM-username -P your-SXM-password

[Install]
WantedBy=multi-user.target
There is no trailing '&' in the start command.


3) As superuser, copy this file to /etc/systemd/system/sxm-player.service
Code:
sudo cp sxm-player.service /etc/systemd/system/sxm-player.service


4) Check the resulting file has ownership and permissions as shown here.
Code:
pi@moode:~ $ ls -l /etc/systemd/system/sxm-player.service
-rw-r--r-- 1 root root 208 Dec  2 18:42 /etc/systemd/system/sxm-player.service


5) Make systemd aware of this service and then enable it
Code:
sudo systemctl daemon-reload
sudo systemctl enable sxm-player

You should see a response like the following
Code:
pi@moode:~ $ sudo systemctl daemon-reload
pi@moode:~ $ sudo systemctl enable sxm-player
Created symlink /etc/systemd/system/multi-user.target.wants/sxm-player.service → /etc/systemd/system/sxm-player.service.


6) Now reboot the moOde player. Please note: A second reboot may be required.


7) Check the status of the service.
Code:
systemctl status sxm-player

If all went well, you'll see something like this.
Code:
pi@moode:~ $ systemctl status sxm-player
● sxm-player.service - sxm-player
   Loaded: loaded (/etc/systemd/system/sxm-player.service; enabled; vendor preset: enabled)
   Active: active (running) since ...

* the actual filename is arbitrary but its extension *must* be .service

* one can simply create and edit the file in the target directory as superuser


This will start an HTTP server that a player that supports HLS, you can access a SXM channel at http://127.0.0.1:9999/channel.m3u8 where “channel” is the channel name, ID, or Sirius channel number. Some channels must be setup using the name of the channel, other can be setup using the name or the channel id number

For a full list of channels
Code:
sxm -l


8) You can access them by setting up stations
Examples:
First Wave can only be setup using the name
http://127.0.0.1:9999/firstwave.m3u8

Tom Petty Radio can be setup using the name or the channel ID
http://127.0.0.1:9999/tom%20petty%20radio.m3u8
http://127.0.0.1:9999/9407.m3u8

Thank you Kent!
Reply
#2
@jmperagine

It's good to hear you were successful.

I was a little puzzled, though, that you have four installation steps where I had been able to get the proxy running after only the first step.

This afternoon I looked inside the packages. It turns out that The current sxm-player package in the Python Package Index (PyPI) [1] has as prerequisites sxm>=0.2.8 and anyio==3.*

Hence, when one executes the sudo pip3 install sxm-player we see in the command output that sxm-player 0.2.5 gets installed and so do sxm 0.2.8 and anyio 3.3.3. It does no harm to install the latter packages again separately but it's redundant.

With that out of the way, what's with idna? Well, it turns out anyio 3.3.3 has a prerequisite of its own, namely idna >=2.8

Here it gets tricky: pip3 discovers there is already present idna 2.6 but reports it is unable to update it to the version currently available in the PyPI, idna 3.3 because of missing information.

It would seem in my tests that sxm-player/anyio don't use idna so in some sense it doesn't matter. (That's not surprising since SiriusXM is a USA/Canada service so international domain names don't come into play.)

Digging deeper we find that python-idna and python3-idna have already been installed in moOde, not by pip/pip3 but by apt as  prereqs for other packagtes including upmpdcli.

My solution is to leave existing versions alone and force pip3 to update the Python3 version of idna to the latest version as well, which seems to work. 

So, in place of your four steps, I believe the following two are sufficient.

Code:
sudo pip3 install -U idna
sudo pip3 install sxm-player


Regards,
Kent

[1] aka the Cheeseshop for you Monty Python fans.
Reply
#3
fromage  bleu ?

No, sorry not delivered due to Covid restrictions....

Maybe a little Sirius X(tra)-M(ature) ? or perhaps the Cherni vit ?

Hang about guv'nor .... I'll just check out the back.....  wait, I've just remembered....we've a very rare Norwegian Blue !

What's that like then...?

Oh, a little feathered around the edges but solid inside !!!
----------
bob
Reply
#4
(11-04-2021, 05:56 AM)DRONE7 Wrote: fromage  bleu ?

No, sorry not delivered due to Covid restrictions....

Maybe a little Sirius X(tra)-M(ature) ? or perhaps the Cherni vit ?

Hang about guv'nor .... I'll just check out the back.....  wait, I've just remembered....we've a very rare Norwegian Blue !

What's that like then...?

Oh, a little feathered around the edges but solid inside !!!

Remarkable bird, the Norwegian Blue, idn't it. Beautiful plummage.

If the Pythons could make wild seques, so can I.

Hard to believe the Flying Circus first aired here in the USA ca 1974. I was instantly hooked and still remember those early sketches virtually word for word. My significant other has sworn me not to recite them to her. I don't hit her with Cook and Moore sketches either (who could forget Sir Streeb-Greebling teaching ravens to fly underwater?). I regret having donated my imported LPs years ago.

Regards,
Kent
Reply
#5
Say no mor' Govn'r. The next challenge is getting the artist and song title to display.
Reply


Forum Jump: