PRProd / HA-Firemote

Apple TV, Amazon Fire TV, Chromecast, Homatics, NVIDIA Shield, onn., Roku, Xiaomi Mi, and Android TV remote control card for Home Assistant
GNU General Public License v3.0
524 stars 72 forks source link

[New App Shortcut]: Magenta TV #58

Closed ChristophCaina closed 1 year ago

ChristophCaina commented 1 year ago

App Name

Magenta TV (German IP TV Streaming App)

Device Platform

Android TV

Is this app downloadable through you device's "store" app?

Optional Comments

The Magenta TV App is an IP TV Streaming application provided by the "deutsche Telekom". Magenta TV is part of the Internet Serivce provided by the telekom - and usually you will get a receiver from the telekom. But it is also possible, to install the same app on any other android tv based device... This would allow you to reduce the amount of devices, since you don't need to implement another device which is usually not possible to integrate into smarthome systems like HomeAssistant.

Link to the App: https://play.google.com/store/apps/details?id=de.telekom.magentatv.atv&gl=DE

PRProd commented 1 year ago

No matter what I do, I can't seem to be able to download this app for testing in my country. (US) I'm going to need your help. Could you please follow the instructions here and post the results? The information there will help a lot. Thanks.

ChristophCaina commented 1 year ago

here we go :) but pls. remember the issue I currently have with the "emby" app ;)

source_list:
  - Android TV Launcher
  - Spotify
  - Prime Video
  - Google Cast
  - Magenta TV
  - Emby
  - Netflix
  - Jellyfin
  - Play Store
  - YouTube
volume_level: 1
is_volume_muted: false
adb_response: >-
  mSurface=Surface(name=de.telekom.magentatv.atv/tv.accedo.xdk.dtag.MainActivity)/@0x44539ae
        mSurface=Surface(name=com.android.systemui.ImageWallpaper)/@0x242014e
hdmi_input: null
device_class: tv
entity_picture: >-
  /api/media_player_proxy/media_player.android_tv_192_168_52_73?token=a1a1dac6014c8cb9c0b5bf54651689dddfd1396ddd6d2843bad3b9d9d7e357f3&cache=1679938249.401256
friendly_name: Android TV
supported_features: 23997
PRProd commented 1 year ago

Yeah, I remember. :smile: We might end up having a few conversations about this, unless we get lucky and the integration just needs to be rebuilt as I suggested.

PRProd commented 1 year ago

Version 2.1.0-beta2 contains the new app shortcut, and is ready for you to test!

PRProd commented 1 year ago

From #55

tested App-Shortcut on Nokia Streaming Box (runniing as shield TV Pro 2019)

  • Jellyfin: OK
  • Netfilx: OK
  • Prime Video: OK
  • Emby: failed
  • YouTube: failed
  • MagentaTV: failed

Bummer. Sorry about the hassle, it's tough to do this without direct access to the same device that you are using. I will try a different strategy for the Magenta app and include it on the next release (either beta or official). I'll let you know when I have something for you to try.

ChristophCaina commented 1 year ago

no worries :) I'll looking forward to contribute with testing :) it's fine for me, since I can't contribute with code...

PRProd commented 1 year ago

v2.1.0-beta3 is ready for you to download and test. Let me know if I've guessed correctly for you on this one and it magically works now.

ChristophCaina commented 1 year ago

sorry - the same as for emby... still not working. After removing the card completely and reinstalling it, I will try it again...

Never mind. I know that my hardware is still not supported and testing with an app that you don't get in the US might be tricky... ^^ If you want, you can provide me some further information what I could test with the adb command shell?

EDIT / UPDATE: No change for "Magenta TV" after uninstalling the card and readding it. Device: Shield Pro 2019

PRProd commented 1 year ago

Hmmm... this might get tricky. Let's try a few things, and hopefully we can get somewhere like we did with emby. Let's try these launch commands to see if any of them will make Magenta TV start up:

Developer Tools -> Services -> Android TV: ADB command

adb shell am start -n de.telekom.magentatv.atv/tv.accedo.xdk.dtag.MainActivity
adb shell am start -a android.intent.category.LAUNCHER -d -n de.telekom.magentatv.atv/tv.accedo.xdk.dtag.MainActivity
adb shell am start -a android.intent.category.LEANBACK_LAUNCHER -d -n de.telekom.magentatv.atv/tv.accedo.xdk.dtag.MainActivity


If those don't work, I'll want to see another data dump

adb shell dumpsys package de.telekom.magentatv.atv

post the response to this command which you will find under 'attributes' in the STATES tab


If the data you see there seems to contain an error or two that look like "Unable to find package: de.telekom.magentatv.atv", then I'll want you to run this command and post these results instead

adb shell pm list packages -f
ChristophCaina commented 1 year ago

OK, it seems that all three commands have worked :)

PRProd commented 1 year ago

HOORAY! ...now I have to admit something. In Beta 2, I did have the correct command written to launch the Magenta app, but looking back at it now, I called it in the wrong way which is what sent us down this path. I'm very sorry about that.

I can't remember who said it, but I've always liked the quote "Computers are dumb. They only do exactly what you tell them to do, not always what you want them to do."

I'll be sure to get it done the right way in the next release. Thanks for your patience!!

ChristophCaina commented 1 year ago

no worries :) I also have still several other topics on my "to integrate in HomeAssistant" list... so I can utilize the time on other projects ;)

PRProd commented 1 year ago

New release v2.1.1 is now available for download which finally includes a working button for Magenta TV. Enjoy!