Hello everyone!
I like to work with LED signs and other fun display technologies and as much as I love my chromecast audio, sadly it has no way of displaying what it is currently playing. Now I know that this information must be somewhat publicly available because the Chromecast app for android can show me what content is playing from Spotify, even if the session is initiated by another client as you can see here:
(Well I can't post images because I'm a new user, use your imagination to see that I can start playing something from Spotify on another device and I'm still able to get cover art, title and artist name here in this native android chromecast app)
Anyway, I'm having trouble devising a way to fetch this information from the Chromecast, I'd really love to send it to some digital signage so I can keep tabs on what's playing, even if that's just say - a raspberry pi with an old VFD attached. So far I was able to use the node chromecast-cli to grab some rudimentary information from the device when it's playing stuff from Spotify. Here's what I get:
so um, most of this status information is painfully redundant, displayName and StatusText are both just 'Spotify' and right now I can't see any useful information about what's playing. So I'm left to assume that the namespaces object is encoded as JSON and potentially contains what I'm looking for, but I'm not sure as to how to actually get it and extract it and put it to good use - or I could be totally wrong and that contains nothing useful. Go figure, but either way I suppose someone here might have the experience needed here to shake this information out of the thing. This might only be pertinent to Spotify, but that's what I use 90% of the time so it's good either way, there might be a more generic string that can be fetched for whatever is playing. Any help would be greatly appreciated!
Thanks in advance!
I like to work with LED signs and other fun display technologies and as much as I love my chromecast audio, sadly it has no way of displaying what it is currently playing. Now I know that this information must be somewhat publicly available because the Chromecast app for android can show me what content is playing from Spotify, even if the session is initiated by another client as you can see here:
(Well I can't post images because I'm a new user, use your imagination to see that I can start playing something from Spotify on another device and I'm still able to get cover art, title and artist name here in this native android chromecast app)
Anyway, I'm having trouble devising a way to fetch this information from the Chromecast, I'd really love to send it to some digital signage so I can keep tabs on what's playing, even if that's just say - a raspberry pi with an old VFD attached. So far I was able to use the node chromecast-cli to grab some rudimentary information from the device when it's playing stuff from Spotify. Here's what I get:
Code:
Komputer$ node chromecast-cli.js --host [IPaddress] status
{ applications:
[ { appId: 'CC32E753',
displayName: 'Spotify',
isIdleScreen: false,
namespaces: [Object],
sessionId: 'C6A14255-0DE0-44DE-9A06-BC9D07D33A53',
statusText: 'Spotify',
transportId: 'web-3' } ],
volume:
{ controlType: 'attenuation',
level: 0.7843137383460999,
muted: false,
stepInterval: 0.05000000074505806 } }
Thanks in advance!
No comments:
Post a Comment