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
69.75k stars 28.91k forks source link

Tuya Integration : Tuya Security Camera not got video #68503

Open VikeDragon opened 2 years ago

VikeDragon commented 2 years ago

The problem

My Device : JeaTone Tuya Video Dorbell R9 http://www.jeatone.com/corpvideo/28.html Connected via Tuya integration. All settings are available, but the video cannot be obtained. In Log : 2022-03-22 13:33:46 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.security_camera] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://:@aws-wework8.tuyaeu.com:443/v1/bffd6b838766c09578yfe0/c8sno1ucmgr80doopsjgaL6SxEJ4kCP3?signInfo=nKli9iYP%2Fs8uQ%2FD28U9na1YSk%2Falx3cHrLVGonu0%2BK7IONP4OHvcR4u6KYKi6MqXIUwScPajflj72YL2kCoD4yWu6lf25liGf9lhHmRbs81JOsw9B%2BpIJSim4gMxNNjHK2YpQV%2F6bUzJVZp2Xd5pHxx%2FG3i0U1aAX7M%2FzqWKdT0%3D

What version of Home Assistant Core has the issue?

core-2022.3.6

What was the last working version of Home Assistant Core?

none

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-9abee8959f6d231712dacc61021fae07-Security Camera-1b4ecfb4cf230f4995f0715e76a67677.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-03-22 13:33:46 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.security_camera] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://****:****@aws-wework8.tuyaeu.com:443/v1/bffd6b838766c09578yfe0/c8sno1ucmgr80doopsjgaL6SxEJ4kCP3?signInfo=nKli9iYP%2Fs8uQ%2FD28U9na1YSk%2Falx3cHrLVGonu0%2BK7IONP4OHvcR4u6KYKi6MqXIUwScPajflj72YL2kCoD4yWu6lf25liGf9lhHmRbs81JOsw9B%2BpIJSim4gMxNNjHK2YpQV%2F6bUzJVZp2Xd5pHxx%2FG3i0U1aAX7M%2FzqWKdT0%3D

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, @metisu, @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)

VikeDragon commented 2 years ago

Problem not solved

VikeDragon commented 2 years ago

Problem not solved. Logger: homeassistant.components.stream.stream.camera.security_camera Source: components/stream/init.py:347 Integration: Stream (documentation, issues) First occurred: 18:46:12 (40 occurrences) Last logged: 20:56:32

Error from stream worker: Stream ended; no additional packets Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://:@aws-wework7.tuyaeu.com:443/v1/bffd6b838766c09578yfe0/c9c2b1beu3kp38u3s6cg0eMKr7KCo3uX?signInfo=xzFlspu2YRr6LFuC4AvM7ZfsmtG%2FrhmXN2cllPaqbfJtSvunfkQ3PReJRYZy5pRYnrs7cF1U4GYglkksiJm%2FqkFUjjO5yyniH00wUXuGHNxOQm6uMNFgv1LvAaIM2Li0ObykcJhZdsiEvE1qYDhW9ovLPa01nVBcC%2F34wN2gwng%3D

VikeDragon commented 2 years ago

Still not working - 2022.4.7

VikeDragon commented 2 years ago

Still not working - 2022.5.0

Logger: homeassistant.components.stream.stream.camera.security_camera Source: components/stream/init.py:347 Integration: Stream (documentation, issues) First occurred: 10:00:28 (9 occurrences) Last logged: 10:06:31

Error from stream worker: Stream ended; no additional packets Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://:@aws-wework7.tuyaeu.com:443/v1/bf4de924bc8c0b2e6fidik/c9pljj3eu3kp38se8m00pH6j5MevjuHn?signInfo=CGGjyczYipSjrRiFbSXGW26HKkT7AysYwh%2FKrplJMYIFG1A%2FFAijrgvz9ijMGje3HWwm9v6AOiM1u3Sb0rVosQOVDF7a2X7j9athAL3J35s2wI19R%2BPWN%2B98coNKHnVDbgxbJtDEMJjwpNqgeMv%2FWZewAYP59R7c6Gev3%2BjK0aw%3D

Enjoy-Combi commented 2 years ago

same for me.

VikeDragon commented 2 years ago

Still not working - 2022.5.4

VikeDragon commented 2 years ago

Still not working - 2022.5.5

Logger: homeassistant.components.stream.stream.camera.security_camera Source: components/stream/init.py:347 Integration: Stream (documentation, issues) First occurred: 19:05:14 (9 occurrences) Last logged: 19:11:18

Error from stream worker: Stream ended; no additional packets Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://:@aws-wework7.tuyaeu.com:443/v1/bf4de924bc8c0b2e6fidik/ca545ureu3kqlbp8t1nguFCyLCSjD2TY?signInfo=nUZdHoJ1O51C0rfSB1lm71PQ%2F0l%2FLOp56iVBuRoSlwmuQC0DgpNOkNQ4M9m9HeeueKHWNmXmMAXjSCd%2BtbIgySGj%2FvUdNferKQQ%2B%2B3Ria6eiAk9hOYUfxUfNHxS5gNAnUOYVvyA3rKEZ373mIKaaRWTQf28q5%2FjZrOFNa5wi4og%3D

VikeDragon commented 2 years ago

Still not working - 2022.6.2

VikeDragon commented 2 years ago

Still not working - 2022.6.6

VikeDragon commented 2 years ago

Still not working - 2022.6.6

VikeDragon commented 1 year ago

Not solved ...

VikeDragon commented 1 year ago

Ha core 2022.07.02

Logger: homeassistant.components.stream.stream.camera.security_camera Source: components/stream/init.py:416 Integration: Stream (documentation, issues) First occurred: 16:38:08 (12 occurrences) Last logged: 16:49:13

Error from stream worker: Stream ended; no additional packets Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://:@aws-wework7.tuyaeu.com:443/v1/bf4de924bc8c0b2e6fidik/cb5bk0beu3krpm81fja01fi4JJDN7c6T?signInfo=4nj5qf%2B%2FeonaBdT2sbr%2FPu%2Bcelna8ciGeE9XnL0fu5YsviNM7tnVT3XYg63b%2BtieaLHd2Z6e18J09Jp6OSrBtwx%2FBTRCRhg0B%2FQFXq0aXh1%2FSS43I9csz7dzwO9Wdx0v9t3cQexgYWnZhoHP1JUC5Dd8D0CSJHyAWLu3Tg8aUo4%3D

VikeDragon commented 1 year ago

Ha core 2022.08.01

Not solved

Logger: homeassistant.components.stream.stream.camera.security_camera Source: components/stream/init.py:416 Integration: Stream (documentation, issues) First occurred: 12:23:23 (86 occurrences) Last logged: 22:33:33

Error from stream worker: Stream ended; no additional packets Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://:@aws-wework7.tuyaeu.com:443/v1/bf4de924bc8c0b2e6fidik/cbmcaj3eu3kskb2kjtq0IndMO4u2WEWB?signInfo=r3i0FZZZAjFBO0L2KIyHhtxtF9vx%2B6BjFlCH7Ok7Ma9E8PoGHXx6NEH2wrHhuqbtLKhDUt8SpYgn%2BJXiyhdgNd3MZl%2FSgwBuY6dc4HCqEBQOHvMHPiKnhM2x%2BW0XDclqiTCT%2FiAlQpEfnnLap1Nzp%2BA%2FA%2BXtDOWEU3Al6D%2Fx1tw%3D

frizby66 commented 1 year ago

Same...different Camera. Have two other cameras that work fine (different manufacturer).

Logger: homeassistant.components.stream.stream.camera.rear Source: components/stream/init.py:416 Integration: Stream (documentation, issues) First occurred: 07:55:10 (8 occurrences) Last logged: 07:59:52

Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://:@aws-wework7.tuyaeu.com:443/v1/bf8179027794b61f9bg1rf/cbrkdr3eu3kq72s93pq0ods2qAXFz4eD?signInfo=JhXxUlVyFTRVzWgV5%2FQUl%2BCBX%2BjcacsqM1lujn1Vm95b1aH5xMOt77k6h%2BZsnq%2BuA%2FYv2YtBrL9GBs9YdtRIV3X%2B66%2FGBAntx6lApZofitKQLwMtoQRzdP%2FtJFzFqj65Qhtce80DBROyYzhtEs9ijtgbDNQwIZpATVCEq3IjQsQ%3D

Faustjohan commented 1 year ago

Hello,

Same problem with a different camera :

Logger: homeassistant.components.stream.stream.camera.appareil_intelligent Source: components/stream/init.py:416 Integration: Stream (documentation, issues) First occurred: 08:08:19 (78 occurrences) Last logged: 16:29:02

Error from stream worker: Stream ended; no additional packets Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://:@aws-wework7.tuyaeu.com:443/v1/bfb3ae2d782978166buwhr/cc1hlureu3ksi070pa1031W6w3aniTBX?signInfo=NdddamfnPd031Idkn15g2kAc00B3X6KheCxc4as0QJ9nMIwDZYwFAL117vcP3oq7K2cZV31XF6rhnV%2Bzh6G%2FurwSvgm0kQQwmmYqMJt0xcIa6JpiwUW9kBqQV3NF3NhTjTQbN4FWibULvDQQQvVl2ZnrT2w3ADT8YZTrFEfMy4I%3D

Any idea on how to solve ?

VikeDragon commented 1 year ago

Ha core 2022.08.07

Not solved

VikeDragon commented 1 year ago

Ha core 2022.09.06

Not solved

issue-triage-workflows[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.

YassineElbouchaibi commented 1 year ago

+1

Sent from my iPhone

On Jan 9, 2023, at 6:07 PM, issue-triage-workflows[bot] @.***> wrote:

๏ปฟ

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.

โ€” Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/68503#issuecomment-1376461772, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALCMIIK673HBJPG4C32QV33WRSKZFANCNFSM5RKFC3VQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Lxxrxns commented 1 year ago

When will this be fixed? (I thought there was a fix?)

arenasa70 commented 1 year ago

I have 2 models. The 1080p and the PTZ. The 1080P work as expected, but the PTZ doesn't show the stream, nor the snapshot. The controls work on both. The log shows this:

`Logger: homeassistant.components.stream.stream.camera.nexxt_ptz Source: components/stream/init.py:434 Integration: Stream (documentation, issues) First occurred: 9:42:28 PM (4 occurrences) Last logged: 9:43:31 PM

Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input) rtsps://:@aws-tractor1.tuyaus.com:443/v1/proxy/echo_show/53187552cae24562bd690d2ee2eff0760c78277f82fdba81`

Everything is up to date:

Home Assistant 2023.3.6 Supervisor 2023.03.3 Operating System 10.0.rc2 Frontend 20230309.1 - latest

jondycz commented 1 year ago

This had worked for me. This API service is not covered by the Tuya integration guide in Home assistant docs, so it is quite possible you might have not enabled it. Upon enabling, it suddenly started working.

https://github.com/home-assistant/core/issues/58614#issuecomment-1362940945

felipecrs commented 1 year ago

This had worked for me. This API service is not covered by the Tuya integration guide in Home assistant docs, so it is quite possible you might have not enabled it. Upon enabling, it suddenly started working.

#58614 (comment)

For me it didn't change anything, unfortunately.

issue-triage-workflows[bot] commented 9 months 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.

felipecrs commented 9 months ago

I believe this issue is still valid. I have two cameras which I cannot stream from Home Assistant.

felipecrs commented 8 months ago

To add a bit more information on this issue, the camera "model" which does not work for me is mcgp2ywx6vatlwob. Polling its stream source URL with https://github.com/felipecrs/hass-expose-camera-stream-source gives me something like:

rtsps://someuser:somepass@aws-tractor2.tuyaus.com:443/v1/proxy/echo_show/e213b126703c424caf20d0edd7b5d60b77ba40178e0ab3d6

But there is no video at all in Home Assistant (or even outside, like go2rtc):

image

felipecrs commented 8 months ago

Just to link issues: https://github.com/tuya/tuya-home-assistant/issues/720

eagle-phoenix commented 8 months ago

Same issue here.

retrospectiva commented 7 months ago

Still actual. I have the same issue:

Logger: homeassistant.components.stream.stream.camera.security_camera Source: components/stream/init.py:431 Integration: Stream (documentation, issues) First occurred: 11:16:22 (30 occurrences) Last logged: 12:29:04

Error from stream worker: Stream ended; no additional packets Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://:@wework-4-eu.stream.iot-11.com:443/v1/bf6ea2566c156cec79zyxu/clpcsvb47or19us24i70T9aL2j4Uja54?signInfo=2Ogfoz8ciuwas--w6EtvL6ZpJ9YwYstTgstRn49FG8PgACyYk49JDLnJzv2bU34L5GcL_KSUmWqEG2FBylQg3CD0P8NLlXaQsZT3qAB_nDg_nSL1LXB_on6-fOo46uYImPa7ec8fa3TtJIa2XAPy5GcNousxtPyk_wZpqo0v7mA

StefanoGiu commented 4 months ago

I have the same issue... I'm on HA core 2024.2.1... this is coming up in the log very frequently...

linkian19 commented 4 months ago

Just going to throw my hat in the ring for this one as well. I have two Feit Electric (which are Tuya based) Floodlight Cameras. I've changed one of them to be linked to the Tuya Smart app and it connected fine on the app but I can't see the camera feed in HA.

I've tried @felipecrs solution to expose the URL and go the WebRTC Camera route, but no luck so far. Can't get the stream at all it seems.

There is only one thing I did notice in my digging that I thought was odd: I was going off of this Reddit Post and got to the part about finding the credentials in the POST that was sent. In the credentials I found I noticed that both username and password contained special characters.

When running @felipecrs provided script from https://github.com/felipecrs/hass-expose-camera-stream-source when I have go2rtc installed under WebRTC Camera I got a rtsps url that contained only the username. From what I can tell these links separate Username and Password with a colon ( : ) and my username happened to contain a colon so it appeared to assume that the color was a separator for username and password. I could be wrong but it seemed odd. I did try modifying the URL to match the credentials I found in various ways and any of the ways I tried didn't give me any different results.

Hope that sparks any ideas! Really wall I want to do is view the stream in Home Assistant, I don't care if I can save/view recordings, just want to see the stream.

For the record, I did try LocalTuya, but that doesn't support cameras unfortunately.

felipecrs commented 4 months ago

That's an interesting finding. I suggest you check if you can get any luck with: https://github.com/felipecrs/get-tuya-webrtc-configs/blob/master/get_tuya_rtsp_stream.sh

linkian19 commented 4 months ago

That's an interesting finding. I suggest you check if you can get any luck with: https://github.com/felipecrs/get-tuya-webrtc-configs/blob/master/get_tuya_rtsp_stream.sh

@felipecrs

Not sure I've configured this wrong, but I don't seem to be getting any output from the script. I did make sure that I had the IoT Video Live stream on my account.

At first I did try to run this I got an openssl error, but I installed that and now I'm not getting error, but I'm not getting any output. Am I missing something?

Edit to clarify - I mean that I am expecting me to have missed something, not that your script is bad or anything lol.

I didn't do any of the docker steps you have listed as it seems like that's not necessary for this script.

But I'm happy to test out anything else with further guidance!

felipecrs commented 4 months ago

Please open an issue in my repo, let's continue there so we don't flood here. Next tip: run the script with bash -x ./script.sh to get more logs.

issue-triage-workflows[bot] commented 1 month 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.

felipecrs commented 1 month ago

I actually have some news about it. If you get the stream type HLS rather than RTSP from Tuya API, the camera can be streamed.

The HLS stream though is kinda bad. I can play it in VLC for example but not in go2rtc.

I will share details on how to get this stream later.

felipecrs commented 1 month ago

This is the script: https://github.com/felipecrs/get-tuya-webrtc-configs/blob/master/get_tuya_stream_url.sh

Just invoke it passing the parameters and then it should output the RTSP or HLS stream URL.

You can test on VLC then.

lemeshovich commented 1 month ago

same issue with my tuya ptz solar camera (q5tqzxasdfwbvip2) Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://****:****@wework-1-eu.stream.iot-11.com:443/v1/... after tuya integration reload i can watch my cam stream for few mins, then image stucks and im getting error log as above

Core 2024.5.5 Supervisor 2024.05.1 OS 12.3

gnicolasb commented 1 day ago

Same error with my tuya doorbell camera