Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get state of player #115

Open
ryjohnson opened this issue Mar 14, 2020 · 0 comments
Open

Unable to get state of player #115

ryjohnson opened this issue Mar 14, 2020 · 0 comments

Comments

@ryjohnson
Copy link

ryjohnson commented Mar 14, 2020

Everything was working great up until yesterday. Now whenever I play a track through Spotify (Sonos App, AirPlay, Spotify Connect), I can't get the current state of the player (play/pause, current track, etc). Looking at the avTransportUriMetadata, for some reason, it keeps thinking I'm using line-in.

'<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="spotify" parentID="0" restricted="false"><dc:title>Spotify</dc:title>**<upnp:class>object.item.audioItem.linein</upnp:class>**<res protocolInfo="x-sonos-vli:*:audio:*">x-sonos-vli:RINCON_347E5C0EE19701400:2,spotify:5e9de992040a26982081102f3cf2b1b0</res><vli cookie="1" group=""></vli></item></DIDL-Lite>'
const SonosDiscovery = require('sonos-discovery');

const settings = {
  port: 1234,
  cacheDir: './cache',
};

const discovery = new SonosDiscovery(settings);

discovery.on('initialized', function(data) {
  console.log('EVENT: initialized');
});

discovery.on('topology-change', function(data) {
  console.log('EVENT: topology-change');
});

discovery.on('transport-state', function(data) {
  console.log('EVENT: transport-state');
  console.log(discovery.zones);
});
@ryjohnson ryjohnson changed the title Issues getting state of player Unable to get state of player Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant