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

Make puppy kitty feeder a separate device #2301

Merged
merged 4 commits into from
Sep 23, 2024
Merged

Conversation

Aegeontis
Copy link
Contributor

Initially I made a pr to add this device (product id: iwabnqimdhmzxzvp) to the existing catit smart feeder config. However, even though I bought it from the same manufacturer, this particular id has a slightly different mapping.

It may be possible to combine this mapping and the catit one, although the catit mapping has a few sensors that dont exist on this device (food shortage and food blockage).

Unfortunately this device does not report anything except the last portion size (and only after being triggered at least once) and whether its on or off (switch with id 25). I also didn't quite add everything from the tinytuya devices.json file (my device has no batteries and doesn't report those values anyways).
Here is the devices.json:

{
        "name": "Automatic Pet Feeder",
        "id": "",
        "key": "",
        "mac": "",
        "uuid": "",
        "sn": "",
        "category": "cwwsq",
        "product_name": "Automatic Pet Feeder",
        "product_id": "iwabnqimdhmzxzvp",
        "biz_type": 18,
        "model": "",
        "sub": false,
        "icon": "https://images.tuyaeu.com/smart/icon/bay166625965320080Or/4e1ad859f112244a4a9efb8b64984540.png",
        "mapping": {
            "1": {
                "code": "meal_plan",
                "type": "Raw",
                "values": {}
            },
            "3": {
                "code": "manual_feed",
                "type": "Integer",
                "values": {
                    "unit": "",
                    "min": 1,
                    "max": 20,
                    "scale": 0,
                    "step": 1
                }
            },
            "4": {
                "code": "feed_state",
                "type": "Enum",
                "values": {
                    "range": [
                        "standby",
                        "feeding",
                        "done"
                    ]
                }
            },
            "10": {
                "code": "battery_percentage",
                "type": "Integer",
                "values": {
                    "unit": "%",
                    "min": 0,
                    "max": 100,
                    "scale": 0,
                    "step": 1
                }
            },
            "11": {
                "code": "charge_state",
                "type": "Boolean",
                "values": {}
            },
            "14": {
                "code": "feed_report",
                "type": "Integer",
                "values": {
                    "unit": "",
                    "min": 0,
                    "max": 20,
                    "scale": 0,
                    "step": 1
                }
            },
            "24": {
                "code": "factory_reset",
                "type": "Boolean",
                "values": {}
            },
            "25": {
                "code": "switch",
                "type": "Boolean",
                "values": {}
            }
        },
        "ip": "",
        "version": "3.4"
    },

Here is what a tinytuya scan reports:

Automatic Pet Feeder   Product ID = iwabnqimdhmzxzvp  [Valid Broadcast]:
    Address =    Device ID =  (len:22)  Local Key =   Version = 3.4  Type = default, MAC = 
    Status: {'3': 2, '25': True}

Changes from review:
 - simplify mapping for Feeding sensor
 - add a raw attribute to Feeding sensor, in case the user wants to differentiate "done" from "standby", or a missing dp.
@make-all make-all merged commit 5f8bbc7 into make-all:main Sep 23, 2024
4 checks passed
make-all added a commit that referenced this pull request Sep 23, 2024
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

Successfully merging this pull request may close these issues.

2 participants