banto6 / haier

海尔智能家居设备接入HomeAssistant
Apache License 2.0
626 stars 124 forks source link

冰箱传感器的数据多了38℃ #137

Open leozhou99 opened 6 months ago

leozhou99 commented 6 months ago

问题描述

冰箱传感器的数据依旧不准确 冰箱传感器

显示的温度均比小程序或者app上高38℃

环境信息:

设备信息 冰箱型号:BCD-470WDCXU1 device_设备ID.json device_34567.json

抓包冰箱的/shadow/v1/devdigitalmodels接口,发现有一段相应内容比较有意思,变温室和冷冻室的defaultValue和minValue都是-38,猜测需要把value值减去38得到正确的摄氏度,冷藏室的defaultValue和minValue都是0,和前面-38的逻辑有点矛盾。 猜测海尔冰箱的基准温度值都是零下38℃,这个减38的逻辑要么是前端写死的,要么是前端取了一个defaultValue是-38之后所有的温度都减去38显示在页面上。

家里只有一个冰箱,作者能否看下其余型号是不是这样,或者大家反馈一下接口相应内容

leozhou99 commented 6 months ago

抓包

reveever commented 6 months ago

我家冰箱是正常的..

leozhou99 commented 6 months ago

我家冰箱是正常的..

能否抓包/shadow/v1/devdigitalmodels看下接口返回

reveever commented 6 months ago

能否抓包/shadow/v1/devdigitalmodels看下接口返回

你的的确有点不一样

{
    "retCode": "00000",
    "retInfo": "操作成功",
    "detailInfo": {
        "68E478758FF2": "{\"alarms\":[],\"attributes\":[{\"desc\":\"查询所有属性\",\"invisible\":true,\"name\":\"getAllProperty\",\"operationType\":\"I\",\"readable\":true,\"valueRange\":{\"dataList\":[{\"data\":\"getAllProperty\"}],\"type\":\"LIST\"},\"writable\":true},{\"desc\":\"强制关闭冷藏室杀菌\",\"invisible\":false,\"name\":\"refSterilizationForcedOff\",\"operationType\":\"I\",\"readable\":true,\"value\":\"false\",\"valueRange\":{\"dataList\":[{\"data\":\"true\",\"desc\":\"开\"},{\"data\":\"false\",\"desc\":\"关\"}],\"type\":\"LIST\"},\"writable\":true},{\"desc\":\"停止报警\",\"invisible\":true,\"name\":\"stopCurrentAlarm\",\"operationType\":\"I\",\"readable\":true,\"valueRange\":{\"dataList\":[{\"data\":\"stopCurrentAlarm\"}],\"type\":\"LIST\"},\"writable\":true},{\"desc\":\"冷冻室显示温度(℃)\",\"invisible\":false,\"name\":\"freezerTemperatureC\",\"readable\":true,\"value\":\"-20\",\"valueRange\":{\"dataStep\":{\"dataType\":\"Integer\",\"maxValue\":\"50\",\"minValue\":\"-38\",\"step\":\"1\"},\"type\":\"STEP\"},\"writable\":false},{\"defaultValue\":\"12\",\"desc\":\"冷冻室\",\"invisible\":false,\"name\":\"freezerTargetTempLevel\",\"operationType\":\"I\",\"readable\":true,\"value\":\"10\",\"valueRange\":{\"dataList\":[{\"data\":\"6\",\"desc\":\"-24\"},{\"data\":\"7\",\"desc\":\"-23\"},{\"data\":\"8\",\"desc\":\"-22\"},{\"data\":\"9\",\"desc\":\"-21\"},{\"data\":\"10\",\"desc\":\"-20\"},{\"data\":\"11\",\"desc\":\"-19\"},{\"data\":\"12\",\"desc\":\"-18\"},{\"data\":\"13\",\"desc\":\"-17\"},{\"data\":\"14\",\"desc\":\"-16\"},{\"data\":\"15\",\"desc\":\"-15\"},{\"data\":\"16\",\"desc\":\"-14\"}],\"type\":\"LIST\"},\"writable\":true},{\"desc\":\"强制开启冷藏室杀菌\",\"invisible\":false,\"name\":\"refSterilizationForcedOn\",\"operationType\":\"I\",\"readable\":true,\"value\":\"false\",\"valueRange\":{\"dataList\":[{\"data\":\"true\",\"desc\":\"开\"},{\"data\":\"false\",\"desc\":\"关\"}],\"type\":\"LIST\"},\"writable\":true},{\"desc\":\"冷藏室杀菌模块关闭时间\",\"invisible\":false,\"name\":\"refSterilizationOffTime\",\"readable\":true,\"value\":\"27\",\"valueRange\":{\"dataStep\":{\"dataType\":\"Integer\",\"maxValue\":\"255\",\"minValue\":\"0\",\"step\":\"1\"},\"type\":\"STEP\"},\"writable\":false},{\"desc\":\"智能存储\",\"invisible\":false,\"name\":\"intelligenceMode\",\"operationType\":\"I\",\"readable\":true,\"value\":\"false\",\"valueRange\":{\"dataList\":[{\"data\":\"true\",\"desc\":\"开\"},{\"data\":\"false\",\"desc\":\"关\"}],\"type\":\"LIST\"},\"writable\":true},{\"defaultValue\":\"35\",\"desc\":\"珍品变温\",\"invisible\":false,\"name\":\"vtRoom2TargetTempLevel\",\"operationType\":\"I\",\"readable\":true,\"value\":\"31\",\"valueRange\":{\"dataList\":[{\"data\":\"31\",\"desc\":\"零度\"},{\"data\":\"35\",\"desc\":\"珍品\"},{\"data\":\"37\",\"desc\":\"母婴\"}],\"type\":\"LIST\"},\"writable\":true},{\"desc\":\"冷藏杀菌模块开关状态\",\"invisible\":false,\"name\":\"refSterilizationModuleStatus\",\"readable\":true,\"value\":\"false\",\"valueRange\":{\"dataList\":[{\"data\":\"true\",\"desc\":\"开\"},{\"data\":\"false\",\"desc\":\"关\"}],\"type\":\"LIST\"},\"writable\":false},{\"defaultValue\":\"6\",\"desc\":\"冷藏室\",\"invisible\":false,\"name\":\"refrigeratorTargetTempLevel\",\"operationType\":\"I\",\"readable\":true,\"value\":\"5\",\"valueRange\":{\"dataList\":[{\"data\":\"2\",\"desc\":\"1\"},{\"data\":\"3\",\"desc\":\"2\"},{\"data\":\"4\",\"desc\":\"3\"},{\"data\":\"5\",\"desc\":\"4\"},{\"data\":\"6\",\"desc\":\"5\"},{\"data\":\"7\",\"desc\":\"6\"},{\"data\":\"8\",\"desc\":\"7\"},{\"data\":\"9\",\"desc\":\"8\"},{\"data\":\"10\",\"desc\":\"9\"}],\"type\":\"LIST\"},\"writable\":true},{\"desc\":\"速冻锁鲜\",\"invisible\":false,\"name\":\"quickFreezingMode\",\"operationType\":\"I\",\"readable\":true,\"value\":\"false\",\"valueRange\":{\"dataList\":[{\"data\":\"true\",\"desc\":\"开\"},{\"data\":\"false\",\"desc\":\"关\"}],\"type\":\"LIST\"},\"writable\":true},{\"desc\":\"查询所有报警\",\"invisible\":true,\"name\":\"getAllAlarm\",\"operationType\":\"I\",\"readable\":true,\"valueRange\":{\"dataList\":[{\"data\":\"getAllAlarm\"}],\"type\":\"LIST\"},\"writable\":true},{\"desc\":\"冷藏室显示温度(℃)\",\"invisible\":false,\"name\":\"refrigeratorTemperatureC\",\"readable\":true,\"value\":\"4\",\"valueRange\":{\"dataStep\":{\"dataType\":\"Integer\",\"maxValue\":\"50\",\"minValue\":\"-38\",\"step\":\"1\"},\"type\":\"STEP\"},\"writable\":false},{\"desc\":\"变温室显示温度\",\"invisible\":false,\"name\":\"vtRoomTemperature\",\"readable\":true,\"value\":\"-20\",\"valueRange\":{\"dataStep\":{\"dataType\":\"Integer\",\"maxValue\":\"50\",\"minValue\":\"-38\",\"step\":\"1\"},\"type\":\"STEP\"},\"writable\":false},{\"desc\":\"冷藏杀菌运行时间\",\"invisible\":false,\"name\":\"sterilizationTime\",\"readable\":true,\"value\":\"100\",\"valueRange\":{\"dataStep\":{\"dataType\":\"Integer\",\"maxValue\":\"100\",\"minValue\":\"0\",\"step\":\"1\"},\"type\":\"STEP\"},\"writable\":false},{\"defaultValue\":\"24\",\"desc\":\"变温室\",\"invisible\":false,\"name\":\"vtRoomTargetTempLevel\",\"operationType\":\"I\",\"readable\":true,\"value\":\"11\",\"valueRange\":{\"dataList\":[{\"data\":\"11\",\"desc\":\"-20\"},{\"data\":\"12\",\"desc\":\"-19\"},{\"data\":\"13\",\"desc\":\"-18\"},{\"data\":\"14\",\"desc\":\"-17\"},{\"data\":\"15\",\"desc\":\"-16\"},{\"data\":\"16\",\"desc\":\"-15\"},{\"data\":\"17\",\"desc\":\"-14\"},{\"data\":\"18\",\"desc\":\"-13\"},{\"data\":\"19\",\"desc\":\"-12\"},{\"data\":\"20\",\"desc\":\"-11\"},{\"data\":\"21\",\"desc\":\"-10\"},{\"data\":\"22\",\"desc\":\"-9\"},{\"data\":\"23\",\"desc\":\"-8\"},{\"data\":\"24\",\"desc\":\"-7\"},{\"data\":\"25\",\"desc\":\"-6\"},{\"data\":\"26\",\"desc\":\"-5\"},{\"data\":\"27\",\"desc\":\"-4\"},{\"data\":\"28\",\"desc\":\"-3\"},{\"data\":\"29\",\"desc\":\"-2\"},{\"data\":\"30\",\"desc\":\"-1\"},{\"data\":\"31\",\"desc\":\"0\"},{\"data\":\"32\",\"desc\":\"1\"},{\"data\":\"33\",\"desc\":\"2\"},{\"data\":\"34\",\"desc\":\"3\"},{\"data\":\"35\",\"desc\":\"4\"},{\"data\":\"36\",\"desc\":\"5\"}],\"type\":\"LIST\"},\"writable\":true}],\"businessAttr\":[]}"
    }
}
leozhou99 commented 6 months ago

我家是卡萨帝的冰箱,比较下来就是多一个defaultValue属性,冷藏室显示温度的minValue不一样,可能这个系列就是这样的,一个接口搞双标让人费解 Snipaste_2024-05-28_16-11-15 另外,系列我是看/wisdomapi/device/v1/wx/family/devices?familyId=这个接口的extendedInfo.brand属性是卡萨帝,

latel commented 3 months ago

我家的冰箱冷藏室设定温度和集成显示的也不一样, 集成显示的冷藏室设定温度会比冰箱机器上和小程序里的高2度 image image

虽然设定温度不对,但是当前温度显示是对的。

/shadow/v1/devdigitalmodels抓包如下

{
    "alarms": [],
    "attributes": [
        {
            "desc": "查询所有属性",
            "invisible": true,
            "name": "getAllProperty",
            "operationType": "I",
            "readable": true,
            "valueRange": {
                "dataList": [
                    {
                        "data": "getAllProperty"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "desc": "强制关闭冷藏室杀菌",
            "invisible": false,
            "name": "refSterilizationForcedOff",
            "operationType": "I",
            "readable": true,
            "value": "false",
            "valueRange": {
                "dataList": [
                    {
                        "data": "true",
                        "desc": "开"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "desc": "停止报警",
            "invisible": true,
            "name": "stopCurrentAlarm",
            "operationType": "I",
            "readable": true,
            "valueRange": {
                "dataList": [
                    {
                        "data": "stopCurrentAlarm"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "desc": "冷冻室显示温度(℃)",
            "invisible": false,
            "name": "freezerTemperatureC",
            "readable": true,
            "value": "-24",
            "valueRange": {
                "dataStep": {
                    "dataType": "Integer",
                    "maxValue": "50",
                    "minValue": "-38",
                    "step": "1"
                },
                "type": "STEP"
            },
            "writable": false
        },
        {
            "defaultValue": "12",
            "desc": "冷冻室",
            "invisible": false,
            "name": "freezerTargetTempLevel",
            "operationType": "I",
            "readable": true,
            "value": "6",
            "valueRange": {
                "dataList": [
                    {
                        "data": "6",
                        "desc": "-24"
                    },
                    {
                        "data": "7",
                        "desc": "-23"
                    },
                    {
                        "data": "8",
                        "desc": "-22"
                    },
                    {
                        "data": "9",
                        "desc": "-21"
                    },
                    {
                        "data": "10",
                        "desc": "-20"
                    },
                    {
                        "data": "11",
                        "desc": "-19"
                    },
                    {
                        "data": "12",
                        "desc": "-18"
                    },
                    {
                        "data": "13",
                        "desc": "-17"
                    },
                    {
                        "data": "14",
                        "desc": "-16"
                    },
                    {
                        "data": "15",
                        "desc": "-15"
                    },
                    {
                        "data": "16",
                        "desc": "-14"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "desc": "强制开启冷藏室杀菌",
            "invisible": false,
            "name": "refSterilizationForcedOn",
            "operationType": "I",
            "readable": true,
            "value": "false",
            "valueRange": {
                "dataList": [
                    {
                        "data": "true",
                        "desc": "开"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "desc": "冷藏室杀菌模块关闭时间",
            "invisible": false,
            "name": "refSterilizationOffTime",
            "readable": true,
            "value": "0",
            "valueRange": {
                "dataStep": {
                    "dataType": "Integer",
                    "maxValue": "255",
                    "minValue": "0",
                    "step": "1"
                },
                "type": "STEP"
            },
            "writable": false
        },
        {
            "desc": "智能存储",
            "invisible": false,
            "name": "intelligenceMode",
            "operationType": "I",
            "readable": true,
            "value": "false",
            "valueRange": {
                "dataList": [
                    {
                        "data": "true",
                        "desc": "开"
                    },
                    {
                        "data": "false",
                        "desc": "关"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "defaultValue": "33",
            "desc": "婴爱空间",
            "invisible": false,
            "name": "vtRoom2TargetTempLevel",
            "operationType": "I",
            "readable": true,
            "value": "31",
            "valueRange": {
                "dataList": [
                    {
                        "data": "31",
                        "desc": "0°保鲜"
                    },
                    {
                        "data": "33",
                        "desc": "冰镇"
                    },
                    {
                        "data": "35",
                        "desc": "珍品"
                    },
                    {
                        "data": "37",
                        "desc": "母婴"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "desc": "冷藏杀菌模块开关状态",
            "invisible": false,
            "name": "refSterilizationModuleStatus",
            "readable": true,
            "value": "false",
            "valueRange": {
                "dataList": [
                    {
                        "data": "true",
                        "desc": "开"
                    },
                    {
                        "data": "false",
                        "desc": "关"
                    }
                ],
                "type": "LIST"
            },
            "writable": false
        },
        {
            "defaultValue": "6",
            "desc": "冷藏室",
            "invisible": false,
            "name": "refrigeratorTargetTempLevel",
            "operationType": "I",
            "readable": true,
            "value": "2",
            "valueRange": {
                "dataList": [
                    {
                        "data": "2",
                        "desc": "1"
                    },
                    {
                        "data": "3",
                        "desc": "2"
                    },
                    {
                        "data": "4",
                        "desc": "3"
                    },
                    {
                        "data": "5",
                        "desc": "4"
                    },
                    {
                        "data": "6",
                        "desc": "5"
                    },
                    {
                        "data": "7",
                        "desc": "6"
                    },
                    {
                        "data": "8",
                        "desc": "7"
                    },
                    {
                        "data": "9",
                        "desc": "8"
                    },
                    {
                        "data": "10",
                        "desc": "9"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "desc": "速冻",
            "invisible": false,
            "name": "quickFreezingMode",
            "operationType": "I",
            "readable": true,
            "value": "false",
            "valueRange": {
                "dataList": [
                    {
                        "data": "true",
                        "desc": "开"
                    },
                    {
                        "data": "false",
                        "desc": "关"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "desc": "查询所有报警",
            "invisible": true,
            "name": "getAllAlarm",
            "operationType": "I",
            "readable": true,
            "valueRange": {
                "dataList": [
                    {
                        "data": "getAllAlarm"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "desc": "冷藏室显示温度(℃)",
            "invisible": false,
            "name": "refrigeratorTemperatureC",
            "readable": true,
            "value": "1",
            "valueRange": {
                "dataStep": {
                    "dataType": "Integer",
                    "maxValue": "50",
                    "minValue": "-38",
                    "step": "1"
                },
                "type": "STEP"
            },
            "writable": false
        },
        {
            "desc": "人感",
            "invisible": false,
            "name": "humanSensingStatus",
            "operationType": "I",
            "readable": true,
            "value": "true",
            "valueRange": {
                "dataList": [
                    {
                        "data": "true",
                        "desc": "开"
                    },
                    {
                        "data": "false",
                        "desc": "关"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        },
        {
            "desc": "冷藏杀菌运行时间",
            "invisible": false,
            "name": "sterilizationTime",
            "readable": true,
            "value": "100",
            "valueRange": {
                "dataStep": {
                    "dataType": "Integer",
                    "maxValue": "100",
                    "minValue": "0",
                    "step": "1"
                },
                "type": "STEP"
            },
            "writable": false
        },
        {
            "desc": "制冰",
            "invisible": false,
            "name": "icemakerOnOffStatus",
            "operationType": "I",
            "readable": true,
            "value": "true",
            "valueRange": {
                "dataList": [
                    {
                        "data": "true",
                        "desc": "开"
                    },
                    {
                        "data": "false",
                        "desc": "关"
                    }
                ],
                "type": "LIST"
            },
            "writable": true
        }
    ],
    "businessAttr": []
}

/uds/v1/protected/deviceinfos

{
    "deviceinfos": [
        {
            "deviceId": "xxxxxxxxxxxx",
            "deviceName": "卡萨帝505",
            "deviceType": "010210gI",
            "online": true,
            "permissions": [
                {
                    "auth": {
                        "control": true,
                        "set": true,
                        "view": true
                    },
                    "authType": "owner"
                }
            ],
            "productCodeT": "B00XN2000",
            "productNameT": "BCD-505WGCFDM4WKU1",
            "totalPermission": {
                "control": true,
                "set": true,
                "view": true
            },
            "wifiType": "xxxxxxxxx"
        }
    ],
    "retCode": "00000",
    "retInfo": "成功!"
}