https://github.com/phts/np-01_buttons
https://github.com/phts/np-01_buttons
phts-electronics phts-np-01
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/phts/np-01_buttons
- Owner: phts
- Created: 2023-02-03T20:53:21.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2026-03-25T20:38:57.000Z (2 months ago)
- Last Synced: 2026-03-26T20:08:37.094Z (2 months ago)
- Topics: phts-electronics, phts-np-01
- Language: JavaScript
- Homepage: https://tsaryk.com/NP-01
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHTS NP-01: buttons
Event handlers of buttons on a front panel of [PHTS NP-01].
:warning: Some of those commands also used by [IR controller].
## Current mappings

Name
Short press
Long press
While playing
While paused
SHUTDOWN
Gracefully shutdown the device
Reboot the device
□
Toggle screen modes: "Track info", "VU meter", "Screensaver"
Current screen mode
Track infoVU meterScreensaver
Toggle repeat/random track modeToggle background image
▶ / ⏸
Play or pause
Stop after current track
Play selected playlist
⏮
Jump to the beginning of the current track or to the previous track
Rewind 10 seconds
Select previous playlist
⏭
Jump to next track
Fast forward 10 seconds
Select next playlist
## Install
```sh
cd /home/volumio
git clone https://github.com/phts/NP-01_buttons.git
cd NP-01_buttons
npm i --only=prod
```
## Usage
`/etc/rc.local`:
```sh
...
sudo bash /home/volumio/NP-01_buttons/run.sh &
...
```
## Debug and development
1. Find process `node app/index.js` and kill it
```sh
ps -elf | grep app/index.js
sudo kill
```
2. Run this app locally
```sh
cd ~/NP-01_buttons
sudo node app/index.js
```
[PHTS NP-01]: https://tsaryk.com/NP-01
[IR controller]: https://github.com/phts/NP-01_IR-controller-configs