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

New device: Catit Pixi Smart Fountain #216

Closed
alexmaras opened this issue Aug 4, 2022 · 6 comments
Closed

New device: Catit Pixi Smart Fountain #216

alexmaras opened this issue Aug 4, 2022 · 6 comments

Comments

@alexmaras
Copy link
Contributor

alexmaras commented Aug 4, 2022

Device: Catit Pixi Smart Cat Fountain

Note: Tuya isn't documented for this fountain anywhere - they use a branded app for this - but pairing works perfectly when configuring in the app, and all relevant settings work.

The functionality includes:

  • switching the fountain on and off
  • seeing the water level
  • time until filter needs replacing
  • resetting the filter life after replacement
  • time until pump needs cleaning
  • resetting the pump cleaning notification after cleaning
  • running a UV cycle
  • time that the UV cycle has been running for
  • "energy saving" mode - though I'm not sure if this is perhaps implemented server-side to send off/on events to the device?
  • timer mode - only runs between time x and y - not sure if implemented client side or server-side

I'm not sure what "water time" and "water reset" are - there's no notifications to change the water as far as I can tell, just one that tells you when the water level is low.

Instructions:
https://www.catit.com/shared/Product-Manual_PIXI-Smart-Fountain_NA.pdf

API Explorer result:

{
  "result": {
    "category": "cwysj",
    "functions": [
      {
        "code": "switch",
        "desc": "{}",
        "name": "开关",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "water_reset",
        "desc": "{}",
        "name": "用水重置",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "filter_reset",
        "desc": "{}",
        "name": "滤芯复位",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "pump_reset",
        "desc": "{}",
        "name": "水泵重置",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "uv",
        "desc": "{}",
        "name": "UV杀菌",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "uv_runtime",
        "desc": "{\"unit\":\"s\",\"min\":0,\"max\":10800,\"scale\":0,\"step\":1}",
        "name": "UV运行时间",
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":0,\"max\":10800,\"scale\":0,\"step\":1}"
      }
    ],
    "status": [
      {
        "code": "switch",
        "name": "开关",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "water_time",
        "name": "用水时长",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":7200,\"scale\":0,\"step\":1}"
      },
      {
        "code": "filter_life",
        "name": "滤芯时长",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":43200,\"scale\":0,\"step\":1}"
      },
      {
        "code": "pump_time",
        "name": "水泵时长",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
      },
      {
        "code": "water_reset",
        "name": "用水重置",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "filter_reset",
        "name": "滤芯复位",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "pump_reset",
        "name": "水泵重置",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "uv",
        "name": "UV杀菌",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "uv_runtime",
        "name": "UV运行时间",
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":0,\"max\":10800,\"scale\":0,\"step\":1}"
      },
      {
        "code": "water_level",
        "name": "水位档位",
        "type": "Enum",
        "values": "{\"range\":[\"level_1\",\"level_2\",\"level_3\"]}"
      }
    ]
  },
  "success": true,
  "t": 1659604978010,
  "tid": "0743a0b713d711ed96d73e3f2147e048"
}

Unfortunately, Home Assistant isn't giving me the datapoints in the logs - if somebody can direct me on how to go about that, that'd be great. They don't show up in the logs section at all - no results when it gives me the list of possible device-types - and my docker logs remain quiet.

I've put the data-points from the zigbee2mqtt instructions in the directory below. Each file is named for its option in the dropdown (apologies - some of these are in chinese - google translate seems to be helpful here) and each file includes the request at the top and then the response below it, in case that helps.

https://cloud.at.alexmaras.com/s/97soGDR77gZtobF

@make-all make-all added the new device Unsupported device label Aug 4, 2022
@make-all
Copy link
Owner

make-all commented Aug 4, 2022

Thanks, the data points are the "code" values in the request part of those json files.

The API explorer has only one function I know of that returns dp_id attributes, and that is the last "Get Device Specification Attribute" function under the section "Device Control" near the end of the list.

@alexmaras
Copy link
Contributor Author

Thanks, code-points extracted below:

filter-reset.json
"7"

pump-reset.json
"8"

uv.json
"10"

uv-runtime.json
"11"

water-level.json
"12"

关联IPC.json
"110"

出水状态.json
"103"

无水提醒.json
"104"

I'll check the device spec attribute stuff out now

@alexmaras
Copy link
Contributor Author

alexmaras commented Aug 4, 2022

{
  "result": {
    "category": "cwysj",
    "functions": [
      {
        "code": "switch",
        "dp_id": 1,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "water_reset",
        "dp_id": 6,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "filter_reset",
        "dp_id": 7,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "pump_reset",
        "dp_id": 8,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "uv",
        "dp_id": 10,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "uv_runtime",
        "dp_id": 11,
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":0,\"max\":10800,\"scale\":0,\"step\":1}"
      }
    ],
    "status": [
      {
        "code": "switch",
        "dp_id": 1,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "water_time",
        "dp_id": 3,
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":7200,\"scale\":0,\"step\":1}"
      },
      {
        "code": "filter_life",
        "dp_id": 4,
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":43200,\"scale\":0,\"step\":1}"
      },
      {
        "code": "pump_time",
        "dp_id": 5,
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
      },
      {
        "code": "water_reset",
        "dp_id": 6,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "filter_reset",
        "dp_id": 7,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "pump_reset",
        "dp_id": 8,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "uv",
        "dp_id": 10,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "uv_runtime",
        "dp_id": 11,
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":0,\"max\":10800,\"scale\":0,\"step\":1}"
      },
      {
        "code": "water_level",
        "dp_id": 12,
        "type": "Enum",
        "values": "{\"range\":[\"level_1\",\"level_2\",\"level_3\"]}"
      }
    ]
  },
  "success": true,
  "t": 1659611960014,
  "tid": "48e5366013e711ed9c145a788053e060"
}

How's that? It looks like the chinese text ones aren't documented in here, but the rest is.
无水提醒 (104) is apparently "no water reminder" - not sure what this is
出水状态 (103) "water state" - not sure what this is
关联IPC (110) "association IPC" - looks to be a company

@alexmaras
Copy link
Contributor Author

alexmaras commented Aug 4, 2022

ah, found the log in HA.

{
  '1': True,
  '3': 0,
  '4': 209,
  '5': 209,
  '6': False,
  '7': False,
  '8': False,
  '10': False,
  '11': 0,
  '12': 'level_3',
  '101': False,
  '102': 1,
  '103': True,
  '104': False,
  'updated_at': 1659612802.5926633
}

@alexmaras
Copy link
Contributor Author

@make-all - if you don't mind giving some guidance on #217 - I'll happily test everything out and make sure it's working.

@alexmaras
Copy link
Contributor Author

Closed with #217

@make-all make-all added unreleased Will be in next release and removed new device Unsupported device unreleased Will be in next release labels Aug 4, 2022
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

2 participants