home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.06k stars 29.72k forks source link

tuya pet feeder - can't feed and not working camera #74321

Closed Shemmmy closed 1 year ago

Shemmmy commented 2 years ago

The problem

I have an automatic pet feeder with a camera that works with the tuya smart life app. Through the smart life app, I can pour food and see the picture through the built-in camera. In HA there is no picture from the camera and there is no "feed" button. All other functions are present and work perfectly - you can turn on the motion sensor, adjust the sensitivity of the motion sensor.

What version of Home Assistant Core has the issue?

2022.6.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Tuya

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tuya

Diagnostics information

tuya-d6f8d88ba288a3ae0687e333f2d197ab-Cat feeder-a630b314425cb4511119a8ad25685fe7.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

tuya documentation tuya source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

cinghialino commented 2 years ago

Interested in this too

pascualpay commented 2 years ago

Another one... cameras show "ide" state and I can't fix it anyway. Please help!

cinghialino commented 2 years ago

@zlinoliver @frenck Can you please shed some knowledge? Thank you

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

cinghialino commented 1 year ago

Repoening because there's still need for this.

Jens-Wymeersch commented 1 year ago

Agreed. Also looking for a solution for this product. Thank you !

pergolafabio commented 1 year ago

Hi, got myself also a Pet Feeder, but not compatible with local tuya, so wanted to try out the official integration Whats workingso far? i see a PR now : https://github.com/home-assistant/core/pull/61359

But what about camera? can it be integrated?

Jens-Wymeersch commented 1 year ago

@pergolafabio I opened a #83346 and it looks like I can't integrate most of stuff. For the camera, I was able to use a rtsp feed as follows rstp://admin:admin/ipadress:554/1

pergolafabio commented 1 year ago

ok, thnx

seems my port 554 is closed =-(

Jens-Wymeersch commented 1 year ago

@pergolafabio for the other points, I'm looking into workarounds within Tuya (automations/scenes). As I still want to be able to at least feed the cat via home assistant. A bit frustrated though with the integration...

pergolafabio commented 1 year ago

Look, I have the same issue, those DP are not visible for me either... Ho do you do the workaround with scenes?

pergolafabio commented 1 year ago

I found a post creating scènes in smart life app, but when I click on tap to run, my pet feeder isn't listed there

Jens-Wymeersch commented 1 year ago

I didn't look yet what was possible till now. The pet feeder is listed but the actions doesn't include feeding unfortunately. Start to feel like a dead end.

Jens-Wymeersch commented 1 year ago

@pergolafabio now looking into the tuya integration towards alexa

pergolafabio commented 1 year ago

yeah, i'm patching the smartlife app, so i can proxy the traffic later, with any luck i can see the json payloads maybe

Jens-Wymeersch commented 1 year ago

@pergolafabio just checked if I can see it in Alexa or google. That wasn't the case !

pergolafabio commented 1 year ago

So officially adding it to google with tuya doesnt expose any feed services? Otherwise we could indeed initiate a routine trough HA

Jens-Wymeersch commented 1 year ago

Exact my thoughts but not such luck. I am very close to give up on the integration idea.

pergolafabio commented 1 year ago

Yeah, gonna test later with my patched APK file to see if I can capture the https traffic...

Although strange that some DP values do work, like indication light for example

pergolafabio commented 1 year ago

Maybe it's just guessing the DP

Jens-Wymeersch commented 1 year ago

Keep me posted !

pergolafabio commented 1 year ago

Seems with my patched APK cant login anymore de decrypt traffic , gonna try later another lower version Or going to look again to install an emulator with android 7 , that version was still possible to decrypt traffic

pergolafabio commented 1 year ago

No luck capturing https from the app ... But I have found something interesting:

https://github.com/py60800/tuyadump https://github.com/TheAgentK/tuya-mqtt

For next time :-)

Jens-Wymeersch commented 1 year ago

@pergolafabio I've adjusted my plan. Still hope you find a direct way, so if you figure out how to do this, please keep me informed. For the moment, I'm going for a backup plan :

Possible actions (the last one is feeding) - if put at -1, it is one portion WhatsApp Image 2022-12-10 at 14 59 43

Possible alerts WhatsApp Image 2022-12-10 at 14 59 10 The 2nd option is the battery level and the 3nd option is cylinder level 5th and 6th option has something to do with SD Card in my opinion. Leaving 1 and 4, indicating motion detection in my opinion.

I'm starting to think because the manufacturer didn't translate these actions/sensors to English they weren't taken into Tuya IOT.

pergolafabio commented 1 year ago

Yes, I try working on it next week, there must be a way Todo it... Where do you create those virtual switches? Is that in smart life app??

Jens-Wymeersch commented 1 year ago

@pergolafabio I found the following documentation https://developer.tuya.com/en/docs/iot/manage-virtual-devices?id=Ka4725tiyfhg0

Jens-Wymeersch commented 1 year ago

@pergolafabio Taken that there are also pet feeders you can put as virtual device, I would advise everyone first testing which one would work before buying any.

pergolafabio commented 1 year ago

ok, i have a look later do that doc when i have some time... so basicly you create an virtual device on the IOT cloud website? And where do you create the trigger/action to make a feed? also on IOT platform or in smartlife app ?

Because in smartlife app, you can also create scenes witn "one tap to run" , but seems i cant select my pet feeder there

Jens-Wymeersch commented 1 year ago

@pergolafabio So the tap and run (feeding one portion) - comes into home assistant as a scene directly. So no need for a virtual button. For the battery- and cylinder level, I created 2 X virtual 3-gang switches. The idea was to link this to their respective status high, low, no and full, less and lack with automations with Tuya. The later didn't work till now. In order to do this, you create a QR code in IOT cloud website and scan it in the Tuya app, the automations are then created in Tuya.

pergolafabio commented 1 year ago

but thats my issue i think... i cant select my petfeeder as a 'tap to run' device in my smartlife? i only see my other devices there, but not the petfeeder... do you see your petfeeder in below screenshot? image image

pergolafabio commented 1 year ago

@Jens-Wymeersch , in IOT platform, normally we need to se the DP ID, but i dont see them, also not for my other devices... do you know where to look? the one in chinese below, are the actual feed DP ID , but i need to find the number somewhere...

image

pergolafabio commented 1 year ago

seems you can also change the instruction set to DP mode, allthough not saved it yet ... not sure what it does :-)

image

Jens-Wymeersch commented 1 year ago

As indicated in previous post, https://user-images.githubusercontent.com/70786498/206857361-cac5100a-e8dc-44a8-8ab2-cc35b2258ca2.jpeg The last option is related to the feeding itself.

pergolafabio commented 1 year ago

not sure how you get there? where is that "select function" option?

Jens-Wymeersch commented 1 year ago

@pergolafabio to find the id, use the following https://www.youtube.com/watch?v=Q1ZShFJDvE0

Jens-Wymeersch commented 1 year ago

@pergolafabio https://github.com/home-assistant/core/issues/74321#issuecomment-1345338216 I select my feeder and have these set of options.

pergolafabio commented 1 year ago

@pergolafabio #74321 (comment) I select my feeder and have these set of options.

yeah, i dont see that, i dont have those functions, only like switch the indocator loght, or flip the camera ...

pergolafabio commented 1 year ago

@pergolafabio to find the id, use the following https://www.youtube.com/watch?v=Q1ZShFJDvE0

no, i have the device id, i mean the "DP ID's" , they should be visible on the iot platform too

edit, nm .. seems its further in the video :-)

Jens-Wymeersch commented 1 year ago

@pergolafabio That is what I wanted to say... Here are my DPs

{
  "result": {
    "category": "sp",
    "functions": [
      {
        "code": "basic_indicator",
        "dp_id": 101,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "basic_osd",
        "dp_id": 104,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "basic_nightvision",
        "dp_id": 108,
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "sd_format",
        "dp_id": 111,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "motion_record",
        "dp_id": 113,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "record_switch",
        "dp_id": 150,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "record_mode",
        "dp_id": 151,
        "type": "Enum",
        "values": "{\"range\":[\"1\",\"2\"]}"
      },
      {
        "code": "device_restart",
        "dp_id": 162,
        "type": "Boolean",
        "values": "{}"
      }
    ],
    "status": [
      {
        "code": "basic_indicator",
        "dp_id": 101,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "basic_osd",
        "dp_id": 104,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "basic_nightvision",
        "dp_id": 108,
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "sd_storge",
        "dp_id": 109,
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "sd_status",
        "dp_id": 110,
        "type": "Integer",
        "values": "{\"min\":1,\"max\":5,\"scale\":0,\"step\":1}"
      },
      {
        "code": "sd_format",
        "dp_id": 111,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "motion_record",
        "dp_id": 113,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "sd_format_state",
        "dp_id": 117,
        "type": "Integer",
        "values": "{\"min\":-20000,\"max\":200000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "record_switch",
        "dp_id": 150,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "record_mode",
        "dp_id": 151,
        "type": "Enum",
        "values": "{\"range\":[\"1\",\"2\"]}"
      },
      {
        "code": "device_restart",
        "dp_id": 162,
        "type": "Boolean",
        "values": "{}"
      }
    ]
  },
  "success": true,
  "t": 123,
  "tid": "456abc"
}

But the feeding itself isn't in there nor the video.

pergolafabio commented 1 year ago

indeed, same here.... but you can create a workaround, with that "tap to run", i cant seletc my device there, icant create a taptorun scene to feed my cat, or i must be doing something wrong

Jens-Wymeersch commented 1 year ago

@pergolafabio Although that I don't think it will change anything, try to use Tuya app instead of SmartLife. Maybe it gives a different result...

pergolafabio commented 1 year ago

Maybe indeed , gonna try that later...

Next week I try to sniff the traffic when I have more time

pergolafabio commented 1 year ago

Hey @Jens-Wymeersch , installed tuya app now, but the homescreen looks exact the same as smart life...

Didn't add the device yet, but can you maybe make some screenshots of the pet feeder , before you go to the functions set?..

Mine look like this... When I goto edit device , and then click on basic feature set.....

Screenshot_20221210-210930 Screenshot_20221210-210942

pergolafabio commented 1 year ago

I don't see the "select function" what you posted before

Hmm, found some other screenshot, I think you can still select the pet feeder after you click on "tap to run" , then you select pet, and then select function, right?

I don't see that, I can't even select my pet feeder after I click on "tap to run" :-(

Jens-Wymeersch commented 1 year ago

@pergolafabio https://github.com/home-assistant/core/issues/74321#issuecomment-1345375509 I can select the pet feeder. Here you go IMG_8036825BF6A7-1

pergolafabio commented 1 year ago

Mine is slightly different :-( I don't have the "basic function set" , I only see "basic feature set" with even less capabilities

Jens-Wymeersch commented 1 year ago

@pergolafabio i would still try to connect it to tuya to see what you get to make sure

pergolafabio commented 1 year ago

I tried already, looks exact the same :-(