Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Some new found endpoints to document #103

Open
elupus opened this issue Feb 9, 2021 · 5 comments
Open

[FEAT] Some new found endpoints to document #103

elupus opened this issue Feb 9, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@elupus
Copy link
Contributor

elupus commented Feb 9, 2021

Is your feature request related to a problem? Please describe.
I found some new endpoints that might be worth documenting. No idea what they are, but wanted to write them down:

/6/context

{'data': 'NA',
 'level1': 'WatchExtension',
 'level2': 'Playstate',
 'level3': 'NA'}

/6/channeldb/servermapping/X

'channelList': {'id': '1', 'version': 8}, 'channels': [], 'version': '-2'}

/6/channeldb/tv/channelLists/{channel_list}/{ccid}/logo

PNG image for channel. Strangely there exists logos's for applications on some ccid's 

/6/recordings/list

{'recordings': []} # don't have anything recorded so can't say how it looks

/6/recordings/refresh

Unsure. probably a post request

/6/reminder/list

{'recordings': []} # don't have anything recorded so can't say how it looks

/6/input/textentry

Unsure. I would expect a post of text entry data

/6/input/pointer

{'status': 'disabled'}

/6/input/onscreenkeyboard/visible

{'visible': 'hide'} # probably also postable

/6/companionlauncher/launch_request_details

Unsure. might need device_id and msg_id data

/6/companionlauncher/launch_response

Unsure. Empty here, likley linked to above

/companionlauncher/registration


@elupus elupus added the enhancement New feature or request label Feb 9, 2021
@idantene
Copy link

idantene commented Jun 5, 2022

@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?

@elupus
Copy link
Contributor Author

elupus commented Jun 5, 2022

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.

@eslavnov
Copy link
Owner

eslavnov commented Jun 6, 2022

@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).

@idantene
Copy link

idantene commented Jun 6, 2022

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!

@Misterke
Copy link

Misterke commented Jul 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants