In-store Radio beta
An In-Store Radio Player for the Raspberry Pi
This package allows you to turn your info-beamer powered Raspberry Pi into an In-Store Radio Player. Stream audio content from a streaming source and add local fallback files. Schedule overlay playback for ads, notifications or other regular content on top.
While this package supports HDMI output, using a HiFiBerry hat for the Raspberry Pi is highly recommended for perfect audio quality.
Supported HiFiBerry DAC include
- DAC+ LIGHT
- DAC+ STANDARD
- DAC+ PRO
- While you're checking out their site: A nice case like the one in the picture above.
- Play an audio stream non-stop
- Optional local fallback files in case of internet problems
- Automatically detect silence in stream and trigger fallback
- Overlay additional audio files at scheduled intervals
Setting up a playback device
- Assemble the HiFiBerry by attaching it to your Raspberry Pi. Follow the instructions included with the hardware for that.
- Install info-beamer on your Raspberry Pi by following the device installation instructions.
- Connect the device to your info-beamer account.
- Import this package by clicking the "Import package" button.
- Create a new setup based on this package by clicking the "Create setup" button.
- Assign this setup to your Pi.
- Stream source: Specify an http/https stream of MP3 or AAC content. You can also point to M3U playlists. Consult with support if you already have a stream producer and need help with integration.
- Stream buffer: Allows you to specify how many seconds of buffer will be filled before playback starts. A longer buffer might take a while to fill but better helps with brief network outages.
Local fallback playlist
If the configured stream is interrupted and the buffer runs empty, a local fallback playlist can take over playback until network streaming is resumed. Additionally this package includes a silence detector: If the stream is working but sends a mostly silent stream, the fallback can be triggered as well.
- Silence detector threshold: Allows you to specify after how many seconds of silence within the network stream the fallback is activated. Be sure to set this value high enough so it doesn't get triggered during expected audio pauses. If you know your content can contain longer pauses, use a higher trigger threshold.
- Fallback switching: Allows you to specify how long the fallback will be active before considering to switch back to the stream. It might be beneficial to use a high value here to avoid flapping between stream and local content during internet outages where the internet connection flaps as well.
- Playlist: Specify any number of local fallback audio files. They will be played in the given order. The position within the fallback playlist is saved. If the player switches between the stream and local playlist, the local playback resumes where it previously stopped.
Overlays allow you to play locally cached audio snippets on top of the normal stream/local playback. This can be used for regular announcements or other repeating content that is not part of the stream itself.
Each overlay items can be configured individually. The following options are available:
- Start and end hour. This allows you to specify the hours the item will be scheduled.
- The interval and minute setting allow you to specify when this item will be scheduled within the given hour constraint. If you specify "Between 08:00 and 19:59 at xx:30", the overlay will be triggered on 08:30, 09:30 and so on until 19:30.
- The volume option allows you to control how the normal stream/local playback will be tuned down during overlay playback.
- The combination option allows to to specify how the individual overlay will be scheduled in case other overlays occupy the same slot. If you have multiple overlays playing at xx:30, each will be triggered in the order within the overlay configuration. The combination option allows you to specify how they will each behave in regards to all other overlays triggered.
- Timezone: Allows you to specify the timezone used for scheduling overlays
- Base volume: Sets the base output volume. Usually it's recommended to keep the volume at 100% and use the hardware volume control settings of your playback system to adjust the volume. If that's not possible, you can lower the volume with this setting.
Initial public release
Want to run In-store Radio on your Raspberry Pi?
This package is ready to run on your Raspberry Pi using info-beamer.com hosted. Easily manage unlimited number of Raspberry Pi devices and centrally configure and run visualizations like this on them. info-beamer.com is a prepaid service. You only pay for the resources you are using. No long term commitment, no hidden fees. Learn more...
Compatible devicespi-1 pi-2 pi-3 pi-4 pi-cm1 pi-cm3 pi-zero pi-zero-2
This package can be extended by importing the following packages as well. You can then add the following packages as a child package of In-store Radio to get additional features not included in In-store Radio itself.
Offline supportMaybe This package might work offline: Needs to access streams and correct time source for scheduling. Also check the information above.
Source code for this packagehttps://github.com/info-beamer/package-instore-radio shows you the full source code of this package so you can freely modify it if you want.
Copyright (C) 2020 Florian Wesch <email@example.com> Show full license information
Copyright (C) 2020 Florian Wesch <firstname.lastname@example.org> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This project includes third party work: package.png, node.png: icons created by Freepik from Flaticon https://www.flaticon.com/de/autoren/freepik https://www.flaticon.com screenshot-1.jpg Depicting the HiFiBerry steel base: https://www.hifiberry.com/shop/cases/steel-case-for-hifiberry-dac-pi-4-2/ package-header.jpg Created by heidifin on unsplash.com https://unsplash.com/@heidifin https://unsplash.com/photos/2TLREZi7BUg deque.lua MIT licensed: https://github.com/catwell/cw-lua/blob/master/deque/deque.lua font.ttf: Office-Code-Pro Regular SIL Open Font License v1.1 https://github.com/nathco/Office-Code-Pro idle.mp3: CC0, created by Brandon Morris https://opengameart.org/content/loading-screen-loop