snOOrz / homebridge-aqara

HomeBridge plugin for Aqara gateway and devices
536 stars 74 forks source link

Gateway Light do not show as Light Bulb #70

Open SierraAngel opened 7 years ago

SierraAngel commented 7 years ago

Hello Sorry my English is bad! I have configured hombridge and Aqara plugin with no problems and everything is perfect, except for the setting "fakeLightBulbForLightSwitch: true" does not make a button to turn on and off the light of the gateway in the Home app. I'm using the latest version on RPi3. Can anybody help me?

astrojetson8 commented 7 years ago

@SierraAngel i don't think that's possible right now. as i understand fakeLightBulbForLightSwitch is for switch.

i ran google translator on following, and looks like @crhan is working on controlling the gateway light. https://github.com/snOOrz/homebridge-aqara/pull/67

czdeee commented 7 years ago

@astrojetson8 ur right. @crhan 's code is work.

astrojetson8 commented 7 years ago

great, and thanks! @a900927 did anyone figure out how to control the switch?

SierraAngel commented 7 years ago

Thanks @astrojetson8 . Surely, when @crhan finishes the code, it will merge into the master, right? Regardless, what is the purpose of the fakeLightBulbForLightSwitch flag? (sorry my English is bad. I speak Spanish!)

atraversi commented 7 years ago

Good question... I don't understand the fakeLightBulbForLightSwitch flag ...

czdeee commented 7 years ago

@astrojetson8 you need to update @crhan 's code.

czdeee commented 7 years ago

@atraversi i think it is the control button on the gateway.can or not control

atraversi commented 7 years ago

Oh @a900927, I understand. But I find no difference by setting it to true or false. How does Siri behave about the button ?, an example, please

czdeee commented 7 years ago

@atraversi I must to be say my english is bad.so you will see the chinglish.

fakeLightBulbForLightSwitch:true.just mean the button available.you can click the button control the gateway lightbulb.if you want control by Home.app.you must to be update the code .see this url:https://github.com/snOOrz/homebridge-aqara/pull/67

crhan commented 7 years ago

I'm so sorry I've wrote that PR in Chinese, because that is more nature for me and I know that the repo's author is a Chinese. It's pretty funny to found that xiaomi (aqara for the smart home brand?) has sold it's product to that many countries and you guys are also interested in it.

Back to the PR #67, I've taken a big code refactor to the project, so that PR may not be acceptable to the author. So if you think the feature is great, you are welcome to use my fork and branch here: https://github.com/crhan/homebridge-aqara/tree/ruohan.chen/add_xiaomi_gateway