Git Product home page Git Product logo

Comments (25)

clinds34 avatar clinds34 commented on May 14, 2024 2

got it. I was halfway there, but your post put the second part together. I dropped

adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mInputMethodTarget|mSurface'
returned

127|kara:/ $ am start -n ca.bellmedia.cravetv/axis.androidtv.sdk.app.MainActivity
Starting: Intent { cmp=ca.bellmedia.cravetv/axis.androidtv.sdk.app.MainActivity }
Warning: Activity not started, its current task has been brought to the front
kara:/ $ 

Next I ran the following command in shell and Crave loaded on the Fire
adb shell $ am start -n ca.bellmedia.cravetv/axis.androidtv.sdk.app.MainActivity

I would note for anyone else down the road that this command was the one that worked

adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mInputMethodTarget|mSurface'

Interesting rabbit hole for me. I appreciate your help.

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024 2

ok, give me some time and I will come back to you this weekend. That tv is outside and not always able to connect. This presents me with a two birds one stone opportunity...

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024 1

fantastic, v1.8.5 is good.

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

@clinds34 - Maybe it's because I'm in the US, but when I try installing the "Crave TV" app on my device, the download page says "Unavailable". Without being able to download it for myself, it might take a while to get this added. Would you be willing to help me with some testing?

If we are lucky, I'll only need you to do this:

  • Launch the app on your device
  • In Home Assistant, click on Developer Tools -> States
  • Find your Fire TV entity by scrolling, or clicking the "set state" bar, and searching for it
  • Reply to this post with the contents found in the Attributes column or the "State attributes (YAML, optional)" box

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024

Hi - Can verify that the Bell Fibe TV works like a charm. Thank you.

Here are the attributes as requested. I have removed the token. I assume that you can't access due to licensing issues. I hope I haven't created a nightmare for you.

source_list: Crave
app_id: ca.bellmedia.cravetv
source: Crave
adb_response: Starting: Intent { cmp=ca.bell.tv.firetv/ca.bell.fiberemote.tv.MainTvActivity }
Warning: Activity not started, its current task has been brought to the front
hdmi_input: null
device_class: tv
entity_picture: /api/media_player_proxy/media_player.fire_tv?
token=xxxxxxxx
friendly_name: Fire TV
supported_features: 22961

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

Pre-release v1.8.1 is available for testing now. @clinds34 - please let me know how the testing goes.

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024

It is not working on the v1.8.1 version. I get the updated crave button but no action on tv when pressed.

attributes rechecked and same as above if load from screen.

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

Pre-release v1.8.2 is available for testing now. @clinds34 - please let me know how the testing goes.

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024

1.8.2 is not working either

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

Bummer. Thanks for the feedback. I'll see if I can figure out something else on my end.

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

Pre-release v1.8.3 is available for testing now. @clinds34 - please let me know how the testing goes. Hopefully third time's a charm.

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024

sorry not yet. but there was this in the attibutes

adb_response: >-
Starting: Intent { cmp=ca.bellmedia.cravetv/awl.application.MainActivity }

Error type 3

Error: Activity class {ca.bellmedia.cravetv/awl.application.MainActivity} does
not exist.
hdmi_input: null
device_class: tv
friendly_name: Fire TV 192.168.1.198
supported_features: 22961
source: Crave
entity_picture: >-
/api/media_player_proxy/media_player.fire_tv?
token=xxxxxxxx
source_list:

  • Crave
    app_id: ca.bellmedia.cravetv

If there is some enhanced bugging I can do (I have been digging around in ADB app but no luck yet), I would be happy to try to help.

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

If you have an easy way to send ADB commands to your device, that would help A LOT! We can make this happen!

Ultimately, we need to come up with a command that causes the crave app to open and/or come to the top. We have tried two different methods that HA uses to talk to media player devices which didn't work in this case. On the third attempt, we tried to use the following ADB command:

adb shell am start -n ca.bellmedia.cravetv/awl.application.MainActivity

This command actually works for me on my sideloaded version of the crave app... well... sort of. It launches the app, and then the app crashes right away. Sideloading is a dangerous practice, but if you happen to have a copy of the .apk file for the crave app that your device is using, I could take it from there... I'm sure you didn't sideload it to begin with, so I'd assume you don't have the .apk file. Not a problem at all.

Since that didn't work on my end, here's how you can help out: First, open the crave app on your device, and then prepare your ADB tool to send a command to it. run the following command:

adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mInputMethodTarget|mSurface'

In that response, you will see a few clues that might help assemble the final working command. You are specifically looking for something that likely begins with "ca.bellmedia...." then a slash, and then some more. In my testing, I found "ca.bellmedia.cravetv/awl.application.MainActivity" (yours will be different)

The next step will be to send a command containing the thing that you found. You can test this command in two different ways. You can either use your ADB tool that you were talking about, or you can use the Developer Tools inside HA to directly send ADB commands to your device. ( Developer Tools -> Services -> Android TV: ADB command ) You'll ultimately want to send a command that begins with adb shell am start -n and then append the "clue" that you found to the end of the command.

For example: adb shell am start -n ca.bellmedia.cravetv/awl.application.MainActivity (yours will be different)

If you have something that works, then HOORAY! Let me know! If not, you might have to do a little more detective work.

In some more frustrating cases, I've needed to run the adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mInputMethodTarget|mSurface' command over and over and over again while I use my other hand and launch the application on the Fire device. If you're lucky, you might happen to catch one or more intermediate activities that you can try to use in your launch command. It's not always an easy process, but it is satisfying when you finally nail it down. :-)

Let me know if I can clarify anything, if you need help, or if you have some amazing success that we can celebrate together! Good luck!

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

EXCELLENT NEWS! Thank YOU for YOUR help!

I'll push this out in an official release soon. I have a couple of other tasks to attend to first.

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

Release v1.8.4 is now available, which incorporates the correct command for launching the Crave TV app. Enjoy! Thanks again!

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024

sorry there is a stray $ in the command, which is probably my bad

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024

not so fast....

source: Prime Video (FireTV)
adb_response: >-
Starting: Intent { cmp=ca.bellmedia.cravetv/awl.application.MainActivity }

Error type 3

Error: Activity class {ca.bellmedia.cravetv/awl.application.MainActivity} does
not exist.
hdmi_input: null
device_class: tv
entity_picture: >-
/api/media_player_proxy/media_player.fire_tv
token=xxx
friendly_name: Fire TV
supported_features: 22961

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

You don't have the latest version yet... likely a cache issue. The cache can be quite sticky. Your version is still trying to use my older broken command.

I just released v1.8.5 which removed the accidental "$", so it should all be good now. Enjoy!

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

@clinds34 - Out of curiosity, which exact Fire device(s) are you using? Since you have been able to help out by running some ADB commands, maybe you could help with this too?
https://github.com/PRProd/HA-Firemote/wiki/Existing-Amazon-Devices---Support-Chart

No pressure, but any input from the community will only make things better.

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024

happy to help, I have two fire tv 4ks and a Pioneer FireTV which curiously is not on those lists (i think it is manufactured by TCL). That TV is outside and not part of the HA ecosystem.

ediit: turns out it is the Hisense 4k 2022 - which runs on the same Android and Firetv OS as the 4k max.

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

Sweet! I was just going to ask what it responds with when you send adb shell getprop ro.product.vendor.model but now I'm assuming that it returns with AFTHA001 ?

Are you currently able to test that TV with the Firemote card? If so, can you open a new "Device Support Request" issue so I can track it and get it added?

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

@clinds34 - You're the best! THANK YOU!!!!

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024

Here is the state attributes I get after running adb shell getprop ro.product.vendor.model

source_list:

  • ca.bell.tv.firetv
    app_id: ca.bell.tv.firetv
    source: ca.bell.tv.firetv
    adb_response: AFTDCT31
    hdmi_input: null
    device_class: tv
    entity_picture: >-
    /api/media_player_proxy/media_player.fire_tv_192_168_1_156?token=29ee28e1f52f560f3d346fb34508c4f44e398b0400357242dc3234e0b68e5ac7&cache=1669321571.235302
    friendly_name: Fire TV 192.168.1.156
    supported_features: 22961

from ha-firemote.

clinds34 avatar clinds34 commented on May 14, 2024

Using the Firemote firetv 4 series 2021 i am not having any problems controlling the tv.

from ha-firemote.

PRProd avatar PRProd commented on May 14, 2024

Thank you!

From that model number (AFTDCT31), it appears that your TV is actually an Insignia 4K UHD - Fire TV (2020)

I'll add that to the officially supported devices soon.

from ha-firemote.

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.