denysdovhan / vacuum-card

Vacuum cleaner card for Home Assistant Lovelace UI
https://denysdovhan.com/smart-home
MIT License
914 stars 531 forks source link

Tuya-based (from Kogan) vacuum shows "unknown" instead of "cleaning" #395

Closed jezzaaa closed 1 year ago

jezzaaa commented 2 years ago

Before submitting a bug

[X] I updated to the latest version available [X] I cleared the cache of my browser

Describe the bug

A clear and concise description of what the bug is.

Steps to reproduce

  1. Go to dashboard where the card has been setup.
  2. Click on 'clean' ("play" triangle)
  3. See status change from "Docked" to "unknown"
  4. Click on 3-dot menu, then 'home' icon
  5. See status change from "unknown" to "Returning Home" and then "Docked"

Expected behavior When cleaning, "Cleaning" is expected as the status, rather than "unknown".

Versions:

denysdovhan commented 2 years ago

Seems like your vacuum integration reports unsupported state to the card. Can you investigate that?

jezzaaa commented 2 years ago

Seems like your vacuum integration reports unsupported state to the card. Can you investigate that?

I wish I knew how!

I somehow stumbled upon some status messages, and noticed this in one of them:

    "status": {
      "power": true,
      "fault": 0,
      "electricity_left": 35,
      "power_go": true,
      "direction_control": "foward",
      "mode": "smart",
      "status": "cleanning",
      "suction": "normal",
      "voice_switch": false,
      "clean_area": 18,
      "clean_time": 23,
      "clean_record": "02802700452"
    },

Note the status of "cleanning" with double-"n". I suspect the Tuya cloud service is providing this info, and the HA Tuya integration is just passing on what it receives. Could it be that this is not correctly parsed by HA or your code?

I had a look at your code where you were matching "cleaning" but I couldn't see anything that might be doing that.

Could suggest how I can investigate this further?

JAKAMI99 commented 2 years ago

Same issue here, bought a Tesvor X500 and registered it over Tuya-Cloud. Sadly, the status is also unknown.

denysdovhan commented 1 year ago

https://github.com/denysdovhan/vacuum-card/blob/337b272e149693f7fb2d79ca85ba80a5515bd182/src/vacuum-card.ts#L178

This is how our card determines the status of a robot.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue. Thank you for your contributions!

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

jezzaaa commented 1 year ago

No updates from me for a while because I moved house and had to setup my HA installation. I added my vac the other day and it shows correctly. I'm guessing there were updates to the card that solved this problem (for me, at least).

jezzaaa commented 9 months ago

Hmm. I moved house again, and had to re-setup HA. The problem has returned!

Following advice on another ticket, I deleted and re-added the device using the Mode DP (27) as the ID. That has improved the situation, where the card now shows "Idle" when it's docked, and it still shows "cleaning" when it's cleaning. It would be better to show "docked" when docked, but "idle" is better than "cleaning" in this state. I note that the Tuya integration shows "docked" when the vac is docked.

The status on the card is also wrong when the vac is returning to the dock. Instead of showing "Returning to dock" (as the Tuya integration does) it shows "cleaning".