Xiaomi Gateway Integration

It seems like @rave has gone MIA again, doesnt look like we are going to see an integration any time soon :frowning:

Quick question, the AirCon companion plug how behave when there is already a gateway?
because I already have a gateway with some xiaomi sensor and a hue setup connected to home-assistant, everything work fine apart from my osram smart plug (connected to hue) that for some reason started to behave strangely:

  • give a not reachable status on hue, but can be controlled
  • from hass I can turn it on with a xiaomi button but not off

So I tought to replace that plug with a xiaomi smart plug, but I prefer a 16A device and the AirCon Companion seems a good replacement, but I don’t understand if it’s another gateway or can be used like another smart plug

Hello to everyone,

I just thinking to monitor if iron is switch on or off, and i thinking to buy a xiaomi plug, but if it possible, i don’t want put a adapter system, so i’m thinking about aqara wall socket.

https://npirtube.com/wp-content/uploads/2017/03/Aqara-Smart-Wall-Socket-ZigBee.png

But first i need to be sure that this device is possible to integrate with HA. Please can someone tell me this?

I know that xiaomi smart plug (zigbee) version is possible to add, but just amb asking about version that i put above, and in my HA configuration, now, i’m using the xiaomi gateway + yeelights.

thanks

Hi,

You can add the yeelight by two way:

  • by gateway (yo lo tengo así)
  • by HA configuration

Found the solution for my problem - I case someone else does the same mistake, I wanna post it here.

I only have one gateway but I added the sid AND the key to my config. Looks like that this is not working. After deleting the sid, I’m able to switch on the light on my gateway…

You can’t use the AirCon companion plug in HA at all, it has a build in gateway but there is currently no way to enable the local mode and/or recover the key needed to talk to it. you can only control it via the mi home app. Furthermore, the AirCon companion plug does not behave like a “Plug” type device, it does not switch off power when you turn it off, instead it send an infrared signal to shut off the AirCon and ask the AirCon to shut itself.

1 Like

Ok thanks, so I need to buy “standard” xiaomi smart plug adapters if I want to replace the osram one (which electrically I trust more)

@rave did some refactorization of the code a week ago https://github.com/lazcad/homeassistant/commit/806d6cd4f4fa131394771199208236aa43042020

Still did not find a way to make dubale click with ha for the Xiaomi wireless button :frowning:

if any one can share me the code he use i be happy, i just want to active the alarm via HA and not go to the button every time.

Thanks!

i did it like this and did not working.

- alias: Start alarm
  trigger:
    platform: event
    event_type: click
    event_data:
        entity_id: binary_sensor.Switch_158d00013f9734
        click_type: double
  action:
    service: switch.toggle
    entity_id: light.gateway_light_286c07859fe7

I’ve taken apart more than 10 xiaomi smart plugs. (to rewire and hide inside walls) They seem to be of pretty decent quality. There is a resettable 10A fuse inside so you have very little chance of overloading them.

1 Like

Do you doc it how you make it?

Could you please share how you do it? Photos maybe?

Sure, but I didn’t document it. Will take some photo/video and share the process next time I do it.

2 Likes

Try this instead, because gateway light is identified as such, so you need to use the light service rather than the switch, to turn it on/off:

    - alias: Start alarm
      trigger:
        platform: event
        event_type: click
        event_data:
            entity_id: binary_sensor.Switch_158d00013f9734
            click_type: double
      action:
        service: light.toggle
        entity_id: light.gateway_light_286c07859fe7

Hi,
I’ve just got my hands on a xiaomi temperature sensor and while it’s visible and workingin the xiaomi app via the Xiaomi gateway, it’s not visible in HA.
All my other Xiaomi stuff is working fine, is the temperature/humidity sensor autodetected or do I need to configure something for HA?

to use as rele for dumb switches, or? SO you can use both zigbee and manual switches???

can you post a picture? MAybe just the picture of how it is installed now

is it the square model or the round model?

yes please that would be very cool. Great idea!

Its the square model, I thought the round one was the new one that might not be supported yet?

it’s opposite