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

 找回密码
 立即注册
楼主: anlong

[插件集成] 小米MIoT设备自动识别接入HA插件 2024-04-30新版发布

  [复制链接]

2

主题

41

帖子

309

积分

中级会员

Rank: 3Rank: 3

积分
309
金钱
268
HASS币
0
发表于 2021-2-3 12:25:34 | 显示全部楼层
evaz 发表于 2021-1-23 23:13
厉害了
我用的斐讯N1 ,wrt 装docker---hassio  ,执行完命令后重启添加没有出现MloT
...

通过HACS安装插件,安装后重启HA,依次进入:配置 > 集成 > +添加集成,搜索“Xiaomi Miot”,配置你的设备信息
我跟你情况一样,就是通过这个方法安装的,没问题的
回复

使用道具 举报

2

主题

41

帖子

309

积分

中级会员

Rank: 3Rank: 3

积分
309
金钱
268
HASS币
0
发表于 2021-2-3 12:20:02 | 显示全部楼层
我输入小爱同学的IP和token,显示无法连接,请问大佬要怎么搞呢
回复

使用道具 举报

6

主题

267

帖子

2377

积分

论坛技术达人

积分
2377
金钱
2090
HASS币
90
 楼主| 发表于 2021-2-1 22:58:14 来自手机 | 显示全部楼层
machiyu01 发表于 2021-2-1 10:40
大佬你好!
     使用al-one/hass-xiaomi-miot添加邦先生M1晾衣架后,发现实体错误。(我可以把这个设备共 ...

最新版已修复
回复

使用道具 举报

1

主题

77

帖子

980

积分

高级会员

Rank: 4

积分
980
金钱
903
HASS币
0
发表于 2021-2-1 14:02:59 | 显示全部楼层
太赞了,必须支持下
回复

使用道具 举报

5

主题

24

帖子

266

积分

中级会员

Rank: 3Rank: 3

积分
266
金钱
242
HASS币
0
发表于 2021-2-1 10:57:20 | 显示全部楼层
machiyu01 发表于 2021-2-1 10:40
大佬你好!
     使用al-one/hass-xiaomi-miot添加邦先生M1晾衣架后,发现实体错误。(我可以把这个设备共 ...

bash-5.0# miiocli -d device --ip 192.168.10.140 --token 1c083a1de6379ca4e22a85b7daae780a raw_command get_properties "[{'did': 'result', 'siid': 2, 'piid': 1}]"
INFO:miio.cliebug mode active
Running command raw_command
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol:Got a response: Container:
    data = Container:
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container:
        data = b'!1\x00 \x00\x00\x00\x00\x14\x02\x808\x00\x01\n\xdc' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = unhexlify('14028038')
            ts = 1970-01-01 18:58:36
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocoliscovered 14028038 with ts: 1970-01-01 18:58:36, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.10.140:54321 >>: {'id': 1, 'method': 'get_properties', 'params': [{'did': 'result', 'siid': 2, 'piid': 1}]}
DEBUG:miio.miioprotocol:192.168.10.140:54321 (ts: 1970-01-01 18:58:41, id: 1) << {'id': 1, 'error': {'code': -9999, 'message': 'user ack timeout'}, 'exe_time': 4010}
DEBUG:miio.click_common:Exception: {'code': -9999, 'message': 'user ack timeout'}
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/miio/click_common.py", line 59, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/miio/click_common.py", line 280, in wrap
    kwargs["result"] = func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/miio/click_common.py", line 245, in command_callback
    return miio_command.call(miio_device, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/miio/click_common.py", line 193, in call
    return method(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/miio/device.py", line 162, in raw_command
    return self.send(command, parameters)
  File "/usr/local/lib/python3.8/site-packages/miio/device.py", line 143, in send
    return self._protocol.send(
  File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 213, in send
    self._handle_error(payload["error"])
  File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 273, in _handle_error
    raise DeviceError(error)
miio.exceptions.DeviceError: {'code': -9999, 'message': 'user ack timeout'}
Error: {'code': -9999, 'message': 'user ack timeout'}
回复

使用道具 举报

5

主题

24

帖子

266

积分

中级会员

Rank: 3Rank: 3

积分
266
金钱
242
HASS币
0
发表于 2021-2-1 10:40:35 | 显示全部楼层
大佬你好!
     使用al-one/hass-xiaomi-miot添加邦先生M1晾衣架后,发现实体错误。(我可以把这个设备共享给你)使用mihome 操作日志如下:
192.168.10.140
mrbond.airer.m1s
1c083a1de6379ca4e22a85b7daae780a

2021-02-01 10:32:44 -> {"id":7271,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:32:44 <- {"code":0,"exe_time":520,"id":7271,"net_cost":474,"ot_cost":955,"otlocalts":1612146765057881,"result":["0","0","0","000","1"]}
2021-02-01 10:32:48 -> {"id":7272,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:32:48 <- {"code":0,"exe_time":410,"id":7272,"net_cost":588,"ot_cost":1125,"otlocalts":1612146769100645,"result":["0","0","0","000","1"]}
2021-02-01 10:32:49 -> {"id":7273,"method":"set_led","params":[1]}
2021-02-01 10:32:49 <- {"code":0,"exe_time":360,"id":7273,"net_cost":140,"ot_cost":833,"otlocalts":1612146769475182,"result":["ok"]}
2021-02-01 10:32:52 -> {"id":7274,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:32:52 <- {"code":0,"exe_time":420,"id":7274,"net_cost":182,"ot_cost":1432,"otlocalts":1612146772732296,"result":["0","1","0","000","1"]}
2021-02-01 10:32:56 -> {"id":7275,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:32:56 <- {"code":0,"exe_time":510,"id":7275,"net_cost":119,"ot_cost":1733,"otlocalts":1612146776792256,"result":["0","1","0","000","1"]}
2021-02-01 10:32:58 -> {"id":7276,"method":"set_led","params":[0]}
2021-02-01 10:32:58 <- {"code":0,"exe_time":250,"id":7276,"net_cost":678,"ot_cost":1363,"otlocalts":1612146779174824,"result":["ok"]}
2021-02-01 10:33:00 -> {"id":7277,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:00 <- {"code":0,"exe_time":310,"id":7277,"net_cost":260,"ot_cost":2637,"otlocalts":1612146780772395,"result":["0","0","0","000","1"]}
2021-02-01 10:33:03 -> {"id":8549,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:03 <- {"code":0,"exe_time":870,"id":8549,"net_cost":154,"ot_cost":1909,"otlocalts":1612146783280803,"result":["0","0","0","000","1"]}
2021-02-01 10:33:06 -> {"id":8550,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:06 <- {"code":0,"exe_time":360,"id":8550,"net_cost":187,"ot_cost":2021,"otlocalts":1612146786871679,"result":["0","0","0","000","1"]}
2021-02-01 10:33:08 -> {"id":8551,"method":"set_motor","params":[2]}
2021-02-01 10:33:08 <- {"code":0,"exe_time":880,"id":8551,"net_cost":84,"ot_cost":2518,"otlocalts":1612146788452501,"result":["ok"]}
2021-02-01 10:33:11 -> {"id":8552,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:11 <- {"code":0,"exe_time":970,"id":8552,"net_cost":139,"ot_cost":1088,"otlocalts":1612146791375913,"result":["0","0","2","000","0"]}
2021-02-01 10:33:14 -> {"id":8553,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:14 <- {"code":0,"exe_time":570,"id":8553,"net_cost":83,"ot_cost":3053,"otlocalts":1612146794954063,"result":["0","0","2","000","0"]}
2021-02-01 10:33:19 -> {"id":8554,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:19 <- {"code":0,"exe_time":870,"id":8554,"net_cost":256,"ot_cost":1621,"otlocalts":1612146799458881,"result":["0","0","2","000","0"]}
2021-02-01 10:33:22 -> {"id":8555,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:22 <- {"code":0,"exe_time":120,"id":8555,"net_cost":557,"ot_cost":2513,"otlocalts":1612146803046007,"result":["0","0","2","000","0"]}
2021-02-01 10:33:27 -> {"id":8556,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:27 <- {"code":0,"exe_time":660,"id":8556,"net_cost":499,"ot_cost":1723,"otlocalts":1612146807558262,"result":["0","0","2","000","0"]}
2021-02-01 10:33:30 -> {"id":8557,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:30 <- {"code":0,"exe_time":180,"id":8557,"net_cost":138,"ot_cost":2044,"otlocalts":1612146810750321,"result":["0","0","2","000","0"]}
2021-02-01 10:33:36 -> {"id":8558,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:36 <- {"code":0,"exe_time":1680,"id":8558,"net_cost":315,"ot_cost":2054,"otlocalts":1612146816460908,"result":["0","0","0","000","2"]}
2021-02-01 10:33:39 -> {"id":8559,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:39 <- {"code":0,"exe_time":170,"id":8559,"net_cost":583,"ot_cost":2850,"otlocalts":1612146819252071,"result":["0","0","0","000","2"]}
2021-02-01 10:33:42 -> {"id":8560,"method":"set_motor","params":[1]}
2021-02-01 10:33:42 <- {"code":0,"exe_time":390,"id":8560,"net_cost":324,"ot_cost":1763,"otlocalts":1612146822819475,"result":["ok"]}
2021-02-01 10:33:43 -> {"id":8561,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:43 <- {"code":0,"exe_time":1390,"id":8561,"net_cost":113,"ot_cost":2055,"otlocalts":1612146824035813,"result":["0","0","1","000","0"]}
2021-02-01 10:33:47 -> {"id":8562,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:47 <- {"code":0,"exe_time":370,"id":8562,"net_cost":303,"ot_cost":1586,"otlocalts":1612146827239868,"result":["0","0","1","000","0"]}
2021-02-01 10:33:51 -> {"id":8563,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:51 <- {"code":0,"exe_time":680,"id":8563,"net_cost":443,"ot_cost":2197,"otlocalts":1612146831723397,"result":["0","0","1","000","0"]}
2021-02-01 10:33:55 -> {"id":8564,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:55 <- {"code":0,"exe_time":370,"id":8564,"net_cost":325,"ot_cost":3208,"otlocalts":1612146835331143,"result":["0","0","1","000","0"]}
2021-02-01 10:33:56 -> {"id":8565,"method":"set_motor","params":[0]}
2021-02-01 10:33:56 <- {"code":0,"exe_time":440,"id":8565,"net_cost":97,"ot_cost":2228,"otlocalts":1612146836910857,"result":["ok"]}
2021-02-01 10:33:59 -> {"id":8566,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:33:59 <- {"code":0,"exe_time":990,"id":8566,"net_cost":173,"ot_cost":1444,"otlocalts":1612146839827436,"result":["0","0","0","000","0"]}
2021-02-01 10:34:03 -> {"id":8567,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:03 <- {"code":0,"exe_time":490,"id":8567,"net_cost":213,"ot_cost":2197,"otlocalts":1612146843402763,"result":["0","0","0","000","0"]}
2021-02-01 10:34:03 -> {"id":8568,"method":"set_motor","params":[1]}
2021-02-01 10:34:03 <- {"code":0,"exe_time":840,"id":8568,"net_cost":183,"ot_cost":1236,"otlocalts":1612146843832016,"result":["ok"]}
2021-02-01 10:34:07 -> {"id":8569,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:07 <- {"code":0,"exe_time":990,"id":8569,"net_cost":184,"ot_cost":2429,"otlocalts":1612146847907998,"result":["0","0","1","000","0"]}
2021-02-01 10:34:10 -> {"id":8570,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:10 <- {"code":0,"exe_time":190,"id":8570,"net_cost":135,"ot_cost":1399,"otlocalts":1612146851091949,"result":["0","0","1","000","0"]}
2021-02-01 10:34:15 -> {"id":8571,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:15 <- {"code":0,"exe_time":1090,"id":8571,"net_cost":117,"ot_cost":3259,"otlocalts":1612146856013606,"result":["0","0","1","000","0"]}
2021-02-01 10:34:18 -> {"id":8572,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:18 <- {"code":0,"exe_time":290,"id":8572,"net_cost":60,"ot_cost":1146,"otlocalts":1612146859181975,"result":["0","0","0","000","1"]}
2021-02-01 10:34:23 -> {"id":8573,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:23 <- {"code":0,"exe_time":870,"id":8573,"net_cost":331,"ot_cost":2047,"otlocalts":1612146864079409,"result":["0","0","0","000","1"]}
2021-02-01 10:34:27 -> {"id":8574,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:27 <- {"code":0,"exe_time":690,"id":8574,"net_cost":133,"ot_cost":2176,"otlocalts":1612146867692829,"result":["0","0","0","000","1"]}
2021-02-01 10:34:31 -> {"id":8575,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:31 <- {"code":0,"exe_time":200,"id":8575,"net_cost":168,"ot_cost":2306,"otlocalts":1612146871271231,"result":["0","0","0","000","1"]}
2021-02-01 10:34:35 -> {"id":8576,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:35 <- {"code":0,"exe_time":490,"id":8576,"net_cost":343,"ot_cost":2192,"otlocalts":1612146875766069,"result":["0","0","0","000","1"]}
2021-02-01 10:34:40 -> {"id":8577,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:40 <- {"code":0,"exe_time":1160,"id":8577,"net_cost":123,"ot_cost":1752,"otlocalts":1612146880261138,"result":["0","0","0","000","1"]}
2021-02-01 10:34:43 -> {"id":8578,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:43 <- {"code":0,"exe_time":310,"id":8578,"net_cost":143,"ot_cost":2532,"otlocalts":1612146883457804,"result":["0","0","0","000","1"]}
2021-02-01 10:34:48 -> {"id":8579,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:48 <- {"code":0,"exe_time":1000,"id":8579,"net_cost":400,"ot_cost":2338,"otlocalts":1612146888433916,"result":["0","0","0","000","1"]}
2021-02-01 10:34:51 -> {"id":8580,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:51 <- {"code":0,"exe_time":350,"id":8580,"net_cost":533,"ot_cost":3229,"otlocalts":1612146891952915,"result":["0","0","0","000","1"]}
2021-02-01 10:34:55 -> {"id":8581,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:55 <- {"code":0,"exe_time":310,"id":8581,"net_cost":139,"ot_cost":1172,"otlocalts":1612146895547381,"result":["0","0","0","000","1"]}
2021-02-01 10:34:59 -> {"id":8582,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:34:59 <- {"code":0,"exe_time":410,"id":8582,"net_cost":99,"ot_cost":1692,"otlocalts":1612146899640939,"result":["0","0","0","000","1"]}
2021-02-01 10:35:04 -> {"id":8583,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:35:04 <- {"code":0,"exe_time":1000,"id":8583,"net_cost":378,"ot_cost":2074,"otlocalts":1612146904552278,"result":["0","0","0","000","1"]}
2021-02-01 10:35:07 -> {"id":8584,"method":"get_prop","params":["dry","led","motor","drytime","airer_location"]}
2021-02-01 10:35:07 <- {"code":0,"exe_time":410,"id":8584,"net_cost":158,"ot_cost":2506,"otlocalts":1612146907784484,"result":["0","0","0","000","1"]}
回复

使用道具 举报

6

主题

267

帖子

2377

积分

论坛技术达人

积分
2377
金钱
2090
HASS币
90
 楼主| 发表于 2021-1-31 22:20:57 来自手机 | 显示全部楼层
qq1838051 发表于 2021-1-30 23:58
QQ交流群:198841186
加不进去啊!!!告诉我答案

答案是al-one
回复

使用道具 举报

0

主题

13

帖子

360

积分

中级会员

Rank: 3Rank: 3

积分
360
金钱
347
HASS币
0
发表于 2021-1-31 09:34:21 | 显示全部楼层
完美接入, 一个字:厉害!!
回复

使用道具 举报

0

主题

10

帖子

68

积分

注册会员

Rank: 2

积分
68
金钱
58
HASS币
0
发表于 2021-1-31 00:00:18 | 显示全部楼层

--2021-01-30 23:58:11--  (try: 3)  https://github.com/al-one/hass-xiaomi-miot/archive/auto-miot.zip
Connecting to github.com|66.249.89.104|:443...


链接超时,如何治?????坐等高手
回复

使用道具 举报

0

主题

10

帖子

68

积分

注册会员

Rank: 2

积分
68
金钱
58
HASS币
0
发表于 2021-1-30 23:58:56 | 显示全部楼层
QQ交流群:198841186
加不进去啊!!!告诉我答案
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-12 05:28 , Processed in 0.654740 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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