Closed 8lele closed 3 years ago
You might have some permissions errors with homebridge, since the plugin is not able to write the info file.
What can I do? Capture packets to get the device's transmission commands to help adapt to the new model
Recheck your homebridge setup. Maybe try to reinstall homebridge.
@8lele Version 0.9.2 should now have initial dmaker fan support. Could you try it out and also post your debug log after connecting to the fan?
@merdok debug log
[6/25/2020, 2:11:44 AM] [Xiaomi Fan 2] Xiaomi Fan - found Fan in network. Trying to connect...
[6/25/2020, 2:11:44 AM] [Xiaomi Fan 2] Xiaomi Fan - connected to Fan
[6/25/2020, 2:11:44 AM] [Xiaomi Fan 2] MiioDevice {
model=dmaker.fan.p10,
types=miio,
capabilities=
}
[6/25/2020, 2:11:44 AM] [Xiaomi Fan 2] Xiaomi Fan - fan model info file already exists, not saving!
[6/25/2020, 2:11:54 AM] [Config] [homebridge] Failed to check registry.npmjs.org for updates: timeout of 5000ms exceeded
[6/25/2020, 2:11:56 AM] [Xiaomi Fan 2] Xiaomi Fan - error while requesting dmaker fan properties: Error: Call to device timed out
at Timeout.retry [as _onTimeout] (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:487:18)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
code: 'timeout'
}
[6/25/2020, 2:12:07 AM] [Config] Terminal session ended.
[6/25/2020, 2:12:13 AM] [XiaoMiAcPartner] [DEBUG]FastSync...
[6/25/2020, 2:12:15 AM] [Xiaomi Fan 2] Xiaomi Fan - error while requesting child lock state: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:15 AM] [Xiaomi Fan 2] Xiaomi Fan - error while requesting swing mode state: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:15 AM] [Xiaomi Fan 2] Xiaomi Fan - error while requesting power state: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:15 AM] [Xiaomi Fan 2] Xiaomi Fan - error while requesting speed level: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:15 AM] [Xiaomi Fan 2] Xiaomi Fan - error while requesting mode: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:15 AM] [Xiaomi Fan 2] Xiaomi Fan - error while requesting buzzer state: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:17 AM] [Xiaomi Fan 2] Xiaomi Fan - error while setting speed level to: 38. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:17 AM] [Xiaomi Fan 2] Xiaomi Fan - error while setting power state to: true. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:19 AM] [Xiaomi Fan 2] Xiaomi Fan - error while setting power state to: true. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:19 AM] [Xiaomi Fan 2] Xiaomi Fan - error while setting buzzer state to: true. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:19 AM] [Xiaomi Fan 2] Xiaomi Fan - error while setting speed level to: 62. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:19 AM] [Xiaomi Fan 2] Xiaomi Fan - error while setting power state to: true. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:20 AM] [Xiaomi Fan 2] Xiaomi Fan - error while setting speed level to: 98. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:20 AM] [Xiaomi Fan 2] Xiaomi Fan - error while setting power state to: true. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:20 AM] [Xiaomi Fan 2] Xiaomi Fan - error while setting speed level to: 100. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:20 AM] [Xiaomi Fan 2] Xiaomi Fan - fan move service - direction: left
[6/25/2020, 2:12:20 AM] [Xiaomi Fan 2] Xiaomi Fan - fan move service - error moving fan to: left. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:21 AM] [Xiaomi Fan 2] Xiaomi Fan - fan move service - direction: right
[6/25/2020, 2:12:21 AM] [Xiaomi Fan 2] Xiaomi Fan - fan move service - error moving fan to: right. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:21 AM] [Xiaomi Fan 2] Xiaomi Fan - error while setting speed level to: 55. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
[6/25/2020, 2:12:21 AM] [Xiaomi Fan 2] Xiaomi Fan - fan move service - direction: left
[6/25/2020, 2:12:21 AM] [Xiaomi Fan 2] Xiaomi Fan - fan move service - error moving fan to: left. Error: Error: busy.
at Object.reject (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:475:13)
at DeviceInfo.onMessage (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:374:8)
at Socket.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-fan/node_modules/miio/lib/network.js:160:11)
at Socket.emit (events.js:310:20)
at UDP.onMessage (dgram.js:924:8) {
code: -30012
}
Do you have version 0.9.2 installed?
This is the 0.9.2 version I installed.
If you want me to add support for your fan then you would need to dump the commands from your fan. Would you willing to do that?
How can I assist you in obtaining information? What software tools do I need to use?
It requires a a couple of steps to be done. You can basically read here how to dump commands from your device: https://github.com/aholstenson/miio/blob/master/docs/protocol.md https://github.com/jghaanstra/com.robot.xiaomi-mi
I think that you have to disconnect the internet in order that the commands are send using the local network instead of the cloud.
If I disconnect the internet connection, then I can’t do anything in the home app, nor can I get any traffic information I think it is the new version of the app that adjusts the access method of the device. When I try to use the old version of the app and it is not compatible with the new device, a problem
This is unfortunately a problem. We somehow need to catch the commands which the app sends to the fan in order for me to implement the fan...
Could you try to log the commands with modded mi home app? Follow this gude.
@sw2719 Thanks for the tutorial,After trying to get the switch command This is the command to get the status
2020-07-26 19:14:46 -> {"id":5502,"method":"get_properties","params":[{"did":"239246709","siid":2,"piid":1},{"did":"239246709","siid":2,"piid":3},{"did":"239246709","siid":2,"piid":10},{"did":"239246709","siid":2,"piid":4},{"did":"239246709","siid":2,"piid":5},{"did":"239246709","siid":2,"piid":6},{"did":"239246709","siid":2,"piid":7},{"did":"239246709","siid":2,"piid":8},{"did":"239246709","siid":3,"piid":1}]}
2020-07-26 19:14:46 <- {"code":0,"message":"ok","result":[{"did":"239246709","siid":2,"piid":1,"code":0,"value":true},{"did":"239246709","siid":2,"piid":3,"code":0,"value":0},{"did":"239246709","siid":2,"piid":10,"code":0,"value":100},{"did":"239246709","siid":2,"piid":4,"code":0,"value":false},{"did":"239246709","siid":2,"piid":5,"code":0,"value":90},{"did":"239246709","siid":2,"piid":6,"code":0,"value":0},{"did":"239246709","siid":2,"piid":7,"code":0,"value":true},{"did":"239246709","siid":2,"piid":8,"code":0,"value":true},{"did":"239246709","siid":3,"piid":1,"code":0,"value":false}],"id":5502}
This is the shutdown command
2020-07-26 19:15:19 <- {"code":0,"message":"","result":[{"did":"239246709","siid":2,"piid":1,"code":0}]}
This is the boot command
2020-07-26 19:15:22 -> {"params":[{"did":"239246709","siid":2,"piid":1,"value":true}]} /miotspec/prop/set
2020-07-26 19:15:22 <- {"code":0,"message":"","result":[{"did":"239246709","siid":2,"piid":1,"code":0}]}
@merdok You can see if these logs can help you achieve access
@8lele thanks! I think that is really helpful, i think i will release an update later today which will add initial support for your fan.
@8lele can you try version 1.2.0. It has no full support for your fan yet, but at least you should be able to do some controls now.
There was a problem that could not be installed
@8lele i think this is some issue with your connection?
@merdok After trying, you can control the fan switch speed,I try to provide all command signals of the device thinks
Oh, does it at least partialy work? Can you tell what works?
Functions that can be manipulated
Ok, that sounds good that some stuff is already working. I will be now working to update the plugin to fully support your device! Thanks for the testing!
If necessary, I will provide more commands to help you improve the plug-in.
@8lele version 1.3.0 should add support for the dmaker.fan.p10. Can you try it out please?
@merdok After I control by Mijia, the home app cannot be automatically updated to get the latest status of the fan
I think after that you need to restart the fan in order to control again in the home app. This is an issue with the fan itself.
model:dmaker.fan.p10 log: