Add Smart Cat Litter Box for Tuya support

Add support for “Smart Cat Litter Box” in Tuya. The device is recognised but says not supported.

This is the diagnostics from the device:

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.7.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.4",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Australia/Sydney",
    "os_name": "Linux",
    "os_version": "6.6.31-haos-raspi",
    "supervisor": "2024.08.0",
    "host_os": "Home Assistant OS 13.0",
    "docker_version": "26.1.4",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "enphase_envoy": {
      "documentation": "https://github.com/briancmpbll/home_assistant_custom_envoy#readme",
      "version": "0.0.20",
      "requirements": [
        "pyjwt",
        "xmltodict",
        "httpx",
        "envoy_utils"
      ]
    },
    "smartlife": {
      "documentation": "https://www.home-assistant.io/integrations/smartlife",
      "version": "0.1.0",
      "requirements": [
        "tuya-device-sharing-sdk==0.2.0"
      ]
    },
    "hacs": {
      "documentation": "https://hacs.xyz/docs/configuration/start",
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "home_connect_alt": {
      "documentation": "https://github.com/ekutner/home-connect-hass",
      "version": "1.1.7",
      "requirements": [
        "home-connect-async==0.8.0"
      ]
    },
    "localtuya": {
      "documentation": "https://github.com/rospogrigio/localtuya/",
      "version": "5.2.1",
      "requirements": []
    },
    "bureau_of_meteorology": {
      "documentation": "https://github.com/bremor/bureau_of_meteorology",
      "version": "1.2.0",
      "requirements": [
        "iso8601"
      ]
    },
    "govee_lan": {
      "documentation": "https://github.com/wez/govee-lan-hass",
      "version": "1.0.0",
      "requirements": [
        "govee-led-wez>=0.0.15"
      ]
    }
  },
  "integration_manifest": {
    "domain": "tuya",
    "name": "Tuya",
    "codeowners": [
      "Tuya",
      "zlinoliver",
      "frenck"
    ],
    "config_flow": true,
    "dependencies": [
      "ffmpeg"
    ],
    "dhcp": [
      {
        "macaddress": "105A17*"
      },
      {
        "macaddress": "10D561*"
      },
      {
        "macaddress": "1869D8*"
      },
      {
        "macaddress": "381F8D*"
      },
      {
        "macaddress": "508A06*"
      },
      {
        "macaddress": "68572D*"
      },
      {
        "macaddress": "708976*"
      },
      {
        "macaddress": "7CF666*"
      },
      {
        "macaddress": "84E342*"
      },
      {
        "macaddress": "D4A651*"
      },
      {
        "macaddress": "D81F12*"
      }
    ],
    "documentation": "https://www.home-assistant.io/integrations/tuya",
    "integration_type": "hub",
    "iot_class": "cloud_push",
    "loggers": [
      "tuya_iot"
    ],
    "requirements": [
      "tuya-device-sharing-sdk==0.1.9"
    ],
    "is_built_in": true
  },
  "setup_times": {
    "null": {
      "setup": 6.275800001276366e-05
    },
    "593479a6fbd8d617c56fef36aad34a81": {
      "wait_import_platforms": -0.10384395600000573,
      "wait_base_component": -0.003711911999999984,
      "config_entry_setup": 29.708555133000004
    }
  },
  "data": {
    "endpoint": "https://apigw.tuyaeu.com",
    "terminal_id": "17136080810555Dgmd2",
    "mqtt_connected": true,
    "disabled_by": null,
    "disabled_polling": false,
    "id": "bf16fcb756e49df197czuf",
    "name": "Smart Cat Litter Box",
    "category": "msp",
    "product_id": "hvalyynkccqpdwrd",
    "product_name": "Smart Cat Litter Box",
    "online": true,
    "sub": false,
    "time_zone": "+10:00",
    "active_time": "2024-09-06T00:58:05+00:00",
    "create_time": "2024-09-06T00:58:05+00:00",
    "update_time": "2024-09-06T00:58:05+00:00",
    "function": {
      "deodorization": {
        "type": "Boolean",
        "value": {}
      }
    },
    "status_range": {
      "cat_weight": {
        "type": "Integer",
        "value": {
          "unit": "g",
          "min": 600,
          "max": 10000,
          "scale": 0,
          "step": 1
        }
      },
      "excretion_times_day": {
        "type": "Integer",
        "value": {
          "unit": "times",
          "min": 0,
          "max": 60,
          "scale": 0,
          "step": 1
        }
      },
      "excretion_time_day": {
        "type": "Integer",
        "value": {
          "unit": "s",
          "min": 0,
          "max": 1800,
          "scale": 0,
          "step": 1
        }
      },
      "deodorization": {
        "type": "Boolean",
        "value": {}
      },
      "fault": {
        "type": "Bitmap",
        "value": {
          "label": [
            "motor_fault",
            "program_fault",
            "g_sensor_fault"
          ]
        }
      }
    },
    "status": {
      "cat_weight": 600,
      "excretion_times_day": 0,
      "excretion_time_day": 0,
      "deodorization": false,
      "fault": 0
    },
    "home_assistant": {
      "name": "Smart Cat Litter Box",
      "name_by_user": null,
      "disabled": false,
      "disabled_by": null,
      "entities": []
    },
    "set_up": false,
    "support_local": true
  }
}

Hello,
This is fully supported by my custom integration:

Have a nice day,
Azerty

3 Likes

Hello,

I’ve installed eXtend Tuya’s integration and it has added only one entity: “self_cleaning_cat_litter_box_delay_clean_time”. But there is a lot more entities in Tuya app (temperature, cleaning indictation etc.). Is there way to add this to Home Assitant?

Hello,
Have you added the Tuya IOT platform credentials?

This should enable the missing entities :).

Have a nice day,
Azerty

Thanks for your answer. I’ve added all the credentials (using this howto: https://www.youtube.com/watch?v=y6kNHIYcJ5c). Integration stated: “success”, but no new entities were added to HA. Any way I can check some logs to debug it further?

I have removed all Tuya integration, added only eXtended Tuya and situation is exactly the same - only “self_cleaning_cat_litter_box_delay_clean_time” entity is visible. Anything I can do to diagnose it further? @ azerty9971

I’m in: “ST+Cloud” mode with Tuya IOT platform credentials configured

Hello,
Can you post the device’s diagnostic file please?

It’s weird that you don’t have more entities, maybe the device itself doesn’t push that many.

We could also maybe do a Google Meet about this if the device diagnostic is not enough :slight_smile:

Have a nice day,
Azerty

Hello,

I have sent the diagnosis file as prv message, and here is screen for this device from Tuya Android App. Yes, we can arrange Google Meet if you are willing to help :slight_smile:

@azerty9971 Hi, was the diagnostic file helpful?

Hello,
Sorry for the delay, I’ve had tons of work these days :confused:
Can we do a Google Meet call about this, I think we’ll have to activate some more codes in your Tuya IOT platform account for it to work correctly…

Don’t hesitate to send me the Google Meet invite at [email protected] and I’ll join as soon as I see it :).

Have a nice day,
Azerty

Hi @akawoj, did you manage to get it to work?

Oh nvm, after adding the credential following this instruction, it now shows in my HA xtend_tuya/docs/cloud_credentials.md at 75bd7ca107b753565b658060b7b5434c9ae2490b · azerty9971/xtend_tuya · GitHub

Thank @azerty9971 a lot for the integration!

1 Like

Hi @trietphm - can you show what entities of this litter box you can see in HA after configuring eXtended Tuya?

Here’s what I’m seeing (“Cat weight (pounds)” is a template sensor)

Thanks.
What model of litter box do you have? I have this one:

regards

I have this one: Amazon.com


Text

Did you manage to get it working in the end @akawoj ?
I have two of the same litter boxes you have, and I also only get self_cleaning_cat_litter_box_delay_clean_time with this integration

I just compared the logs I have to yours (I have the same as Evan and its working now). The only difference I see is the first line above “cat_weight” for my log is showing up different… Not sure if this helps. I’m in standard so my values will be different for sure.

 }
        "cat_weight": {
        "type": "Integer",
        "value": {
          "unit": "",
          "min": 0,
          "max": 500,
          "scale": 1,
          "step": 1: 1
        }

No I didn’t mange to get i work. It works in Tuya app without any problem.

I’ve created a PR and extended TuyaLocal to now accept our kind of litter boxes. Perhaps that’ll help you out as well.