Scrobble plays of your UPnP-devices to Last.fm
$ npm install
$ node app.js
For pretty logging-output
$ npm install bunyan -g
$ node app.js | bunyan
The UPnP discovery and subscription flow is completely handled by peer-upnp, and follows the following strategy:
- Issuing an
M-Search
request, asking forurn:schemas-upnp-org:device:MediaRenderer:1
- UPnP-device says Hi
- Requesting the UPnP-device defintion from the device (
LOCATION
of response) over HTTP - UPnP-device returns its defintion
- Parsing the definition, looking for a
urn:schemas-upnp-org:service:AVTransport:1
service - Sending a
SUBSCRIBE
request over HTTP to theeventSubURL
of theAVTransport
service - UPnP-device emits events to the advertised callback URL over HTTP
- Parsing the events data and sending it over to Last.fm
upnp-scrobble uses scribble, which does not scrobble the album of your track. I have a patched fork availableMy patched fork of scribble is used.On a regular basis the UPnP-device does not send events. I am still investigating this very issue.Please use thepeer-upnp discovers the optimal resubscription interval by looking up the timeout from thesubscriptionTimeoutInSeconds
configuration parameter, which sould be decreased if you see missing notifications. This will result in a shorter timeout of the subscriptions, and a more frequent resubscription.SUBSCRIBE
response.- I have tested the setup with Raumfeld One S, Netgear WNDR 3700, and a Raspberry PI 2 running Raspbian.
node-upnp-scrobble-js is published under WTFNMFPLv3.
Audio Spectrum by useiconic.com from the Noun Project.