AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN
https://github.com/AlexxIT/Blog
MIT License
2.44k stars 342 forks source link

Control non Xiaomi Zigbee devices #44

Closed AlexxIT closed 1 year ago

AlexxIT commented 4 years ago

This issue to discuss the feature of adding third-party Zigbee devices to the Mi Home ecosystem.

It is important to understand that only devices similar to Xiaomi devices will work this way!

You must add devices by calling the remote.send_command service with the specified model.

Tested devices:

Zuz666 commented 4 years ago

@AlexxIT impressive! But what means "similar to Xiaomi devices"?

AlexxIT commented 4 years ago

@Zuz666 the device must support the same protocol, have the same number of channels and the same functions as one of the Xiaomi devices. For example, Xiaomi does not have an analogue of a two-channel dimmer. Or a 5 channel relay. But they have relays for 1-3 channels and bulbs with brightness.

l0ckk commented 4 years ago

Try to add led power supply ikea (with wireless reciever) model : icpshc24-10eu-1l-1. in HA detected in eventes as new device ( model: TRADFRI Driver 10W version: 17 zb_ver: 3.0 ) but gateway sounds 3 times...

edicine commented 4 years ago

Tested Müller Licht tint LED 2700-6500 K added as ikea.light.led1546g12 (on/off brightness color temp) https://www.mueller-licht.de/produktinformationen/artikel/404004/

Ikea TRÅDFRI LED- E27 806 lm ww added as ikea.light.led1623g12 (on/off brightness) https://www.ikea.com/de/de/p/tradfri-led-leuchtmittel-e27-806-lm-kabellos-dimmbar-warmes-tageslicht-warmes-tageslicht-rund-opalweiss-90408797/

AlexxIT commented 4 years ago

@l0ckk Are you adding through the remote.send_command service? I think the model ikea.light.led1623g12 will be suitable.

l0ckk commented 4 years ago

@AlexxIT Trying to add this code to automation.yaml, but when i check configuration HA flashed an error ( Invalid config for [automation]: [service] is an invalid option for [automation]. Check: automation->service. (See ?, line ?).) What i'm doing wrong? New to HA....

AlexxIT commented 4 years ago

@l0ckk check demo video in readme. You can call service from GUI

l0ckk commented 4 years ago

@AlexxIT thanks!

kkmaslowski commented 4 years ago

You can also add Ikea tradfri outlet to supported devices (https://www.zigbee2mqtt.io/devices/E1603_E1702.html). No power meter, only on/off. Paired as lumi.plug.mmeu01.

ANS-spb commented 4 years ago

Aqara Smart Plug EU (SP-EUC01, lumi.plug.maeu01) paired as lumi.plug.mmeu01. No power measurement, on/off only.

dstudio3 commented 4 years ago

Can you please tell me if it is possible to add colored lamps?

for example: https://www.ikea.com/gb/en/p/tradfri-led-bulb-e14-600-lumen-wireless-dimmable-colour-and-white-spectrum-globe-colour-and-white-spectrum-opal-white-50411565/

what to use the device?

Thanks!

agmaq commented 4 years ago

I was able to add IKEA Tradfri LED 1000 lm E27 (id: LED1732G11) as ikea.light.led1623g12. on/off & brightness work! Thx @AlexxIT

kkmaslowski commented 4 years ago

I'm trying to control Ikea E1743 (https://www.zigbee2mqtt.io/devices/E1743.html) switch without success. It has 2 buttons. I tried to pair it as lumi.sensor_switch.aq2 and lumi.remote.b286opcn01. I see no actions when i press buttons. When it's paired as b286opcn01 it shows battery level. Any idea how to debug it? Button press is visible in debug mode? I enabled debug but don't see anything when I press it.

Spirituss commented 4 years ago

@AlexxIT It would be great to add IKEA Zigbee2 dimmer as well, since z2m support works quite bad for it (https://github.com/Koenkk/zigbee2mqtt/issues/4609).

fedkevichan commented 4 years ago

Добрый день! Один Blitzwolf BW SHP-13 добавлен как lumi.plug.mmeu01. Работает и в НА и в MiHome, но без измерений мощности. Второй попробовал добавить как lumi.plug.mitw01. В НА работает также как первый. А в MiHome устройство вне сети. Возможно его теперь добавить в MiHome как lumi.plug.mmeu01? Пробовал удалять - не помогло.

AlexxIT commented 4 years ago

@fedkevichan Нельзя. Я предупреждал, что в Mi Home есть только 1 шанс.

scoobypt commented 4 years ago

Sonoff ZigBee motion sensor (SNZB-03) paired successfully as lumi.sensor_motion but no motion is detected (always clear) only battery readings work.

Zuz666 commented 4 years ago

@fedkevichan Нельзя. Я предупреждал, что в Mi Home есть только 1 шанс.

@AlexxIT, а где можно про это подробнее прочитать?

AlexxIT commented 4 years ago

@Zuz666 readme https://github.com/AlexxIT/XiaomiGateway3#add-third-party-zigbee-devices

AlexxIT commented 4 years ago

@scoobypt yes. Sonoff motion sensor is very different from Xiaomi / Aqara

fedkevichan commented 4 years ago

@fedkevichan Нельзя. Я предупреждал, что в Mi Home есть только 1 шанс.

Я видел. Не готов был, что он вообще не будет доступен в MiHome, хоть и добавился. В инструкции, про такой вариант тоже не было.

biscuitee commented 4 years ago

Hi, how can I use xiaomi gateway 3 integration to control Yeelight M2 spotlights mesh (YLTS02YL model) ? i can see yeelight mesh spotlights in xiaomi smart gateway BLE connection, but I am unable to see any in HA with the xiaomi gateay 3 installed. Anyone can help?

scoobypt commented 4 years ago

@scoobypt yes. Sonoff motion sensor is very different from Xiaomi / Aqara

One question if I change to zha component do you think it will work?

Zuz666 commented 4 years ago

@Zuz666 readme https://github.com/AlexxIT/XiaomiGateway3#add-third-party-zigbee-devices

Thanks, but it's not clear to me! Deleting device from MiHome later will not help to change the device model?

rezmus commented 4 years ago

mijia cloud remembers device model forever after first registration (per region).

AlexxIT commented 4 years ago

@scoobypt it seems to have worked for ZHA. I have such a sensor. But no time for tests

AlexxIT commented 4 years ago

@biscuitee There are other issues about mesh. No need to discuss it here.

scoobypt commented 3 years ago

@scoobypt it seems to have worked for ZHA. I have such a sensor. But no time for tests

I already test it and it works perfectly in fact I change half of my aqara presence sensors, aqara temperature sensors and some sonoff presence sensors to this gateway with zha component and all work great. I will buy another type of sonoff ZigBee sensors and some ZigBee tuya and will test also.

RichardLeITC commented 3 years ago

Hi. I have problem with zigbee tuya switch 1 gang and 2 gang (with neutral wire). I added them using Aquara switch device: lumi.switch.b1nacn02 and lumi.switch.b2nacn02

The Xiaomi Gateway 3 found them and I can control them from HA (of/off)

New device: did: lumi.ec1bbdfffed0fe57 mac: ec1bbdfffed0fe57 model: lumi.switch.b1nacn02 version: 66 zb_ver: 1.2

and

New device: did: lumi.ec1bbdfffed0ed96 mac: ec1bbdfffed0ed96 model: lumi.switch.b2nacn02 version: 66 zb_ver: 1.2

However, HA cannot read current state of these switch (if turn on/off switch by hand) Here is the log file log101120.txt Could you please and help me solve this problem. Thanks

AlexxIT commented 3 years ago

I think the current state is not supported for all devices added this way. You can use ZHA mode or another stick.

RichardLeITC commented 3 years ago

I think the current state is not supported for all devices added this way. You can use ZHA mode or another stick.

I tried ZHA mode following the instruction in your video but not success. It says failed to connect. Same result with me account or token key. Any suggestion? Thanks

AlexxIT commented 3 years ago

Try restart gateway and config ZHA again

evgen-20 commented 3 years ago

I added a Lonsonho Double Switch Wall - lumi.switch.b2lacn02, but I can't control it. image

kkmaslowski commented 3 years ago

I added a Lonsonho Double Switch Wall - lumi.switch.b2lacn02, but I can't control it. It fully works in ZHA mode.

jmpaiva commented 3 years ago

I'm trying to control Ikea E1743 (https://www.zigbee2mqtt.io/devices/E1743.html) switch without success. It has 2 buttons. I tried to pair it as lumi.sensor_switch.aq2 and lumi.remote.b286opcn01. I see no actions when i press buttons. When it's paired as b286opcn01 it shows battery level. Any idea how to debug it? Button press is visible in debug mode? I enabled debug but don't see anything when I press it.

Did you manage to make it work?

rozhkovets commented 3 years ago

I added a Lonsonho Double Switch Wall - lumi.switch.b2lacn02, but I can't control it. It fully works in ZHA mode.

i added Lonsonho Double Switch Wall (with out N) like lumi.switch.b2lacn02, when i turned on the 1 switch - turned on 2 switch, when i turned on the 2 switch - nothing turned on. chanels are shifted?

When i added switch in ZHA mode, both channels work well, but automatically turn off 2 minutes after turning on

I added switch in usual mode like lumi.ctrl_ln2.aq1 QBKG12LM - both channels work well, after 2 minutes it does not turn off, everything is fine. lumi.ctrl_ln2.aq1 have power meter and, of course, it is not available with this method

itispip commented 3 years ago

Great feature for Zigbee!

Can same feature be added for BlueTooth Mesh? eg. I have a 3rd party BLE Mesh Switch, worked in Mi Home, in Mi IoT Debugger display as Switch, but appear in HASS as Light, model name 3015, on/off button greyed out. Apparently this component default all Mesh device as light and not support Switch yet, but I'm hoping if I can use the same approach as ZigBee to disguise it as a XiaoMi BLE Switch...

dmytroaskuma commented 3 years ago

Please Help. Who did pairing with Lonsonho Single Wall Switch no-neutral Switch What model name should I use ?

lumi.ctrl_ln1, lumi.ctrl_ln2 ande other Aquara wall switched doesnt work

rozhkovets commented 3 years ago

Please Help. Who did pairing with Lonsonho Single Wall Switch no-neutral Switch What model name should I use ?

lumi.ctrl_ln1, lumi.ctrl_ln2 ande other Aquara wall switched doesnt work

I used lumi.ctrl_ln2.aq1

dmytroaskuma commented 3 years ago

Please Help. Who did pairing with Lonsonho Single Wall Switch no-neutral Switch What model name should I use ? lumi.ctrl_ln1, lumi.ctrl_ln2 ande other Aquara wall switched doesnt work

I used lumi.ctrl_ln2.aq1

It works, but I have 1 button, and now I cannot change it to lumi.ctrl_ln1.aq1 ? After update integration deleting entity and reboot, I changed it to 1 button version. Thanks a lot !!!

kkmaslowski commented 3 years ago

@dmytroaskuma Use ZHA. It's stable for me and all my non-xiaomi devices work. I have lonsonho (3 button with neutral), ikea (bulbs,sockets,switch), sonoff (zbmini) and more, everything works great. Even zigbee network map works.

dmytroaskuma commented 3 years ago

@dmytroaskuma Use ZHA. It's stable for me and all my non-xiaomi devices work. I have lonsonho (3 button with neutral), ikea (bulbs,sockets,switch), sonoff (zbmini) and more, everything works great. Even zigbee network map works.

How it works with HomeKite bridge ?

rozhkovets commented 3 years ago

may be time to make a summary table of third-party devices, with which xiaomi device model it was possible to manage this third-party devices?

Soused19 commented 3 years ago

its any option how control sonoff zigbee devices over Xiaomi Gateway 3? I have sonoff snzb-02

Thanks

AlexxIT commented 3 years ago

@Soused19 use ZHA

Soused19 commented 3 years ago

@AlexxIT thanks, i will try it

PTPWW commented 3 years ago

Hello, adding 3rd party devices (such as zigbee plug) works well, they are also visible and usable in the MiHome App. Xiaomi Gateway is in "Mi Home" mode. But after some hours they appear as OFFLINE, and only a DELETE, restart of HASS and new adding works then to re-activate them in MiHome App - and only again for a few hours. In HASS they keep on working. @AlexxIT Is this bug known, and is there a way to keep those devices "alive" in the MiHome app? Thanks

WEBudoGT commented 3 years ago

Does anybody know if Osram Lightify lightbulbs can be paired?

PTPWW commented 3 years ago

@AlexxIT Hi, I just want to ask you about the sentense "The devices added in this way will work even after the Gateway is restarted. They will continue to work without Hass. And they can be used in Mi Home automations." Like I wrote in 2 comments before, for me it works for a few hours and after that they suddenly turn grey and "offline" in the Mi Home automation. ZHA is not being used. Is that behviour known, and what can I do to re-activate the devices in the Mi Home app, and to keep it there usable? Thank you for your great work here!

AlexxIT commented 3 years ago

Some devices go offline after some time when using this method. I don't know why one devices works without problem and other go offline.