Yes and no. It did work in the beginning. Then I started home assistant and tried tinkering around a bit since I got that error message and suddenly it stopped working. I could still hit adb connect ip
and it would tell me that it connected successfully, but it didn’t show up in the devices list and I couldn’t shell into it anymore.
Then I’ve turned the adb option off and on again in the Fire TV settings and voila, it worked again, so I was able to open a shell. Then I restarted home assistant, and now I get a different error message:
Update for media_player.feuerglotze_2 fails
17:50 components/media_player/firetv.py (ERROR)
Couldn't connect to host: [ip]:5555, error: Broken pipe
17:50 components/media_player/firetv.py (WARNING)
The first error has a trace assigned to it:
Traceback (most recent call last):
File "/home/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
await self.async_device_update()
File "/home/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/lib/python3.6/site-packages/homeassistant/components/media_player/firetv.py", line 105, in _adb_wrapper
returns = func(self, *args, **kwargs)
File "/home/homeassistant/lib/python3.6/site-packages/homeassistant/components/media_player/firetv.py", line 201, in update
if not self.firetv.screen_on:
File "/home/homeassistant/lib/python3.6/site-packages/firetv/__init__.py", line 197, in screen_on
return self._dump_has('power', 'Display Power', 'state=ON')
File "/home/homeassistant/lib/python3.6/site-packages/firetv/__init__.py", line 245, in _dump_has
return self._dump(service, grep=grep).strip().find(search) > -1
File "/home/homeassistant/lib/python3.6/site-packages/firetv/__init__.py", line 234, in _dump
return self._adb.Shell('dumpsys {0} | grep "{1}"'.format(service, grep))
File "/home/homeassistant/lib/python3.6/site-packages/adb/adb_commands.py", line 376, in Shell
timeout_ms=timeout_ms)
File "/home/homeassistant/lib/python3.6/site-packages/adb/adb_protocol.py", line 411, in Command
return ''.join(cls.StreamingCommand(usb, service, command, timeout_ms))
File "/home/homeassistant/lib/python3.6/site-packages/adb/adb_protocol.py", line 438, in StreamingCommand
timeout_ms=timeout_ms)
File "/home/homeassistant/lib/python3.6/site-packages/adb/adb_protocol.py", line 372, in Open
msg.Send(usb, timeout_ms)
File "/home/homeassistant/lib/python3.6/site-packages/adb/adb_protocol.py", line 233, in Send
usb.BulkWrite(self.Pack(), timeout_ms)
File "/home/homeassistant/lib/python3.6/site-packages/adb/common.py", line 332, in BulkWrite
return self._connection.send(data)
BrokenPipeError: [Errno 32] Broken pipe
Maybe something interesting to note: I couldn’t get the “confirm adb connection” screen to show up on my Fire TV. I know that screen from connecting to other adb devices, but here it won’t show up. Probably because I already connected to it a few months ago (if I remember correctly), but yeah… I also couldn’t find an option to reset trusted devices. Would it help to delete the keyfile maybe?
Update: So it turns out, removing the adbkey and connecting to the device again forces it to prompt that dialog again, so I made sure to accept it properly. But unfortunately, that doesn’t solve the problem…
Could not connect to Fire TV at [ip]:5555 using adbkey='/home/homeassistant/.homeassistant/adbkey'
18:05 components/media_player/firetv.py (WARNING)
Couldn't connect to host: [ip]:5555, error: Connection reset by peer
18:05 components/media_player/firetv.py (WARNING)
Thanks
WiFiCable