Coder Social home page Coder Social logo

Comments (6)

terrabythia avatar terrabythia commented on September 15, 2024 1

Didn't know about the eureka_info way to get the device's info. Seems to be a better fit for this use case, since it's JSON and not (annoying) XML and we can also specify which params we would like to have returned.

Updated the code to use eureka_info instead of device_info.

from dart_chromecast.

NBTX avatar NBTX commented on September 15, 2024

In order to get information about your device, the library makes an HTTP GET request to http://${host}:8008/ssdp/device-desc.xml. The result you're getting is an invalid response.

I recommend printing info.address and then making the GET request in your browser, substituting the printed address into the above URL. If you still can't determine the cause of the issue, I recommend you post the response here.

from dart_chromecast.

holyspidoo avatar holyspidoo commented on September 15, 2024

From the browser, I can easily get info from /setup/eureka_info but never from /ssdp/device-desc.xml

from dart_chromecast.

NBTX avatar NBTX commented on September 15, 2024

Okay I've done some digging and found some unofficial documentation (https://rithvikvibhu.github.io/GHLocalApi/#device-info-eureka-info-get) - it looks like the library can be adapted to use /setup/eureka_info (which works on my Android TV device too - out of interest are you using an Android TV or Chromecast?)

For reference, the URL I've crafted that can act as a substitute is: http://${host}:8008/setup/eureka_info?params=name,version,detail.icon_list,device_info.manufacturer,device_info.model_name

I'll try and sort out a PR to the repo. Not sure how active the maintainer is.

from dart_chromecast.

holyspidoo avatar holyspidoo commented on September 15, 2024

For model name and friendly name, there is no need for eureka_info since we already have the attributes bundle to decode? You can look at how I did it in:
cast_device

from dart_chromecast.

holyspidoo avatar holyspidoo commented on September 15, 2024

Also, just a heads up, I've noticed that POST requests to Eureka device dont' seem to work with HTTP library, I had to use DIO to get those to work (for GET it doesn't matter). Took me far too much time to find out :)

from dart_chromecast.

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.