-
Notifications
You must be signed in to change notification settings - Fork 16
Power OnOff
Using the approach described on this page you can gracefully shutdown the Power Supply connected to the Raspberry Pi. It can be done in several ways:
- By clicking two times on the Shutdown button in the Player UI (e.g. using a touchscreen)
- By clicking two times on the Shutdown button in the Player Web UI (e.g. using Web UI in a cell phone connected to your home network)
- By pressing twice the hardware push-button connected through the Power Management System to the Raspberry Pi board.
The player supports the Software and Hardware shutdown. The additional hardware can be used for the PMS. It can gracefully switch On/Off the +5V Power Supply connected to the Raspberry Pi board. In addition to that a PMS can provide Power On functionality as well.
In order to enable the Power Off functionality through the PMS the following line should be added to the /boot/config.txt file:
dtoverlay=gpio-poweroff,active_low,gpiopin=4
These settings enable the module which will pull the pin GPIO#4 from HIGH (+3.3V) to LOW (0V) when the OS will finish the power-off procedure. That in turn will indicate that it's safe to switch off the power supply. This sequence provides the graceful power shutdown sequence.
To enable the hardware power-off using the push-button the following parameters should be specified in the file /home/pi/Peppy/config.txt:
[gpio]
use.buttons = True
...
button.poweroff = 24
This will cause the Peppy Player to listen for the signal change (+3.3V -> 0V) on the pin GPIO#24. When the signal will be changed two times the player will save the current player state and run the command sudo poweroff.
The following image explains the Power On/Off sequences using PMS.
- The gpio-poweroff should be enabled and configured in the /boot/config.txt file
- The hardware push-button should be pushed once.
- Upon the single button push the PMS activates the relay which connects +5V from the Power Supply to the Raspberry Pi board.
- To initiate the power off procedure either the player software Shutdown button should be clicked twice (4) or the hardware push-button should be pressed two times (2).
- Upon double button push the PMS should cause the LOW signal on the pin GPIO#24 configured earlier.
- When the Peppy player receives either two clicks or two pushes it save the current settings and runs the command sudo poweroff.
- When OS finishes the poweroff procedure it will bring the HIGH level on pin GPIO#4 to the LOW level.
- PMS will deactivate the relay which will disconnect the Power Supply +5V from the Raspberry Pi board.
Alexander Amend (Germany) developed the PMS board which provides Power On/Off functionality:
Please pay attention to the pin numbers of the T2. Here is the proof of concept implementation of the above mentioned design from Alexander.
- Peppy Players
- Peppy Home
- Hardware
- Audio Players
- Software
- Installation Guide
- Updating Guide
- Peppy Configuration
- Languages
- Scripts
- Voice Assistant
-
Peppy Player UI
- About
- Home Screen
- Radio Player
- Radio Groups
- Radio Favorites
- Radio Browser
- File Browser
- File Menu
- Quick Configuration
- File Player
- Audiobooks Player
- Audiobooks Browser
- Stream
- Podcasts Player
- Podcasts Browser
- AirPlay
- Spotify Connect
- Bluetooth Sink
- Jukebox
- Archive
- Equalizer
- Timer
- Language
- Network
- Headless Mode
- Resolution
- Recursive Playback
- Playback Order
- Information
- Background
- Icons
- Fonts
- Player Screen
- Image Viewer
- Switch
- Collection
- Catalog
- YA Streams
- Web UI
- Screensavers
- Woodware
- Sketches