MiEcosystem / NewXmPluginSDK

xiaomi smarthome app plugin sdk
Apache License 2.0
176 stars 81 forks source link

Android门铃公版插件一直显示设备不在线 #113

Closed 18792576258 closed 5 years ago

18792576258 commented 5 years ago

环境

插件 model 是com.ydhome.cateyepr1.android 使用的哪个方法 device.callMethod("get_online", array, new Callback()) 已分享到 346378191

现象

2019-07-29 15:49:31.221 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online onFailure=-3 timeout 2019-07-29 15:49:37.251 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online onFailure=-3 timeout 2019-07-29 15:49:43.220 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online onFailure=-9999 user ack timeout 判断门铃在线的接口一个只返回的是失败 -3 或者 -9999

期望

ios公版插件返回设备在线,期望和ios一样,也返回设备在线参数

其他的上下文/日志/截图

2019-07-29 15:52:43.359 3276-3392/com.xiaomi.smarthome:core I/STAT-SUCCESS: {"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":6078,\"rpc\":\"{\\"id\\":6351,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":39}","extra":"","am":"mihome","uid":"755489843","time":1564386763} 2019-07-29 15:52:43.909 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:52:44.434 5180-5180/? W/WkPushSDK: [PushManager.java,399,handelEvent] action:com.lantern.wifilocating.push.action.HEARTBEAT 2019-07-29 15:52:46.912 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:52:47.492 1680-1805/? D/WorkerThreadMonitor: Kill MSF check result[ senderSize:0,sendInterval:114549,receiveInterval=24293,addCmdCount=68 2019-07-29 15:52:49.299 3276-3599/com.xiaomi.smarthome:core D/forceUpdateAllData: https://api.io.mi.com/app/home/rpc/293718383 takes 6070ms to get response 2019-07-29 15:52:49.300 3276-3599/com.xiaomi.smarthome:core D/MIIO: host:api.io.mi.com prefix:nullpath:/home/rpc/293718383 method:POST params:[data:{"id":6352,"method":"get_online","params":[]}] 2019-07-29 15:52:49.300 3276-3599/com.xiaomi.smarthome:core D/MIIO: {"code":-3,"error":{"code":-3,"message":"timeout"},"id":6352,"message":"timeout"} 2019-07-29 15:52:49.301 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online onFailure=-3 timeout 2019-07-29 15:52:49.301 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online start + [] 2019-07-29 15:52:49.303 2131-3863/? I/WifiService: getConnectionInfo uid=10401 2019-07-29 15:52:49.305 3840-4047/com.xiaomi.smarthome:plugin0 I/STAT-REPORT: {type:result,key:app.common.log,value: {type:2,value:{delay:6078,rpc:{id:6352,method:get_online,params:[]},did:293718383,succ:1,model:ydhome.cateye.pr1},key_name:app_common_log,session:1564386510463,order:40},extra:,am:mihome, uid:755489843,time:1564386769} 2019-07-29 15:52:49.306 3276-3344/com.xiaomi.smarthome:core D/BootRequestCheck: 1564386769306 SmartHomeRc4Api.sendRequest Request{method=POST, url=https://api.io.mi.com/app/home/rpc/293718383, tag=setDNGmzaXqQWFpj+RnE+w==} com.xiaomi.smarthome:core 2019-07-29 15:52:49.306 3276-3392/com.xiaomi.smarthome:core I/STAT-SERVICE: {"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":6078,\"rpc\":\"{\\"id\\":6352,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":40}","extra":"","am":"mihome","uid":"755489843","time":1564386769} 2019-07-29 15:52:49.307 3276-3392/com.xiaomi.smarthome:core D/ServerCompact: get server from cache: ServerBean: CN : cn 2019-07-29 15:52:49.307 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:52:49.307 2131-3863/? I/WifiService: getConnectionInfo uid=10401 2019-07-29 15:52:49.308 3276-3392/com.xiaomi.smarthome:core I/STAT-UPLOAD: {"ver":"v3","cid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","msid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","av":"5.5.10","ov":"Android-8.1.0-V9.5.15.0.ODCCNFA","md":"MI 6X|{\"manu\":\"Xiaomi\",\"hard\":\"qcom\"}","am":"com.xiaomi.mihome","ch":"MI_APP_STORE","rd":[{"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":6078,\"rpc\":\"{\\"id\\":6352,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":40}","extra":"","am":"mihome","uid":"755489843","time":1564386769}]} 2019-07-29 15:52:49.311 3276-3491/com.xiaomi.smarthome:core D/SmartHome: https://api.io.mi.com/app/home/rpc/293718383 takes 6070ms to get response 2019-07-29 15:52:49.311 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:52:49.311 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:52:49.434 3276-4059/com.xiaomi.smarthome:core E/MIIO: prefix:nullpath:/stat/stat_info method:POST params:[data:{"ver":"v3","cid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","msid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","av":"5.5.10","ov":"Android-8.1.0-V9.5.15.0.ODCCNFA","md":"MI 6X|{\"manu\":\"Xiaomi\",\"hard\":\"qcom\"}","am":"com.xiaomi.mihome","ch":"MI_APP_STORE","rd":[{"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":6078,\"rpc\":\"{\\"id\\":6352,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":40}","extra":"","am":"mihome","uid":"755489843","time":1564386769}]}] 2019-07-29 15:52:49.434 3276-4059/com.xiaomi.smarthome:core E/MIIO: {"code":0,"interval":1,"max_number":100,"message":"ok","result":"true"} 2019-07-29 15:52:49.434 3276-4059/com.xiaomi.smarthome:core D/CoreService: {"code":0,"interval":1,"max_number":100,"message":"ok","result":"true"} 2019-07-29 15:52:49.434 3276-3392/com.xiaomi.smarthome:core I/STAT-SUCCESS: {"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":6078,\"rpc\":\"{\\"id\\":6352,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":40}","extra":"","am":"mihome","uid":"755489843","time":1564386769} 2019-07-29 15:52:49.915 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:52:51.922 2131-3863/? I/WifiService: getWifiEnabledState uid=10095 2019-07-29 15:52:51.922 2131-3863/? I/WifiService: isScanAlwaysAvailable uid=10095 2019-07-29 15:52:52.918 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:52:55.219 3276-3620/com.xiaomi.smarthome:core D/forceUpdateAllData: https://api.io.mi.com/app/home/rpc/293718383 takes 5910ms to get response 2019-07-29 15:52:55.220 3276-3620/com.xiaomi.smarthome:core D/MIIO: host:api.io.mi.com prefix:nullpath:/home/rpc/293718383 method:POST params:[data:{"id":6353,"method":"get_online","params":[]}] 2019-07-29 15:52:55.220 3276-3620/com.xiaomi.smarthome:core D/MIIO: {"code":-9999,"error":{"code":-9999,"message":"user ack timeout"},"id":6353,"message":"user ack timeout"} 2019-07-29 15:52:55.221 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online onFailure=-9999 user ack timeout 2019-07-29 15:52:55.224 3840-4047/com.xiaomi.smarthome:plugin0 I/STAT-REPORT: {type:result,key:app.common.log,value: {type:2,value:{delay:5918,rpc:{id:6353,method:get_online,params:[]},did:293718383,succ:1,model:ydhome.cateye.pr1},key_name:app_common_log,session:1564386510463,order:41},extra:,am:mihome, uid:755489843,time:1564386775} 2019-07-29 15:52:55.225 3276-3392/com.xiaomi.smarthome:core I/STAT-SERVICE: {"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":5918,\"rpc\":\"{\\"id\\":6353,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":41}","extra":"","am":"mihome","uid":"755489843","time":1564386775} 2019-07-29 15:52:55.226 3276-3392/com.xiaomi.smarthome:core D/ServerCompact: get server from cache: ServerBean: CN : cn 2019-07-29 15:52:55.226 2131-6202/? I/WifiService: getConnectionInfo uid=10401 2019-07-29 15:52:55.226 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:52:55.227 3276-3392/com.xiaomi.smarthome:core I/STAT-UPLOAD: {"ver":"v3","cid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","msid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","av":"5.5.10","ov":"Android-8.1.0-V9.5.15.0.ODCCNFA","md":"MI 6X|{\"manu\":\"Xiaomi\",\"hard\":\"qcom\"}","am":"com.xiaomi.mihome","ch":"MI_APP_STORE","rd":[{"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":5918,\"rpc\":\"{\\"id\\":6353,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":41}","extra":"","am":"mihome","uid":"755489843","time":1564386775}]} 2019-07-29 15:52:55.231 3276-3491/com.xiaomi.smarthome:core D/SmartHome: https://api.io.mi.com/app/home/rpc/293718383 takes 5910ms to get response 2019-07-29 15:52:55.231 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:52:55.231 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:52:55.345 3276-3845/com.xiaomi.smarthome:core E/MIIO: prefix:nullpath:/stat/stat_info method:POST params:[data:{"ver":"v3","cid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","msid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","av":"5.5.10","ov":"Android-8.1.0-V9.5.15.0.ODCCNFA","md":"MI 6X|{\"manu\":\"Xiaomi\",\"hard\":\"qcom\"}","am":"com.xiaomi.mihome","ch":"MI_APP_STORE","rd":[{"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":5918,\"rpc\":\"{\\"id\\":6353,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":41}","extra":"","am":"mihome","uid":"755489843","time":1564386775}]}] 2019-07-29 15:52:55.346 3276-3845/com.xiaomi.smarthome:core E/MIIO: {"code":0,"interval":1,"max_number":100,"message":"ok","result":"true"} 2019-07-29 15:52:55.346 3276-3845/com.xiaomi.smarthome:core D/CoreService: {"code":0,"interval":1,"max_number":100,"message":"ok","result":"true"} 2019-07-29 15:52:55.346 3276-3392/com.xiaomi.smarthome:core I/STAT-SUCCESS: {"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":5918,\"rpc\":\"{\\"id\\":6353,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":41}","extra":"","am":"mihome","uid":"755489843","time":1564386775} 2019-07-29 15:52:55.921 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:52:58.224 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online start + [] 2019-07-29 15:52:58.226 2131-6202/? I/WifiService: getConnectionInfo uid=10401 2019-07-29 15:52:58.229 3276-3344/com.xiaomi.smarthome:core D/BootRequestCheck: 1564386778228 SmartHomeRc4Api.sendRequest Request{method=POST, url=https://api.io.mi.com/app/home/rpc/293718383, tag=setDNGmzaXqQWFpj+RnE+w==} com.xiaomi.smarthome:core 2019-07-29 15:52:58.925 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:53:01.928 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:53:04.179 3276-3650/com.xiaomi.smarthome:core D/forceUpdateAllData: https://api.io.mi.com/app/home/rpc/293718383 takes 5947ms to get response 2019-07-29 15:53:04.180 3276-3650/com.xiaomi.smarthome:core D/MIIO: host:api.io.mi.com prefix:nullpath:/home/rpc/293718383 method:POST params:[data:{"id":6354,"method":"get_online","params":[]}] 2019-07-29 15:53:04.180 3276-3650/com.xiaomi.smarthome:core D/MIIO: {"code":-9999,"error":{"code":-9999,"message":"user ack timeout"},"id":6354,"message":"user ack timeout"} 2019-07-29 15:53:04.181 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online onFailure=-9999 user ack timeout 2019-07-29 15:53:04.184 3840-4047/com.xiaomi.smarthome:plugin0 I/STAT-REPORT: {type:result,key:app.common.log,value: {type:2,value:{delay:5955,rpc:{id:6354,method:get_online,params:[]},did:293718383,succ:1,model:ydhome.cateye.pr1},key_name:app_common_log,session:1564386510463,order:42},extra:,am:mihome, uid:755489843,time:1564386784} 2019-07-29 15:53:04.185 3276-3392/com.xiaomi.smarthome:core I/STAT-SERVICE: {"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":5955,\"rpc\":\"{\\"id\\":6354,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":42}","extra":"","am":"mihome","uid":"755489843","time":1564386784} 2019-07-29 15:53:04.186 3276-3392/com.xiaomi.smarthome:core D/ServerCompact: get server from cache: ServerBean: CN : cn 2019-07-29 15:53:04.186 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:53:04.186 2131-6202/? I/WifiService: getConnectionInfo uid=10401 2019-07-29 15:53:04.190 3276-3392/com.xiaomi.smarthome:core I/STAT-UPLOAD: {"ver":"v3","cid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","msid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","av":"5.5.10","ov":"Android-8.1.0-V9.5.15.0.ODCCNFA","md":"MI 6X|{\"manu\":\"Xiaomi\",\"hard\":\"qcom\"}","am":"com.xiaomi.mihome","ch":"MI_APP_STORE","rd":[{"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":5955,\"rpc\":\"{\\"id\\":6354,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":42}","extra":"","am":"mihome","uid":"755489843","time":1564386784}]} 2019-07-29 15:53:04.191 3276-3491/com.xiaomi.smarthome:core D/SmartHome: https://api.io.mi.com/app/home/rpc/293718383 takes 5947ms to get response 2019-07-29 15:53:04.191 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:53:04.191 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:53:04.304 3276-3902/com.xiaomi.smarthome:core E/MIIO: prefix:nullpath:/stat/stat_info method:POST params:[data:{"ver":"v3","cid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","msid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","av":"5.5.10","ov":"Android-8.1.0-V9.5.15.0.ODCCNFA","md":"MI 6X|{\"manu\":\"Xiaomi\",\"hard\":\"qcom\"}","am":"com.xiaomi.mihome","ch":"MI_APP_STORE","rd":[{"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":5955,\"rpc\":\"{\\"id\\":6354,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":42}","extra":"","am":"mihome","uid":"755489843","time":1564386784}]}] 2019-07-29 15:53:04.304 3276-3902/com.xiaomi.smarthome:core E/MIIO: {"code":0,"interval":1,"max_number":100,"message":"ok","result":"true"} 2019-07-29 15:53:04.304 3276-3902/com.xiaomi.smarthome:core D/CoreService: {"code":0,"interval":1,"max_number":100,"message":"ok","result":"true"} 2019-07-29 15:53:04.305 3276-3392/com.xiaomi.smarthome:core I/STAT-SUCCESS: {"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":5955,\"rpc\":\"{\\"id\\":6354,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":42}","extra":"","am":"mihome","uid":"755489843","time":1564386784} 2019-07-29 15:53:04.931 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:53:05.440 24927-24927/? W/monitorlib: type=1400 audit(0.0:28106): avc: denied { read } for name="stat" dev="proc" ino=4026532075 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0 2019-07-29 15:53:05.450 24927-25825/? W/System.err: java.io.FileNotFoundException: /proc/stat (Permission denied) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at java.io.FileInputStream.open0(Native Method) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at java.io.FileInputStream.open(FileInputStream.java:200) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at java.io.FileInputStream.(FileInputStream.java:150) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at java.io.FileInputStream.(FileInputStream.java:103) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at android.support.a.a$a.i(Unknown Source:8) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at com.bytedance.framwork.core.monitor.e.a(Unknown Source:166) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at com.bytedance.frameworks.core.a.e.run(Unknown Source:60) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at android.os.Handler.handleCallback(Handler.java:790) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at android.os.Handler.dispatchMessage(Handler.java:99) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at android.os.Looper.loop(Looper.java:164) 2019-07-29 15:53:05.450 24927-25825/? W/System.err: at android.os.HandlerThread.run(HandlerThread.java:65) 2019-07-29 15:53:05.800 24927-24927/? W/monitorlib: type=1400 audit(0.0:28107): avc: denied { read } for name="stat" dev="proc" ino=4026532075 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0 2019-07-29 15:53:05.817 24927-25825/? W/System.err: java.io.FileNotFoundException: /proc/stat (Permission denied) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at java.io.FileInputStream.open0(Native Method) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at java.io.FileInputStream.open(FileInputStream.java:200) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at java.io.FileInputStream.(FileInputStream.java:150) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at java.io.FileInputStream.(FileInputStream.java:103) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at android.support.a.a$a.i(Unknown Source:8) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at com.bytedance.framwork.core.monitor.e.a(Unknown Source:183) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at com.bytedance.frameworks.core.a.e.run(Unknown Source:60) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at android.os.Handler.handleCallback(Handler.java:790) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at android.os.Handler.dispatchMessage(Handler.java:99) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at android.os.Looper.loop(Looper.java:164) 2019-07-29 15:53:05.817 24927-25825/? W/System.err: at android.os.HandlerThread.run(HandlerThread.java:65) 2019-07-29 15:53:05.906 2131-3863/? D/LocationManagerService: getLastLocation: Request[POWER_NONE passive fastest=0 num=1] 2019-07-29 15:53:07.184 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online start + [] 2019-07-29 15:53:07.187 2131-3863/? I/WifiService: getConnectionInfo uid=10401 2019-07-29 15:53:07.189 3276-3344/com.xiaomi.smarthome:core D/BootRequestCheck: 1564386787189 SmartHomeRc4Api.sendRequest Request{method=POST, url=https://api.io.mi.com/app/home/rpc/293718383, tag=setDNGmzaXqQWFpj+RnE+w==} com.xiaomi.smarthome:core 2019-07-29 15:53:07.934 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:53:09.315 3840-3840/com.xiaomi.smarthome:plugin0 E/MiJiaCamera_SdCard: SYNC_DATA 2019-07-29 15:53:09.315 3840-3840/com.xiaomi.smarthome:plugin0 E/MiJiaCamera_SdCard: syncData 2019-07-29 15:53:09.315 3840-3840/com.xiaomi.smarthome:plugin0 E/MiJiaCamera_SdCard: doSyncData 2019-07-29 15:53:09.315 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_SdCard: updateHistoryTime 2019-07-29 15:53:09.316 3840-3840/com.xiaomi.smarthome:plugin0 E/MiJiaCamera_SdCard: notifyFailed: -1 2019-07-29 15:53:09.324 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:53:09.327 3276-3491/com.xiaomi.smarthome:core D/SmartHome: SdCard:notifyFailed: -1 2019-07-29 15:53:09.327 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:53:09.327 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:53:10.937 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:53:13.144 2285-2285/? D/BatteryController: action=android.intent.action.BATTERY_CHANGED; mCharging=true 2019-07-29 15:53:13.145 3495-3495/? I/BatteryInfoReceiver: ACTION_BATTERY_CHANGED 2019-07-29 15:53:13.145 2131-2146/? I/WhetstoneClientManager: pid = 6179, uid = 10291 is frozen, not allowed Broadcast 2019-07-29 15:53:13.145 2131-2146/? V/BroadcastQueueInjector: Skipping BroadcastRecord{17f8c3e u-1 android.intent.action.BATTERY_CHANGED} to ProcessRecord{ebfeb72 6179:com.ss.android.article.lite:pushservice/u0a291} 2019-07-29 15:53:13.145 2131-2146/? I/WhetstoneClientManager: pid = 24927, uid = 10291 is frozen, not allowed Broadcast 2019-07-29 15:53:13.145 2131-2146/? V/BroadcastQueueInjector: Skipping BroadcastRecord{17f8c3e u-1 android.intent.action.BATTERY_CHANGED} to ProcessRecord{c87f83f 24927:com.ss.android.article.lite/u0a291} 2019-07-29 15:53:13.145 3451-3741/? D/PowerCheckerService: onBatteryChanged, mBatteryLevel = 78, status = 2, level = 78, plug = 2 2019-07-29 15:53:13.152 827-2526/? V/LocSvc_HIDL_IzatProvider: [onLocationChanged][71] [HS] =>>>> [HC] 2019-07-29 15:53:13.152 2131-2207/? V/LocSvc_HIDL_IzatProvider_jni: [onLocationChanged][136] [HC] <<= [HS] 2019-07-29 15:53:13.152 2131-2145/? D/LocationManagerService: incoming location: Location[fused 34.200173,108.880676 hAcc=1039 et=+8h36m12s249ms alt=409.3773193359375 vel=0.0 bear=0.0 vAcc=??? sAcc=??? bAcc=??? {Bundle[{com.qualcomm.location.nlp:ready=true}]}] 2019-07-29 15:53:13.153 2131-2145/? D/LocationManagerService: incoming location: Location[fused 34.200173,108.880676 hAcc=1039 et=+8h36m12s249ms alt=409.3773193359375 vel=0.0 bear=0.0 vAcc=??? sAcc=??? bAcc=??? {Bundle[{com.qualcomm.location.nlp:ready=true}]}] 2019-07-29 15:53:13.163 3495-31167/? I/PowerCenterProvider: call METHOD_GET_POWER_SUPPLY_INFO, quick_charge:false 2019-07-29 15:53:13.299 3276-3600/com.xiaomi.smarthome:core D/forceUpdateAllData: https://api.io.mi.com/app/home/rpc/293718383 takes 6107ms to get response 2019-07-29 15:53:13.300 3276-3600/com.xiaomi.smarthome:core D/MIIO: host:api.io.mi.com prefix:nullpath:/home/rpc/293718383 method:POST params:[data:{"id":6355,"method":"get_online","params":[]}] 2019-07-29 15:53:13.300 3276-3600/com.xiaomi.smarthome:core D/MIIO: {"code":-3,"error":{"code":-3,"message":"timeout"},"id":6355,"message":"timeout"} 2019-07-29 15:53:13.301 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online onFailure=-3 timeout 2019-07-29 15:53:13.301 3840-3840/com.xiaomi.smarthome:plugin0 D/MiJiaCamera_HttpMethod: get_online start + [] 2019-07-29 15:53:13.303 2131-3772/? I/WifiService: getConnectionInfo uid=10401 2019-07-29 15:53:13.304 3840-4047/com.xiaomi.smarthome:plugin0 I/STAT-REPORT: {type:result,key:app.common.log,value: {type:2,value:{delay:6115,rpc:{id:6355,method:get_online,params:[]},did:293718383,succ:1,model:ydhome.cateye.pr1},key_name:app_common_log,session:1564386510463,order:43},extra:,am:mihome, uid:755489843,time:1564386793} 2019-07-29 15:53:13.306 3276-3344/com.xiaomi.smarthome:core D/BootRequestCheck: 1564386793306 SmartHomeRc4Api.sendRequest Request{method=POST, url=https://api.io.mi.com/app/home/rpc/293718383, tag=setDNGmzaXqQWFpj+RnE+w==} com.xiaomi.smarthome:core 2019-07-29 15:53:13.306 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:53:13.306 3276-3392/com.xiaomi.smarthome:core I/STAT-SERVICE: {"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":6115,\"rpc\":\"{\\"id\\":6355,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":43}","extra":"","am":"mihome","uid":"755489843","time":1564386793} 2019-07-29 15:53:13.307 3276-3392/com.xiaomi.smarthome:core D/ServerCompact: get server from cache: ServerBean: CN : cn 2019-07-29 15:53:13.307 2131-3772/? I/WifiService: getConnectionInfo uid=10401 2019-07-29 15:53:13.308 3276-3392/com.xiaomi.smarthome:core I/STAT-UPLOAD: {"ver":"v3","cid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","msid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","av":"5.5.10","ov":"Android-8.1.0-V9.5.15.0.ODCCNFA","md":"MI 6X|{\"manu\":\"Xiaomi\",\"hard\":\"qcom\"}","am":"com.xiaomi.mihome","ch":"MI_APP_STORE","rd":[{"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":6115,\"rpc\":\"{\\"id\\":6355,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":43}","extra":"","am":"mihome","uid":"755489843","time":1564386793}]} 2019-07-29 15:53:13.311 3276-3491/com.xiaomi.smarthome:core D/SmartHome: https://api.io.mi.com/app/home/rpc/293718383 takes 6107ms to get response 2019-07-29 15:53:13.311 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:53:13.311 3276-3491/com.xiaomi.smarthome:core I/Microlog.FileAppender: Closing the FileAppender 2019-07-29 15:53:13.422 3276-3974/com.xiaomi.smarthome:core E/MIIO: prefix:nullpath:/stat/stat_info method:POST params:[data:{"ver":"v3","cid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","msid":"909F0F9DD5027FCCE08379FD239748F1D73D00BA","av":"5.5.10","ov":"Android-8.1.0-V9.5.15.0.ODCCNFA","md":"MI 6X|{\"manu\":\"Xiaomi\",\"hard\":\"qcom\"}","am":"com.xiaomi.mihome","ch":"MI_APP_STORE","rd":[{"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":6115,\"rpc\":\"{\\"id\\":6355,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":43}","extra":"","am":"mihome","uid":"755489843","time":1564386793}]}] 2019-07-29 15:53:13.422 3276-3974/com.xiaomi.smarthome:core E/MIIO: {"code":0,"interval":1,"max_number":100,"message":"ok","result":"true"} 2019-07-29 15:53:13.422 3276-3974/com.xiaomi.smarthome:core D/CoreService: {"code":0,"interval":1,"max_number":100,"message":"ok","result":"true"} 2019-07-29 15:53:13.422 3276-3392/com.xiaomi.smarthome:core I/STAT-SUCCESS: {"type":"result","key":"app.common.log","value":"{\"type\":2,\"value\":{\"delay\":6115,\"rpc\":\"{\\"id\\":6355,\\"method\\":\\"get_online\\",\\"params\\":[]}\",\"did\":\"293718383\",\"succ\":1,\"model\":\"ydhome.cateye.pr1\"},\"key_name\":\"app_common_log\",\"session\":1564386510463,\"order\":43}","extra":"","am":"mihome","uid":"755489843","time":1564386793} 2019-07-29 15:53:13.940 856-871/? I/mmid: select timeout: wait for receiving msg 2019-07-29 15:53:15.627 2850-5622/? E/memtrack: Couldn't load memtrack module 2019-07-29 15:53:15.627 2850-5622/? W/android.os.Debug: failed to get memory consumption info: -1 2019-07-29 15:53:16.943 856-871/? I/mmid: select timeout: wait for receiving msg

尝试过的解决办法

使用最新插件和最新设备都试过

zanetti4 commented 5 years ago

已安排相关同事查看,请耐心等待。

18792576258 commented 5 years ago

ios是device.isOnline。Android插件中在线离线的解析是看不到的,所以无法推断设备到底应该传什么状态值。 这个问题应该是设备没返回状态值。 设备会收到手机发来的获取状态的一些方法,但是这些方法收到之后不知道要怎么回复。get_online wakeup等(issue 109)

1. 设备端收到get_online wakeup这些状态值时需要回复的内容和格式是什么
2. 为什么ios和Android判断设备在线离线的方法不一样
gotone commented 5 years ago

需要自行找服务器核对状态。其它设备是没有这个问题的