Devices like Fire Stick

I just got an Android TV and am working on a remote control for it. How is the delay time in sending ADB commands via Home Assistant? I’m trying to figure out if I should go that direction or something IR based. I see there is plenty out there on python and ADB commands.

It’s probably 750ms delay. I used IR for most commands and ADB for things like starting Netflix

Hm ok - that’s pretty significant for functions like volume. Not a problem for starting apps.

So something like a Global Cache would be better it seems.

I wonder how apps like these work:

It’s so significant that I stopped using all Fire devices. Even the IR has a slight lag.

Ehh that’s not great. Ok, thanks for the info.

I am going to keep Googling around to see how some of those remote apps work, because I have not seen that much delay with them. So there must be something else they’re doing.

Hi, if i have global cache can i control firestick wit IR. can you explain how to control firestick through IR, what are the resources i need for that
If you don’t mind can you guide me from the beginning…??

Hi,

I see there are a couple of options posted here, FLIRC and IRUSB. I assume they accomplish the same thing although the IRUSB looks like it uses a seperate app to handle the incoming ir… does this mean it is simply using the ADB functions that are online? There is a video showing only a tiny delay with the IRUSB but I see Greg gave up because of the delay. Also is there now codes for the home and back etc? The latest IRUSB looks different now so I wondered if theyd added the codes for the missing buttons?

John

Hi,

For those still interested in this is I’m using the ireusb option and y cable for Ethernet and I have managed to find all the remote codes (including home, context and back). So the remote works properly with IR and no need for adb.

John

1 Like

Hi All,

After reading this it sounds like people are using the IR receive functionality on the IRUSB to control their FireTVs. I presume somebody else has also figured this out, but I am actually using the IRUSB and controlling the my FireTV over IP with no delay because it doesn’t go through ADB either. I have also been able to implement long press functionality using this method as well as a full QWERTY keyboard on my homeremote project to control the FireTV. I really can’t hardly tell any difference in performance vs the FireTV remote. If anybody wants to see the plugin that I wrote to do this, let me know and I can share.

Steve

Hi Steve,

I would be interest in seeing the plug-in. Can you share please?

John

Hi Steve.
I am also intresterd to see the plugin.
Thanks.

Hi - Ive just realised you are using the videostrorm IRUSB which plugs into the USB port on the firetv and has access to the IP of the device. I am using the inteset IREUSB which intercepts the ir signal and tranlates to an understandble command for the firestick. I think they work in 2 different ways - I would assume the plugin wont work for me - although still interested to see it.

John

Hi John,

You are correct, I am using the video-storm IRUSB device which was initially referenced in the old google groups forum a couple years ago. The device is a bit expensive for what it is, but I will say that it works. It can perform all of the standard button commands as well as launch applications. I have attached a project as well as the plugin itself, the commands in there may not line up exactly with the standard homeremote commands because I have gone a different direction than the standard tiles for my media control system, but I tested the project I uploaded on my system and it does work, although I am not certain that the “Wake” command will actually wake a sleeping firetv from the standard tile, although I did add the command in case the standard tile would. I wanted to include the project so everyone could see how I implemented the long press. I know that has been mentioned a few times in the forums and I was really happy to be able to figure out a way to get it to work. I should mention that if you do have a IRUSB, I did have to upgrade the firmware on mine before I could get the long press commands to work. I am not a programmer at all, so the code may be a bit messy and I would welcome anyone to make improvements to it.

Steve
IRUSB.plugin (6.5 KB) FireTV.hrp (898.1 KB)

Hi @kskok68 I’m trying to get the video storm device set up with your plugin. Using the default port resulted in a refusal by the device to any request. I tried ports 8009 and some others but found that port 5555 does not give any error messages back in the console log. However, the firestick also does not respond to any commands sent. Any ideas what I need to do here to get this working?

@WannaBe sorry if it’s a dumb question, but did you change the ip address in the settings of the device?

@gregkinney Yes, I did find the address of the device and changed it in the plugin. My problem is I was trying to get it to work without installing the IRUSB app on the Firestick. I figured that I needed an Android phone or tablet to install it on, not realizing I should have installed the app directly on the Firestick. Once I installed the app, updated the firmware, and gave permission to the device, it worked fine with Steve’s custom xaml shown in his FireTV.hrp file. Now I’ve got to figure out how to get the cursor pad centered on the screen on smaller devices. It looks good on an ipad, but it is over to the right side of the screen and encroaching on the bottom buttons with an iphone. So I don’t think it was set up to be used on multiple device screens. What grid settings do I need to look at to fix that? I don’t really have a clear understanding of how the settings work to make the GUI flexible. I may just try to move the buttons over to the standard media controller xaml.

@WannaBe I can’t be much of help with that, glad you got it working.

Hi @gregkinney I was able to get the grid issue worked out. There were a bunch of excess grids on that page. Once I deleted those and fiddled with the auto width settings, the cursor pad is now centered whether on ipad or phone. Now I’ve got an intermittent disconnect of the Firestick. It will work fine for a while, but then it will disconnect for some reason. I can either turn wi-fi off/on on the phone or even waiting a while seems to allow it to reconnect. Any ideas on what that is? It only seems to affect the firestick. I can still control my Denon and others via TCP when that happens. The specific error message is “Unable to read data from transport connection. The socket has been shut down.” And then “TCPClient is not connected.”

I saw this piece of code in someone’s plugin recently in the onChangeRequest function, right before a command was to be sent, maybe it will work:

if (tcp.IsConnected == false) {
    onConnect();
} else if (tcp.available == 0) {
    onConnect();
}

I have added it to the plugin, let me know how it goes.
IRUSB-21-12-02.plugin (7.4 KB)

1 Like

Thank you @gregkinney, that change to the code seems to have fixed the issue.