YinHangCode / homebridge-mi-aqara

a homebridge plugin for XiaoMi Aqara plugin.
1.09k stars 154 forks source link

Gateway light + Virtual Switches Issue #79

Open SirNoble opened 7 years ago

SirNoble commented 7 years ago

Hello All, Having an issue with both the Gateway Light and virtual switches which appear when using the Xiaomi Aqara Smart Wireless Switch.

The Gateway displays "No Response" when pressed in the Home app. Same with the virtual switches that're created. The switch works just fine when assigned to actions for the button device that shows up in the Home app.

img_0334 img_0333

YinHangCode commented 7 years ago

does it exist any error log in homebridge output?

SirNoble commented 7 years ago

@YinHangCode Where do I check ?

czdeee commented 7 years ago

homebridge -D and see error log then post it

YinHangCode commented 7 years ago

it seems havn't error.

YinHangCode commented 7 years ago

Is there a problem with the same device?

SirNoble commented 7 years ago

@YinHangCode What do you mean? I have one gateway. All three switches I have have the same issue.

czdeee commented 7 years ago

hey guy,do you have other homebridge plugin?

czdeee commented 7 years ago

i think you can open the Home.app,and then delete the bridge,finally re-add the bridge

SirNoble commented 7 years ago

@a900927 @YinHangCode Hi, I am actually getting an error it says:

[10/24/2017, 10:50:07 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key length [10/24/2017, 10:50:07 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key length [10/24/2017, 10:50:14 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key length [10/24/2017, 10:50:15 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key length [10/24/2017, 10:50:15 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key length [10/24/2017, 10:50:16 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key length [10/24/2017, 10:50:16 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key length

Each time I press either the virtual switch or the gateway light.

The other items work such as the temperature+humidity sensor and button.

YinHangCode commented 7 years ago

@SirNoble make sure ur passwd is right.

czdeee commented 7 years ago

@SirNoble pls see the new config rule and update it

SirNoble commented 7 years ago

@a900927 Hi, What do I need to change ?

czdeee commented 7 years ago

@SirNoble post your config here

YinHangCode commented 7 years ago

@SirNoble remove the last space in the password string.

SirNoble commented 7 years ago

@YinHangCode Yes! That worked, thank you very much!

What are the virtual switches for? They don't seem to do anything?

YinHangCode commented 7 years ago

@SirNoble turn on/off virtual switch equivalent to press the button.

SirNoble commented 7 years ago

@YinHangCode They don't do anything? Any idea how to fix?

YinHangCode commented 7 years ago

@SirNoble it don't trigger homekit clicks now. it can trigger Mijia app automation which use this button as trigger condition now.

SirNoble commented 7 years ago

@YinHangCode How do I delete the virtual switches?

YinHangCode commented 7 years ago

@SirNoble read README.MD, use disable attribute.

"platforms": [{
        "platform": "MiAqaraPlatform",
        "gateways": {
            "6409802da3b3": "02i44k56zrgg578b",
            "f0b4299a5b2b": "2F92E7DA90C66B86",
            "f0b4299a77dd": "syu3oasva3uqd5qd"
        },
        "defaultValue": {
            "158d0001000003": {
                "Button_StatelessProgrammableSwitch": {
                    "name": "living room button"
                },
                "Button_Switch_VirtualSinglePress": {
                    "name": "living room button virtual single press",
                    "disable": true
                },
                "Button_Switch_VirtualDoublePress": {
                    "name": "living room button virtual double press",
                    "disable": true
                }
            }
        }
    }]
SirNoble commented 7 years ago

@YinHangCode @a900927

Having issue again with the virtual light. It gives me this error: [MiAqaraPlatform] [ERROR]Error: timeout:{"cmd":"write","model":"gateway","sid":"xxxxxxxxxxx","data":"{\"rgb\":1694498815, \"key\": \"25538689a9f61998778ac9a268e134dc\"}"}

SirNoble commented 7 years ago

Ang idea?

Strebl1 commented 7 years ago

it don't trigger homekit clicks now. it can trigger Mijia app automation which use this button as trigger condition now.

@YinHangCode could you elaborate on that? i don t know how to make the button work!

YinHangCode commented 7 years ago

@SirNoble within a few second, program not received “write_ack” which is gateway send, so program think had no control over success.

YinHangCode commented 7 years ago

@Strebl1 This has been updated. control the switch and click the physical button the same effect.

Strebl1 commented 7 years ago

img_5931

@YinHangCode its weird because i do always get "no answer" from the switch and the button itself! i cant put any action to the button or switches in homekit! is there anything i need to do in the mijia app?