Git Product home page Git Product logo

Comments (6)

Skyost avatar Skyost commented on August 17, 2024 1

I see. But I maintain that's a little bit out of scope for this library : the goal here is only to discover the MDNS devices on your network.

To achieve what you want, I'm affraid that you may have to dive into the internal documentation of how Chromecasts work. I've did a little search for you : pychromecast (a Python library that helps interacting with Chromecast devices) first looks at the port :

  • If it's not 8009, then the cast type is set to group.
  • If it's 8009, then it looks to the model type (md attribute) and refers to this table to know whether the cast type is cast, audio or group.

Now ; the cast type cast supports both video and audio while the cast types audio and group only support audio.

Reference : https://github.com/home-assistant-libs/pychromecast/blob/master/pychromecast/discovery.py#L211.

from bonsoir.

RaghuMudem avatar RaghuMudem commented on August 17, 2024 1

Hi Skyost,

Thank you for your valuable response and for searching for the information I requested. I appreciate your effort and I will look into the reference you provided.

Thankyou.

from bonsoir.

Skyost avatar Skyost commented on August 17, 2024

Well, it's a little bit off-topic. You may have to deal with the service name or with its attributes, but I can't tell you more since I've never been interested in this question. Sorry.

from bonsoir.

RaghuMudem avatar RaghuMudem commented on August 17, 2024

Hi Skyost,

Thank you for your quick response. I apologize for not conveying the importance of this topic clearly.

We are currently using the library and it works well to detect the devices. However, we also need to know the device capabilities, which is not possible with the service name and properties received from the library. The device name can be different if a third party has integrated the Chromecast in their device.

It could be helpful to have some way similar to android native castDevices methods mentioned here.
https://developers.google.com/android/reference/com/google/android/gms/cast/CastDevice#public-boolean-hascapabilities-int%5B%5D-capabilities

Below are examples of a video device and an audio device:

Video Device

{
   "service.name":"DIW7022-8c80d0745f97d83edd8825c4e7ea3153",
   "service.type":"_googlecast._tcp",
   "service.port":8009,
   "service.attributes":{
      "bs":"FA8F6C9F4A95",
      "cd":"F57B7061D22CDF749CAFC29C0A5DBD8A",
      "rs":"",
      "st":"0",
      "md":"DIW7022",
      "fn":"Desk-A",
      "nf":"1",
      "ic":"/setup/icon.png",
      "id":"8c80d0745f97d83edd8825c4e7ea3153",
      "rm":"8EC0B0432CB99D7C",
      "ca":"266757",
      "ve":"05"
   },
   "service.ip":"192.168.*.*"
}

Audio Device

{
   "service.name":"Google-Nest-Mini-f085fd9042490e01a04233c8bf333778",
   "service.type":"_googlecast._tcp",
   "service.port":8009,
   "service.attributes":{
      "bs":"FA8FCA78A8D0",
      "cd":"5810A9FF37B193370398E3678764CF83",
      "rs":"",
      "st":"0",
      "md":"Google Nest Mini",
      "fn":"Office speaker",
      "nf":"1",
      "ic":"/setup/icon.png",
      "id":"f085fd9042490e01a04233c8bf333778",
      "rm":"",
      "ca":"199172",
      "ve":"05"
   },
   "service.ip":"192.168.*.**"
}

For security reason, I have changed the ip address in the above response.
It would be appreciated if you could give us a clue on how to differentiate the video and audio capabilities of the devices.

Thank you.

from bonsoir.

Skyost avatar Skyost commented on August 17, 2024

No problem 👍

from bonsoir.

dgilperez avatar dgilperez commented on August 17, 2024

@RaghuMudem hi! did you ever set this up working for chromecasts or other video-audio devices? If so, did you open source it or would you be open for that? I am looking for solutions in this line and Bonsoir looks a great option to me ...

(sorry for continuing the slight offtopic)

from bonsoir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.