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

Integrate miot-local for yunmi.waterpuri.lx7 #890

Closed
dinde opened this issue Nov 21, 2022 · 18 comments
Closed

Integrate miot-local for yunmi.waterpuri.lx7 #890

dinde opened this issue Nov 21, 2022 · 18 comments

Comments

@dinde
Copy link

dinde commented Nov 21, 2022

Hello,

Is it possible to integrate https://home.miot-spec.com/spec/yunmi.waterpuri.lx7 with miot-local ?
Here is the output when I add the device to Home Assistant with ip/token:
Model
yunmi.waterpuri.lx7
Lan IP
192.168.x.y
MAC address
[deleted]
Entity class
MiotSensorEntity
Miot type
urn:miot-spec-v2:device:water-purifier:0000A013:yunmi-lx7:1
State property
water_purifier.temperature
Water purifier.temperature.error
-4004 Other internal errors
Filter-5.filter used time.error
-4004 Other internal errors
Filter-5.filter used flow.error
-4004 Other internal errors
Filter.filter used time.error
-4004 Other internal errors
Filter.filter used flow.error
-4004 Other internal errors
Tds sensor.tds in.error
-4004 Other internal errors
Tds sensor.tds out.error
-4004 Other internal errors
State updater
lan

thanks !

@al-one
Copy link
Owner

al-one commented Nov 21, 2022

It is not a miot device, I will adapt it to local integration through miio2miot in future versions.

@dinde
Copy link
Author

dinde commented Nov 21, 2022

Thank you !
If you need tests, do not hesitate to hit me.

@al-one
Copy link
Owner

al-one commented Dec 5, 2022

Try master branch.

@al-one
Copy link
Owner

al-one commented Dec 6, 2022

Does it work ?

@dinde
Copy link
Author

dinde commented Dec 6, 2022

Hello,

Checked out latest branch and I've been able to add it without warning.
But it only pulls water temp and remains in state unknown
Attributes below:
Model
yunmi.waterpuri.lx7
Lan IP
[private]
MAC address
[private]
Entity class
MiotSensorEntity
Miot type
urn:miot-spec-v2:device:water-purifier:0000A013:yunmi-lx7:1
State property
water_purifier.temperature
Water purifier.temperature.error
-4004 Other internal errors
Filter-5.filter used time.error
-4004 Other internal errors
Filter-5.filter used flow.error
-4004 Other internal errors
Filter.filter used time.error
-4004 Other internal errors
Filter.filter used flow.error
-4004 Other internal errors
Tds sensor.tds in.error
-4004 Other internal errors
Tds sensor.tds out.error
-4004 Other internal errors
State updater
lan

@al-one
Copy link
Owner

al-one commented Dec 6, 2022

You failed to update to the master branch.

@dinde
Copy link
Author

dinde commented Dec 6, 2022

Installed thru:

wget -q -O - https://raw.githubusercontent.com/al-one/hass-xiaomi-miot/master/install.sh | ARCHIVE_TAG=master bash -

Then restarted HA

So I downloaded the master.zip
unzip then mv custom_components/xiaomi_miot
Then restarted HA
And it seems to be working I can get 6 sensors now.

Is TDS IN missing or not available on the device ?
Thanks !

@al-one
Copy link
Owner

al-one commented Dec 7, 2022

Is TDS IN missing or not available on the device ?

Show me the latest entity attributes.

@dinde
Copy link
Author

dinde commented Dec 9, 2022

sensor.yunmi_lx7_5a4b_filter_used_flow
Purificateur d'Eau Composite Filter Service Used Flow 170

state_class: total_increasing
entity_class: MiotSensorSubEntity
parent_entity_id: sensor.yunmi_lx7_5a4b_water_purifier
service_description: Composite Filter Service
property_description: Filter Used Flow
updated_time: 2022-12-08T04:05:28.975213+01:00
filter.filter_used_flow: 170
icon: mdi:water-percent
friendly_name: Purificateur d'Eau Composite Filter Service Used Flow
supported_features: 0
sensor.yunmi_lx7_5a4b_filter_used_flow_2
Purificateur d'Eau RO Filter Service Used Flow
170	state_class: total_increasing
entity_class: MiotSensorSubEntity
parent_entity_id: sensor.yunmi_lx7_5a4b_water_purifier
service_description: RO Filter Service
property_description: Filter Used Flow
updated_time: 2022-12-08T04:05:28.975614+01:00
filter-5.filter_used_flow: 170
icon: mdi:water-percent
friendly_name: Purificateur d'Eau RO Filter Service Used Flow
supported_features: 0

sensor.yunmi_lx7_5a4b_filter_used_time
Purificateur d'Eau Composite Filter Service Used Time 3156

entity_class: MiotSensorSubEntity
parent_entity_id: sensor.yunmi_lx7_5a4b_water_purifier
service_description: Composite Filter Service
property_description: Filter Used Time
updated_time: 2022-12-08T08:33:00.246242+01:00
filter.filter_used_time: 3156
unit_of_measurement: hours
icon: mdi:clock
friendly_name: Purificateur d'Eau Composite Filter Service Used Time
supported_features: 0
sensor.yunmi_lx7_5a4b_filter_used_time_2

Purificateur d'Eau RO Filter Service Used Time 3156

entity_class: MiotSensorSubEntity
parent_entity_id: sensor.yunmi_lx7_5a4b_water_purifier
service_description: RO Filter Service
property_description: Filter Used Time
updated_time: 2022-12-08T08:32:30.246777+01:00
filter-5.filter_used_time: 3156
unit_of_measurement: hours
icon: mdi:clock
friendly_name: Purificateur d'Eau RO Filter Service Used Time
supported_features: 0

sensor.yunmi_lx7_5a4b_total_dissolved_solids_for_output_water
Purificateur d'Eau Total Dissolved Solids Sensor for Output Water 193

state_class: measurement
entity_class: MiotSensorSubEntity
parent_entity_id: sensor.yunmi_lx7_5a4b_water_purifier
service_description: Total Dissolved Solids Sensor
property_description: Total Dissolved Solids for Output Water
updated_time: 2022-12-09T02:49:01.831978+01:00
tds_sensor.tds_out: 193
unit_of_measurement: ppm
icon: mdi:water-check
friendly_name: Purificateur d'Eau Total Dissolved Solids Sensor for Output Water
supported_features: 0

sensor.yunmi_lx7_5a4b_water_purifier
Purificateur d'Eau Water Purifier Temperature 19.0

model: yunmi.waterpuri.lx7
lan_ip: 192.168.y.z
mac_address: [removed]
entity_class: MiotSensorEntity
miot_type: urn:miot-spec-v2:device:water-purifier:0000A013:yunmi-lx7:1
state_property: water_purifier.temperature
run_status: 0
f1_totalflow: 7200
f2_totalflow: 7200
water_purifier.temperature: 19
water_purifier.rinse: 0
water_purifier.light_mode: false
water_purifier.tds_warn_thd: 100
filter-5.filter_used_time: 3156
filter-5.filter_used_flow: 170
filter.filter_used_time: 3156
filter.filter_used_flow: 170
tds_sensor.tds_out: 193
state_updater: lan
sub_entities: filter-4.filter_used_time-1, filter-4.filter_used_flow-2, filter-5.filter_used_time-1, filter-5.filter_used_flow-2, tds_sensor-3.tds_out-2
unit_of_measurement: °C
device_class: temperature
friendly_name: Purificateur d'Eau Water Purifier Temperature
supported_features: 0

@al-one
Copy link
Owner

al-one commented Dec 9, 2022

Try master branch again.

@dinde
Copy link
Author

dinde commented Dec 13, 2022

Tested latest master and TDS IN populated immediately.
Thank you

@al-one al-one closed this as completed Dec 13, 2022
@dinde
Copy link
Author

dinde commented Dec 14, 2022

It seems that TDS IN value stays on 80 in my end.
No variation at all since 24h.

@al-one
Copy link
Owner

al-one commented Dec 14, 2022

Is there any change in MiHome APP ?

@dinde
Copy link
Author

dinde commented Dec 14, 2022

Mi Home only reports TDS OUT by design.
Attributes does not update (like with mi air purifier with temperature).
It updated 16h ago then attributes does not change.

Attributs
Entity class
MiotSensorSubEntity
Parent entity ID
sensor.yunmi_lx7_5a4b_water_purifier
Service description
Total Dissolved Solids Sensor
Property description
Total Dissolved Solids for Input Water
Updated time
14 décembre 2022 à 02:16:01
Tds sensor.tds in
80

@al-one
Copy link
Owner

al-one commented Dec 15, 2022

The TDS IN of some models of Yunmi water purifiers is hard-coded in the device firmware, not the real value. These values are all from the device, you can verify the data through the following service command, if they have not changed, I can't do anything.

service: xiaomi_miot.send_command
data:
  entity_id: sensor.yunmi_lx7_5a4b_water_purifier
  method: get_prop
  params: [tds_in,tds_out]
  throw: true

@dinde
Copy link
Author

dinde commented Dec 16, 2022

Miio command result
[100, 'error']

Now

@liuan1990
Copy link

The TDS IN of some models of Yunmi water purifiers is hard-coded in the device firmware, not the real value. These values are all from the device, you can verify the data through the following service command, if they have not changed, I can't do anything.

service: xiaomi_miot.send_command
data:
  entity_id: sensor.yunmi_lx7_5a4b_water_purifier
  method: get_prop
  params: [tds_in,tds_out]
  throw: true

Miio command result
[80, 'error']

@dinde
Copy link
Author

dinde commented Dec 17, 2022

image
Peak is due to a power outage.
For some reasons, value switched from 80 to 100 now for TDS IN.

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