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

X40 Ultra water tank sensors not working #633

Open
apocaliss92 opened this issue Jul 10, 2024 · 14 comments
Open

X40 Ultra water tank sensors not working #633

apocaliss92 opened this issue Jul 10, 2024 · 14 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@apocaliss92
Copy link

Describe the bug
The entity sensor.x40_ultra_complete_low_water_warning entity does not update when the tank is empty, while the application is fine. I'm also wondering if there is any sensor available to track the dirty water tank, the dust bag status and the detergent status, all these information are available on the application

To Reproduce
Check the sensor.x40_ultra_complete_low_water_warning entity

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
Screenshot 2024-07-10 alle 12 28 51

Additional Information (please complete the following information)

  • Model Name: Dreame X40 Ultra
  • Firmware Version: 4.3.9_1392
  • Home Assistant Version: 2024.7.1
  • Configuration Type: With map support
  • Plugin version: v2.0.0b15
@apocaliss92 apocaliss92 added bug Something isn't working question Further information is requested labels Jul 10, 2024
@apocaliss92
Copy link
Author

I have done a bit of investigation and seems like the 2 following behaviors are not handled:

  • dirty water tank not installed
  • dirty water tank full

For the first one I could find the property DreameVacuumProperty.DIRTY_WATER_TANK_STATUS (137) is not handled in the sensors
The value is 1 if the tank is removed, 0 if it's correctly installed
I will look at the second one too, hopefully will be helpful

@Tasshack
Copy link
Owner

I haven't been able to get access to a X40 yet therefore it is not fully supported.

@apocaliss92
Copy link
Author

Let me know if I can help somehow! Appreciate your work

@Tasshack
Copy link
Owner

Can you share screenshots from the app that contains the information you want to see in the integration?

@apocaliss92
Copy link
Author

IMG_4008

From top left to bottom right

  • clean water tank (already working with the the sensor sensor.x40_ultra_complete_low_water_warning)
  • dirty water tank: which looks like the property DIRTY_WATER_TANK_STATUS, 0 for ok 1 for not inserted, I have to check if it's the same for when it's empty) One more point on this, I think the value should be fetched also on startup and not only on state change, I have moved the properties on device.py on lines 2727-2730 in the array on line 2678, I would not get its value if not after a task completed
  • dust bag: I do not see any error on the integration of the bag is missing, in the app I do
  • Detergent: not sure about this, I still have to face an error about it in the app too

Can I provide you some logs to help?

@Tasshack
Copy link
Owner

For clean and dirty tanks;
The dock does not actually have a water level sensor but instead it measures power consumption of the pump for determining the tank is empty therefore it cannot know tank is empty or not without running its pump.

Dust bag;
I don't think the dock also have a sensor for detecting a bag is installed or not. Only sensor is for the dust bag cover.

Detergent;
Integration already generates entities for detegent sensor.x40_ultra_complete_detergent_left and sensor.x40_ultra_complete_detergent_time_left. When detergent is not installed DreameVacuumProperty.AUTO_ADD_DETERGENT should be returning 2 but since that property also controls the detergent adding feature, there are no extra sensor generated for it from the integration.

I will take a look at the app source code for more information.

@apocaliss92
Copy link
Author

Thanks for the detailed responses! About tanks, i am quiet sure there are sensors mounted in the tanks, and if I remove one of them the app shows red right away, without it is running, tomorrow I can upload a pic of the sensors

About the dust bag same, as soon as I remove the bag, the app shows red for it

@Tasshack
Copy link
Owner

Thanks for the detailed responses! About tanks, i am quiet sure there are sensors mounted in the tanks, and if I remove one of them the app shows red right away, without it is running, tomorrow I can upload a pic of the sensors

Yes there are sensors for presence of the tank but there are no sensor for liquid level inside it. Because of that low water warning can only be triggered after pumps start running.

About the dust bag same, as soon as I remove the bag, the app shows red for it

I will check on this from the source code.

@apocaliss92
Copy link
Author

Oh ok I got it now, then for clear water it's all good already. Are the presence sensors already mapped to ha?

Today the dirty water tank got full during a run and I have received a notification on home assistant and on the app, do you know what sensor should I check, when this happens?

Thanks

@Tasshack
Copy link
Owner

Tasshack commented Jul 21, 2024

I think it is handled by the standard error sensor sensor.x40_ultra_complete_error.
https://github.com/Tasshack/dreame-vacuum/blob/dev/custom_components/dreame_vacuum/dreame/const.py#L1621

You should also see a notification in HA too if you haven't been cleared it from the app.

@Tasshack
Copy link
Owner

Those are the remaining properties.

    DreameVacuumProperty.CLEAN_WATER_TANK_STATUS: {siid: 27, piid: 1},
    DreameVacuumProperty.DIRTY_WATER_TANK_STATUS: {siid: 27, piid: 2},
    DreameVacuumProperty.DUST_BAG_STATUS: {siid: 27, piid: 3},
    DreameVacuumProperty.DETERGENT_STATUS: {siid: 27, piid: 4},
    DreameVacuumProperty.STATION_DRAINAGE_STATUS: {siid: 27, piid: 5},

https://github.com/Tasshack/dreame-vacuum/blob/dev/custom_components/dreame_vacuum/dreame/types.py#L911

I am going to map these to sensors on the next Beta release.

@apocaliss92
Copy link
Author

Thank you very much! Ah one lost thing but probably you know already, I had to comment out the lines 2784-2785 in map.py, they would break the integration, it was a suggestion from another issue

@Tasshack
Copy link
Owner

Values from app source code;

CLEAN_WATER_TANK_STATUS:
0 = ???
1 = Not Installed
2 = Low Water
3 = OK

DIRTY_WATER_TANK_STATUS:
0 = Installed
1 = Not Installed or Full

DUST_BAG_STATUS:
0 = Installed
1 = Not Installed
2 = Please Check

DETERGENT_STATUS:
0 = Installed
1 = Disabled
2 = Low Detergent

@apocaliss92
Copy link
Author

Thanks a lot for taking this up, I have just encountered another issue, tonight the vacuum has cleaned up as usually and did run out of water in the end. The sensor.x40_ultra_complete_low_water_warning was set to low_water correctly, but as soon as I refilled it up it didn't return to normal state. The only thing that worked was to reload the integration in homeassistant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants