『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 7730|回复: 18

[技术探讨] 斐讯空气净化器 A1 api记录

[复制链接]

32

主题

986

帖子

4233

积分

论坛元老

Rank: 8Rank: 8

积分
4233
金钱
3207
HASS币
110

教程狂人论坛风云人物

发表于 2018-3-25 10:37:20 | 显示全部楼层 |阅读模式
本帖最后由 27hh 于 2018-3-25 10:39 编辑

期待大神写插件

可用操作
public interface a {
    @retrofit2.http.GET("aircleaner/getBindDevs")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse<com.phicomm.aircleaner.models.equipment.response.EnvDeviceListResponse>> a(@retrofit2.http.Header("Authorization") java.lang.String r1);

    @retrofit2.http.GET("aircleaner/countData_year")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse<com.phicomm.aircleaner.models.history.response.YearDataResponse.DataBean>> a(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceID") java.lang.String r2);

    @retrofit2.http.POST("aircleaner/setDataSource")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse> a(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("catDeviceID") java.lang.String r2, @retrofit2.http.Query("cleanerDeviceID") java.lang.String r3);

    @retrofit2.http.GET("aircleaner/countData_day")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse<com.phicomm.aircleaner.models.history.response.DayDataResponse.DataBean>> a(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceID") java.lang.String r2, @retrofit2.http.Query("startTime") java.lang.String r3, @retrofit2.http.Query("endTime") java.lang.String r4);

    @retrofit2.http.POST("scenarioautomation/aircleaner/addTask")
    io.reactivex.d<com.phicomm.aircleaner.models.task.beans.TaskResponse> a(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceId") java.lang.String r2, @retrofit2.http.Query("name") java.lang.String r3, @retrofit2.http.Query("mode") java.lang.String r4, @retrofit2.http.Query("customMode") java.lang.String r5, @retrofit2.http.Query("repeatMode") java.lang.String r6, @retrofit2.http.Query("startTime") java.lang.String r7, @retrofit2.http.Query("endTime") java.lang.String r8);

    @retrofit2.http.POST("scenarioautomation/aircleaner/modifyTask")
    io.reactivex.d<com.phicomm.aircleaner.models.task.beans.TaskResponse> a(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceId") java.lang.String r2, @retrofit2.http.Query("taskId") java.lang.String r3, @retrofit2.http.Query("name") java.lang.String r4, @retrofit2.http.Query("mode") java.lang.String r5, @retrofit2.http.Query("customMode") java.lang.String r6, @retrofit2.http.Query("repeatMode") java.lang.String r7, @retrofit2.http.Query("startTime") java.lang.String r8, @retrofit2.http.Query("endTime") java.lang.String r9);

    @retrofit2.http.GET("aircleaner/getIndexData")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse<com.phicomm.aircleaner.models.home.beans.DeviceResponse>> b(@retrofit2.http.Header("Authorization") java.lang.String r1);

    @retrofit2.http.GET("aircleaner/getDeviceData")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse<com.phicomm.aircleaner.models.home.beans.Device>> b(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceID") java.lang.String r2);

    @retrofit2.http.POST("aircleaner/setChildLock")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse> b(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceID") java.lang.String r2, @retrofit2.http.Query("childLock") java.lang.String r3);

    @retrofit2.http.GET("aircleaner/countData_day_hour")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse<com.phicomm.aircleaner.models.history.response.DayDataResponse.DataBean>> b(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceID") java.lang.String r2, @retrofit2.http.Query("startTime") java.lang.String r3, @retrofit2.http.Query("endTime") java.lang.String r4);

    @retrofit2.http.GET("aircleaner/getDeviceStatus")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse> c(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceID") java.lang.String r2);

    @retrofit2.http.POST("aircleaner/setDeviceMode")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse> c(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceID") java.lang.String r2, @retrofit2.http.Query("mode") java.lang.String r3);

    @retrofit2.http.GET("aircleaner/countData_month")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse<com.phicomm.aircleaner.models.history.response.MonthDataResponse.DataBean>> c(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceID") java.lang.String r2, @retrofit2.http.Query("startTime") java.lang.String r3, @retrofit2.http.Query("endTime") java.lang.String r4);

    @retrofit2.http.POST("aircleaner/resetFilter")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse> d(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceID") java.lang.String r2);

    @retrofit2.http.POST("aircleaner/windSpeed")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse> d(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceID") java.lang.String r2, @retrofit2.http.Query("windSpeed") java.lang.String r3);

    @retrofit2.http.GET("scenarioautomation/aircleaner/getTaskList")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse<java.util.List<com.phicomm.aircleaner.models.task.beans.TimerTask>>> e(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceId") java.lang.String r2);

    @retrofit2.http.POST("scenarioautomation/aircleaner/delTask")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse> e(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("deviceId") java.lang.String r2, @retrofit2.http.Query("taskId") java.lang.String r3);

    @retrofit2.http.GET("scenarioautomation/aircleaner/getTask")
    io.reactivex.d<com.phicomm.aircleaner.common.http.client.BaseResponse<com.phicomm.aircleaner.models.task.beans.TimerTask>> f(@retrofit2.http.Header("Authorization") java.lang.String r1, @retrofit2.http.Query("taskId") java.lang.String r2);
}



设备开关及模式
public class AircleanDevice extends com.phicomm.aircleaner.models.home.beans.CatDevice {
    public static java.lang.String MODE_AUTO = "3";
    public static java.lang.String MODE_EFFIECT = "5";
    public static java.lang.String MODE_HAND = "2";
    public static java.lang.String MODE_OFF = "0";
    public static java.lang.String MODE_ON = "1";
    public static java.lang.String MODE_SLEEP = "4";
}


示例(HTTP POST):
https://aircleaner.phicomm.com/aircleaner/windSpeed?windSpeed=30&deviceID=30-B0:F8:93:AA:AA:AA&access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.eyJ1aWQiOiI4NTk5MjE5MyIsImNvZGUiOiJmZWl4dW4uU0hfMSIsInR5cGUiOiJhY2Nlc3NfdG9rZW4iLCJpc3MiOiJQaGljb21tIiwibmJmIjoxNTIxOTE2MDYyLCJleHAiOjE1MjI0MzQ0NjIsInJlZnJlc2hUaW1lIjoiMjAxOC0wMy0yNyAwMjoyNzo0MiJ9.u94PBisQ8LeQstmo2cvoZdyKihVoTwlyYZFq_HyQIgY


执行后会将风速设置为最小。
回复

使用道具 举报

175

主题

2956

帖子

7555

积分

超级版主

我就是六神

Rank: 8Rank: 8

积分
7555
金钱
4574
HASS币
398

活跃会员教程狂人灌水之王

QQ
发表于 2018-3-25 10:56:47 | 显示全部楼层
666,期待插件~~~
回复

使用道具 举报

74

主题

1942

帖子

7885

积分

元老级技术达人

积分
7885
金钱
5893
HASS币
430

活跃会员教程狂人

发表于 2018-3-25 11:19:43 | 显示全部楼层
希望大神顺便把体脂称也搞搞,哈哈哈哈。
所有过往,皆为序章。
回复

使用道具 举报

123

主题

4626

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
16009
金钱
11298
HASS币
45
发表于 2018-3-25 11:24:12 | 显示全部楼层
希望大神顺便把体脂称也搞搞,哈哈哈哈。
回复

使用道具 举报

123

主题

4626

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
16009
金钱
11298
HASS币
45
发表于 2018-3-25 11:24:45 | 显示全部楼层
A1不是早有插件了么?还是抓抓体脂秤吧
回复

使用道具 举报

32

主题

986

帖子

4233

积分

论坛元老

Rank: 8Rank: 8

积分
4233
金钱
3207
HASS币
110

教程狂人论坛风云人物

 楼主| 发表于 2018-3-25 11:26:48 | 显示全部楼层
本帖最后由 27hh 于 2018-3-25 11:29 编辑
Jones 发表于 2018-3-25 11:24
A1不是早有插件了么?还是抓抓体脂秤吧

啊???我没找到啊,是发群里了?这是净化器,不是检测器。
回复

使用道具 举报

123

主题

4626

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
16009
金钱
11298
HASS币
45
发表于 2018-3-25 11:56:59 | 显示全部楼层
27hh 发表于 2018-3-25 11:26
啊???我没找到啊,是发群里了?这是净化器,不是检测器。

噢,净化器啊,那可能没有。
回复

使用道具 举报

22

主题

519

帖子

1608

积分

金牌会员

Rank: 6Rank: 6

积分
1608
金钱
1089
HASS币
10
发表于 2018-3-26 15:45:50 | 显示全部楼层
Jones 发表于 2018-3-25 11:24
A1不是早有插件了么?还是抓抓体脂秤吧

那是M1吧
回复

使用道具 举报

123

主题

4626

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
16009
金钱
11298
HASS币
45
发表于 2018-3-26 15:58:36 | 显示全部楼层

是的,我看错了。
回复

使用道具 举报

1

主题

162

帖子

1029

积分

金牌会员

Rank: 6Rank: 6

积分
1029
金钱
867
HASS币
0
发表于 2018-3-26 17:12:56 | 显示全部楼层
求分享抓包分过程。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-20 19:55 , Processed in 0.102929 second(s), 33 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表