Xiaomi Gateway Integration

If I recall correctly from the Mi home app if you set the automation:
Gateway light turns on in dark
It says “This function requires an Occupancy Sensor”
Don’t know if they use it as a sort of path light, or compensate the reading with the motion sensor

This is super nice! Just got 2 quick questions

  1. Why the hell this is not in HA already!?!?!
  2. Would it be possible to get support for the Xiaomi Vacuum cleaner (robot) would love that!

Thanks!

You can control the vacuum with https://github.com/rytilahti/python-mirobo

2 Likes

Too sensitive?
Have you tried to cover it with some transparent tape (eventually to be coloured

Apparently the Xiaomi mini plug (Wifi) works the same as the vacuum.

I don’t think anyone has managed to hack it yet.

Hi mates, can some one help me with this automation? I asked on another topic but no one, sadly, answered me :frowning:

I’m trying to bind long press for dim+ an Yeelight but I can’t figure out :confused:
Here there is the link to my post for see the automation:

Cheers!!!

How is it sensitive? It drops just a little when i switch off my lights. Then it doesnt update. So i waited for about 1 minute, switch my gateway light on and i can see the reading drops to 350 from 1190.

It seems that the light sensor does not update it’s values automatically until i switch the lights on or off.

yea. I think so too. they must have used the motion sensor to help the light sensor.

Thanks for sharing!
One more think, for revert you can use:

iptables -nL --line-numbers
this will show the number of each records in every group

iptables -D FORWARD <record number>
Replace with the number of record that you want to remove

Cheers

Hey all. New gateway f/w is out 1.4.1_146
Any reports on new functionality? Or issues?

Just updated the firmware and restarted ha. All good so far.:sweat_smile:

They just use it as a trigger to turn on the gateway light when there is motion and shut it off when no motion is registered for a few minutes.

I see that protocol version updated. Now it’s 1.0.7. I think they’ve changed something in status report message for sensors.My magnet sensor which was not opened for one month now reports status unknown. Maybe ghost issues was solved on FW level.

that would be great

According to the developer of the firmware, this update should include a fix for that!

I imagined that, but I don’t have the motion sensor, but if I enable the automation without the sensor it just won’t work

Where did you get this info? Any link?
It seems is true. My magnet sensor reports close in heart_beats. And I don’t touch it for month or maybe more.

With the Aqara wireless wall switch (dual paddle) you can press both buttons at once. When i do that i see the following in the HASS logs

17-05-10 20:08:58 DEBUG (Thread-5) [custom_components.xiaomi] PUSH >> <Entity Wall Switch (Left)_158d000183f688: off>: {'dual_channel': 'both_click'}
17-05-10 20:08:58 DEBUG (Thread-5) [custom_components.xiaomi] PUSH >> <Entity Wall Switch (Right)_158d000183f688: off>: {'dual_channel': 'both_click'}

However when i try to hook into this event in HASS i have had no joy. See my attempt below

trigger:
    platform: event
event_type: both_click
 event_data:
     entity_id: binary_sensor.wall_switch_left_158d000183f56e

I think support will need to be added at the component level to get this to work as it comes in on the dual_channel & not channel_0 or channel_1 like regular click do.

Nice to hear that it is working better! He told me that in an email. Xiaomi support redirected me to him when I reported the issue.

Yes, it forces you to select a motion sensor