Manage Xiaomi MITV emulating the remote control as it is an android bluetooth device


I’m new to Home Assistant, but I’ve knowledge about computers/devices/programming and this stuff.

I’ve a Xiaomi tv at home and I’m interested in controlling the TV from my home assistant via scripts and automation in general. But, in order to implement this functionality first the devices must be recognized by ha.

The first problem I faced is that in order to interact with the TV I need to enable ADB “Android Debug Bridge” and I have the feeling this is NOT the right way to go. Why shall I enable debugging of my TV device if all I want is to manage the volume, change the selected channel and turn it ON and OFF. Of course I’ve been able to install ADB in my TV-Box and I managed for the TV to be recognized by HA, but there are several collateral things unresolved starting with the fact that I can’t simply turn ON/OFF the TV.

On the other hand, the TV can be fully controlled by the remote control. It is a simple Bluetooth device paired with the TV. And the remote has all the functionality I need.

I’ve been exploring if there is a kind of “Android Remove TV” emulator integration available but I find nothing.

The entire purpose of this thread is to:

  1. Share experiences and ideas about this path.
  2. Share and collect other threads with information useful for this purpose.
  3. Develop or help develop a more simple mechanism to get access and control over devices at home, not linking directly with the device (it might not have internet connection at all) but via their own remote controllers or emulators of the remote controllers.

Any help is welcome. I’ll try to post here links to the documentation.


1 Like

Pointers to documentation for reference:

Google TV Pairing Protocol

Android TV overview

Anymote Protocol

Today I got a new Xiaomi TV.
Unfortunately I’m unable to turn it on or off by using Home Assistant.
I was able to cast a video from an url and control volume but if the tv is off, I can’t do anything to wake it up.
I went to enable the odb debugging options and it’s only available for USB, not that useful when you have a WiFi TV 10 meters away from the home assistant server.

Seems like we’re out of luck with this brand

I just found out I can turn on the TV by using wake on lan feature after enabling it on developer options!

Hi guys… same issue here.
Have you figured out a solution?

I’m using Xiaomi MI Stick and via ADB command it never powers ON… just by BT remote control.

To power off the SLEEP or POWER ADB commands works, but to power on just by remote control.

Any thoughts?

I have the xiaomi tv with build in chromecast. it can be turned on off from ha. i installed android remote app from apps store on my tv. I use powerline adapter for net connection to router. To stop tv from going into deep sleep I use binanry sensor

- platform: ping
  name: Android TV
  count: 1
  scan_interval: 15

Thanks for your solution! The problem here is that it will continue to heat and consume, as it if it was reproducing.

I think a good solution would be bluetooth pairing with Mi Box S to emulate a second remote in order to wake it up, as the title suggested. Unfortunately I haven’t found how to do it.