Bluebie / homebridge-miio

Xiaomi Mi Home Plugin for Homebridge
112 stars 26 forks source link

USB toggles when switching power on v1 plug #30

Open biogerm opened 7 years ago

biogerm commented 7 years ago

Hi,

I have recently reinstalled my Pi and runs a lower node js version 6.11 with Pi 1 on armv6. Everything seems working fine except that the power switching on V1 plug seems affecting its USB at the same time. When I turn the plug on, the USB in the plug turns on as well, and when turning off, USB would be turned off too. It was working fine on Pi 3 that I set up couple months ago. Not sure if it's because of node js being 6.11, or because changes in miio plugin. Does anyone have a clue?

BR AnChin

biogerm commented 7 years ago

Just check my previous home ridge runs with Nodejs 7.2 and miio 0.2.0. The current one runs miio 0.3.2

biogerm commented 7 years ago

So I upgraded nodejs to 8.2, homebridge and miio both to the latest and the problem is still there. Further more I noticed that they won't show their status correctly in the homekit. For v2 plugs, they are fine, but for v1 ones, they are always shown as turned off. I can turn them on but next time when I open control center, they are shown as off again even though they are on.

Bluebie commented 7 years ago

it's likely some changes in miio and homebridge-miio libraries. I don't have any v1 plugs to test with or knowledge of how they work though. if you find a solution i may accept a pull request!

Enivel commented 6 years ago

same error here, I tried to solve it but failed, miio work fine, .power()return two result { main: true, usb: true } but miio device object .power()return undefind

biogerm commented 6 years ago

forgot to mention that miio 0.2.0 works fine. i downgrade it from 0.3.2 to 0.2.0 and it worked fine since.