npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

streamr-mpc

v0.0.1

Published

MPD Client for playing music using streamr platform

Downloads

6

Readme

Streamr-mpc

MPD-Client for Streamr (https://www.npmjs.org/package/streamr)

working with streamr version >0.0.9

Installation

Prerequisites

Install Raspbian on your Raspberry Pi and configure the network adapter settings

Install node.js

tested with version 0.10.26 for Raspberry Pi (ARM)

mkdir ~/node
cd ~/node
wget http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-arm-pi.tar.gz
tar -xvzf node-v0.10.26-linux-arm-pi.tar.gz

Add node.js to path variables

NODE_JS_HOME=/home/pi/node/node-v0.10.26-linux-arm-pi
PATH=$PATH:$NODE_JS_HOME/bin
sudo bash -c 'echo "PATH=$PATH:/home/pi/node/node-v0.10.26-linux-arm-pi/bin" >> /etc/profile'

Install required tools (screen & dos2unix)

sudo apt-get update
sudo apt-get install screen
sudo apt-get install dos2unix
sudo apt-get install mpd
sudo apt-get install mpc

Configure MPD

edit configuration file sudo nano /etc/mpd.conf and change following lines:

bind_to_address         "localhost"
audio_output {
        type            "alsa"
        name            "My ALSA Device"
        device          "hw:0,0"        # optional
#        format          "44100:16:2"    # optional
#        mixer_device    "default"       # optional
#        mixer_control   "PCM"           # optional
#        mixer_index     "0"             # optional
}

Install streamr-mpc

cd ~
npm install streamr-mpc

Install required submodules

cd ~/node_modules/streamr-mpc
npm install

Configure autostart

cd ~
dos2unix node_modules/streamr-mpc/scripts/*
sudo cp node_modules/streamr-mpc/scripts/streamr-mpc /etc/init.d/
sudo chmod 755 /etc/init.d/streamr-mpc
sudo update-rc.d mpd defaults
sudo update-rc.d streamr-mpc defaults

following warning can be ignored:

insserv: warning: script 'mathkernel' missing LSB tags and overrides

Hifiberry (optional)

I recommend using HifiBerry instead of built-in 3,5mm audio. If you want to use HifiBerry you have to do following steps (from http://www.hifiberry.com/products/dac/hifiberry-dac-software/)

Load necessary modules

add following entries using sudo nano /etc/modules:

snd_soc_bcm2708
snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_pcm5102a
snd_soc_hifiberry_dac

Reboot and then aplay -l must print something similar:

pi@raspberrypi ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

Remember the card number and device number and change output device in mpd config file using sudo nano /etc/mpd.conf (replace hw:0,0 with hw:yourCardNumber,yourDeviceNumber):

audio_output {
        type            "alsa"
        name            "Hifiberry"
        device          "hw:1,0"        # optional
        format          "44100:16:2"    # optional
        mixer_device    "default"       # optional
        mixer_control   "PCM"           # optional
        mixer_index     "0"             # optional
}

You also have to change the mixer to software when using hifiberry:

mixer_type                      "software"

Restart your Raspberry after configuration.