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

viomi.waterheater.e1 不显示当前温度和水位 #1707

Closed
Gamingvin opened this issue Jun 12, 2024 · 9 comments
Closed

viomi.waterheater.e1 不显示当前温度和水位 #1707

Gamingvin opened this issue Jun 12, 2024 · 9 comments

Comments

@Gamingvin
Copy link

Gamingvin commented Jun 12, 2024

Device model / 设备型号

viomi.waterheater.e1

Component version / 插件版本

0.7.18

HA core version / HA版本

2024.6.2

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

不显示当前温度和水位。当前温度为 0 ,目标温度为0,水位没有显示
尝试按照#375
升级到master分支,不显示;尝试修改init.py,device_customizes.py,不能启动,只能回退。
开发者工具→服务:

service: xiaomi_miot.send_command
data:
  entity_id: water_heater.viomi_e1_8aee_water_heater
  method: get_prop
  params:
    - targetTemp
    - waterTemp
    - washStatus
    - hotWater
    - modeType

返回结果

result:
  - 0
  - 0
  - 37
  - 50
  - 0
  - 20
  - 0
  - 1
  - 20
  - 23

对应米家显示
微信图片_20240612121009

Entity attributes / 实体属性

min_temp: 30
max_temp: 75
operation_list: Normal, Heat, Delay
current_temperature: 0
temperature: 0
target_temp_high: 75
target_temp_low: 30
operation_mode: Normal
model: viomi.waterheater.e1
lan_ip: 192.168.2.55
mac_address: 5C:E5:0C:09:8A:EE
entity_class: MiotWaterHeaterEntity
home_room: 默认家庭 浴室
miot_type: urn:miot-spec-v2:device:water-heater:0000A02A:viomi-e1:1
water_heater.temperature: 0
water_heater.status: 0
water_heater.on: false
water_heater.water_level: 0
water_heater.mode: 0
state_updater: lan
friendly_name: 热水器 状态
supported_features: 3

Home Assistant Logs / 系统日志

无关于热水器的日志

@Gamingvin
Copy link
Author

Gamingvin commented Oct 7, 2024

service: xiaomi_miot.send_command
data:
  entity_id: water_heater.viomi_e1_8aee_water_heater
  method: get_prop
  params: [water_heater.temperature]

返回结果是
Miio command result
[2, 0, 43, 50, 0, 40, 0, 1, 20, 23]

第3位49是水温,第4位50是目标温度

@Gamingvin
Copy link
Author

Gamingvin commented Oct 8, 2024

补充日志

2024-10-07 23:20:29.924 DEBUG (MainThread) [custom_components.xiaomi_miot] Xiaomi cloud device: {'name': '热水器', 'host': '192.168.2.55', 'token': '****', 'model': 'viomi.waterheater.e1', 'miot_did': '241625390', 'miot_type': 'urn:miot-spec-v2:device:water-heater:0000A02A:viomi-e1:1', 'miio_info': {'ap': {'ssid': 'wifi', 'bssid': 'DC:D8:7C:57:99:CC', 'rssi': -56}, 'netif': {'localIp': '192.168.2.55', 'gw': '', 'mask': ''}, 'fw_ver': '2.1.3', 'hw_ver': '', 'mac': '5C:E5:0C:09:8A:EE', 'model': 'viomi.waterheater.e1', 'token': '9e82b00cb9931a217dacd62ccba92d14'}, 'conn_mode': 'auto', 'miot_local': False, 'miot_cloud': True, 'home_name': '默认家庭', 'room_name': '浴室', 'entry_id': '4dda237d11b6dee9f4017ce783f1c908', 'config_version': 0.3}
2024-10-07 23:20:34.687 INFO (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Initializing miot device with mapping: {'water_heater.temperature': {'siid': 2, 'piid': 2}, 'water_heater.status': {'siid': 2, 'piid': 3}, 'water_heater.on': {'siid': 2, 'piid': 4}, 'water_heater.water_level': {'siid': 2, 'piid': 5}, 'water_heater.mode': {'siid': 2, 'piid': 6}}
2024-10-07 23:20:39.988 INFO (SyncWorker_14) [custom_components.xiaomi_miot.core.miio2miot] viomi.waterheater.e1: Got miio props for miot: {'targetTemp': 0, 'waterTemp': 0, 'washStatus': 0, 'hotWater': 0, 'modeType': 0}
2024-10-07 23:20:40.277 DEBUG (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Got new state: {'water_heater.temperature': 0, 'water_heater.status': 0, 'water_heater.on': False, 'water_heater.water_level': 0, 'water_heater.mode': 0, 'state_updater': 'lan'}
2024-10-07 23:20:40.289 DEBUG (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Added to hass: [{'sensor_properties': 'water_velocity,tds_in,tds_out', 'switch_properties': 'water_heater.on,preheating,cruise_press', 'extend_miot_specs': [{'iid': 2, 'properties': [{'iid': 2, 'access': ['read', 'notify']}, {'iid': 5, 'access': ['read', 'notify']}]}]}]
2024-10-07 23:21:45.374 INFO (SyncWorker_60) [custom_components.xiaomi_miot.core.miio2miot] viomi.waterheater.e1: Got miio props for miot: {'targetTemp': 0, 'waterTemp': 0, 'washStatus': 0, 'hotWater': 0, 'modeType': 0}
2024-10-07 23:21:45.423 DEBUG (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Added sub entity switch: water_heater-2.on-4
2024-10-07 23:21:45.424 DEBUG (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Got new state: {'water_heater.temperature': 0, 'water_heater.status': 0, 'water_heater.on': False, 'water_heater.water_level': 0, 'water_heater.mode': 0, 'state_updater': 'lan'}
2024-10-07 23:22:45.555 INFO (SyncWorker_59) [custom_components.xiaomi_miot.core.miio2miot] viomi.waterheater.e1: Got miio props for miot: {'targetTemp': 0, 'waterTemp': 0, 'washStatus': 0, 'hotWater': 0, 'modeType': 0}
2024-10-07 23:22:45.616 DEBUG (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Got new state: {'water_heater.temperature': 0, 'water_heater.status': 0, 'water_heater.on': False, 'water_heater.water_level': 0, 'water_heater.mode': 0, 'state_updater': 'lan'}

@Gamingvin
Copy link
Author

找到原因
viomi.waterheater.e1的
target-temperature、temperature、water-level
不支持读,只有通知
先参考
#375
进行修改,无效果
再参考
#30
#87
都说没有读取权限,里面的代码不知道要写在哪里。

想通过service: xiaomi_miot.send_command,params: [water_heater.temperature]获取到的
Miio command result
[2, 0, 43, 50, 0, 40, 0, 1, 20, 23]
写个sensor,自动化的方式也不行

@Gamingvin
Copy link
Author

Gamingvin commented Oct 17, 2024

目前只做了这种调整
'prop.2.2': {'prop': 'waterTemp'},
改成'prop.2.2': {'prop': 'temperature'}

  'viomi.waterheater.e1': {
        'chunk_properties': 1,
        'miio_specs': {
            'prop.2.1': {'prop': 'target-temperature', 'setter': 'set_temp', 'set_template': '{{ [value|int] }}'},
            'prop.2.3': {'prop': 'temperature'},
            'prop.2.2': {'prop': 'status'},
            'prop.2.4': {
                'prop': 'washStatus',
                'setter': 'set_power',
                'template': '{{ value != 0 }}',
                'set_template': '{{ [value|int(1)] }}',
            },
        },
    },

目前开关和温度已经正常,但是其他都有问题

@Gamingvin
Copy link
Author

修改版米家获得的miio信息:
192.168.2.55
viomi.waterheater.e1
9e82b00cb9931a217dacd62ccba92d14

2024-10-23 17:37:51 -> {"id":5122,"method":"get_prop","params":["washStatus","velocity","waterTemp","targetTemp","errStatus","hotWater","needClean","modeType","appointStart","appointEnd"]}
2024-10-23 17:37:51 <- {"code":0,"exe_time":630,"id":5122,"message":"ok","net_cost":54,"ot_cost":47,"otlocalts":1729676271878930,"result":[0,0,38,35,0,20,0,1,20,23]}

@al-one
Copy link
Owner

al-one commented Oct 28, 2024

尝试master分支

@Gamingvin
Copy link
Author

Gamingvin commented Oct 28, 2024

谢谢大佬,目前水温、状态、热水量正常了,目标温度还是0
Uploading image.png…

状态:
min_temp: 30
max_temp: 75
operation_list: Normal, Heat, Delay
current_temperature: 55
temperature: 0
target_temp_high: 75
target_temp_low: 30
operation_mode: Heat
model: viomi.waterheater.e1
lan_ip: 192.168.2.55
mac_address: 5C:E5:0C:09:8A:EE
entity_class: MiotWaterHeaterEntity
home_room: 默认家庭 浴室
miot_type: urn:miot-spec-v2:device:water-heater:0000A02A:viomi-e1:1
water_heater.temperature: 55
water_heater.status: 2
water_heater.on: true
water_heater.water_level: 60
water_heater.mode: 1
state_updater: lan
friendly_name: 热水器 状态
supported_features: 3
sub_entities: water_heater-2.on-4

日志:

2024-10-28 22:45:37.491 DEBUG (MainThread) [custom_components.xiaomi_miot] Xiaomi cloud device: {'name': '热水器', 'host': '192.168.2.55', 'token': '****', 'model': 'viomi.waterheater.e1', 'miot_did': '241625390', 'miot_type': 'urn:miot-spec-v2:device:water-heater:0000A02A:viomi-e1:1', 'miio_info': {'ap': {'ssid': 'wifi', 'bssid': 'DC:D8:7C:57:99:CC', 'rssi': -56}, 'netif': {'localIp': '192.168.2.55', 'gw': '', 'mask': ''}, 'fw_ver': '2.1.3', 'hw_ver': '', 'mac': '5C:E5:0C:09:8A:EE', 'model': 'viomi.waterheater.e1', 'token': '9e82b00cb9931a217dacd62ccba92d14'}, 'conn_mode': 'auto', 'miot_local': False, 'miot_cloud': True, 'home_name': '默认家庭', 'room_name': '浴室', 'entry_id': '4dda237d11b6dee9f4017ce783f1c908', 'config_version': 0.3}
2024-10-28 22:45:44.812 INFO (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Initializing miot device with mapping: {'water_heater.temperature': {'siid': 2, 'piid': 2}, 'water_heater.status': {'siid': 2, 'piid': 3}, 'water_heater.on': {'siid': 2, 'piid': 4}, 'water_heater.water_level': {'siid': 2, 'piid': 5}, 'water_heater.mode': {'siid': 2, 'piid': 6}}
2024-10-28 22:45:45.342 INFO (SyncWorker_8) [custom_components.xiaomi_miot.core.miio2miot] viomi.waterheater.e1: Got miio props for miot: {'washStatus': 2, 'velocity': 0, 'waterTemp': 56, 'targetTemp': 55, 'errStatus': 0, 'hotWater': 60, 'needClean': 0, 'modeType': 1, 'appointStart': 20, 'appointEnd': 23}
2024-10-28 22:45:46.214 DEBUG (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Got new state: {'water_heater.temperature': 56, 'water_heater.status': 2, 'water_heater.on': True, 'water_heater.water_level': 60, 'water_heater.mode': 1, 'state_updater': 'lan'}
2024-10-28 22:45:46.235 DEBUG (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Added to hass: [{'sensor_properties': 'water_velocity,tds_in,tds_out', 'switch_properties': 'water_heater.on,preheating,cruise_press', 'extend_miot_specs': [{'iid': 2, 'properties': [{'iid': 2, 'access': ['read', 'notify']}, {'iid': 5, 'access': ['read', 'notify']}]}]}]
2024-10-28 22:46:52.780 INFO (SyncWorker_2) [custom_components.xiaomi_miot.core.miio2miot] viomi.waterheater.e1: Got miio props for miot: {'washStatus': 2, 'velocity': 0, 'waterTemp': 55, 'targetTemp': 55, 'errStatus': 0, 'hotWater': 60, 'needClean': 0, 'modeType': 1, 'appointStart': 20, 'appointEnd': 23}
2024-10-28 22:46:53.162 DEBUG (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Added sub entity switch: water_heater-2.on-4
2024-10-28 22:46:53.166 DEBUG (MainThread) [custom_components.xiaomi_miot.water_heater] 热水器(viomi.waterheater.e1): Got new state: {'water_heater.temperature': 55, 'water_heater.status': 2, 'water_heater.on': True, 'water_heater.water_level': 60, 'water_heater.mode': 1, 'state_updater': 'lan'}

看miot-spec,应该是Target Temperature没有读取权限,加了

{
    "iid": 1,
    "access": ["read", "write", "notify"]
 },

目前运行良好

@Gamingvin
Copy link
Author

感谢大佬,更新到master后运行良好

@github180556
Copy link

2024.11.3 0.7.24热水器又不行了,看不到温度,不能打开关闭

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

No branches or pull requests

3 participants