Android TV failed to add on 2022.02

Hello everyone!

After update to 2022.02 Android TV integration moved to config flow.
My FireTV entity got automatically removed from system, and didn’t appear in Integrations.
When i disabled it in yaml, rebooted, and tried to add via UI, i got error:

Impossible to determine a valid unique id for the device

No errors/warnings in log.
What could go wrong?

My old config:

media_player:          
  - platform: androidtv
    exclude_unnamed_apps: true
    name: Fire TV
    host: 192.168.#.#

Thanks in advance!

UPD Tried to do same from test instance of HA, guessing, that maybe it’s ADB key issue. But after enabling ADB debugging on FireTV upon integration request, got same error in HA.

Hi guys.

Absolutely the same for me.
It used to work with manual configuration in YAML, but now it doesn’t.

Aborted

Impossible to determine a valid unique id for the device

System Health

version core-2022.2.0
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.10.92-v8+
arch aarch64
timezone Europe/Warsaw

Home Assistant Supervisor

host_os Debian GNU/Linux 11 (bullseye)
update_channel stable
supervisor_version supervisor-2022.01.1
docker_version 20.10.12
disk_total 117.1 GB
disk_used 14.5 GB
healthy true
supported failed to load: Unsupported
supervisor_api ok
version_api ok

Same Problem here, no chance to get this working again

Unique ID changed from serial number to MAC address with 2022.02:

Take a look at your Android TV MAC addresses. Maybe you’ll find the reason there.

Thank you for digging this out!

Well, this is not really good to declare full compatibility and easy transfer of configuration, while changing functionality in parallel and without proper testing. :slight_smile:

Since stick is in the network, it definitely has MAC.
So looks like the problem is in getting it.
Will check integration code to see, how does it try.

So the integration relies on “androidtv” library, which returns dictionary with properties, including ethernet and WiFi MAC addresses. I believe, in our case for FireTV stick neither of them are present in response.

It also does not work with the KSTB6020 Android TV box, giving the same error… is there a workaround?

Not yet.
We have discussion about issue here:

1 Like

So looks like problem is in LAN connection. When i connected to WiFi, everything worked fine.

As temporal workaround, i connected to both WiFi and ethernet, to acquire WiFi MAC.
And connected integration successfully via Ethernet IP.

Will be waiting for persistent fix.

That’s interesting. Unfortunately, my android TV box does not offer the possibility to connect over WiFi, although it might have hardware inside. I guess it is factory disabled. I’ve finally got rid of the troubles with HDMI-CEC and automated power on/off of AVR, TV, ATV with a single press of the button. Let’s hope it will be fixed soon. Thanks for reporting the bug.

Yeah, that’s bummer for those who can’t connect WiFi.
Let’s hope that fix will be introduced ASAP.

1 Like

I just did the 2022.2 upgrade, and for my FireTV Cube, there wasn’t any issue with the upgrade.

As an FYI…
Before upgrading I came across this thread and did some digging around to see how the mac address is retrieved. It appears the library uses the adb shell command ip addr show eth0 | grep -m 1 ether and the command ip addr show wlan0 | grep -m 1 ether.

You can check to see how your device responds:
If you go to the dev tool->services and select the “Android TV: ADB command”, choose your device and for the command, cut-n-past one of the ip addr show .... commands and click “Call Service”, then go to dev tool->States, scroll down to find your device and look at its attribute adb_response. It should show your device mac address, something like: link/ether YOUR:MAC:ADDRESS brd ff:ff:ff:ff:ff:ff

I can confirm, that both commands do show correct and different MAC addresses.
I can suggest, that when WiFi is not enabled, Ethernet mac is also missing.

Turned off WiFi. Device still works fine, and eth0 returns correct mac.
wlan0 says that device does not exist. Expected.

I wonder, what happens before turning WiFi on…

New update addresses this issue.
Can someone try on non-working device please?

Release 2022.2.2 fixed it for my device Nokia Streaming Box 8000

i also had initially some issues getting it working but 2022.2.2 had solved it, but i had to deactivate and reactivate the ADB Debugging in the FireTV user options to get it working

I cannot configure Android TV (Amazon Fire TV) after update to 2022.02.

Here it is my old configuration:

media_player:
  # Use the Python ADB implementation
  - platform: androidtv
    name: Fire TV
    host: 10.11.12.110

It’s automatically discovered in HA, but when I press configure button in integrations and I add the host IP (10.11.12.110), I get an error message Failed to connect.

I’ve checked that port 5555 is opened in Fire TV.

try to deactivate and reactivate the ADB Debugging on your FIreTV worked for me

2 Likes

It worked!
Thank you!

1 Like