Hello, until recently my “Xiaomi Mi Box 4S” was pulled into my HA as a media player, but now it is no longer displayed. I do not know why. I have not changed any settings. HA runs on my RPi in version 0.105.1 The “Mi Box” keeps getting new updates, but I suspect that this is not the cause of my problem. I have integrated the “Mi Box” via the ADB addon, there is also no error message in the logs
The integrated Chromacast of the “Mi Box” is displayed in HA. Android 9 is installed on the “Mi Box”. Can someone give me a tip or help? I would be grateful for that.
greetings
The main reason they disappear is because the Box is off or was off when HA booted. The box needs to be on all the time in order to work and getting a mibox to do that is a real challenge. I have CEC switch off so nothing else can close it down, the wavelock app installed to try and force the box to stay awake, but it still goes offline occasionally. There is no WOL capability on the Mi Box 4s.
Ok, I get you and my problem is different and can u you help with this if you know?
I cannot connect my MI box s to home assistant through ADB addon. I tried everything and can’t figure out whats the problem is and pinged you here
I am running my HA in raspberry pie 4(hassos) and my mi box is the latest version running android 9.
My addon says it connected but in HA logs its says
@VolkerKa thank you for replay as you said i tried with port:5555 and 8009 also but no luck. In add-on, it says connected but in home assistant logs it says cannot connect.
Addon logs
[10:49:45] INFO: Starting the Android Debug Bridge server...
[10:49:46] INFO: Connecting to device: 192.168.1.26...
unable to connect to 192.168.1.26:5555: Connection timed out
[10:51:26] INFO: Connecting to device: 192.168.1.26...
connected to 192.168.1.26:5555
[10:52:57] INFO: Connecting to device: 192.168.1.26...
already connected to 192.168.1.26:5555
[10:54:28] INFO: Connecting to device: 192.168.1.26...
already connected to 192.168.1.26:5555
[10:55:58] INFO: Connecting to device: 192.168.1.26...
already connected to 192.168.1.26:5555
Home assistant logs
Logger: homeassistant.components.androidtv.media_player
Source: components/androidtv/media_player.py:227
Integration: androidtv (documentation, issues)
First occurred: 10:50:32 AM (2 occurrences)
Last logged: 10:51:02 AM
Could not connect to Mi box at 192.168.1.26:5555 using ADB server at 127.0.0.1:5555
Ahh OK my misunderstanding. I have no ide why but when I first setup adb just couldn’t get it to work. was confident I’d followed all the steps and all looked good but just wasn’t seeing anything. I uninstalled the addon, rebooted the host, re-installed and it worked.
the adb config is just:
devices:
192.168.1.89
reconnect_timeout: 90
using port 5037
and this is the relevant section of configuration.yaml
media_player:
platform: androidtv
host: 192.168.1.89
name: TV
adb_server_ip: 127.0.0.1
adb_server_port: 5037
This works as long as the Mibox behaves and stays on.
@tachikoma1373 I even tried addon uninstalling, reinstalling, router restart, Hass reboot, reset my MI box but no luck
So I thought why not try with other android box! One of my friends have firestick so tried with that and it worked for the first time. After that, I tried with my MI box but same repeats it doesn’t show in Home assistant and now if I tried to connect back firestick even that is not connecting.
I don’t know how my problem will be solved
Maybe I should make a snapshot backup and reinstall a fresh Hass completely and try.
@venkattetali have you tried disabling developer mode on the mibox? Make sure you clear the cache if thats an option, then hard reset the device. then re-enable developer mode and do the set up again. maybe something is messed up at the mi end?
Changing the USB setting to something different from charging was not persisted when I entered the settings again and did not work for me with the MI Box S4.
Instead I just figured out that you need to enable “usb debugging” under the developer settings, and then accept when you short time after get a pop up to verify your setting.
Next time I restated Home assistant, it succeeded connecting to the MI Box by a media player defined using the androidtv platform.
Finally, i have been struggling with this for several weeks now