LASER-Yi / homebridge-mi-acpartner

XiaoMi AC Partner plugins for HomeBridge(https://github.com/nfarina/homebridge).
MIT License
263 stars 36 forks source link

Switch function doesn't work #20

Closed Hohnjo closed 6 years ago

Hohnjo commented 6 years ago

Hello, thanks for the plugin ! I just want to change my LED light IR color so I want the red color on ON and the white color on OFF. It works in the Mi home app with customize button. I have learn the On/Off with the learn button everything is OK, but in the Home app it doesn't look like it's sending the IR Code...

Here is my config part of ac partner :

    {
"platform": "XiaoMiAcPartner",
"ip": "192.168.01.80",
"token": "0973d7770664d95e621318c9dbeec8e0",
"accessories":[{
        "name": "LED",
        "type": "switch",
        "data": {
       "on": "FE000000000000000000000000080024224C0035003F00AE00E901CB03890F56138854000100010101010102020202020202020101010202010201020202010102010206530745",
        "off": "FE000000000000000000000000080026224E003900AB00E901C6038C0F51138825B24300000000000000000101010101010101000001000000010001010001010100010542074206DE"
        }
    }
]
Hohnjo commented 6 years ago

someone ?? :(

LASER-Yi commented 6 years ago

There's something wrong in IR switch. The result of learnIR switch isn't the right IR signal and I am trying to figure it out how to get right IR signal.

Hohnjo commented 6 years ago

Thanks for the answer ! I also have the broadlink rm pro plus with the homebridge plugin, i will try the ir code learn by it and put it in the ac partner json section !

LASER-Yi commented 6 years ago

The code of Broadlink RM is different from The code of AC Partner, The accuracy way to get AC Partner's IR code now is by using this Method

Hohnjo commented 6 years ago

Ok I see ! thanks for the answers !

In the beginning I've tried the Miio method to get the tokens but nothing worked the command miio --discover was like "command not found" (in my memories). This method looks even more difficult..

I'll wait for the Learn IR button works then !

Hohnjo commented 6 years ago

Does the Learn button work with the update ?

LASER-Yi commented 6 years ago

Nope. Trying to make it work next update.

Hohnjo commented 6 years ago

Hello ! it works now ?

LASER-Yi commented 6 years ago

Nope. I think XiaoMi is using special way to correct their IR Code, and I cannot find a way to crack it now. You can use wireshark to catch the IR Code you want. I wrote that catch method in Wiki so you can learn how to do it.

shandorka commented 6 years ago

Try to catch IR from method in Wiki, but Shark does not see anything. Dev mode on acpartner is enable. Can you record video how you doing that? Thanks

tkmark commented 6 years ago

The method in wiki is not work anymore, I think xiaomi has changed their protocol or something else so you cannot use the 54321 port filter to get the control data, I tried with ether address filter and only got some periodic multicast state update from device. waiting for the update for now.

LASER-Yi commented 6 years ago

I change the way to send ir code. If you still here, please use sudo npm i -g homebridge-mi-acpartner@beta to help me test this feature.