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

小米智能插座(chuangmi.plug.v1)添加后无法单独操控USB开关和220插座开关 #707

Closed
Networkzt opened this issue Jul 16, 2022 · 12 comments

Comments

@Networkzt
Copy link

model: chuangmi.plug.v1
lan_ip: XXXX
mac_address: XXXX
entity_class: MiotSwitchEntity
home_room: XXXX的家
miot_type: urn:miot-spec-v2:device:outlet:0000A002:chuangmi-v1:2
switch.on: true
indicator_light.on: true
state_updater: lan
sub_entities: indicator_light-3
device_class: outlet
friendly_name: USB电源插座 Power Switch Status
supported_features: 0

希望可以将USB口单独建一个开关控制,驱动device:outlet:0000A002:chuangmi-v1:1,大大看看能不能后续的更新里可以加上

@al-one
Copy link
Owner

al-one commented Jul 18, 2022

chuangmi.plug.v1 貌似没有USB开关。

@Networkzt
Copy link
Author

米家里面是有单独USB控制的,用隔壁家的插件竟然是有单独控制,希望这边也能实现,省的我就一个设备挂在那个下面,大大研究研究
mapping:
{"switch":{"switch_status":{"siid":2,"piid":1}},"switch_usb":{"switch_status":{"siid":3,"piid":1}}}
配置参数:
{"switch":{"switch_status":{"power_on":true,"power_off":false},"main":true},"switch_usb":{"switch_status":{"power_on":true,"power_off":false}}}
f8d9a8c4a1192574b51df62c006abb1
446fd517cd712d84b56c40d24031ab7
Snipaste_2022-07-19_22-58-49

@al-one
Copy link
Owner

al-one commented Jul 22, 2022

已添加该设备的USB开关实体,请更新到master分支

@chenjiezb
Copy link

已经更新到最新版本0.6.11,也核对了保存在本地的代码已经更新了,但发现chuangmi.plug.v1的usb开关没有能出来。
2022-08-30_210254

@Networkzt
Copy link
Author

我也测试了和你一样,但我用隔壁的就能出USB的开关,扎心了
image
他的Mapping 和参数如下:
{"switch":{"switch_status":{"siid":2,"piid":1}},"switch_usb":{"switch_status":{"siid":3,"piid":1}}}
{"switch":{"switch_status":{"power_on":true,"power_off":false},"main":true},"switch_usb":{"switch_status":{"power_on":true,"power_off":false}}}

@Networkzt
Copy link
Author

@chenjiezb 用右边的顶顶哈哈
image

@al-one
Copy link
Owner

al-one commented Sep 1, 2022

执行下面的服务并从HA通知中获取结果。

service: xiaomi_miot.send_command
data:
  entity_id: switch.chuangmi_v1_xxxx
  method: get_prop
  params: ['on', usb_on, temperature, wifi_led]
  throw: true
service: xiaomi_miot.send_command
data:
  entity_id: switch.chuangmi_v1_xxxx
  method: get_prop
  params: ['on', usb_on, wifi_led]
  throw: true

al-one added a commit that referenced this issue Sep 1, 2022
@al-one
Copy link
Owner

al-one commented Sep 1, 2022

更新master分支再试

@chenjiezb
Copy link

目前220v和usb两个开关功能均恢复正常了,但原来正常的指示灯开关功能现在不能使用,出现了两个指示灯开关,无温度传感器数据。
2022-09-01_195657

al-one added a commit that referenced this issue Sep 1, 2022
@al-one
Copy link
Owner

al-one commented Sep 1, 2022

不可用的指示灯实体直接删除即可。

@chenjiezb
Copy link

此设备在ha中的功能完美展现,感谢大侠即时修复!哪里有教程,俺也想学一学:)
2022-09-01_210255

@Networkzt
Copy link
Author

Networkzt commented Sep 3, 2022

终于好了,不容易,我更新master几次才好,估计是网络问题导致更新没成功 @chenjiezb

@al-one al-one closed this as completed Sep 5, 2022
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

3 participants