Xiaomi Gateway Integration

Battery level seems to work.

I upgraded, but where do you see battery levels in Mi home app?

You can’t, but you can see battery levels in Home Assistant now.

Thanks, merged it now.

I don’t. I see them in the network traffic broadcasted from the gateway.

Does anyone have issues with motion sensor after update?
My constantly reports motion.

Hurray! New firmware! New features for power sockets (zigbee):

aqara | INFO:mqtt:Publishing message to topic home/plug/heater/inuse: 1.
aqara | INFO:mqtt:Publishing message to topic home/plug/heater/power_consumed: 167.
aqara | INFO:mqtt:Publishing message to topic home/plug/heater/load_power: 14.
aqara | INFO:mqtt:Publishing message to topic home/plug/heater/voltage: 3600.
aqara | INFO:mqtt:Publishing message to topic home/plug/heater/status: on.

Audio playback is working too =))
{ “cmd”:“write”,“sid”:“f0b429aa1463”,“data”:"{“mid”:21,“key”:“793c04b3a56fb8b384f553dd45cfce74”}}

Fantastic, managed to get battery level working.
How would one play audio from HASS to it?
Does it only playback built-in sounds?

nice! thanks

I am running HA in a Docker container on my Synology Diskstation.
Where should the component folder go to?
So far I have mapped .ssh, config, local and scripts folder.

But I couldn’t find info, where the custom components should be located.

path to HA dir /custom_components

what is this for?

DId you managed to make it work with a custom (mp3, wav) audio file?

Thx for the answer! Does it mean, I have to map a volume to /custom_components and put the files from lazcad git-repo into that mapped folder?
I did and still get the error:

  • Component not found: xiaomi
  • Setup failed for xiaomi: Component not found.

My home assistant dir is ~/homeassistant (/home/user/homeassistant)
My docker run command is:

docker run -d --name=“home-assistant” -v /home/user/homeassistant:/config -v /etc/localtime:/etc/localtime:ro --restart=always --net=host homeassistant/home-assistant

This is what I did to install xiaomi from raves github.
Note that (i think) we need to move the files around a bit as in github the component is buried in dir homeassistant/component, but the files need to be in custom_components dir

cd ~/homeassistant
sudo mkdir custom_components
cd custom_components
sudo git clone https://github.com/lazcad/homeassistant
sudo mv homeassistant/components/* .

If you like you can also remove homeassistant/components dirs to keep it tidy in your custom_components dir.

need to restart HA after this of course.

Didn’t try - but you must upload custom file only with mi home app (i haven’t little file on my phone and I can’t upload big file, like mp3 song to device), you can’t specify file url to play =(

you can play sounds on xiaomi gateway =)

@monster1025 Am I correct to assume that you see this in the API, but there is not yet support for audio playback in the HA component? For sure I dont think I can see any (e.g) media_player component for the gw.

also cast? Or just mp3 or?

Thank you @hijinx !

I am a Linux newbie and used Docker so far only with the nice synology Docker UI.
But from what you described, I doubt that can be done from the UI only.
So I guess I need to learn how to connect to Synology using PuTTY.