Skip to content
This repository has been archived by the owner on May 23, 2018. It is now read-only.

Scrobble plays of your UPnP-devices to Last.fm

License

Notifications You must be signed in to change notification settings

dittodhole/node-upnp-scrobble-js

Repository files navigation

Icon node-upnp-scrobble-js

Scrobble plays of your UPnP-devices to Last.fm

Install

$ npm install

Run

$ node app.js

For pretty logging-output

$ npm install bunyan -g
$ node app.js | bunyan

Flow

The UPnP discovery and subscription flow is completely handled by peer-upnp, and follows the following strategy:

  1. Issuing an M-Search request, asking for urn:schemas-upnp-org:device:MediaRenderer:1
  2. UPnP-device says Hi
  3. Requesting the UPnP-device defintion from the device (LOCATION of response) over HTTP
  4. UPnP-device returns its defintion
  5. Parsing the definition, looking for a urn:schemas-upnp-org:service:AVTransport:1 service
  6. Sending a SUBSCRIBE request over HTTP to the eventSubURL of the AVTransport service
  7. UPnP-device emits events to the advertised callback URL over HTTP
  8. Parsing the events data and sending it over to Last.fm

Known issues

  • upnp-scrobble uses scribble, which does not scrobble the album of your track. I have a patched fork available My 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 the subscriptionTimeoutInSeconds 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. peer-upnp discovers the optimal resubscription interval by looking up the timeout from the SUBSCRIBE response.
  • I have tested the setup with Raumfeld One S, Netgear WNDR 3700, and a Raspberry PI 2 running Raspbian.

License

node-upnp-scrobble-js is published under WTFNMFPLv3.

Icon

Audio Spectrum by useiconic.com from the Noun Project.

About

Scrobble plays of your UPnP-devices to Last.fm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published