Open syssi opened 6 years ago
get_device_prop '[ "lumi.0" , "ac_power" ]' # current wat number -> [100.91]
@killadm which version (v1, v2 vor v3) of the device do you own? Does this value match with the 3rd value of get_model_and_state []
?
@syssi lumi.acpartner.v2 yes
@syssi I found the source code of the MI Home APP(IOS). https://github.com/NoverreD/Device_ForRemote
"\Devices\Gateway\Logic\IFTTT\MHGatewayMigrationManager.m"(275,70): NSDictionary payload = [gateway requestJsonDictionaryPayloadWithMethodName:@"notify_back_up" "\Devices\Gateway\Logic\IFTTT\MHGatewayMigrationManager.m"(315,70): NSDictionary payload = [gateway requestJsonDictionaryPayloadWithMethodName:@"notify_back_up" "\Devices\Gateway\Logic\IFTTT\MHGatewayMigrationManager.m"(364,59): NSDictionary payload = [oldGateway requestPayloadWithMethodName:@"remove_all_device" "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(284,53): NSDictionary payload = [self requestPayloadWithMethodName:@"send_cmd" value:command]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(297,53): NSDictionary payload = [self requestPayloadWithMethodName:@"send_ir_code" value:code]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(325,53): NSDictionary payload = [self requestPayloadWithMethodName:@"save_cmd_map" value:command]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(357,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_cmd_map" value:[NSMutableArray new]]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(457,53): NSDictionary payload = [self requestPayloadWithMethodName:@"send_cmd_by_model" value:modelCmd]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(471,53): NSDictionary payload = [self requestPayloadWithMethodName:@"set_ac_model" value:modelCmd]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(496,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_model_and_state" value:test]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1014,54): NSDictionary payload = [self requestPayloadWithMethodName:@"start_ir_learn" value:@[ value ? value : @(30) ]]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1025,54): NSDictionary payload = [self requestPayloadWithMethodName:@"get_ir_learn_result" value:[NSMutableArray new]]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1036,54): NSDictionary payload = [self requestPayloadWithMethodName:@"end_ir_learn" value:[NSMutableArray new]]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1099,54): NSDictionary payload = [self requestPayloadWithMethodName:@"set_quick_cool_func" value:params]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1110,54): NSDictionary payload = [self requestPayloadWithMethodName:@"get_quick_cool_func" value:[NSMutableArray new]]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1123,54): NSDictionary payload = [self requestPayloadWithMethodName:@"set_sleep_func" value:params]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1134,54): NSDictionary payload = [self requestPayloadWithMethodName:@"get_sleep_func" value:[NSMutableArray new]]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1146,53): NSDictionary payload = [self requestPayloadWithMethodName:@"start_ir_match" value:params]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1157,54): NSDictionary payload = [self requestPayloadWithMethodName:@"get_ir_match_result" value:[NSMutableArray new]]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1169,54): NSDictionary payload = [self requestPayloadWithMethodName:@"end_ir_match" value:[NSMutableArray new]]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1256,53): NSDictionary payload = [self requestPayloadWithMethodName:@"start_scan_model" value:@(count)]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1374,53): NSDictionary payload = [self requestPayloadWithMethodName:@"end_scan_model" value:params]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(1386,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_scan_result" value:params]; "\Devices\Gateway\Logic\Models\MHDeviceAcpartner.m"(2619,54): NSDictionary payload = [self requestPayloadWithMethodName:@"get_device_prop" value:@[ @"lumi.0" , @"ac_power" ]]; "\Devices\Gateway\Logic\Models\MHDeviceCamera.m"(88,53): NSDictionary payload = [self requestPayloadWithMethodName:@"set_video" value:@[ toggle, self.UID ?: @"FDPUBD5CK1VM8N6GY1C1" ]]; "\Devices\Gateway\Logic\Models\MHDeviceCamera.m"(105,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_prop" value:@[ @"p2p_id"]]; "\Devices\Gateway\Logic\Models\MHDeviceCamera.m"(124,15): NSString methodName = @"set_video"; "\Devices\Gateway\Logic\Models\MHDeviceCamera.m"(128,26): payload[@"method"] = methodName; "\Devices\Gateway\Logic\Models\MHDeviceCamera.m"(155,15): NSString methodName = @"set_app_type"; "\Devices\Gateway\Logic\Models\MHDeviceCamera.m"(172,26): payload[@"method"] = methodName; "\Devices\Gateway\Logic\Models\MHDeviceCamera.m"(195,15): NSString methodName = @"get_feccal"; "\Devices\Gateway\Logic\Models\MHDeviceCamera.m"(198,26): payload[@"method"] = methodName; "\Devices\Gateway\Logic\Models\MHDeviceCamera.m"(230,17):// NSString methodName = @"get_feccal"; "\Devices\Gateway\Logic\Models\MHDeviceCamera.m"(233,28):// payload[@"method"] = methodName; "\Devices\Gateway\Logic\Models\MHDeviceGateway.h"(116,51):- (NSDictionary )requestJsonDictionaryPayloadWithMethodName:(NSString )method value:(NSDictionary )value; "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(363,37):- (NSDictionary )requestPayloadWithMethodName:(NSString )method value:(id)value { "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(377,51):- (NSDictionary )requestJsonDictionaryPayloadWithMethodName:(NSString )method value:(NSDictionary )value { "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(496,53): NSDictionary payload = [self requestPayloadWithMethodName:@"start_zigbee_join" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(511,53): NSDictionary payload = [self requestPayloadWithMethodName:@"start_zigbee_join" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(527,53): NSDictionary payload = [self requestPayloadWithMethodName:@"remove_device" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(571,44): payload = [self requestPayloadWithMethodName:@"get_device_prop" value:@[ @"lumi.0" , @"en_alarm_light", @"alarm_time_len" ]]; "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(574,44): payload = [self requestPayloadWithMethodName:@"get_device_prop" value:@[ @"lumi.0" , alarmNames[propId] ]]; "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(602,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_device_prop_exp" value:[self requestPayloadParams:devices]]; "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(836,53): NSDictionary payload = [self requestPayloadWithMethodName:@"music_list" value:@( idx )]; "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(863,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_default_sound" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(895,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_music_free_space" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(912,53): NSDictionary payload = [self requestPayloadWithMethodName:@"download_user_music" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(928,53): NSDictionary payload = [self requestPayloadWithMethodName:@"delete_user_music" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(943,53): NSDictionary payload = [self requestPayloadWithMethodName:@"reset_user_music" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(961,53): NSDictionary payload = [self requestPayloadWithMethodName:@"play_music_new" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(978,53): NSDictionary payload = [self requestPayloadWithMethodName:@"set_default_music" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(994,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_default_music" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1011,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_music_info" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1080,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_download_progress" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1118,53): NSDictionary payload = [self requestPayloadWithMethodName:@"set_default_sound" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1135,54): NSDictionary payload = [self requestPayloadWithMethodName:@"play_music" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1151,53): NSDictionary payload = [self requestPayloadWithMethodName:@"bind_page" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1213,53): NSDictionary payload = [self requestPayloadWithMethodName:@"dis_alarm" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1230,53): NSDictionary payload = [self requestPayloadWithMethodName:@"set_sound_playing" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1270,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_prop_fm" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1300,67): NSDictionary payload = [self requestJsonDictionaryPayloadWithMethodName:@"play_specify_fm" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1315,53): NSDictionary payload = [self requestPayloadWithMethodName:@"play_specify_fm" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1332,53): NSDictionary payload = [self requestPayloadWithMethodName:@"volume_ctrl_fm" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1427,67): NSDictionary payload = [self requestJsonDictionaryPayloadWithMethodName:@"set_channels" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1471,67): NSDictionary payload = [self requestJsonDictionaryPayloadWithMethodName:@"add_channels" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1484,67): NSDictionary payload = [self requestJsonDictionaryPayloadWithMethodName:@"remove_channels" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1501,67): NSDictionary payload = [self requestJsonDictionaryPayloadWithMethodName:@"get_channels" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1519,53): NSDictionary payload = [self requestPayloadWithMethodName:@"play_fm" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1719,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_clock" "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1742,53): NSDictionary payload = [self requestPayloadWithMethodName:@"set_clock" value:array]; "\Devices\Gateway\Logic\Models\MHDeviceGateway.m"(1849,53): NSDictionary payload = [self requestPayloadWithMethodName:@"set_clock" value:@[ @(0),@(0),@(0),@(0),@(minute)]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewayBase.h"(141,37):- (NSDictionary )requestPayloadWithMethodName:(NSString )method "\Devices\Gateway\Logic\Models\MHDeviceGatewayBase.h"(143,39):- (NSDictionary )subDevicePayloadWithMethodName:(NSString )method "\Devices\Gateway\Logic\Models\MHDeviceGatewayBase.m"(47,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_battery" "\Devices\Gateway\Logic\Models\MHDeviceGatewayBase.m"(106,37):- (NSDictionary )requestPayloadWithMethodName:(NSString )method "\Devices\Gateway\Logic\Models\MHDeviceGatewayBase.m"(122,39):- (NSDictionary )subDevicePayloadWithMethodName:(NSString )method deviceId:(NSString )did value:(id)value { "\Devices\Gateway\Logic\Models\MHDeviceGatewayBase.m"(144,53): NSDictionary payload = [self requestPayloadWithMethodName:@"bind_page" "\Devices\Gateway\Logic\Models\MHDeviceGatewayBase.m"(220,57): NSDictionary payload = [self requestPayloadWithMethodName:@"bind" "\Devices\Gateway\Logic\Models\MHDeviceGatewayBase.m"(274,69): NSDictionary payload = [self requestPayloadWithMethodName:@"remove_bind" "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorCassette.m"(351,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"get_device_prop_exp" "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorCassette.m"(383,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"toggle_plug" deviceId:self.did value:@[ @"channel_0", toggle ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorCassette.m"(426,36):- (void)setPlugProtect:(NSString )methodName "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorCassette.m"(436,46): [payload setObject:@{ @"sid" : self.did, methodName : @(value) } forKey:@"params"]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorCurtain.m"(131,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_device_prop" value:@[ @"curtain_status" ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorCurtain.m"(178,55):// NSDictionary payload = [self requestPayloadWithMethodName:@"toggle_device" value:@[ status ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorCurtain.m"(179,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"toggle_device" deviceId:self.did value:@[ status ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorCurtain.m"(205,53): NSDictionary payload = [self requestPayloadWithMethodName:@"toggle_device" value:@[ @"open" ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorCurtain.m"(229,53): NSDictionary payload = [self requestPayloadWithMethodName:@"toggle_device" value:@[ @"stop" ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorCurtain.m"(263,53): NSDictionary payload = [self requestPayloadWithMethodName:@"toggle_device" value:@[ @"close" ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorDoubleNeutral.m"(197,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_prop_ctrl_neutral" value:@[ @"neutral_0", @"neutral_1" ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorDoubleNeutral.m"(258,55):// NSDictionary payload = [self requestPayloadWithMethodName:@"toggle_ctrl_neutral" value:@[ neutral, status]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorDoubleNeutral.m"(298,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"toggle_ctrl_neutral" deviceId:self.did value:@[ neutral , status ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorHumiture.m"(48,55):// NSDictionary payload = [self requestPayloadWithMethodName:@"get_prop_sensor_ht" value:propNames]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorHumiture.m"(49,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"get_prop_sensor_ht" deviceId:self.did value:propNames]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorNatgas.m"(178,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_device_prop" value:@[ self.did, @"read_info" ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorPlug.h"(51,36):- (void)setPlugProtect:(NSString )methodName "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorPlug.m"(348,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_prop_plug" "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorPlug.m"(377,55):// NSDictionary payload = [self requestPayloadWithMethodName:@"get_prop_plug" "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorPlug.m"(401,55):// NSDictionary payload = [self requestPayloadWithMethodName:@"toggle_plug" value:@[@"neutral_0",toggle]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorPlug.m"(450,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"toggle_plug" deviceId:self.did value:@[ @"neutral_0" , toggle ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorPlug.m"(494,36):- (void)setPlugProtect:(NSString )methodName "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorPlug.m"(504,46): [payload setObject:@{ @"sid" : self.did, methodName : @(value) } forKey:@"params"]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorSingleNeutral.m"(150,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_prop_ctrl_neutral" value:@[ @"neutral_0" ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorSingleNeutral.m"(201,55):// NSDictionary payload = [self requestPayloadWithMethodName:@"toggle_ctrl_neutral" value:@[ @"neutral_0", status]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorSingleNeutral.m"(226,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"toggle_ctrl_neutral" deviceId:self.did value:@[ @"neutral_0" , status ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorWithNeutralDual.m"(198,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"get_device_prop_exp" "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorWithNeutralDual.m"(247,59): // NSDictionary payload = [self requestPayloadWithMethodName:@"toggle_ctrl_neutral" value:@[ neutral, status]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorWithNeutralDual.m"(287,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"toggle_ctrl_neutral" deviceId:self.did value:@[ neutral , status ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorWithNeutralSingle.m"(162,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"get_device_prop_exp" deviceId:nil value:@[ @[self.did, @"channel_0" , @"load_power"] ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorWithNeutralSingle.m"(200,55): NSDictionary payload = [self subDevicePayloadWithMethodName:@"toggle_ctrl_neutral" deviceId:self.did value:@[ @"channel_0" , status ]]; "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorXBulb.m"(37,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_bright" "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorXBulb.m"(53,53): NSDictionary payload = [self requestPayloadWithMethodName:@"set_bright" "\Devices\Gateway\Logic\Models\MHDeviceGatewaySensorXBulb.m"(72,53): NSDictionary payload = [self requestPayloadWithMethodName:@"toggle" value:nil]; "\Devices\Gateway\Logic\Tools\MHDeviceGatewaySensorLoopData.m"(76,53): NSDictionary payload = [self requestPayloadWithMethodName:prop value:params]; "\Devices\Gateway\Logic\Tools\MHDeviceGatewaySensorLoopDataV2.h"(15,42):- (void)startWatchingNewData:(NSString )methodName WithParams:(id)params; "\Devices\Gateway\Logic\Tools\MHDeviceGatewaySensorLoopDataV2.m"(17,40):@property (nonatomic,strong) NSString methodName; "\Devices\Gateway\Logic\Tools\MHDeviceGatewaySensorLoopDataV2.m"(38,42):- (void)startWatchingNewData:(NSString )methodName WithParams:(id)params { "\Devices\Gateway\Logic\Tools\MHDeviceGatewaySensorLoopDataV2.m"(41,6): _methodName = methodName; "\Devices\Gateway\Logic\Tools\MHDeviceGatewaySensorLoopDataV2.m"(61,31): [self loopDeviceProp:self.methodName value:self.params success:^(id obj){ "\Devices\Gateway\Logic\Tools\MHDeviceGatewaySensorLoopDataV2.m"(67,53): NSLog(@" loop fetch data , propname = %@", self.methodName); "\Devices\Gateway\Logic\Tools\MHDeviceGatewaySensorLoopDataV2.m"(75,55): NSDictionary payload = [self subDevicePayloadWithMethodName:prop deviceId:nil value:params]; "\Devices\Gateway\UI\Camera\CameraChunDongDemo\MHDeviceCameraDemo.m"(81,53): NSDictionary payload = [self requestPayloadWithMethodName:@"get_prop" value:@[ @"p2p_id"]]; "\Devices\Gateway\UI\Camera\CameraChunDongDemo\MHDeviceCameraDemo.m"(100,15): NSString methodName = @"set_video"; "\Devices\Gateway\UI\Camera\CameraChunDongDemo\MHDeviceCameraDemo.m"(104,26): payload[@"method"] = methodName; "\Devices\Gateway\UI\Camera\CameraChunDongDemo\MHDeviceCameraDemo.m"(124,15): NSString *methodName = @"set_app_type"; "\Devices\Gateway\UI\Camera\CameraChunDongDemo\MHDeviceCameraDemo.m"(141,26): payload[@"method"] = methodName;