Different Google Cast devices
Opened this issue · 2 comments
Right now it seems that this library will show all Google Cast devices that have device.manufacturer = "Google Inc."
.
- There are many different Google-made Google Cast devices out there, some of them being audio-only (like the Chromecast Audio, Google Home, Nexus Player).
- There are many different Google Cast audio-only compatible speakers out there.
- There are many Android TV (so Google Cast video/audio-compatible) TVs and TV Boxes out there (Sony Bravia, Sharp AQUOS, NVIDIA Shield, etc.).
As far as I know, the only way to know at discovery time if a Google Cast-compatible device (including Google's own devices) is audio-only is by matching the device.manufacturer
and/or device. modelName
to a list (I've pasted below the SSDP response for Google Home that is audio-only).
I'm also wondering if all Google Cast compatible devices (ex: NVIDIA Shield, Sony Bravia, etc.) will answer with device.manufacturer = "Google Inc."
(I'm assuming they don't).
It would be great if this library could also returns device.modelName
as a property, and potentially add an option to not filter Google Inc. as manufacturer and returns device.manufacturer
as well so anyone with a more advanced use-case (and time on its hand) could offer a better experience.
Something that could be cool would be a property audioOnly
that is true if we're sure it's an audio-only device, otherwise false (and a comprehensive list could be maintained in the lib, starting with the obvious Chromecast Audio and Google Home).
While I'm not sure I'm the right person for a PR, I'm definitely open to report back on any manufacturer/modelName I encounter in the wild. Maybe the folks at webtorrent-desktop knows more about this (@feross, @dcposch).
I've also find this if it helps:
- https://github.com/masmu/pulseaudio-dlna/blob/master/pulseaudio_dlna/plugins/chromecast/renderer.py#L156-L161
- https://github.com/jeremychild/NCast/blob/master/NCast/Devices/DeviceTypeDeterminer.cs
{
"$":{
"xmlns":"urn:schemas-upnp-org:device-1-0"
},
"specVersion":{
"major":"1",
"minor":"0"
},
"URLBase":"http://10.0.0.37:8008",
"device":{
"deviceType":"urn:dial-multiscreen-org:device:dial:1",
"friendlyName":"Living Room",
"manufacturer":"Google Inc.",
"modelName":"Google Home",
"UDN":"uuid:fee5c0d9-7475-b74a-1a14-xxx",
"iconList":{
"icon":{
"mimetype":"image/png",
"width":"98",
"height":"55",
"depth":"32",
"url":"/setup/icon.png"
}
},
"serviceList":{
"service":{
"serviceType":"urn:dial-multiscreen-org:service:dial:1",
"serviceId":"urn:dial-multiscreen-org:serviceId:dial",
"controlURL":"/ssdp/notfound",
"eventSubURL":"/ssdp/notfound"
}
}
}
}
I think that this idea makes a lot of sense.
I have a Chromecast Audio that I can test the audioOnly
feature on, if you (or someone else) wants to send a PR.
👍