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

 找回密码
 立即注册
查看: 12741|回复: 7

[已解决] 米家智能晾衣机(架)有没有办法接入hass?

[复制链接]

76

主题

1364

帖子

1万

积分

元老级技术达人

积分
19137
金钱
17733
HASS币
290
发表于 2020-12-23 23:25:14 | 显示全部楼层 |阅读模式
本帖最后由 dscao 于 2021-2-2 19:40 编辑

搜索了很久都没找到方法,抓包不会,用路由器抓没发现它的IP 54321端口有数据。如果能接入它的灯也好。否则只能通过小米的智能执行,或者硬改一个小米无线按钮来反向控制。

采用本地控制shell command 配合 https://bbs.hassbian.com/thread-12049-1-1.html 这个插件,目前使用效果良好!
或者使用moit插件 https://bbs.hassbian.com/thread-12009-1-1.html ,但 current_position 对于这个设备有问题。
回复

使用道具 举报

58

主题

631

帖子

3878

积分

论坛元老

Rank: 8Rank: 8

积分
3878
金钱
3242
HASS币
20
发表于 2020-12-24 11:59:13 | 显示全部楼层
我刚刚买一个邦先生晾衣架是米家的接入了
回复

使用道具 举报

12

主题

242

帖子

2397

积分

论坛技术达人

积分
2397
金钱
2155
HASS币
30
发表于 2021-1-5 19:40:12 | 显示全部楼层
本帖最后由 uavana 于 2021-1-5 19:48 编辑

不需要抓包了已经 miot的定义都能查得到了
假设你的型号是 mrbond.airer.m1pro
在这里搜索 http://miot-spec.org/miot-spec-v2/instances?status=all
找到这段
{"status":"released","model":"mrbond.airer.m1pro","version":1,"type":"urn:miot-spec-v2:device:airer:0000A00D:mrbond-m1pro:1"}就是到type了
https://miot-spec.org/miot-spec-v2/instance?type=[把type贴在这里]


得到:
https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:airer:0000A00D:mrbond-m1pro:1
最后就得到了指令定义, 可以自己随便找一个component改造, 建议通过yonsm 的mrbond 衣架改造, 基本上很接近了
https://github.com/Yonsm/HAExtra ... onents/mrbond_airer

回复

使用道具 举报

76

主题

1364

帖子

1万

积分

元老级技术达人

积分
19137
金钱
17733
HASS币
290
 楼主| 发表于 2021-1-6 15:53:36 | 显示全部楼层
uavana 发表于 2021-1-5 19:40
不需要抓包了已经 miot的定义都能查得到了
假设你的型号是 mrbond.airer.m1pro
在这里搜索 http://miot-spe ...

谢谢!不过我还是搞不定啊。

mrbond.airer.m1pro:
{
    "type": "urn:miot-spec-v2:device:airer:0000A00D:mrbond-m1pro:1", 
    "description": "Airer", 
    "services": [
        {
            "iid": 1, 
            "type": "urn:miot-spec-v2:service:device-information:00007801:mrbond-m1pro:1", 
            "description": "Device Information", 
            "properties": [
                {
                    "iid": 1, 
                    "type": "urn:miot-spec-v2:property:manufacturer:00000001:mrbond-m1pro:1", 
                    "description": "Device Manufacturer", 
                    "format": "string", 
                    "access": [
                        "read"
                    ]
                }, 
                {
                    "iid": 2, 
                    "type": "urn:miot-spec-v2:property:model:00000002:mrbond-m1pro:1", 
                    "description": "Device Model", 
                    "format": "string", 
                    "access": [
                        "read"
                    ]
                }, 
                {
                    "iid": 3, 
                    "type": "urn:miot-spec-v2:property:serial-number:00000003:mrbond-m1pro:1", 
                    "description": "Device Serial Number", 
                    "format": "string", 
                    "access": [
                        "read"
                    ]
                }, 
                {
                    "iid": 4, 
                    "type": "urn:miot-spec-v2:property:firmware-revision:00000005:mrbond-m1pro:1", 
                    "description": "Current Firmware Version", 
                    "format": "string", 
                    "access": [
                        "read"
                    ]
                }
            ]
        }, 
        {
            "iid": 2, 
            "type": "urn:miot-spec-v2:service:airer:00007817:mrbond-m1pro:1", 
            "description": "Airer", 
            "properties": [
                {
                    "iid": 1, 
                    "type": "urn:miot-spec-v2:property:motor-control:00000038:mrbond-m1pro:1", 
                    "description": "Motor Control", 
                    "format": "uint8", 
                    "access": [
                        "write"
                    ], 
                    "value-list": [
                        {
                            "value": 0, 
                            "description": "Pause"
                        }, 
                        {
                            "value": 1, 
                            "description": "Up"
                        }, 
                        {
                            "value": 2, 
                            "description": "Down"
                        }
                    ]
                }, 
                {
                    "iid": 2, 
                    "type": "urn:miot-spec-v2:property:dryer:00000027:mrbond-m1pro:1", 
                    "description": "Dryer", 
                    "format": "bool", 
                    "access": [
                        "read", 
                        "write", 
                        "notify"
                    ]
                }, 
                {
                    "iid": 3, 
                    "type": "urn:miot-spec-v2:property:drying-level:0000003B:mrbond-m1pro:1", 
                    "description": "Drying Level", 
                    "format": "uint8", 
                    "access": [
                        "read", 
                        "write", 
                        "notify"
                    ], 
                    "value-list": [
                        {
                            "value": 1, 
                            "description": "Level1"
                        }, 
                        {
                            "value": 2, 
                            "description": "Level2"
                        }, 
                        {
                            "value": 3, 
                            "description": "Level3"
                        }, 
                        {
                            "value": 4, 
                            "description": "Level4"
                        }
                    ]
                }
            ]
        }, 
        {
            "iid": 3, 
            "type": "urn:miot-spec-v2:service:light:00007802:mrbond-m1pro:1", 
            "description": "Light", 
            "properties": [
                {
                    "iid": 1, 
                    "type": "urn:miot-spec-v2:property:on:00000006:mrbond-m1pro:1", 
                    "description": "Switch Status", 
                    "format": "bool", 
                    "access": [
                        "read", 
                        "write", 
                        "notify"
                    ]
                }
            ]
        }
    ]
}



小米晾衣架:
{
    "type": "urn:miot-spec-v2:device:airer:0000A00D:hyd-znlyj1:1", 
    "description": "Airer", 
    "services": [
        {
            "iid": 1, 
            "type": "urn:miot-spec-v2:service:device-information:00007801:hyd-znlyj1:1", 
            "description": "Device Information", 
            "properties": [
                {
                    "iid": 1, 
                    "type": "urn:miot-spec-v2:property:manufacturer:00000001:hyd-znlyj1:1", 
                    "description": "Device Manufacturer", 
                    "format": "string", 
                    "access": [
                        "read"
                    ]
                }, 
                {
                    "iid": 2, 
                    "type": "urn:miot-spec-v2:property:model:00000002:hyd-znlyj1:1", 
                    "description": "Device Model", 
                    "format": "string", 
                    "access": [
                        "read"
                    ]
                }, 
                {
                    "iid": 3, 
                    "type": "urn:miot-spec-v2:property:serial-number:00000003:hyd-znlyj1:1", 
                    "description": "Device Serial Number", 
                    "format": "string", 
                    "access": [
                        "read"
                    ]
                }, 
                {
                    "iid": 4, 
                    "type": "urn:miot-spec-v2:property:firmware-revision:00000005:hyd-znlyj1:1", 
                    "description": "Current Firmware Version", 
                    "format": "string", 
                    "access": [
                        "read"
                    ]
                }
            ]
        }, 
        {
            "iid": 2, 
            "type": "urn:miot-spec-v2:service:airer:00007817:hyd-znlyj1:1", 
            "description": "Airer", 
            "properties": [
                {
                    "iid": 1, 
                    "type": "urn:miot-spec-v2:property:fault:00000009:hyd-znlyj1:1", 
                    "description": "Device Fault", 
                    "format": "uint8", 
                    "access": [
                        "read", 
                        "notify"
                    ], 
                    "unit": "none", 
                    "value-list": [
                        {
                            "value": 0, 
                            "description": "No Faults"
                        }, 
                        {
                            "value": 1, 
                            "description": "Obstruction"
                        }, 
                        {
                            "value": 2, 
                            "description": "Overweight"
                        }, 
                        {
                            "value": 3, 
                            "description": "Overheated"
                        }
                    ]
                }, 
                {
                    "iid": 2, 
                    "type": "urn:miot-spec-v2:property:motor-control:00000038:hyd-znlyj1:1", 
                    "description": "Motor Control", 
                    "format": "uint8", 
                    "access": [
                        "write"
                    ], 
                    "unit": "none", 
                    "value-list": [
                        {
                            "value": 0, 
                            "description": "Pause"
                        }, 
                        {
                            "value": 1, 
                            "description": "Up"
                        }, 
                        {
                            "value": 2, 
                            "description": "Down"
                        }
                    ]
                }, 
                {
                    "iid": 3, 
                    "type": "urn:miot-spec-v2:property:current-position:00000039:hyd-znlyj1:1", 
                    "description": "Current Position", 
                    "format": "uint8", 
                    "access": [
                        "read", 
                        "notify"
                    ], 
                    "unit": "none", 
                    "value-range": [
                        0, 
                        2, 
                        1
                    ]
                }, 
                {
                    "iid": 4, 
                    "type": "urn:miot-spec-v2:property:status:00000007:hyd-znlyj1:1", 
                    "description": "Status", 
                    "format": "uint8", 
                    "access": [
                        "read", 
                        "notify"
                    ], 
                    "unit": "none", 
                    "value-list": [
                        {
                            "value": 0, 
                            "description": "Stopped"
                        }, 
                        {
                            "value": 1, 
                            "description": "Up"
                        }, 
                        {
                            "value": 2, 
                            "description": "Down"
                        }, 
                        {
                            "value": 3, 
                            "description": "Pause"
                        }
                    ]
                }
            ]
        }, 
        {
            "iid": 3, 
            "type": "urn:miot-spec-v2:service:light:00007802:hyd-znlyj1:1", 
            "description": "Light", 
            "properties": [
                {
                    "iid": 1, 
                    "type": "urn:miot-spec-v2:property:on:00000006:hyd-znlyj1:1", 
                    "description": "Switch Status", 
                    "format": "bool", 
                    "access": [
                        "read", 
                        "write", 
                        "notify"
                    ], 
                    "unit": "none"
                }
            ]
        }
    ]
}


两款只是功能上有点差别,这个也是很接近的。特别是灯应该是一样的,但是直接用插件都没办法显示状态或控制。

用命令行猜也全是 code:-4004 05.jpg

要原因可能还是我没搞懂这些控制命令怎么用的。

回复

使用道具 举报

6

主题

556

帖子

3476

积分

论坛元老

Rank: 8Rank: 8

积分
3476
金钱
2920
HASS币
0
发表于 2021-1-6 23:59:53 | 显示全部楼层
uavana 发表于 2021-1-5 19:40
不需要抓包了已经 miot的定义都能查得到了
假设你的型号是 mrbond.airer.m1pro
在这里搜索 http://miot-spe ...

大神应该出一个详细的教程,相信可以帮助很多小白!拜托拜托!
回复

使用道具 举报

76

主题

1364

帖子

1万

积分

元老级技术达人

积分
19137
金钱
17733
HASS币
290
 楼主| 发表于 2021-1-9 01:05:51 | 显示全部楼层
原来这个小米晾衣架这些命令可以本地控制,但不能本地获取状态。
回复

使用道具 举报

2

主题

31

帖子

154

积分

注册会员

Rank: 2

积分
154
金钱
123
HASS币
0
发表于 2021-2-2 17:39:52 | 显示全部楼层
作为只会用hacs 点点点的小白表示围观。
回复

使用道具 举报

5

主题

259

帖子

1590

积分

金牌会员

Rank: 6Rank: 6

积分
1590
金钱
1331
HASS币
0
发表于 2021-4-23 12:40:51 来自手机 | 显示全部楼层
大神给小白们这个教程呀,感谢
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-23 11:17 , Processed in 1.754828 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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