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

Request support for Smart Pet Water Fountain #2836

Closed
fate8383 opened this issue Jan 22, 2025 · 11 comments
Closed

Request support for Smart Pet Water Fountain #2836

fate8383 opened this issue Jan 22, 2025 · 11 comments

Comments

@fate8383
Copy link

fate8383 commented Jan 22, 2025

Log message

2025-01-22 17:36:43.138 WARNING (MainThread) [custom_components.tuya_local.config_flow] Adding Smart Pet Water Fountain device with product id akln8rb04cav403q
2025-01-22 17:36:43.145 WARNING (MainThread) [custom_components.tuya_local.config_flow] Unable to fetch data model from cloud: 'str' object has no attribute 'keys'
2025-01-22 17:36:43.147 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches zigbee_waterleak_sensor with quality of 20%. DPS: {"updated_at": 173
7563794.3515668, "2": "normal", "3": 14, "4": 7, "22": 8, "102": 3181}
2025-01-22 17:36:43.148 WARNING (MainThread) [custom_components.tuya_local.config_flow] Include the previous log messages with any new device request to https://github.com
/make-all/tuya-local/issues/

Product ID

akln8rb04cav403q

Product Name

Smart Pet Water Fountain

DPS information

{
"result": {
"model": "{"modelId":"e1k9lplc","services":[{"actions":[],"code":"","description":"","events":[],"name":"","properties":[
{"abilityId":1,"accessMode":"rw","code":"switch","description":"总开关","extensions":{"iconName":"icon-dp_power2","attribute":"1664"},"name":"开关","typeSpec":{"type":"bool"}},
{"abilityId":2,"accessMode":"rw","code":"work_mode","description":"normal:普通模式\nsmart:智能模式\nnight:夜晚模式\npir:感应模式","extensions":{"iconName":"icon-dp_mode","attribute":"1664"},"name":"工作模式","typeSpec":{"type":"enum","range":["normal","night"]}},
{"abilityId":3,"accessMode":"ro","code":"filter_days","description":"设备本地上报","extensions":{"iconName":"icon-dp_time2","attribute":"1664"},"name":"滤芯剩余天数","typeSpec":{"type":"value","max":90,"min":0,"scale":0,"step":1,"unit":"day"}},
{"abilityId":4,"accessMode":"ro","code":"pump_time","description":"设备上报剩余清洗天数","extensions":{"iconName":"icon-dp_time","attribute":"1664"},"name":"清洗剩余天数","typeSpec":{"type":"value","max":31,"min":0,"scale":0,"step":1,"unit":"day"}},
{"abilityId":5,"accessMode":"rw","code":"filter_reset","description":"","extensions":{"iconName":"icon-dp_loop","attribute":"1664"},"name":"滤芯复位","typeSpec":{"type":"bool"}},
{"abilityId":6,"accessMode":"rw","code":"pump_reset","description":"","extensions":{"iconName":"icon-dp_loop","attribute":"1664"},"name":"清洗重置","typeSpec":{"type":"bool"}},
{"abilityId":7,"accessMode":"rw","code":"filter_life","description":"0表示关闭,不进行滤芯更换提醒,首页也不显示滤芯剩余天数","extensions":{"iconName":"icon-dp_time2","attribute":"1760"},"name":"滤芯更换提醒时长","typeSpec":{"type":"value","max":30,"min":0,"scale":0,"step":1,"unit":"day"}},
{"abilityId":8,"accessMode":"rw","code":"time_clean","description":"0表示关闭,不进行清洗提醒,首页也不显示清洗剩余天数","extensions":{"iconName":"icon-dp_time3","attribute":"1760"},"name":"清洗提醒时长","typeSpec":{"type":"value","max":15,"min":0,"scale":0,"step":1,"unit":"day"}},
{"abilityId":9,"accessMode":"ro","code":"water_level","description":"适用于无精确计算功能的饮水机\nlow:水量不足;\nmiddle:水量中等;\nhigh:水量充足;","extensions":{"iconName":"icon-dp_water","attribute":"1152"},"name":"剩余水量档位","typeSpec":{"type":"enum","range":["low","middle","high"]}},
{"abilityId":10,"accessMode":"ro","code":"water_left","description":"适用于有精确计算的饮水机","extensions":{"iconName":"icon-dp_water","attribute":"1152"},"name":"剩余水量百分比","typeSpec":{"type":"value","max":100,"min":0,"scale":0,"step":1,"unit":"%"}},
{"abilityId":22,"accessMode":"ro","code":"water_intake","description":"上报宠物每次饮水量,后台会统计每天、每月、每年宠物饮水总量","extensions":{"iconName":"icon-dp_water","attribute":"1152","id":22,"trigger":"direct"},"name":"每次饮水量","typeSpec":{"type":"value","max":2000,"min":0,"scale":0,"step":1,"unit":"ml"}},
{"abilityId":23,"accessMode":"ro","code":"fault","description":"lack_water:缺水提醒;\nfilter_replace:滤芯更换提醒;\nclean_reminder:清洗提醒;\nbattery_power:电池供电提醒;\npump_blocked:水泵堵塞提醒;","extensions":{"iconName":"icon-baojing","attribute":"1152"},"name":"故障告警","typeSpec":{"type":"bitmap","label":["lack_water","filter_replace","clean_reminder","battery_power","pump_blocked"],"maxlen":5}},
{"abilityId":102,"accessMode":"rw","code":"water_surplus","description":"","name":"剩余水量","typeSpec":{"type":"value","max":4500,"min":0,"scale":0,"step":1,"unit":"ml"}}]}]}"
},
"success": true,
"t": 1737622531207,
"tid": "ccbb4d3dd96711efbbcac2b21b10ca93"
}
{
  "result": {
    "properties": [
      {
        "code": "switch",
        "custom_name": "",
        "dp_id": 1,
        "time": 1737553505021,
        "type": "bool",
        "value": false
      },
      {
        "code": "work_mode",
        "custom_name": "",
        "dp_id": 2,
        "time": 1737561618706,
        "type": "enum",
        "value": "normal"
      },
      {
        "code": "filter_days",
        "custom_name": "",
        "dp_id": 3,
        "time": 1737561618706,
        "type": "value",
        "value": 14
      },
      {
        "code": "pump_time",
        "custom_name": "",
        "dp_id": 4,
        "time": 1737561618706,
        "type": "value",
        "value": 7
      },
      {
        "code": "filter_reset",
        "custom_name": "",
        "dp_id": 5,
        "time": 1737553505021,
        "type": "bool",
        "value": false
      },
      {
        "code": "pump_reset",
        "custom_name": "",
        "dp_id": 6,
        "time": 1737553505021,
        "type": "bool",
        "value": false
      },
      {
        "code": "filter_life",
        "custom_name": "",
        "dp_id": 7,
        "time": 1737553505021,
        "type": "value",
        "value": 0
      },
      {
        "code": "time_clean",
        "custom_name": "",
        "dp_id": 8,
        "time": 1737553505021,
        "type": "value",
        "value": 0
      },
      {
        "code": "water_level",
        "custom_name": "",
        "dp_id": 9,
        "time": 1737553505021,
        "type": "enum",
        "value": "low"
      },
      {
        "code": "water_left",
        "custom_name": "",
        "dp_id": 10,
        "time": 1737553505021,
        "type": "value",
        "value": 0
      },
      {
        "code": "water_intake",
        "custom_name": "",
        "dp_id": 22,
        "time": 1737562525874,
        "type": "value",
        "value": 8
      },
      {
        "code": "fault",
        "custom_name": "",
        "dp_id": 23,
        "time": 1737553505021,
        "type": "bitmap",
        "value": 0
      },
      {
        "code": "water_surplus",
        "custom_name": "",
        "dp_id": 102,
        "time": 1737563626456,
        "type": "value",
        "value": 3181
      }
    ]
  },
  "success": true,
  "t": 1737563986717,
  "tid": "7d801cf2d8df11efbbcac2b21b10ca93"
}

Information about how the device functions

No response

@fate8383 fate8383 added the new device Unsupported device label Jan 22, 2025
@make-all
Copy link
Owner

Unfortuantely your device info is missing range info.

@make-all make-all added the log provided Log of dps has been provided, though it is short of full info, so some guessing is needed label Jan 22, 2025
@make-all make-all moved this to 📋 Backlog in Tuya Local Jan 22, 2025
@make-all make-all added full_info All info needed was provided and removed log provided Log of dps has been provided, though it is short of full info, so some guessing is needed labels Jan 23, 2025
@make-all make-all moved this from 📋 Backlog to 🔖 Ready in Tuya Local Jan 23, 2025
@fate8383
Copy link
Author

appologies, I think this is what you are looking for:

{
"result": {
"properties": [
{
"code": "switch",
"custom_name": "",
"dp_id": 1,
"time": 1737564741910,
"type": "bool",
"value": false
},
{
"code": "work_mode",
"custom_name": "",
"dp_id": 2,
"time": 1737837413803,
"type": "enum",
"value": "normal"
},
{
"code": "filter_days",
"custom_name": "",
"dp_id": 3,
"time": 1737967171759,
"type": "value",
"value": 10
},
{
"code": "pump_time",
"custom_name": "",
"dp_id": 4,
"time": 1737967171743,
"type": "value",
"value": 3
},
{
"code": "filter_reset",
"custom_name": "",
"dp_id": 5,
"time": 1737627814173,
"type": "bool",
"value": false
},
{
"code": "pump_reset",
"custom_name": "",
"dp_id": 6,
"time": 1737627815294,
"type": "bool",
"value": false
},
{
"code": "filter_life",
"custom_name": "",
"dp_id": 7,
"time": 1737564276013,
"type": "value",
"value": 6
},
{
"code": "time_clean",
"custom_name": "",
"dp_id": 8,
"time": 1737627803217,
"type": "value",
"value": 7
},
{
"code": "water_level",
"custom_name": "",
"dp_id": 9,
"time": 1737553505021,
"type": "enum",
"value": "low"
},
{
"code": "water_left",
"custom_name": "",
"dp_id": 10,
"time": 1737564265057,
"type": "value",
"value": 100
},
{
"code": "water_intake",
"custom_name": "",
"dp_id": 22,
"time": 1737965135402,
"type": "value",
"value": 10
},
{
"code": "fault",
"custom_name": "",
"dp_id": 23,
"time": 1737553505021,
"type": "bitmap",
"value": 0
},
{
"code": "water_surplus",
"custom_name": "",
"dp_id": 102,
"time": 1737970503903,
"type": "value",
"value": 3084
}
]
},
"success": true,
"t": 1737970852355,
"tid": "cc53ee95dc9211ef9e609e9247cde4aa"
}

@fate8383
Copy link
Author

{
"result": {
"category": "cwysj",
"functions": [
{
"code": "switch",
"desc": "{}",
"name": "开关",
"type": "Boolean",
"values": "{}"
},
{
"code": "filter_reset",
"desc": "{}",
"name": "滤芯复位",
"type": "Boolean",
"values": "{}"
},
{
"code": "pump_reset",
"desc": "{}",
"name": "水泵重置",
"type": "Boolean",
"values": "{}"
}
],
"status": [
{
"code": "switch",
"name": "开关",
"type": "Boolean",
"values": "{}"
},
{
"code": "pump_time",
"name": "水泵时长",
"type": "Integer",
"values": "{"unit":"day","min":0,"max":31,"scale":0,"step":1}"
},
{
"code": "filter_reset",
"name": "滤芯复位",
"type": "Boolean",
"values": "{}"
},
{
"code": "pump_reset",
"name": "水泵重置",
"type": "Boolean",
"values": "{}"
},
{
"code": "filter_life",
"name": "滤芯时长",
"type": "Integer",
"values": "{"unit":"day","min":0,"max":30,"scale":0,"step":1}"
}
]
},
"success": true,
"t": 1737971063681,
"tid": "4a47b5e4dc9311efbbcac2b21b10ca93"
}

@fate8383
Copy link
Author

Unfortuantely your device info is missing range info.

sorry, no idea why I didn't use the full data sets being my third device request :) I have posted twice current and full data set with ranges. One of my request already completed in today's release, thanks a lot!

@make-all
Copy link
Owner

No, I think I was wrong, the data was there at the start, but it was buried below other data that was missing range info. I later re-ordered the original post to put the needed data at the top and hid the extra data behind a "Details" tag.

@make-all
Copy link
Owner

make-all commented Feb 2, 2025

There must be some info on your device (or in the instruction manual) about branding or manufacturer name, model info etc.

Adding it with a generic name like "Smart Water fountain" is misleading, because there are many models already supported that are not compatible with this one, so it is not a generic device config that will match most similar devices.

@fate8383
Copy link
Author

fate8383 commented Feb 2, 2025

There must be some info on your device (or in the instruction manual) about branding or manufacturer name, model info etc.

Adding it with a generic name like "Smart Water fountain" is misleading, because there are many models already supported that are not compatible with this one, so it is not a generic device config that will match most similar devices.

Honestly, I didn't see on sales page, nothing on tuya app and nothing on manuals book. There is Kanchou as a sales brand name but it really is not the brand or the model of the fountain. This is fairly new Tuya and not yet white labeled by anyone to have a brand, my guess. This is the link: 4.0L Stainless Steel Water Fountain For Cat With App Control Smart Automatic Intelligent Pets Water Dispenser Cats Dogs Products
https://a.aliexpress.com/_ExsbpaM

@make-all
Copy link
Owner

make-all commented Feb 6, 2025

I don't quite understand the relationship between water_level, water_left and water_surplus. There are a couple of sets of values from the cloud logs above, but they don't seem consistent. Are you able to explain what these mean in terms of what is shown in the app?

Water level Water Left (%) Water Surplus (mL)
low 0 3181
low 100 3084

@fate8383
Copy link
Author

fate8383 commented Feb 6, 2025

I don't quite understand the relationship between water_level, water_left and water_surplus. There are a couple of sets of values from the cloud logs above, but they don't seem consistent. Are you able to explain what these mean in terms of what is shown in the app?

Water level Water Left (%) Water Surplus (mL)
low 0 3181
low 100 3084

water surplus is how many ml of water in the tank. currently I have 2900 ish ml.
water left is pounds (ounce) currently I have 100 oz (not using this but there is a flip in the app to show ml or oz).
water intake shows 3 in tuya API now, no idea what that is, I have no button settings or anything in the app for this.
water level is showing now "low" in API but app shows "enough" if it means anything and I do not know when it triggers low.
in the app I have ml or oz (flip), enough (just a text), night/normal (this stops or start fountain to pure water), clean left (cleaning days left count down, default 7), reset clean (just button), filter left (default 14, countdown days and button to reset)
that's all, please let me know if you have any questions. screenshot of the app attached.

Image

@make-all
Copy link
Owner

make-all commented Feb 6, 2025

It looks like they are only using the water_surplus, which makes sense, since that is actually the only one appearing in the log.
water_left is documented as a percentage, but not reported in the local log, and reported as 0 and 100 in the two cloud logs, which have water_suplus differing only by a small amount. Also, it seems to derive that "enough" from the measurement, rather than displaying the "low" from the cloud data.

make-all added a commit that referenced this issue Feb 6, 2025
@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release and removed full_info All info needed was provided labels Feb 6, 2025
@make-all make-all moved this from 🔖 Ready to ✅ Done in Tuya Local Feb 6, 2025
@make-all make-all removed new device Unsupported device awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release labels Feb 11, 2025
@fate8383
Copy link
Author

It looks like they are only using the water_surplus, which makes sense, since that is actually the only one appearing in the log. water_left is documented as a percentage, but not reported in the local log, and reported as 0 and 100 in the two cloud logs, which have water_suplus differing only by a small amount. Also, it seems to derive that "enough" from the measurement, rather than displaying the "low" from the cloud data.

Excellent, thanks a lot for adding this.
Just added and I see this in the logs:
2025-02-12 18:41:39.348 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.pet_fountain_water_consumption (<class 'custom_components.tuya_local.sensor.TuyaLocalSensor'>) is using state class 'measurement' which is impossible considering device class ('volume') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/make-all/tuya-local/issues

I believe this is for water level or consumption entity.

And also power on/off entity does not really do anything but I will simply ignore that. It does not exist even in the app itself. Mode Night/Normal basically turns on/off the fountain water, I will create template switch for that.

make-all added a commit that referenced this issue Feb 13, 2025
- power switch is non-functional, so removed.
- HA expects volume sensors to be total/total_increasing or no state class.
  Since this is probably a daily measurement, total_increasing would be wrong,
  and we do not have a reset_time dp to allow use of total.

Issue #2836
@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release labels Feb 13, 2025
@make-all make-all added the device improvement Improvement to an existing device config label Feb 13, 2025
@make-all make-all reopened this Feb 13, 2025
@github-project-automation github-project-automation bot moved this from ✅ Done to 📋 Backlog in Tuya Local Feb 13, 2025
@make-all make-all moved this from 📋 Backlog to ✅ Done in Tuya Local Feb 13, 2025
@make-all make-all removed awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release device improvement Improvement to an existing device config labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants