openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.9k stars 3.59k forks source link

[MiHome] Add features introduced in API version 1.0.9 #2851

Closed kubawolanin closed 6 years ago

kubawolanin commented 7 years ago

Official documentation of Lumi AIOT used for MiHome binding introduced a few interesting features:

v1.0.8 2017-06-279 brudy.wong@forxmail.com New: Support Aqara wireless switch, Aqara door sensor, Aqara body illumination sensor, Aqara temperature and humidity pressure sensor, flooding sensor and other new products
v1.0.9 2017-08-01 brudy.wong@forxmail.com Added: Support for adding and deleting child devices

(translated from Chinese)

I think it would be awesome to add device inclusion and removal to the MiHome binding.

You can find translated 1.0.9 document here: Gateway LAN communication.pdf

cc: @dimalo @tavalin @pboos

dimalo commented 6 years ago

hey @kubawolanin, finally I got some time to implement your request. I didn't implement removal. I think it's quite tricky, because the device removal also means deleting the thing. Also it would be complicated to provide a list to the user, which devices he/she can remove. So I would like to stick to inclusion only. If a user has two gateways and he wants to remove it from one and include it to the other, do you think that just including it to the other gateway automatically removes it from the current? This would be my guess at least. Also if a user buys a used sensor, there is no "I am locked because I'm still coupled to another gateway"-mode.

dimalo commented 6 years ago

@kubawolanin I hope you had the time to test the new functionality and agree that removal isn't suiting the OH usecase. Perhaps close this issue then? cheers!

kubawolanin commented 6 years ago

@dimalo absolutely! Thank you. Closing the issue.