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

 找回密码
 立即注册
楼主: 27hh

[修仙教程] 【持续更新优化】小米米家智能设备通用接入HomeAssistant插件

  [复制链接]

32

主题

986

帖子

4233

积分

论坛元老

Rank: 8Rank: 8

积分
4233
金钱
3207
HASS币
110

教程狂人论坛风云人物

 楼主| 发表于 2021-1-6 06:29:52 | 显示全部楼层
sundat 发表于 2021-1-5 17:24
多功能网关能接入吗?好像列表里没有

多功能网关有官方插件,集成里搜索gateway即可
回复

使用道具 举报

32

主题

986

帖子

4233

积分

论坛元老

Rank: 8Rank: 8

积分
4233
金钱
3207
HASS币
110

教程狂人论坛风云人物

 楼主| 发表于 2021-1-6 06:30:17 | 显示全部楼层
itispip 发表于 2021-1-6 00:44
楼主,你的2个待更新的坑还填吗?

填了
回复

使用道具 举报

32

主题

986

帖子

4233

积分

论坛元老

Rank: 8Rank: 8

积分
4233
金钱
3207
HASS币
110

教程狂人论坛风云人物

 楼主| 发表于 2021-1-6 06:31:16 | 显示全部楼层
foxwywh 发表于 2021-1-5 17:43
你好,报这错误:
Logger: custom_components.xiaomi_miot_raw.switch
Source: custom_components/xiaomi ...

应该是siid和piid找错了,不适用于这个设备
回复

使用道具 举报

32

主题

986

帖子

4233

积分

论坛元老

Rank: 8Rank: 8

积分
4233
金钱
3207
HASS币
110

教程狂人论坛风云人物

 楼主| 发表于 2021-1-6 06:32:34 | 显示全部楼层
ocerot 发表于 2021-1-4 17:35
大佬厉害,已经把家里循环扇和洗衣机接入HA了,开关和传感器没问题了,但是类似调速,风扇角度这种非布尔值 ...

正在开发,敬请期待
回复

使用道具 举报

32

主题

986

帖子

4233

积分

论坛元老

Rank: 8Rank: 8

积分
4233
金钱
3207
HASS币
110

教程狂人论坛风云人物

 楼主| 发表于 2021-1-6 06:34:29 | 显示全部楼层
xztxy 发表于 2020-12-30 18:57
刚回家弄好了。。。完美控制开关,以后要是可以控制亮度色温之类的就太好啦~~ ...

原作者一直不更新,我自己动手了,刚刚开发完cover插件,可以接入晾衣架和窗帘。灯的插件应该也很快了。可惜我没有智能灯,测试不了。
回复

使用道具 举报

22

主题

139

帖子

806

积分

高级会员

Rank: 4

积分
806
金钱
667
HASS币
0
发表于 2021-1-6 09:08:38 | 显示全部楼层
27hh 发表于 2021-1-6 06:29
多功能网关有官方插件,集成里搜索gateway即可

现在新出的多功能网关二代可以通过这种方式接入吗?之前看他们贴子,好像是说升级后就不能用了,还要刷回老固件
回复

使用道具 举报

7

主题

97

帖子

1062

积分

金牌会员

Rank: 6Rank: 6

积分
1062
金钱
965
HASS币
0
发表于 2021-1-6 09:14:31 | 显示全部楼层
本帖最后由 neoyang 于 2021-1-6 09:15 编辑

{"status":"released","model":"chuangmi.camera.021a04","version":1,"type":"urn:miot-spec-v2:device:camera:0000A01C:chuangmi-021a04:1"},
[color=var(--error-color)]Configuration invalid

Platform error camera.xiaomi_miot_raw - No module named 'custom_components.xiaomi_miot_raw.camera'



想请教各位, 这台要如何加入 configuration.yaml ?
回复

使用道具 举报

2

主题

105

帖子

1892

积分

金牌会员

Rank: 6Rank: 6

积分
1892
金钱
1787
HASS币
0
发表于 2021-1-6 09:16:18 | 显示全部楼层
27hh 发表于 2021-1-6 06:31
应该是siid和piid找错了,不适用于这个设备

没错的,我结合调试助手搞的,同时这玩意也是你有的邦先生晾衣架一代,顺便问下电机控制用啥,它有三个状态up down pause
回复

使用道具 举报

4

主题

342

帖子

2694

积分

金牌会员

Rank: 6Rank: 6

积分
2694
金钱
2352
HASS币
0
发表于 2021-1-6 10:56:25 | 显示全部楼层
hzx1987227 发表于 2021-1-5 16:59
sensor:
- platform: xiaomi_miot_raw
   name: letsleep

好的,谢谢
回复

使用道具 举报

7

主题

43

帖子

194

积分

注册会员

Rank: 2

积分
194
金钱
151
HASS币
0
发表于 2021-1-6 11:17:31 | 显示全部楼层
本帖最后由 axlzys 于 2021-1-6 11:22 编辑

大佬你好。。一个欧普的风扇灯,,一直提示-9999 user act timeout,确认IP和token没打错。。

这个是代码,
switch:
  - platform: xiaomi_miot_raw
    name: 风扇灯
    host: 192.168.1.174
    token: 7c41ed8b1a71b460c7c915368444c827
    turn_on_command: 'set_properties'
    turn_on_parameters: '{"did":"light","siid":2,"piid":1,"value":true}'
    turn_off_command: 'set_properties'
    turn_off_parameters: '{"did":"light","siid":2,"piid":1,"value":false}'
    state_property: 
      did: SwitchStatus
      siid: 2
      piid: 1
    state_property_getter: 'get_properties'
    state_on_value: True
    state_off_value: False

这个是SPECS按我理解,iid:2是控制灯的,对于siid。里面包含另外4个iid控制设备开关 色温之类就是piid,不知道是不是这样理解。。
{
        "type":"urn:miot-spec-v2:device:light:0000A001:opple-fanlight:2","description":"Light","services":
                [
                        {"iid":1,"type":"urn:miot-spec-v2:service:device-information:00007801:opple-fanlight:2","description":"Device Information","properties":
                                [
                                        {"iid":1,"type":"urn:miot-spec-v2:property:manufacturer:00000001:opple-fanlight:2","description":"Device Manufacturer","format":"string","access":["read"]},
                                        {"iid":2,"type":"urn:miot-spec-v2:property:model:00000002:opple-fanlight:2","description":"Device Model","format":"string","access":["read"]},
                                        {"iid":3,"type":"urn:miot-spec-v2:property:serial-number:00000003:opple-fanlight:2","description":"Device Serial Number","format":"string","access":["read"]},
                                        {"iid":4,"type":"urn:miot-spec-v2:property:firmware-revision:00000005:opple-fanlight:2","description":"Current Firmware Version","format":"string","access":["read"]}
                                ]
                        },
                        {"iid":2,"type":"urn:miot-spec-v2:service:light:00007802:opple-fanlight:2","description":"Light","properties":
                                [
                                        {"iid":1,"type":"urn:miot-spec-v2:property:on:00000006:opple-fanlight:2","description":"Switch Status","format":"bool","access":["read","write"]},
                                        {"iid":2,"type":"urn:miot-spec-v2:property:mode:00000008:opple-fanlight:2","description":"Mode","format":"uint8","access":["read","write"],"value-list":[{"value":1,"description":"Hospitality"},{"value":2,"description":"Tv"},{"value":3,"description":"Entertainment"},{"value":4,"description":"Night"}]},
                                        {"iid":3,"type":"urn:miot-spec-v2:property:brightness:0000000D:opple-fanlight:2","description":"Brightness","format":"uint8","access":["write","read"],"unit":"percentage","value-range":[7,100,1]},
                                        {"iid":4,"type":"urn:miot-spec-v2:property:color-temperature:0000000F:opple-fanlight:2","description":"Color Temperature","format":"uint32","access":["read","write"],"unit":"kelvin","value-range":[3000,5700,1]}
                                ]
                        },
                        {"iid":3,"type":"urn:miot-spec-v2:service:fan:00007808:opple-fanlight:2","description":"Fan","properties":
                                [
                                        {"iid":1,"type":"urn:miot-spec-v2:property:on:00000006:opple-fanlight:2","description":"Switch Status","format":"bool","access":["read","write","notify"]},
                                        {"iid":2,"type":"urn:miot-spec-v2:property:fan-level:00000016:opple-fanlight:2","description":"Fan Level","format":"uint8","access":["read","write","notify"],"value-range":[10,64,1]},
                                        {"iid":3,"type":"urn:miot-spec-v2:property:mode:00000008:opple-fanlight:2","description":"Mode","format":"uint8","access":["read","write","notify"],"value-list":[{"value":1,"description":"NONE"},{"value":2,"description":"LOW"},{"value":3,"description":"MID"},{"value":4,"description":"HIGH"}]}
                                ]
                        }
                ]
}
以下是报错信息
Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}



回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 13:56 , Processed in 0.261576 second(s), 31 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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