- 积分
- 523
- 金钱
- 366
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
高级会员
- 积分
- 523
- 金钱
- 366
- HASS币
- 0
|
本帖最后由 liuxiaobo 于 2024-8-25 22:24 编辑
家中使用的奥克斯空调,论坛的MQTT方案不适用,无奈手动抓包,小黄鸟抓包接口数据如下:
1.登录为短信验证,短信请求接口如下:
https://smthomeav.aux-home.com/app/login_sms_code
方法为 POST,请求体为 phone:13xxxxx 手机号
2.短信验证请求接口:
https://smthomeav.aux-home.com/app/wechatMini/loginBySms
方法为 POST,请求体为 phone:13xxxxx 手机号;code:xxxx 验证码
3.登录后获取到Authorization 参数=token值 并包含到请求头中,expireAt应为token有效期时间参数:
"openApiToken": {
"token": "bc18c3b217a34c7b9dfXXXXXXXXXXXXXXXXX",
"expireAt": 1726762443
}
4.获取设备列表接口,确保请求头中包含 Authorization 参数值
https://smthomeav.aux-home.com/app/device_bindings?getStatus=true
获取到的设备列表JSON数据如下(部分私人参数和谐):
{
"code": 200,
"message": "OK",
"data": [
{
"deviceId": "f57cb83f-e9c5-4251-b98e-a81fXXXXXXXXXXX",
"source": 1,
"productKey": "000100XXXXX",
"mac": "E8165XXXXXXXX",
"did": "d500010001XXXXXXX",
"alias": "主卧空调",
"type": null,
"deviceKey": null,
"deviceLock": null,
"password": "b7beXXXXXXXX",
"terminalId": 1,
"subDevice": 0,
"dataOne": "42",
"dataTwo": "90",
"dataThree": "06",
"city": null,
"cityCode": null,
"sn": "",
"longitude": "113.XXXXX",
"latitude": "30.XXXXX",
"modelId": "ea47d0fc-e9f1-4589-8f9d-4XXXXXXXXXXX",
"suitType": 0,
"useType": 0,
"feature": "{\"coolType\":[\"1\",\"0\"],\"frenquency\":[\"1\",\"0\"],\"tempInterval\":[\"0\",\"0\"],\"roomTempDisplay\":[\"1\",\"0\"],\"screen\":[\"2\",\"0\"],\"windSpeed\":[\"2\",\"0\"],\"faultSupport\":[\"0\",\"0\"],\"timing\":[\"0\",\"0\"],\"mode\":[\"0,1,2,3,4\",\"1\"],\"deviceSupport\":[\"0,1,2,3,4,5,6,7,9,10\",\"1\"],\"appSupport\":[\"0,1,2,3,4,5\",\"1\"]}",
"deviceMainUri": "https://smart-home-saas.oss-cn-hangzhou.aliyuncs.com/20181108/img/a2f1873e-c7a8-49ea-bd2c-7005ccf921e3.png",
"entityUri": null,
"userTag": 0,
"wash": true,
"deviceKind": null,
"mcuType": 0,
"sftype": false,
"zeroWindFeel": false,
"address": null,
"transport": null,
"customerFuncs": null,
"thirdDid": null,
"online": true,
"data": {
"wind_child": 0,
"ventilate": 0,
"half": 0,
"wind_speed_1": 6,
"air_con_func": 1,
"power_limit_percent": 0,
"support_heat": 1,
"type": "control_status",
"auto_screen": 0,
"eco": 0,
"temperature_decimal": 0,
"up_down_swing": 7,
"power_limit": 0,
"electric_lock": 0,
"anti_fungus": 0,
"temperature": 29,
"left_right_swing": 1,
"wind_smart": 0,
"ventilate_heap_notify": 0,
"fahrenheit": 0,
"addr": 1,
"wind_far": 0,
"sleep_mode": 0,
"ver": 0,
"electric_heating": 0,
"src": 1,
"comfort_wind": 0,
"freshing": 0,
"wind_ring": 0,
"on_off": 1,
"clean": 0,
"zero_wind_feeling": 0,
"sleep_diy": 0,
"ventilate_auxiliary": 0,
"auto_following_code": 0,
"human_detection": 0,
"screen_on_off": 0,
"healthy": 0,
"following": 0,
"wind_light": 0,
"turbo_silence": 0,
"air_q_light": 0,
"hanging": 1
},
"wifi_hard_version": "2C007100",
"wifi_soft_version": "00071061",
"passcode": "b7beXXXXXX"
}
]
}
5.控制接口和部分控制代码值(请确保请求头中包含 Authorization 参数值):
https://smthomeav.aux-home.com/app/wechatMini/new_device_control
例,空调调整到29.5度:
{
"did": "d500010001e816566b4b98",
"uart": "bb00068000010f000101af2080a0002000002000000000de9b",
"pk": "00010001",
"action": {
"temperature": 295
}
}
|
评分
-
查看全部评分
|