Closed xztxy closed 3 years ago
后续版本会改用HA内置的water_heater
实体类型集成热水器设备,请更新master分支代码后重试。
Commit: https://github.com/al-one/hass-xiaomi-miot/commit/26cb7d5031016c6d59b80e32ba45d418dcecf7ae
另外你的热水器miot-spec协议中没有模式相关字段,因此无发切换模式。
{
"service":"water-heater",
"desc":"Water Heater",
"prop":{
"1":{
"property":"target-temperature",
"desc":"Target Temperature",
"access":"write,notify,read",
"format":"uint8",
"unit":"celsius",
"value-range":[
30,
65,
1
]
},
"2":{
"property":"temperature",
"desc":"Temperature",
"access":"read,notify",
"format":"uint8",
"unit":"celsius",
"value-range":[
0,
255,
1
]
},
"3":{
"property":"status",
"desc":"Status",
"access":"notify",
"format":"uint8",
"unit":"none",
"value-list":[
{
"value":0,
"description":"Off"
},
{
"value":1,
"description":"Idle"
},
{
"value":2,
"description":"Busy"
},
{
"value":3,
"description":"Preheating"
}
]
},
"4":{
"property":"on",
"desc":"Switch Status",
"access":"write",
"format":"bool"
}
}
}
后续版本会改用HA内置的
water_heater
实体类型集成热水器设备,请更新master分支代码后重试。
更新最新的只有 一个实体~ 还有没有字段是我这边的问题还是需要怎么处理?~
无法控制目标温度是吗? 也没有开关吗? 模式字段是云米没有将其添加至miot协议中,因此无法实现模式切换。不过不可以在无模式字段的情况下将开关做到模式中。
已修复,请更新后尝试。 至于热水器开关,会创建一个switch实体。
由于你的热水器miot协议中开关字段on
没有read
权限,会导致switch实体状态异常。
请再次更新后尝试。
由于你的热水器miot协议中开关字段
on
没有read
权限,会导致switch实体状态异常。 请再次更新后尝试。
不好意思,刚在忙,刚试了最新的,switch开关是ok的。热水器调温界面上图那样的。但是调温,无效。调温度的数字跳动好像也有问题。
你的热水器miot协议中状态字段status
也没有read
权限,因此会无法读取开关及运行状态。即使可以控制开关,但是开关状态无法正常读取。
调温问题还需要查看有没有相关日志。
你的热水器miot协议中状态字段
status
也没有read
权限,因此会无法读取开关及运行状态。即使可以控制开关,但是开关状态无法正常读取。 调温问题还需要查看有没有相关日志。
2021-03-06 22:58:03 DEBUG (MainThread) [custom_components.xiaomi_miot.config_flow] Xiaomi Miot config flow: {'user_input': {'name': '厨房热水器', 'token': 'b6268423aefdcb8f960ef5707cd4bb2d', 'host': '192.168.15.246'}, 'miio_info': viomi.waterheater.u8 v2.1.3 (04:CF:8C:67:43:44) @ 192.168.15.246 - token: b6268423aefdcb8f960ef5707cd4bb2d, 'errors': {}} 2021-03-06 22:58:03 DEBUG (MainThread) [custom_components.xiaomi_miot] Xiaomi Miot setup config entry: {'entry_id': 'd3d805dffe2892b5bfa8d4bb18396382', 'unique_id': '04:cf:8c:67:43:44', 'config': {'host': '192.168.15.246', 'token': 'b6268423aefdcb8f960ef5707cd4bb2d', 'name': '厨房热水器', 'model': 'viomi.waterheater.u8', 'mode': [], 'miot_type': 'urn:miot-spec-v2:device:water-heater:0000A02A:viomi-u8:1', 'miio_info': {'life': 681754, 'uid': 987711293, 'model': 'viomi.waterheater.u8', 'token': 'b6268423aefdcb8f960ef5707cd4bb2d', 'ipflag': 1, 'fw_ver': '2.1.3', 'mcu_fw_ver': '0002', 'miio_ver': '0.0.9', 'hw_ver': 'esp8266', 'mmfree': 22116, 'mac': '04:CF:8C:67:43:44', 'wifi_fw_ver': '8903c22', 'ap': {'ssid': 'Momo', 'bssid': 'C4:41:1E:E4:ED:C0', 'rssi': -79, 'primary': 4}, 'netif': {'localIp': '192.168.15.246', 'mask': '255.255.255.0', 'gw': '192.168.15.1'}}, 'config_entry': <homeassistant.config_entries.ConfigEntry object at 0x7f2de0008180>}, 'miio': {'life': 681754, 'uid': 987711293, 'model': 'viomi.waterheater.u8', 'token': 'b6268423aefdcb8f960ef5707cd4bb2d', 'ipflag': 1, 'fw_ver': '2.1.3', 'mcu_fw_ver': '0002', 'miio_ver': '0.0.9', 'hw_ver': 'esp8266', 'mmfree': 22116, 'mac': '04:CF:8C:67:43:44', 'wifi_fw_ver': '8903c22', 'ap': {'ssid': 'Momo', 'bssid': 'C4:41:1E:E4:ED:C0', 'rssi': -79, 'primary': 4}, 'netif': {'localIp': '192.168.15.246', 'mask': '255.255.255.0', 'gw': '192.168.15.1'}}} 2021-03-06 22:58:03 INFO (MainThread) [custom_components.xiaomi_miot.water_heater] Initializing 厨房热水器 Water Heater (192.168.15.246, token b6268...), miot mapping: {'water_heater.target_temperature': {'siid': 2, 'piid': 1}, 'water_heater.temperature': {'siid': 2, 'piid': 2}, 'water_heater.on': {'siid': 2, 'piid': 4}} 2021-03-06 22:58:11 ERROR (MainThread) [custom_components.xiaomi_miot] Got MiioException while fetching the state for 厨房热水器 Water Heater: {'code': -9999, 'message': 'user ack timeout'}
2021-03-06 22:58:21 DEBUG (MainThread) [custom_components.xiaomi_miot] Xiaomi Miot update config entry options: {'entry_id': 'd3d805dffe2892b5bfa8d4bb18396382', 'unique_id': '04:cf:8c:67:43:44', 'state': 'loaded', 'data': mappingproxy({'name': '厨房热水器', 'token': 'b6268423aefdcb8f960ef5707cd4bb2d', 'host': '192.168.15.246', 'model': 'viomi.waterheater.u8', 'miio_info': {'life': 681754, 'uid': 987711293, 'model': 'viomi.waterheater.u8', 'token': 'b6268423aefdcb8f960ef5707cd4bb2d', 'ipflag': 1, 'fw_ver': '2.1.3', 'mcu_fw_ver': '0002', 'miio_ver': '0.0.9', 'hw_ver': 'esp8266', 'mmfree': 22116, 'mac': '04:CF:8C:67:43:44', 'wifi_fw_ver': '8903c22', 'ap': {'ssid': 'Momo', 'bssid': 'C4:41:1E:E4:ED:C0', 'rssi': -79, 'primary': 4}, 'netif': {'localIp': '192.168.15.246', 'mask': '255.255.255.0', 'gw': '192.168.15.1'}}, 'miot_type': 'urn:miot-spec-v2:device:water-heater:0000A02A:viomi-u8:1', 'unique_did': '04:cf:8c:67:43:44'}), 'options': mappingproxy({'miot_cloud': True})} 2021-03-06 22:58:21 DEBUG (MainThread) [custom_components.xiaomi_miot] Xiaomi Miot setup config entry: {'entry_id': 'd3d805dffe2892b5bfa8d4bb18396382', 'unique_id': '04:cf:8c:67:43:44', 'config': {'miot_cloud': True, 'host': '192.168.15.246', 'token': 'b6268423aefdcb8f960ef5707cd4bb2d', 'name': '厨房热水器', 'model': 'viomi.waterheater.u8', 'mode': [], 'miot_type': 'urn:miot-spec-v2:device:water-heater:0000A02A:viomi-u8:1', 'miio_info': {'life': 681754, 'uid': 987711293, 'model': 'viomi.waterheater.u8', 'token': 'b6268423aefdcb8f960ef5707cd4bb2d', 'ipflag': 1, 'fw_ver': '2.1.3', 'mcu_fw_ver': '0002', 'miio_ver': '0.0.9', 'hw_ver': 'esp8266', 'mmfree': 22116, 'mac': '04:CF:8C:67:43:44', 'wifi_fw_ver': '8903c22', 'ap': {'ssid': 'Momo', 'bssid': 'C4:41:1E:E4:ED:C0', 'rssi': -79, 'primary': 4}, 'netif': {'localIp': '192.168.15.246', 'mask': '255.255.255.0', 'gw': '192.168.15.1'}}, 'config_entry': <homeassistant.config_entries.ConfigEntry object at 0x7f2de0008180>}, 'miio': {'life': 681754, 'uid': 987711293, 'model': 'viomi.waterheater.u8', 'token': 'b6268423aefdcb8f960ef5707cd4bb2d', 'ipflag': 1, 'fw_ver': '2.1.3', 'mcu_fw_ver': '0002', 'miio_ver': '0.0.9', 'hw_ver': 'esp8266', 'mmfree': 22116, 'mac': '04:CF:8C:67:43:44', 'wifi_fw_ver': '8903c22', 'ap': {'ssid': 'Momo', 'bssid': 'C4:41:1E:E4:ED:C0', 'rssi': -79, 'primary': 4}, 'netif': {'localIp': '192.168.15.246', 'mask': '255.255.255.0', 'gw': '192.168.15.1'}}} 2021-03-06 22:58:21 INFO (MainThread) [custom_components.xiaomi_miot.water_heater] Initializing 厨房热水器 Water Heater (192.168.15.246, token b6268...), miot mapping: {'water_heater.target_temperature': {'siid': 2, 'piid': 1}, 'water_heater.temperature': {'siid': 2, 'piid': 2}, 'water_heater.on': {'siid': 2, 'piid': 4}} 2021-03-06 22:58:25 ERROR (MainThread) [custom_components.xiaomi_miot] Got MiioException while fetching the state for 厨房热水器 Water Heater: {'code': -9999, 'message': 'user ack timeout'} 2021-03-06 23:00:26 DEBUG (MainThread) [custom_components.xiaomi_miot] Got new state from 厨房热水器 Water Heater: {'water_heater.target_temperature': 41, 'water_heater.temperature': 41, 'water_heater.on.error': -704030013, 'state_updater': 'cloud'} 麻烦大佬再次看下这是日志里面找到的~之前手动更新了插件版本有一个单独的开关。现在从HACS更新后开关也没了。就这样了 也没有办法调温的。
开关实体没了,是因为你设备下的on
和status
都无法获取,所以新版就直接不生成开关实体了。
调温需要获取操作调温后产生的相关日志,或者通过小米调试助手尝试是否正常控制设备。
开关实体没了,是因为你设备下的
on
和status
都无法获取,所以新版就直接不生成开关实体了。 调温需要获取操作调温后产生的相关日志,或者通过小米调试助手尝试是否正常控制设备。
有办法解决吗 或者大佬有空的话我把设备共享给大佬。。看下?~
开关实体没了,是因为你设备下的
on
和status
都无法获取,所以新版就直接不生成开关实体了。 调温需要获取操作调温后产生的相关日志,或者通过小米调试助手尝试是否正常控制设备。
2021-03-07 01:43:36 DEBUG (SyncWorker_8) [custom_components.xiaomi_miot] Set miot property to 厨房热水器 Water Heater ({'did': '129224749', 'siid': 2, 'piid': 1, 'value': 48.3}), result: {'did': '129224749', 'siid': 2, 'piid': 1, 'code': -704220043} 2021-03-07 01:43:36 INFO (SyncWorker_8) [custom_components.xiaomi_miot] Set miot property to 厨房热水器 Water Heater failed: water_heater.target_temperature(48.3), result: {'did': '129224749', 'siid': 2, 'piid': 1, 'code': -704220043} 2021-03-07 01:43:38 DEBUG (SyncWorker_7) [custom_components.xiaomi_miot.core.xiaomi_cloud] Request miot spec: prop/get, params: [{'did': '129224749', 'siid': 2, 'piid': 1}, {'did': '129224749', 'siid': 2, 'piid': 2}, {'did': '129224749', 'siid': 2, 'piid': 4}] to cloud result: {"code":0,"message":"","result":[{"did":"129224749","siid":2,"piid":1,"value":41,"code":0,"updateTime":1615024910},{"did":"129224749","siid":2,"piid":2,"value":24,"code":0,"updateTime":1615050370},{"did":"129224749","siid":2,"piid":4,"code":-704030013}]} 2021-03-07 01:43:38 DEBUG (MainThread) [custom_components.xiaomi_miot] Got new state from 厨房热水器 Water Heater: {'water_heater.target_temperature': 41, 'water_heater.temperature': 24, 'water_heater.on.error': -704030013, 'state_updater': 'cloud'}
调温之后的日志~~
调温问题你可以更新master分支后尝试下。 开关实体已经无解了,是云米配置的miot-spec协议有问题,除非云米更新固件和协议。
调温问题你可以更新master分支后尝试下。 开关实体已经无解了,是云米配置的miot-spec协议有问题,除非云米更新固件和协议。
现在超过44度-60度可以调,但是不是一度一度的 这个是需要一度一度的调的。而且最低应该可以调30度,现在是没法调到44度以下。和60度以上。
调温已修复。