LASER-Yi / homebridge-mi-acpartner

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

关于自定义ir,能不能给一个已经配置好的config文件看看 #1

Closed maxmib closed 7 years ago

maxmib commented 7 years ago

关于自定义ir,能不能给一个已经配置好的config文件看看

LASER-Yi commented 7 years ago

img 这个是我目前自己在用的配置文件,格力二号。 需要解释一下这个其实并不是IR信号,准确来说这个是米家app发给空调伴侣的控制码,需要用我在README中提到的方法抓取。

maxmib commented 7 years ago

那个方法我看了,是按miio的那个方式先导出json文件再用miio分析还是按米家扫地机器人里的那个方法一个一个找发送的控制码,我用扫地机器人里的方法试了一下,可以得到所有发送给空调伴侣的控制码但是怎么能识别出哪一个是配置里需要的控制码,我开关空调后用记录的所有发送过的控制码在packetsender里试了一下空调伴侣都没有反应,我的是格力1号

LASER-Yi commented 7 years ago

@maxmib 格力一号插件中有预设提供,发包建议用miio中的control命令 miio --control deviceIdOrAddressHere --method nameOfMethod --params paramsAsJSON

具体来说,如果我想给我家的空调伴侣发包,那么我的命令就是 miio --control 7hsua7eq9201kxa --method send_cmd --params '["0100010727...0001050"]'

maxmib commented 7 years ago

主要是miio识别不了我的网关,所以想用ip的方式来检测设备,看你的config配置里用ip方式的话就要填控制码

LASER-Yi commented 7 years ago

@maxmib 可以直接填ip然后下面用配置,这两个控制是分开的。我没有说清楚,非常抱歉啦。

maxmib commented 7 years ago

[8/17/2017, 12:47:32 PM] [AcPartner] [XiaoMiAcParner][INFO] Using user customized IR signal... /usr/lib/node_modules/homebridge-mi-acpartner/index.js:33 if(!this.UserCustomized.off){ ^

TypeError: Cannot read property 'off' of undefined 出现这错误。。。

这是config { "accessory": "XiaoMiAcPartner", "token": "ad1f58b2c813fbb08a1bd372f49a3442", "name": "AcPartner", "brand": "gree", "preset_no": "1" }, { "accessory": "XiaoMiAcPartner", "token": "ad1f58b2c813fbb08a1bd372f49a3442", "name": "AcPartner", "defaultTemp": 25, "ip": "192.168.31.198", "brand": "gree", "preset_no": "1"

    }
]
LASER-Yi commented 7 years ago

我更新了一个版本修复了 你在npm中更新一下应该就能用了

LASER-Yi commented 7 years ago

另外你这两个对应的都是一个空调伴侣,你可以考虑删掉第一个 只留下下面那个配置

maxmib commented 7 years ago

现在是可以运行了,但是一控制空调伴侣homebridge就无响应, Aug 17 22:13:43 raspberrypi homebridge[8338]: Thu, 17 Aug 2017 14:13:43 GMT Accessory [Homebridge] Setting Characteristic "Target Heating Cooling State" to value 2 Aug 17 22:13:43 raspberrypi homebridge[8338]: /usr/lib/node_modules/homebridge-mi-acpartner/index.js:270 Aug 17 22:13:43 raspberrypi homebridge[8338]: if (!coolSignal[this.TargetTemperature]&&coolSignal[this.TargetTemperature] == "") { Aug 17 22:13:43 raspberrypi homebridge[8338]: ^ Aug 17 22:13:43 raspberrypi homebridge[8338]: ReferenceError: coolSignal is not defined Aug 17 22:13:43 raspberrypi homebridge[8338]: at Object.SendCmd (/usr/lib/node_modules/homebridge-mi-acpartner/index.js:270:26) Aug 17 22:13:43 raspberrypi homebridge[8338]: at Object.setTargetHeatingCoolingState (/usr/lib/node_modules/homebridge-mi-acpartner/index.js:204:18) Aug 17 22:13:43 raspberrypi homebridge[8338]: at emitMany (events.js:127:13) Aug 17 22:13:43 raspberrypi homebridge[8338]: at emit (events.js:201:7) Aug 17 22:13:43 raspberrypi homebridge[8338]: at Characteristic.setValue (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:164:10) Aug 17 22:13:43 raspberrypi homebridge[8338]: at Bridge. (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:733:22) Aug 17 22:13:43 raspberrypi homebridge[8338]: at Array.forEach (native) Aug 17 22:13:43 raspberrypi homebridge[8338]: at Bridge.Accessory._handleSetCharacteristics (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:678:8) Aug 17 22:13:43 raspberrypi homebridge[8338]: at emitMany (events.js:127:13) Aug 17 22:13:43 raspberrypi homebridge[8338]: at HAPServer.emit (events.js:201:7) Aug 17 22:13:43 raspberrypi systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE Aug 17 22:13:43 raspberrypi systemd[1]: Unit homebridge.service entered failed state.

LASER-Yi commented 7 years ago

修复了,请更新一下插件

maxmib commented 7 years ago

homekit里控制了温度但是空调网关没有反应 Aug 18 01:23:01 raspberrypi homebridge[574]: Thu, 17 Aug 2017 17:23:01 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":2,"iid":12,"value":24}] Aug 18 01:23:01 raspberrypi homebridge[574]: Thu, 17 Aug 2017 17:23:01 GMT Accessory [Homebridge] Setting Characteristic "Target Temperature" to value 24 Aug 18 01:23:01 raspberrypi homebridge[574]: Thu, 17 Aug 2017 17:23:01 GMT EventedHTTPServer [::ffff:192.168.31.239] Sending HTTP event '2.11' with data: {"characteristics":[{"aid":2,"iid":11,"value":24}]} Aug 18 01:23:01 raspberrypi homebridge[574]: [8/18/2017, 1:23:01 AM] [AcPartner] [XiaoMiAcPartner][WARN] Signal not define! Aug 18 01:23:01 raspberrypi homebridge[574]: Thu, 17 Aug 2017 17:23:01 GMT EventedHTTPServer [::ffff:192.168.31.239] Muting event '2.12' notification for this connection since it originated here. Aug 18 01:23:01 raspberrypi homebridge[574]: Thu, 17 Aug 2017 17:23:01 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP Response is finished Aug 18 01:23:01 raspberrypi homebridge[574]: Thu, 17 Aug 2017 17:23:01 GMT EventedHTTPServer [::ffff:192.168.31.239] Writing pending HTTP event data

LASER-Yi commented 7 years ago

初始化信息和配置文件给我看看

maxmib commented 7 years ago

配置文件

           "accessories": [
      {
        "accessory": "XiaoMiAcPartner",
        "token": "ad1f58b2c813fbb08a1bd372f49a3442",
        "name": "AcPartner",
        "ip": "192.168.31.198",
        "brand": "gree",
        "preset_no": "1"
         }
       ]

初始化信息 Aug 18 06:03:35 raspberrypi homebridge[5737]: WARNING Please fix your application to use the native API of Avahi! Aug 18 06:03:35 raspberrypi homebridge[5737]: WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs Aug 18 06:03:35 raspberrypi homebridge[5737]: WARNING The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. Aug 18 06:03:35 raspberrypi homebridge[5737]: WARNING Please fix your application to use the native API of Avahi! Aug 18 06:03:35 raspberrypi homebridge[5737]: WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister Aug 18 06:03:38 raspberrypi homebridge[5737]: [8/18/2017, 6:03:38 AM] Loaded plugin: homebridge-edomoticz Aug 18 06:03:38 raspberrypi homebridge[5737]: [8/18/2017, 6:03:38 AM] Registering platform 'homebridge-edomoticz.eDomoticz' Aug 18 06:03:38 raspberrypi homebridge[5737]: [8/18/2017, 6:03:38 AM] --- Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] Loaded plugin: homebridge-mi-acpartner Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] Registering accessory 'homebridge-mi-acpartner.XiaoMiAcPartner' Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] --- Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] Loaded config.json with 1 accessories and 1 platforms. Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] --- Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] Loading 1 platforms... Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] [eDomoticz] Initializing eDomoticz platform... Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] Loading 1 accessories... Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] [AcPartner] Initializing XiaoMiAcPartner accessory... Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] [AcPartner] [XiaoMiAcPartner][INFO] Using presets... Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.device.[192.168.31.198] -> Handshake Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.packet -> <Buffer 21 31 00 20 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff> Aug 18 06:03:39 raspberrypi homebridge[5737]: Scan this code with your HomeKit App on your iOS device to pair with Homebridge: Aug 18 06:03:39 raspberrypi homebridge[5737]: ┌────────────┐ Aug 18 06:03:39 raspberrypi homebridge[5737]: │ 030-66-233 │ Aug 18 06:03:39 raspberrypi homebridge[5737]: └────────────┘ Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT EventedHTTPServer Server listening on port 51826 Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] Homebridge is running on port 51826. Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] [eDomoticz] Data received for 智能台灯. Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] [eDomoticz] Data Received for 智能台灯: 100 Aug 18 06:03:39 raspberrypi homebridge[5737]: [8/18/2017, 6:03:39 AM] [eDomoticz] There was an error while getting the MQTT Hardware Device from Domoticz. Aug 18 06:03:39 raspberrypi homebridge[5737]: Please verify that you have added the MQTT Hardware Device and that the hardware device is enabled. Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.packet <- <Buffer 21 31 00 20 00 00 00 00 02 e0 b5 1e 00 0b 6d d7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.device.[192.168.31.198] <- Handshake reply: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.device.[192.168.31.198] -> (3) {"id":1,"method":"miIO.info","params":[]} Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.packet -> <Buffer 21 31 00 50 00 00 00 00 02 e0 b5 1e 00 0b 6d d7 ef 05 98 c2 d2 97 87 b3 55 63 37 70 96 4e 7a 37> Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.packet <- <Buffer 21 31 02 30 00 00 00 00 02 e0 b5 1e 00 0b 6d d7 d9 f2 f1 79 99 6e a8 9e 1a f5 26 03 c0 ef 9b 90> Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.device.[192.168.31.198] <- Message: {"result":{"life":749015,"cfg_time":0,"token":"ad1f58b2c813fbb08a1bd372f49a3442","mac":"28:6C:07:11:79:09","fw_ver":"1.4.1_144","hw_ver":"MW300","uid":36827187,"model":"lumi.acpartner.v1","mcu_fw_ver":"0143","wifi_fw_ver":"SD878x-14.76.36.p84-702.1.0-WM","ap":{"rssi":-51,"ssid":"Xiaomi","bssid":"64:09:80:75:CF:8F"},"netif":{"localIp":"192.168.31.198","mask":"255.255.255.0","gw":"192.168.31.1","gw_mac":"64:09:80:75:CF:8E"},"mmfree":158096,"ot":"ott","otu_stat":[207,95,591,14,575,70],"ott_stat":[6, 9, 230, 3403]},"id":1} Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.device.[192.168.31.198] -> Handshake Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.packet -> <Buffer 21 31 00 20 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff> Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.packet <- <Buffer 21 31 00 20 00 00 00 00 02 e0 b5 1e 00 0b 6d d7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.device.[192.168.31.198] <- Handshake reply: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.device.[192.168.31.198] -> (3) {"id":1,"method":"get_prop","params":["illumination","rgb"]} Aug 18 06:03:39 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:39 GMT miio.packet -> <Buffer 21 31 00 60 00 00 00 00 02 e0 b5 1e 00 0b 6d d7 5e 2c 1e 0b ac de bc 7a f3 ca 72 5d d8 fa 2f 0d> Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] New connection from client Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP server listening on port 36113 Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP request: /pair-verify Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT HAPServer [B8:66:EB:F8:F6:D5] HAP Request: POST /pair-verify Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT HAPServer [B8:66:EB:F8:F6:D5] Pair verify step 1/2 Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP Response is finished Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP request: /pair-verify Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT HAPServer [B8:66:EB:F8:F6:D5] HAP Request: POST /pair-verify Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT HAPServer [B8:66:EB:F8:F6:D5] Pair verify step 2/2 Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT HAPServer [B8:66:EB:F8:F6:D5] Client 1511931C-9CC2-4F44-B6BB-806D67856B6D verification complete Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP Response is finished Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP request: /accessories Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT HAPServer [B8:66:EB:F8:F6:D5] HAP Request: GET /accessories Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP Response is finished Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP request: /characteristics Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT HAPServer [B8:66:EB:F8:F6:D5] HAP Request: PUT /characteristics Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":2,"iid":9,"ev":true},{"aid":2,"iid":10,"ev":true},{"aid":2,"iid":11,"ev":true},{"aid":2,"iid":12,"ev":true},{"aid":2,"iid":13,"ev":true}] Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT Accessory [Homebridge] Registering Characteristic "Current Heating Cooling State" for events Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT Accessory [Homebridge] Registering Characteristic "Target Heating Cooling State" for events Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT Accessory [Homebridge] Registering Characteristic "Current Temperature" for events Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT Accessory [Homebridge] Registering Characteristic "Target Temperature" for events Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT Accessory [Homebridge] Registering Characteristic "Temperature Display Units" for events Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP Response is finished Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP request: /characteristics Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT HAPServer [B8:66:EB:F8:F6:D5] HAP Request: PUT /characteristics Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":3,"iid":9,"ev":true},{"aid":3,"iid":10,"ev":true}] Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT Accessory [Homebridge] Registering Characteristic "On" for events Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT Accessory [Homebridge] Registering Characteristic "Brightness" for events Aug 18 06:03:40 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:40 GMT EventedHTTPServer [::ffff:192.168.31.239] HTTP Response is finished Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] -> (2) {"id":1,"method":"get_prop","params":["illumination","rgb"]} Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.packet -> <Buffer 21 31 00 60 00 00 00 00 02 e0 b5 1e 00 0b 6d d9 72 4e f4 a7 bf 84 c3 0a d7 e0 19 26 b0 6b 6c fe> Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.packet <- <Buffer 21 31 00 40 00 00 00 00 02 e0 b5 1e 00 0b 6d d9 b2 5e 0b ca 36 c7 29 25 5f db a4 0b ee ca e2 45> Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] <- Message: {"result":[164,null],"id":1} Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] Property illuminance changed from undefined to 164 Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] Property rgb changed from undefined to { red: 0, green: 0, blue: 0 } Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] Property brightness changed from undefined to 0 Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] -> (3) {"id":2,"method":"get_device_prop","params":["lumi.0","device_list"]} Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.packet -> <Buffer 21 31 00 70 00 00 00 00 02 e0 b5 1e 00 0b 6d d9 18 6d 12 50 20 40 70 9d 3c da 76 9a bc 91 6c 45> Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.packet <- <Buffer 21 31 00 d0 00 00 00 00 02 e0 b5 1e 00 0b 6d d9 20 50 c5 f7 e2 26 74 e4 ab 65 a4 e7 69 f7 87 9d> Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] <- Message: {"result":["lumi.158d000114b903",10,1,0,1,"lumi.158d00010101ec",3,1,0,10,"lumi.158d0001177c75",2,1,0,11,"lumi.158d0001148787",11,1,22,1,"lumi.158d0000e7cb18",1,1,0,10],"id":2} Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] -> (3) {"id":3,"method":"get_device_prop_exp","params":[["lumi.158d000114b903","temperature","humidity"]]} Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.packet -> <Buffer 21 31 00 90 00 00 00 00 02 e0 b5 1e 00 0b 6d d9 ea 85 06 38 a0 0c fe 59 3b 36 c8 45 23 5a 44 cb> Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] -> (3) {"id":4,"method":"get_device_prop_exp","params":[["lumi.158d0001148787","status","load_voltage","load_power","power_consumed"]]} Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.packet -> <Buffer 21 31 00 b0 00 00 00 00 02 e0 b5 1e 00 0b 6d d9 f0 f1 77 d5 69 08 90 a9 83 de 83 cc d8 64 0f 0b> Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] -> (3) {"id":5,"method":"get_lumi_dpf_aes_key","params":[]} Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.packet -> <Buffer 21 31 00 60 00 00 00 00 02 e0 b5 1e 00 0b 6d d9 a1 a0 8c 12 08 75 c3 95 5f e4 88 fa ec 0d 3f b5> Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.packet <- <Buffer 21 31 00 40 00 00 00 00 02 e0 b5 1e 00 0b 6d d9 74 f8 00 1c 81 f4 28 86 60 62 ae 39 b0 84 b5 09> Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] <- Message: {"result":[[2740,6312]],"id":3} Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198].158d000114b903 Property temperature changed from undefined to 27.4 Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198].158d000114b903 Property humidity changed from undefined to 63.12 Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.packet <- <Buffer 21 31 00 50 00 00 00 00 02 e0 b5 1e 00 0b 6d d9 4d ba ab 7d 8e 8c 35 f3 f9 0b 80 3b 43 4b 50 33> Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] <- Message: {"result":[["","",0.00,""]],"id":4} Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198].158d0001148787 Property powerChannel0 changed from undefined to false Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198].158d0001148787 Property power changed from undefined to { '0': false } Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198].158d0001148787 Property loadVoltage changed from undefined to NaN Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198].158d0001148787 Property loadPower changed from undefined to 0 Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198].158d0001148787 Property powerConsumed changed from undefined to NaN Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.packet <- <Buffer 21 31 00 50 00 00 00 00 02 e0 b5 1e 00 0b 6d d9 e2 d0 b9 c7 74 76 fd e6 7e e9 26 94 7e 7b e6 f5> Aug 18 06:03:41 raspberrypi homebridge[5737]: Thu, 17 Aug 2017 22:03:41 GMT miio.device.[192.168.31.198] <- Message: {"result":["16hjfnpkklmphwkb"],"id":5}

LASER-Yi commented 7 years ago

因为我们家没有使用预设,所以那个地方没有调试过,这次应该可以用了,非常抱歉了

maxmib commented 7 years ago

太客气了,你愿意做这个就很感谢了,已经可以使用了,另外想问一下这个可以实时获得空调状态吗,如果空调是开着的homekit刚启动能不能自动获得空调状态并显示

LASER-Yi commented 7 years ago

这个功能理论上可以实现的,我打算下个版本弄出来

maxmib commented 7 years ago

很可以,期待新功能