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

能适配支持Gosund电小酷16A智能插座吗 #919

Closed
ppttu opened this issue Dec 5, 2022 · 15 comments
Closed

能适配支持Gosund电小酷16A智能插座吗 #919

ppttu opened this issue Dec 5, 2022 · 15 comments
Labels
bug Something isn't working device: outlet

Comments

@ppttu
Copy link

ppttu commented Dec 5, 2022

Device model

cuco.plug.cp2d

Component version

1.4.3

HA core version

2022.11.2

Integrated mode

Automatic (自动模式)

The problem

Gosund电小酷智能插座wifi语音控制手机APP远程控制定时开关16A记电量热水器插座无线定时智能插座接入小爱
https://item.jd.com/100020583222.html

请问能对这个设备进行适配吗? 我看到已经在适配列表里,但hass中显示实体状态为不可用。
16a的智能插座是大功率电器必备 市面上兼容米家的16a插座也不多,而一些红外控制的设备是无法通过遥控判断开关机状态的:即开机与关机是同一个遥控按键。这个时候通过插座功率来判断设备运行状态将是一个很好的方式。

还请作者帮忙适配一下:可以控制插座开关、可以读取到功率数据,如有需要 我可以寄一个测试用的智能插座给你

Entity attributes

evice_class: outlet
friendly_name: 智能插座-次卫洗手台 Switch
supported_features: 0

Home Assistant Logs

2022-12-05 11:02:33.131 ERROR (MainThread) [custom_components.xiaomi_miot.switch] 智能插座-厨房空调(cuco.plug.cp2d): Got MiioException while fetching the state: Unable to parse message payload, mapping: {'switch.on': {'siid': 2, 'piid': 1}, 'other_setting.overheat_alarm': {'siid': 6, 'piid': 1},

@al-one
Copy link
Owner

al-one commented Dec 5, 2022

请在米家重新绑定该设备后再试。

@ppttu
Copy link
Author

ppttu commented Dec 5, 2022

好的, 感谢回复 下午我回去试试

@ppttu
Copy link
Author

ppttu commented Dec 5, 2022

仍旧一样,一共三个同款设备 都是一样的表现形式

Logger: custom_components.xiaomi_miot.switch
Source: custom_components/xiaomi_miot/init.py:1360
Integration: Xiaomi Miot Auto (documentation, issues)
First occurred: 11:02:33 (3642 occurrences)
Last logged: 18:49:42

智能插座-公卫洗手台(cuco.plug.cp2d): Got MiioException while fetching the state: No response from the device, mapping: {'switch.on': {'siid': 2, 'piid': 1}, 'other_setting.overheat_alarm': {'siid': 6, 'piid': 1}, 'other_setting.temperature': {'siid': 6, 'piid': 2}, 'other_setting.overload_alarm': {'siid': 6, 'piid': 3}, 'physical_controls_locked': {'siid': 5, 'piid': 1}, 'indicator_light.on': {'siid': 4, 'piid': 1}, 'power_consumption': {'siid': 3, 'piid': 1}, 'electric_current-3-2': {'siid': 3, 'piid': 2}, 'power_consumption.voltage': {'siid': 3, 'piid': 3}, 'electric_power-3-4': {'siid': 3, 'piid': 4}}, max_properties: 10/10
智能插座-主卫洗手台(cuco.plug.cp2d): Got MiioException while fetching the state: Unable to parse message payload, mapping: {'switch.on': {'siid': 2, 'piid': 1}, 'other_setting.overheat_alarm': {'siid': 6, 'piid': 1}, 'other_setting.temperature': {'siid': 6, 'piid': 2}, 'other_setting.overload_alarm': {'siid': 6, 'piid': 3}, 'physical_controls_locked': {'siid': 5, 'piid': 1}, 'indicator_light.on': {'siid': 4, 'piid': 1}, 'power_consumption': {'siid': 3, 'piid': 1}, 'electric_current-3-2': {'siid': 3, 'piid': 2}, 'power_consumption.voltage': {'siid': 3, 'piid': 3}, 'electric_power-3-4': {'siid': 3, 'piid': 4}}, max_properties: 10/10
智能插座-厨房空调(cuco.plug.cp2d): Got MiioException while fetching the state: Unable to parse message payload, mapping: {'switch.on': {'siid': 2, 'piid': 1}, 'other_setting.overheat_alarm': {'siid': 6, 'piid': 1}, 'other_setting.temperature': {'siid': 6, 'piid': 2}, 'other_setting.overload_alarm': {'siid': 6, 'piid': 3}, 'physical_controls_locked': {'siid': 5, 'piid': 1}, 'indicator_light.on': {'siid': 4, 'piid': 1}, 'power_consumption': {'siid': 3, 'piid': 1}, 'electric_current-3-2': {'siid': 3, 'piid': 2}, 'power_consumption.voltage': {'siid': 3, 'piid': 3}, 'electric_power-3-4': {'siid': 3, 'piid': 4}}, max_properties: 10/10
智能插座-次卫洗手台(cuco.plug.cp2d): Got MiioException while fetching the state: Unable to parse message payload, mapping: {'switch.on': {'siid': 2, 'piid': 1}, 'other_setting.overheat_alarm': {'siid': 6, 'piid': 1}, 'other_setting.temperature': {'siid': 6, 'piid': 2}, 'other_setting.overload_alarm': {'siid': 6, 'piid': 3}, 'physical_controls_locked': {'siid': 5, 'piid': 1}, 'indicator_light.on': {'siid': 4, 'piid': 1}, 'power_consumption': {'siid': 3, 'piid': 1}, 'electric_current-3-2': {'siid': 3, 'piid': 2}, 'power_consumption.voltage': {'siid': 3, 'piid': 3}, 'electric_power-3-4': {'siid': 3, 'piid': 4}}, max_properties: 10/10
智能插座-公卫洗手台2(cuco.plug.cp2d): Got MiioException while fetching the state: Unable to parse message payload, mapping: {'switch.on': {'siid': 2, 'piid': 1}, 'other_setting.overheat_alarm': {'siid': 6, 'piid': 1}, 'other_setting.temperature': {'siid': 6, 'piid': 2}, 'other_setting.overload_alarm': {'siid': 6, 'piid': 3}, 'physical_controls_locked': {'siid': 5, 'piid': 1}, 'indicator_light.on': {'siid': 4, 'piid': 1}, 'power_consumption': {'siid': 3, 'piid': 1}, 'electric_current-3-2': {'siid': 3, 'piid': 2}, 'power_consumption.voltage': {'siid': 3, 'piid': 3}, 'electric_power-3-4': {'siid': 3, 'piid': 4}}, max_properties: 10/10

@home110120
Copy link

草民附议 这个设备只有一个switch实体 看不到功率等等 switch也不可使用

@a490077
Copy link

a490077 commented Dec 7, 2022

附议。

@al-one
Copy link
Owner

al-one commented Dec 7, 2022

更新master分支后重试。

@a490077
Copy link

a490077 commented Dec 8, 2022

更新master后目前可以正常显示功率及开关状态, 但用电统计的单日电量和本月电量一直为0, 且功率实体在传感器列表不显示

@al-one
Copy link
Owner

al-one commented Dec 8, 2022

提供实体属性

@a490077
Copy link

a490077 commented Dec 8, 2022

月电量:

state_class: total_increasing
entity_class: BaseSensorSubEntity
parent_entity_id: switch.cuco_cp2d_19ba_switch
updated_time: '2022-12-08T08:51:02.151670+08:00'
power_cost_month: 0
unit_of_measurement: kWh
device_class: energy
friendly_name: 热水器 Switch power_cost_month
supported_features: 0

日电量:

state_class: total_increasing
entity_class: BaseSensorSubEntity
parent_entity_id: switch.cuco_cp2d_19ba_switch
updated_time: '2022-12-08T08:51:02.151126+08:00'
power_cost_today: 0
unit_of_measurement: kWh
device_class: energy
friendly_name: 热水器 Switch power_cost_today
supported_features: 0

功率:

entity_class: MiotSensorSubEntity
parent_entity_id: switch.cuco_cp2d_19ba_switch
service_description: Power Consumption
property_description: Electric Power
updated_time: '2022-12-08T12:52:32.114705+08:00'
electric_power-3-4: 0
unit_of_measurement: watt
device_class: power
friendly_name: 热水器 Power Consumption Electric
supported_features: 0

@al-one
Copy link
Owner

al-one commented Dec 8, 2022

再试更新master分支。

@a490077
Copy link

a490077 commented Dec 8, 2022

感谢! 已可以正常显示, 但是数值比app少了一个0, 应该是换算错了
app显示10.44度电 ha才1.044度

@al-one
Copy link
Owner

al-one commented Dec 8, 2022

已修复。

@a490077
Copy link

a490077 commented Dec 8, 2022

已解决. 非常感谢!

@al-one al-one closed this as completed Dec 8, 2022
@ppttu
Copy link
Author

ppttu commented Dec 8, 2022

牛逼! 开发者神速!!! 很想给作者送一杯咖啡 😄 建议贴个赞助码

家里电线预埋小了 洗手台下接的小厨宝, 多个小厨宝同时开的话会导致跳闸. 本想通过功率做一个互斥的场景 确保总功率不超载.
无奈发现两个坑:
1.市面上数控的小厨宝断电再来电不会待机 需要手动点开机按钮, 而通常小厨宝安装位置不一定方便操作.
2.这款16a插座带功率保护功能且没法关闭. 虽然买的3.5kw的小厨宝 但顺时功耗会到3800w 导致插座过载保护断电

@al-one
Copy link
Owner

al-one commented Dec 9, 2022

@ppttu 感谢支持,你们的Star就是我最大的动力了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working device: outlet
Projects
None yet
Development

No branches or pull requests

4 participants