This OSMC Snapcast addons bringing now the possibility to let run both, Snapserver and Snapclient, independent or together on Raspberry Pi.
For now Snapserver is limited to serve only Kodi audio through ALSA loopback device. For now Snapclient is only available for people with no need for pulseaudio support.
Addons now supporting OSMC Kodi v.19 Matrix :-D
Base Snapcast binaries are of course from the main developer Johannes Pohl (badaix). Mainly the ideas to create this addons including code fragments comes from Anton Voyl (awiouy) for Team LibreELEC (https://libreelec.tv)
A lot of improvements needed. Addons are still in development status. Feel free to report me back issues or improvements. Or if you familiar with coding and Git adjust the code and make a pull request.
- Allow multiple instances for Snapclient needs inspiration ;-)
- Functional Kodi playback paused and resumed events for Snapclient
- Implement all available configuration settings for Snapclient and Snapserver (not done yet)
- Addons now supporting OSMC Kodi v.19 Matrix
- Added commented out client instance dev. code
- Added commented out client pause and resume code
- Initial commit with corrected addon structure
- Snapclient and Snapserver v0.25.0
- Adjusted Snapclient locally to hear mopidy snapserver multiroom audio on Kodi
- No Git commits since established
Currently there is no Kodi package installation routine. Therefore, some adjustments have to be made directly.
All required system packages should already be installed by default (please correct me if i'm wrong). No further customization should be necessary. Except in case of special sound card configuration.
Copy the addons individually or together into your Raspberry Pi OSMC Kodi addon folder using your preferred method.
You can also clone the Git repository to Kodi, but make sure you also have Git installed or already present in the system. Afterwards check addons on filesystem level if user, group and permissions are correctly set.
Log into your OSMC commandline.
Make script and binary executable:
cd ~/.kodi/addons/script.service.snapclient/resources/bin/
chmod +x ./snapclient*
Same for Snapserver if you want to use it. Just replace all occurences of snapclient
to snapserver
from code above.
cd ~/.kodi/addons/script.service.snapserver/resources/bin/
chmod +x ./snapserver*
You should create a system service for Snapserver and Snapclient.
Example files are in system.d folder service.snapserver.service
and service.snapclient.service
Add a Snapclient system service started at boot:
cd ~/.kodi/addons/script.service.snapclient/system.d/
sudo cp service.snapclient.service /usr/lib/systemd/system/snapclient.service
cd /usr/lib/systemd/system
sudo systemctl enable snapclient
sudo systemctl status snapclient
sudo systemctl start snapclient
Add a Snapserver system service too:
cd ~/.kodi/addons/script.service.snapserver/system.d/
sudo cp service.snapserver.service /usr/lib/systemd/system/snapserver.service
cd /usr/lib/systemd/system
sudo systemctl enable snapserver
sudo systemctl status snapserver
sudo systemctl start snapserver
Make adjustments inside Kodi addon settings (TV screen or whatever you use for Kodi addon management).
Snapclient should play stream from remote server:
- Setup Snapclient server host IP address to your remote Snapserver
- Give your client a unique host ID
Snapclient should play stream from local Snapserver e.g. for Kodi:
- Enable Snapserver in addon settings
- Setup Snapclient server host IP address to 127.0.0.1
- Give your Snapclient a unique host ID
- Set switch for stopping Snapclient if Kodi is playing to disabled
- In Kodi system settings set audio output to Loopback device
- Everything else should work now out of the box
- Play with latency time of Snapclient in case you have asynchronized video/audio
- Many thx to (badaix) for the great Snapcast system to inspire me to make a old-fashioned OSMC addon from it.
- Special thx to Anton Voyl (awiouy) for his great work to support Snapcast on LibreELEC Kodi. I reused ;-) a lot of code from him.
- For LibreELEC reference look at Snapserver and Snapclient