Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on status shows wrong with chuangmi-plug-v1 #42

Closed
syu-lk4b opened this issue Jun 20, 2017 · 2 comments
Closed

on status shows wrong with chuangmi-plug-v1 #42

syu-lk4b opened this issue Jun 20, 2017 · 2 comments

Comments

@syu-lk4b
Copy link

i am using homebridge-miio plugin, which is using the miio lib .From homekit , I can turn on or turn off the plugin , but once I turn on it ,after a while it will show off status even it's on . Looks like it somehow failed fetch the up status.

from the miio lib ,it says at least basic, not sure if this is the case. I am rasie the issue in here now.
since this is the issue that I met when I use this module
Device ID: 937021
Model info: chuangmi.plug.v1 (power-plug)
Address: 192.168.88.18 (chuangmi-plug-v1_miio937021)
Token: a6ab080d5223bdbc73fbf572ef8388dc via auto-token
Support: At least basic

here is the log

May 31 13:54:07 stevenhomesmart homebridge[20969]: [5/31/2017, 1:54:07 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 13:54:44 stevenhomesmart homebridge[20969]: [5/31/2017, 1:54:44 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 13:58:07 stevenhomesmart homebridge[20969]: [5/31/2017, 1:58:07 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:00:58 stevenhomesmart homebridge[20969]: [5/31/2017, 2:00:58 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:04:05 stevenhomesmart homebridge[20969]: [5/31/2017, 2:04:05 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:08:48 stevenhomesmart homebridge[20969]: [5/31/2017, 2:08:48 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:11:36 stevenhomesmart homebridge[20969]: [5/31/2017, 2:11:36 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:11:40 stevenhomesmart homebridge[20969]: [5/31/2017, 2:11:40 PM] [XiaomiMiio] miIO Plug 937021 power to 1
May 31 14:13:03 stevenhomesmart homebridge[20969]: [5/31/2017, 2:13:03 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:13:04 stevenhomesmart homebridge[20969]: [5/31/2017, 2:13:04 PM] [XiaomiMiio] miIO Plug 937021 power to 1

enabled the debug log yesterday, from the debug log ,it seems able to fetch the status correct

May 30 23:53:10 stevenhomesmart homebridge[5975]: [5/30/2017, 11:53:10 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 30 23:53:10 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:10 GMT miio.device.937021 -> (3) {"id":3543,"method":"get_prop","params":["power"]}
May 30 23:53:10 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:10 GMT miio.device.937021 <- Message: {"result":["on"],"id":3543}
May 30 23:53:16 stevenhomesmart homebridge[5975]: [5/30/2017, 11:53:16 PM] [XiaomiMiio] miIO Plug 937021 power to 1
May 30 23:53:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:16 GMT miio.device.937021 -> (3) {"id":3544,"method":"set_on","params":[]}
May 30 23:53:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:16 GMT miio.device.937021 <- Message: {"result":0,"id":3544}
May 30 23:53:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:16 GMT miio.device.937021 -> (3) {"id":3545,"method":"get_prop","params":["power"]}
May 30 23:53:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:16 GMT miio.device.937021 <- Message: {"result":["on"],"id":3545}
May 30 23:53:31 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:31 GMT miio.device.937021 -> (3) {"id":3546,"method":"get_prop","params":["power"]}
May 30 23:53:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:32 GMT miio.device.937021 <- Message: {"result":["on"],"id":3546}
May 30 23:53:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:32 GMT miio.device.937021 -> (3) {"id":3547,"method":"get_prop","params":["on","usb_on"]}
May 30 23:53:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:32 GMT miio.device.937021 <- Message: {"result":[true,true],"id":3547}
May 30 23:53:46 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:46 GMT miio.device.937021 <- Handshake reply: <Buffer a6 ab 08 0d 52 23 bd bc 73 fb f5 72 ef 83 88 dc>
May 30 23:53:46 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:46 GMT miio.device.937021 -> (3) {"id":3548,"method":"get_prop","params":["power"]}
May 30 23:53:46 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:46 GMT miio.device.937021 <- Message: {"result":["on"],"id":3548}
May 30 23:54:01 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:01 GMT miio.device.937021 -> (3) {"id":3549,"method":"get_prop","params":["power"]}
May 30 23:54:01 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:01 GMT miio.device.937021 <- Message: {"result":["on"],"id":3549}
May 30 23:54:02 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:02 GMT miio.device.937021 -> (3) {"id":3550,"method":"get_prop","params":["on","usb_on"]}
May 30 23:54:02 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:02 GMT miio.device.937021 <- Message: {"result":[true,true],"id":3550}
May 30 23:54:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:16 GMT miio.device.937021 -> (3) {"id":3551,"method":"get_prop","params":["power"]}
May 30 23:54:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:16 GMT miio.device.937021 <- Message: {"result":["on"],"id":3551}
May 30 23:54:31 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:31 GMT miio.device.937021 -> (3) {"id":3552,"method":"get_prop","params":["power"]}
May 30 23:54:31 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:31 GMT miio.device.937021 <- Message: {"result":["on"],"id":3552}
May 30 23:54:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:32 GMT miio.device.937021 -> (3) {"id":3553,"method":"get_prop","params":["on","usb_on"]}
May 30 23:54:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:32 GMT miio.device.937021 <- Message: {"result":[true,true],"id":3553}
May 30 23:54:47 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:47 GMT miio.device.937021 <- Handshake reply: <Buffer a6 ab 08 0d 52 23 bd bc 73 fb f5 72 ef 83 88 dc>
May 30 23:54:47 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:47 GMT miio.device.937021 -> (3) {"id":3554,"method":"get_prop","params":["power"]}
May 30 23:54:47 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:47 GMT miio.device.937021 <- Message: {"result":["on"],"id":3554}
May 30 23:55:01 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:01 GMT miio.device.937021 -> (3) {"id":3555,"method":"get_prop","params":["power"]}
May 30 23:55:01 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:01 GMT miio.device.937021 <- Message: {"result":["on"],"id":3555}
May 30 23:55:02 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:02 GMT miio.device.937021 -> (3) {"id":3556,"method":"get_prop","params":["on","usb_on"]}
May 30 23:55:02 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:02 GMT miio.device.937021 <- Message: {"result":[true,true],"id":3556}
May 30 23:55:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:16 GMT miio.device.937021 -> (3) {"id":3557,"method":"get_prop","params":["power"]}
May 30 23:55:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:16 GMT miio.device.937021 <- Message: {"result":["on"],"id":3557}
May 30 23:55:31 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:31 GMT miio.device.937021 -> (3) {"id":3558,"method":"get_prop","params":["power"]}
May 30 23:55:31 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:31 GMT miio.device.937021 <- Message: {"result":["on"],"id":3558}
May 30 23:55:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:32 GMT miio.device.937021 -> (3) {"id":3559,"method":"get_prop","params":["on","usb_on"]}
May 30 23:55:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:32 GMT miio.device.937021 <- Message: {"result":[true,true],"id":3559}

maybe some bug here ,will check it tomorrow, if I have time, if not ,hope someone can take a look ,as I pretty much provide everything you need for debug

@aholstenson
Copy link
Owner

Thanks for the report!

There was an issue with this type of plug, but most of the issues were resolved as part of issue #18 and released in 0.12.0. homebridge-miio still depends on 0.7.0 and needs to be updated to get access to those fixes.

I'll close this issue, but if you do any experimentation with the latest version and it still does not work please reopen this issue.

@syu-lk4b
Copy link
Author

thanks man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants