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 Petoneer WF005 pet fountain #2878

Open
K900 opened this issue Jan 30, 2025 · 5 comments · May be fixed by #2880
Open

Request support for Petoneer WF005 pet fountain #2878

K900 opened this issue Jan 30, 2025 · 5 comments · May be fixed by #2880
Labels
full_info All info needed was provided new device Unsupported device

Comments

@K900
Copy link

K900 commented Jan 30, 2025

Log message

DPS: {"updated_at": 1738238967.1914475, "1": false, "2": "smart", "3": 30, "4": 60, "9": "1", "12": 0, "14": true, "15": 3600, "23": 0, "101": 10002, "102": "192.168.4.8", "104": 1020304, "105": true, "106": 1}

Product ID

cwysj

Product Name

Petoneer Fresco EzGo (WF-005)

DPS information

{
  "modelId": "dwyr0g",
  "services": [
    {
      "actions": [],
      "code": "",
      "description": "",
      "events": [],
      "name": "默认服务",
      "properties": [
        {
          // Primary on-off switch
          "abilityId": 1,
          "accessMode": "rw",
          "code": "switch",
          "description": "总开关",
          "extensions": {
            "iconName": "icon-dp_power2",
            "attribute": "1664"
          },
          "name": "开关",
          "typeSpec": {
            "type": "bool"
          }
        },
        {
          // Operation mode: "normal" is always on, "smart" is geyser mode (see below)
          "abilityId": 2,
          "accessMode": "rw",
          "code": "work_mode",
          "description": "normal:常开模式\nsmart:间歇泉\n",
          "extensions": {
            "iconName": "icon-dp_mode",
            "attribute": "1664"
          },
          "name": "工作模式",
          "typeSpec": {
            "type": "enum",
            "range": [
              "normal",
              "smart"
            ]
          }
        },
        {
          // Days until next filter cleaning reminder
          "abilityId": 3,
          "accessMode": "ro",
          "code": "filter_days",
          "description": "设备本地上报",
          "extensions": {
            "iconName": "icon-dp_time2",
            "attribute": "1664"
          },
          "name": "滤芯剩余天数",
          "typeSpec": {
            "type": "value",
            "max": 30,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "day"
          }
        },
        {
          // Days until next pump cleaning reminder
          "abilityId": 4,
          "accessMode": "ro",
          "code": "pump_time",
          "description": "设备上报剩余清洗天数",
          "extensions": {
            "iconName": "icon-dp_time",
            "attribute": "1664"
          },
          "name": "清洗剩余天数",
          "typeSpec": {
            "type": "value",
            "max": 60,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "day"
          }
        },
        {
          // Send this to reset the filter cleaning timer
          "abilityId": 5,
          "accessMode": "rw",
          "code": "filter_reset",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_loop",
            "attribute": "1664"
          },
          "name": "滤芯复位",
          "typeSpec": {
            "type": "bool"
          }
        },
        {
          // Send this to reset the pump cleaning timer
          "abilityId": 6,
          "accessMode": "rw",
          "code": "pump_reset",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_loop",
            "attribute": "1664"
          },
          "name": "清洗重置",
          "typeSpec": {
            "type": "bool"
          }
        },
        {
          // Something about filter cleaning reminders, doesn't seem to be used?
          "abilityId": 7,
          "accessMode": "rw",
          "code": "filter_life",
          "description": "0表示关闭,不进行滤芯更换提醒,首页也不显示滤芯剩余天数",
          "extensions": {
            "iconName": "icon-dp_time2",
            "attribute": "1760"
          },
          "name": "滤芯更换提醒时长 (废弃)",
          "typeSpec": {
            "type": "value",
            "max": 90,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "day"
          }
        },
        {
          // Something about pump cleaning reminders, doesn't seem to be used?
          "abilityId": 8,
          "accessMode": "rw",
          "code": "time_clean",
          "description": "0表示关闭,不进行清洗提醒,首页也不显示清洗剩余天数",
          "extensions": {
            "iconName": "icon-dp_time3",
            "attribute": "1760"
          },
          "name": "清洗提醒时长 (废弃)",
          "typeSpec": {
            "type": "value",
            "max": 31,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "day"
          }
        },
        {
          // Water level/state:
          // 0 - not enough water
          // 1 - normal operation
          // 2 - water level low
          // 3 - pump not detected
          // 4 - pump clogged? unconfirmed
          "abilityId": 9,
          "accessMode": "ro",
          "code": "water_level",
          "description": "0:缺水\n1:有水\n2:少水\n3:未安装水泵\n4.水泵堵转",
          "extensions": {
            "iconName": "icon-dp_water",
            "attribute": "1152"
          },
          "name": "剩余水量档位",
          "typeSpec": {
            "type": "enum",
            "range": [
              "0",
              "1",
              "2",
              "3",
              "4"
            ]
          }
        },
        {
          // Indicator light status: 1 is on, 0 is off, any value >1 is also on
          "abilityId": 12,
          "accessMode": "rw",
          "code": "bright_value",
          "description": "0表示关闭指示灯\n1:表示打开",
          "extensions": {
            "iconName": "icon-liangdu",
            "attribute": "1152"
          },
          "name": "指示灯亮度",
          "typeSpec": {
            "type": "value",
            "max": 10,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": ""
          }
        },
        {
          // UV cleaner enabled/disabled, not confirmed how exactly it works
          "abilityId": 14,
          "accessMode": "rw",
          "code": "uv",
          "description": "yes:打开UV杀菌 \nNO:关闭UV杀菌",
          "extensions": {
            "iconName": "icon-dp_power2",
            "attribute": "1152"
          },
          "name": "UV杀菌",
          "typeSpec": {
            "type": "bool"
          }
        },
        {
          // Presumably works together with the previous one to run the UV cleaner,
          // but my model doesn't have it
          "abilityId": 15,
          "accessMode": "rw",
          "code": "uv_runtime",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_time3",
            "attribute": "1152"
          },
          "name": "UV运行剩余时间",
          "typeSpec": {
            "type": "value",
            "max": 3600,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "second"
          }
        },
        {
          // Errors, if any, labels are rather self-explanatory
          "abilityId": 23,
          "accessMode": "ro",
          "code": "fault",
          "description": "lack_water:缺水提醒;\nfilter_replace:滤芯更换提醒;\nclean_reminder:清 洗提醒;\npump_blocked:水泵堵塞提醒;\npump_no_installed:水泵未安装",
          "extensions": {
            "iconName": "icon-baojing",
            "scope": "fault",
            "attribute": "1152"
          },
          "name": "故障告警",
          "typeSpec": {
            "type": "bitmap",
            "label": [
              "lack_water",
              "filter_replace",
              "clean_reminder",
              "pump_blocked",
              "pump_no_installed"
            ],
            "maxlen": 5
          }
        },
        {
          // Indicator enabled times, encoded as a number that's really a string of format FHH1MM1HH2MM2
          // F - flag, 1 is schedule enabled, 0 is schedule disabled
          // HH1MM1 - start time as HH:MM (24 hour, zero padded)
          // HH2MM2 - end time as HH:MM (24 hour, zero padded)
          // So e.g. if the schedule is set to turn on at 1:02AM and turn off at 3:04AM,
          // the value will be 101020304, and if the schedule is disabled, the value will be 1020304
          // (with leading zeroes stripped).
          "abilityId": 101,
          "accessMode": "rw",
          "code": "indicator_light_time",
          "description": "最高一位 0/1 表示规则使能 后面8位表示开始~结束时间 20102320 表示20:10~23:20",
          "name": "夜间模式时间段",
          "typeSpec": {
            "type": "value",
            "max": 124002400,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": ""
          }
        },
        {
          // Local IP address
          "abilityId": 102,
          "accessMode": "ro",
          "code": "local_ip",
          "description": "获取路由器下的ip地址",
          "name": "获取路由器ip地址 ",
          "typeSpec": {
            "type": "string",
            "maxlen": 255
          }
        },
        {
          // Operating times, encoded same way as indicator time above
          "abilityId": 104,
          "accessMode": "rw",
          "code": "worktime",
          "description": "最高一位 0/1 表示规则使能\n后面8位表示开始~结束时间\n20102320 表示20:10~23:20",
          "name": "工作时间段",
          "typeSpec": {
            "type": "value",
            "max": 124002400,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": ""
          }
        },
        {
          // "geyser mode" runs the fountain in 1 minute on / 5 minute off cycles
          // This is true when the fountain is running, and false when not, but only in geyser mode
          // It seems to always be false in normal mode, even when the fountain is running
          "abilityId": 105,
          "accessMode": "ro",
          "code": "geyser_state",
          "description": "间歇泉状态:0表示空闲 1:工作\n5分钟工作5分钟休息",
          "name": "间歇泉状态",
          "typeSpec": {
            "type": "bool"
          }
        },
        {
          // "device type", 0 - "smart UV water pump", 1 - "smart water pump", 2 - "normal water pump", 3 - "other"
          // presumably they use the same spec for multiple devices? I only have this one though
          // why is it rw?
          "abilityId": 106,
          "accessMode": "rw",
          "code": "device_type",
          "description": "0:智能UV水泵\n1:智能水泵\n2:普通水泵\n3.未知设备",
          "name": "设备类型",
          "typeSpec": {
            "type": "value",
            "max": 3,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": ""
          }
        }
      ]
    }
  ]
}

Information about how the device functions

I annotated all the knobs I could figure out inline in the json-with-comments.

@K900 K900 added the new device Unsupported device label Jan 30, 2025
@make-all make-all added the full_info All info needed was provided label Jan 30, 2025
@make-all make-all moved this to 🔖 Ready in Tuya Local Jan 30, 2025
@make-all
Copy link
Owner

The product id that you have supplied seems too short. In fact it seems to match the "category code" from https://github.com/tuya/tuya-home-assistant/wiki/Supported-Device-Category for Pet water feeders. The category code is cloud related, to pick the "Standard Instruction Set" that is associated with that category, but is not relevant for the local protocol.
Product id should come from either the same cloud functions as the local key is available from, or from the local discovery process, which can be manually invoked using tinytuya: python -m tinytuya scan (both are also logged by this integration if you use the cloud assisted config flow to try to set up your device).

@K900
Copy link
Author

K900 commented Jan 30, 2025

Ugh copy/paste error. Let me get the right one.

@K900
Copy link
Author

K900 commented Jan 30, 2025

jfyxbljcu1lz99hg.

@K900
Copy link
Author

K900 commented Jan 30, 2025

Also, after some further testing, it looks like the documentation is actually wrong, and geyser mode runs on a 5/5 cycle, not 1/5. This is probably not going to matter, but just noting it down for posterity.

K900 added a commit to K900/tuya-local that referenced this issue Jan 30, 2025
Fixes make-all#2878, except for scheduling, which will require some custom code.
@K900
Copy link
Author

K900 commented Jan 30, 2025

I got it working!

@make-all make-all moved this from 🔖 Ready to 👀 In review in Tuya Local Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full_info All info needed was provided new device Unsupported device
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

2 participants