Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support 米家智能晾衣架 hyd.airer.znlyj2 #138

Closed
Comee opened this issue Jul 21, 2021 · 19 comments
Closed

support 米家智能晾衣架 hyd.airer.znlyj2 #138

Comee opened this issue Jul 21, 2021 · 19 comments

Comments

@Comee
Copy link

Comee commented Jul 21, 2021

Current problems
截屏2021-07-21 下午10 43 39
截屏2021-07-22 上午12 14 41

此外,添加到Homekit后,升降控制均无效

other maybe useful information
截屏2021-07-22 上午12 08 35

@al-one
Copy link
Owner

al-one commented Jul 22, 2021

该型号的miot协议定义有点乱,有两个airer服务,且其中一个有两个target-position属性,另一个下面所有属性错误码-704040002表示服务不存在,因此siid为4的服务应该是无效的,可以将其关联的cover实体和fan实体禁用。

另外,请提供下面不同状态下的实体状态以及airer.statusairer.current_position

  • 最顶部
  • 30%左右非暂停
  • 65%左右暂停
  • 最低部

@Comee
Copy link
Author

Comee commented Jul 22, 2021

升到最顶端:airer.current_position = 1  airer.status = 0
上升过程中:airer.current_position = 0  airer.status = 1
降到最低端:airer.current_position = 2  airer.status = 0
下降过程中:airer.current_position = 0  airer.status = 2
中途暂停(不管上升还是下降代码一样)airer.current_position = 0  airer.status = 3

原来的图标含义也有问题,上升图标表示下降,下降图标表示上升

@al-one
Copy link
Owner

al-one commented Jul 22, 2021

请更新master后再试下。

@Comee
Copy link
Author

Comee commented Jul 22, 2021

error log
.homeassistant/custom_components/xiaomi_miot/cover.py", line 181, in is_closed
if pos < 0:
TypeError: '<' not supported between instances of 'NoneType' and 'int'

al-one added a commit that referenced this issue Jul 22, 2021
@al-one
Copy link
Owner

al-one commented Jul 22, 2021

再试下

@Comee
Copy link
Author

Comee commented Jul 22, 2021

home assistant 上测试已经没问题,但是集成到homekit上后,苹果手机家庭里面无法控制升降(可以控制照明),看日志是调用了HomeKit send command set_cover_position for 晾衣架 Airer

@al-one
Copy link
Owner

al-one commented Jul 22, 2021

在HA上点开实体弹出框通过滑竿控制升降试试。并且观察下HomeKit操作后有无相关日志,如没有请开启debug日志后再试:

service: logger.set_level
data:
  custom_components.xiaomi_miot: debug

日志以Set miot property to 晾衣架 Airer ...开头。

@Comee
Copy link
Author

Comee commented Jul 22, 2021

HA上通过滑竿控制也不可以,debug日志如下:

2021-07-22 19:37:42 DEBUG (SyncWorker_8) [custom_components.xiaomi_miot] Set miot property to 晾衣架 Airer ({'did': '358897291', 'siid': 2, 'piid': 5, 'value': 45}), result: {'did': '358897291', 'siid': 2, 'piid': 5, 'code': -704002000}

al-one added a commit that referenced this issue Jul 22, 2021
@al-one
Copy link
Owner

al-one commented Jul 22, 2021

当cover实体支持设置行程时,HomeKit会通过设置行程控制实体。请再次更新,已将该型号的target-position默认禁用。

@Comee
Copy link
Author

Comee commented Jul 22, 2021

可以控制了,homekit里面显示有问题,显示反了:
实际晾衣架已升到最上面(关上状态),HomeKit里显示已打开
实际晾衣架降到最下面(打开状态),HomeKit里显示已关闭

@al-one
Copy link
Owner

al-one commented Jul 22, 2021

状态没有问题,晾衣架类是没有打开关闭的说法的,请把晾衣架想象成卷帘。

@Comee
Copy link
Author

Comee commented Jul 22, 2021

这个能改吗,语音控制起来,有点反常识,别扭😂

@al-one
Copy link
Owner

al-one commented Jul 22, 2021

# customize.yaml
cover.your_entity_id:
  motor_reverse: true

你可以添加此自定义属性尝试,但是可能会导致操作也是反的

@Comee
Copy link
Author

Comee commented Jul 22, 2021

HomeKit 测试没问题了,要是能把暂停功能也加入HomeKit 那就更完美了,现在在HomeKit里面只能升到最顶端,或降到最低端。HA里则可以让其停在任意位置😊。

@al-one
Copy link
Owner

al-one commented Jul 22, 2021

可以添加一个脚本调用cover.stop_cover服务并同步script实体到HomeKit。

@Comee
Copy link
Author

Comee commented Jul 22, 2021

非常感谢🙏

@Comee Comee closed this as completed Jul 22, 2021
@Comee
Copy link
Author

Comee commented Jul 27, 2021

homekit 语音 关闭全屋窗帘,会导致关闭 该晾衣架,有什么办法可以不让其受影响吗

@Comee Comee reopened this Jul 27, 2021
@al-one
Copy link
Owner

al-one commented Jul 27, 2021

只能晾衣机不接入HomeKit,用template switch或者script调用服务控制衣机。

@Comee
Copy link
Author

Comee commented Jul 27, 2021

👌谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants