takatost / homebridge-mi-ac-partner

[DEPRECATED] A Xiaomi Mi ac partner plugin for Homebridge.
MIT License
28 stars 1 forks source link

it seems not support ac partner v2 #1

Closed Fetiz closed 7 years ago

Fetiz commented 7 years ago
screen shot 2017-07-29 at 14 05 14

can't get the token.

takatost commented 7 years ago

Current only supports acpartner.v1, I don't have v2 device to test... You can follow this document to get token.

Fetiz commented 7 years ago

I tried as the doc. But it only show ??? in the bash. I get the token from mijia app. Doesn't work.

Sent from my Google Pixel using FastHub

takatost commented 7 years ago

@Fetiz I'm not sure if the acpartner.v2 is compatible with miio.

Dengor1984 commented 7 years ago

I have Ac Partner v2 and i got token from miso, but have issues after i have try to "on" conditioner

Dengor1984 commented 7 years ago

/usr/lib/node_modules/homebridge-mi-ac-partner/index.js:188 this.device.call('send_cmd', [code]); ^

TypeError: Cannot read property 'call' of undefined at MiAcPartner.SendCmd (/usr/lib/node_modules/homebridge-mi-ac-partner/index.js:188:14) at MiAcPartner.setTargetHeatingCoolingState (/usr/lib/node_modules/homebridge-mi-ac-partner/index.js:146:13) at emitMany (events.js:127:13) at Characteristic.TargetHeatingCoolingState.emit (events.js:204:7) at Characteristic.TargetHeatingCoolingState.Characteristic.setValue (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:164:10) at Bridge. (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:756:22) at Array.forEach (native) at Bridge.Accessory._handleSetCharacteristics (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:701:8) at emitMany (events.js:127:13) at HAPServer.emit (events.js:204:7)

Dengor1984 commented 7 years ago

This is information from miio

Device ID: 55620188 Model info: Unknown Address: 10.0.1.206 Token: f6b1d1901c4832893bd481f7e06d3dac via auto-token Support: Unknown

miio --inspect 55620188 INFO Attempting to inspect 55620188

Device ID: 55620188 Model info: lumi.acpartner.v2 (generic) Address: 10.0.1.206 Token: f6b1d1901c4832893bd481f7e06d3dac via auto-token Support: At least basic

Firmware version: 1.4.1_139 Hardware version: MW300 MCU firmware version: 0143

Remote access (Mi Home App): UDP

It is posiible to make AC Partner work in homekit?

Fetiz commented 7 years ago

@takatos but the miio show the device up and i see the message "part support " in home app.

takatost commented 7 years ago

@Dengor1984 try sudo npm update -g homebridge-mi-ac-partner to add acpartner.v2 support.

Dengor1984 commented 7 years ago

@takatost Ihave apdete to 1.1.2 but it not help...(

Dengor1984 commented 7 years ago

img_3127

takatost commented 7 years ago

@Dengor1984 I received acpartner.v2 just now. I'm trying to compatible with it soon.

Dengor1984 commented 7 years ago

@takatost A HUGE thank you for a trying and a great work! If you need a betatester - i'm ready to help!)

takatost commented 7 years ago

@Dengor1984 My acpartner.v2 worked very fine.

Update to 1.1.3 and make a try. If some error showed up, please post here. I think you got a wrong token..

Dengor1984 commented 7 years ago

@takatost hello! I have update to v 1.1.3 and have no errors in homebridge and in homekit, but homekit don't on/off my conditioner in really! In home app it shows as on/off...

Dengor1984 commented 7 years ago

img_3146

Dengor1984 commented 7 years ago

img_3147

Dengor1984 commented 7 years ago

I will try to fresh install from backup before yours plugin and will you know!

takatost commented 7 years ago

@Dengor1984 Maybe your air conditioner cmd code is not compatible with mine.😕

Dengor1984 commented 7 years ago

@takatost i have a Cooper&Hunter air conditioner. How can i remoove stored token, with which command?

takatost commented 7 years ago

Because different air conditioner has different cmd code, it's hard work...

takatost commented 7 years ago

@Dengor1984 If you want to update the token of a device use the --update flag:

miio --update device-id --token token-as-hex

or reset your ac partner

https://github.com/aholstenson/miio/blob/master/docs/management.md#setting-the-token-of-a-device

Dengor1984 commented 7 years ago

@takatost I have reset my ac partner v2 and got new token, in homekit air conditioner shows and i can change themperature and mode, BUT in real, home app don't on/off my conditioner...( Maybe problem is in cmd code...

Dengor1984 commented 7 years ago

@takatost which manufacturer name of air conditioner you have?

takatost commented 7 years ago

@Dengor1984 Only two media air conditioner

takatost commented 7 years ago

@Dengor1984 Currently, Only Thermostat Service has "set target temperature" characteristic, but the Thermostat Service has no on/off characteristic

This is Thermostat characteristics: https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L3223

Dengor1984 commented 7 years ago

@takatost which brand of iar conditioner you have choose in settings of AC Companion?

Dengor1984 commented 7 years ago

img_3185

takatost commented 7 years ago

@Dengor1984 I tested my Panasonic AC. Unfortunately, It seems different AC has different control command. My Midea AC's power on cmd is 018011111111301402 But Panasonic AC's power on cmd is 010000258701301801000220E004000000060220E00400302080AF00000660000080000671

takatost commented 7 years ago

It's a little harder for many people.

If I open the permission of custom cmd code in configs. You must install the android simulator and Mi Home App. Then use the wireshark to create a capture of your AC partner cmd code and fill in config...

Dengor1984 commented 7 years ago

Sorry, but i don't have any android devices... Only Apple and MacOS

Dengor1984 commented 7 years ago

@takatost if i choose a Midea air conditioner in MiHome app the cmd command will be the same with yours?

takatost commented 7 years ago

@Dengor1984 Yes, but your AC maybe not working with the midea cmd.

Dengor1984 commented 7 years ago

@takatost my AC working with Midea settings in MiHome, but which number of preset do you set? It is from 1 to 28, when you do manual setting

takatost commented 7 years ago

@Dengor1984 I use the No.2 preset.

takatost commented 7 years ago

I'm using the Bluestacks android simulator on Mac to create the capture.

Dengor1984 commented 7 years ago

@takatost My AC working on No 10 preset

takatost commented 7 years ago

And follow this doc to get your code: https://github.com/aholstenson/miio/blob/master/docs/protocol.md

Commands you should get: power on/off temp 16-30

Dengor1984 commented 7 years ago

Ok, i will try, thanks

mulua6 commented 7 years ago

I have the same problem

error logs:

Aug 07 02:50:54 raspberrypi homebridge[1352]: [8/7/2017, 2:50:54 AM] [Ac Partner] Device not exists. Aug 07 02:50:56 raspberrypi homebridge[1352]: [8/7/2017, 2:50:56 AM] [Ac Partner] Device not exists.