Comments (5)
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.
@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.
@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.
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.
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, theHW[0-9]
works fine if the input is changed via the remote, but does not if it is changed via HA'smedia_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)
- [FEAT] Docs on pairing protocol HOT 22
- [FEAT] control volume via HDMI / CEC HOT 3
- 65pus6703/12 cannot pair[BUG] HOT 3
- [BUG] IP blocked by TV HOT 1
- 2020 Android TV Ambilight "lounge lights" doesn't respond[BUG] HOT 2
- 'PowerON' failure HOT 2
- [BUG] set_channel command not working
- [FEAT] Switch Picture style HOT 1
- [BUG] Pairing process fail on android TV 8 (55OLED803)
- [FEAT] Using pylips as a python module? (+ Ambilight colour control) HOT 1
- Ambilight + Hue configuration endpoint HOT 1
- [FEAT] Open Browser at URL
- Ambiligt missing modes HOT 1
- [BUG] 2020/2021 support hack?
- [BUG] Port 1926 not opened 43PUS7956
- [help request] Google assistant CURL command
- sending letters as for keyboard HOT 1
- 55PUS8007[BUG] HOT 6
- [BUG] "TypeError: option values must be strings" when writing apiversion to config HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylips.