Code Monkey home page Code Monkey logo

Comments (5)

elupus avatar elupus commented on July 22, 2024 1

You can extract the xtv.apk package from an android tv and dissassemble it. You get most sourcecode back.

There is no endpoint for hdmi source sadly. Should be possible to get if one writes their own android app thou.

You can trigger a switch to hdmi source using an intent.

from pylips.

idantene avatar idantene commented on July 22, 2024

@elupus How did you find these? I'm trying to dig and see if there's an endpoint (or via Android) to get the current HDMI input. Are you aware of any such functionality?

from pylips.

eslavnov avatar eslavnov commented on July 22, 2024

@idantene, I agree with @elupus: there are no HDMI source endpoints and writing your own Android app is probably the best way to get this info reliably.

Alternatively, you can write a simple script to query the system logs via adb:
adb shell dumpsys activity starter | grep -o "HW[0-9]" | head -n 1 - this will return something like "HW1" or "HW9" depending on which HDMI source is active. The only downside is that this gets written only when you change a source (so if you turn on the TV without changing the source it won't return anything).

from pylips.

idantene avatar idantene commented on July 22, 2024

Thanks @elupus and @eslavnov!

The adb solution was what I had so far - it is unfortunately also unreliable if you change the HDMI source via other interactions (that is, the HW[0-9] works fine if the input is changed via the remote, but does not if it is changed via HA's media_player component).

But alas - if it is not available by default, I will make my own workarounds within HA 👍🏻 Thank you for your suggestions and time!

from pylips.

Misterke avatar Misterke commented on July 22, 2024

Thanks @elupus and @eslavnov!

The adb solution was what I had so far - it is unfortunately also unreliable if you change the HDMI source via other interactions (that is, the HW[0-9] works fine if the input is changed via the remote, but does not if it is changed via HA's media_player component).

But alas - if it is not available by default, I will make my own workarounds within HA 👍🏻 Thank you for your suggestions and time!

Has anyone meanwhile found a way to know what source the TV would be on? Seems pretty ridiculous that this basic functionality is hidden so far away.

from pylips.

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.