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.75k stars 30k forks source link

Nest Camera stream API returns 404 Not Found #60353

Open junalmeida opened 2 years ago

junalmeida commented 2 years ago

The problem

I could see it working only for a couple of times. Now all I see is a broken UI in HA.

image

image

What version of Home Assistant Core has the issue?

core-2021.11.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Nest

Link to integration documentation on our website

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

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.stream.worker
Source: components/stream/worker.py:414
Integration: Stream (documentation, issues)
First occurred: November 24, 2021, 5:03:59 PM (6 occurrences)
Last logged: November 24, 2021, 5:07:35 PM

Error opening stream rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr4sjwroHzZu67-DoaFqjCMNjrIs-OnXI8oQVrD6RW2ZWEnEAfW1qkdCa1zO0jokpzthuIJUAv39Lxibq9tgpi4kLgarNeUAOLK9_N2UD-_8PECaxOiE_BbjFoC-aahmMPj19Ie-88GAW5u7OVlveYblcD2DPrSDOCufoDr_iM-IEOHCT7dN-EAvi4LfUF1CvAg1N1A?auth=g.0.eyJraWQiOiIyMzhiNTUxZmMyM2EyM2Y4M2E2ZTE3MmJjZTg0YmU3ZjgxMzAzMmM4IiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJuZXN0LXNlY3VyaXR5LWF1dGhwcm94eSIsInN1YiI6Im5lc3RfaWQ6bmVzdC1waG9lbml4LXByb2Q6MTY5Njc4OTUiLCJwb2wiOiIzcC1vYXV0aC1zY29wZS1BUElfU0RNX1NFUlZJQ0UtY2xpZW50LTEwNzUwMDAzOTE5MDItdHI1aWt1ZGE4dWc0MmY5djQ0bXMxMzJzYWptaWU2ZWYuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJleHAiOjE2Mzc3OTUzMjN9.bU2ul2H9OaLfkPSWK0pTeeEXUqTW9AVHcbCJ_pqwGvvuYWCUOA5XI_OMUa19KVkltCP2Y_DIhhnv4HSgiid2NlnvV5EhmH6mM5PVNSFcr-Y-KNIwAVOAURw0sMGw_1LioI2uxG_BB1FscQGD75deBxZS4XeQz29yFkCCL9b68eZUF41Rn5kRZZhm_NHvwjJcRa0SHbWZg5msYguCV06veVNb51v5tnNPC6N27NQOGtGP0L3DekHcTZIncqcstpnrk_UWm_MIV4SUdWIuZIyvipw0-L9LiLK9bQa7zuvRH_7Jvi2uhS0Jiv7jmnmXj1N-XwzTaWaVOZdvwiuz4AGQvA

Additional information

No response

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

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


nest documentation nest source (message by IssueLinks)

allenporter commented 2 years ago

Nest server streams are failing. This is not a home assistant bug as far as I can tell.

junalmeida commented 2 years ago

@allenporter Stream is working on their Nest/Google Home App, so maybe their API has changed?

allenporter commented 2 years ago

No, that is not the case. This is fairly common unfortunately. I imagine I'd you retry it will work again.

junalmeida commented 2 years ago

@allenporter Nope, It is failing for more than a month :(

allenporter commented 2 years ago

OK, the issue is on the nest servers, or with your camera, so there is not a lot we can do on this side. However, I can think about ways to improve the error messages to give more error detail if possible, but unclear that it is feasible.

junalmeida commented 2 years ago

@allenporter Well ok. I don't see how the issue could be with my camera as it is working normally when using Google Home. It has been failing for a while, even after refreshing the token.

So, I suppose you don't have any advice on how to get it working, or at least on how to provide you better information in order to track down the issue.

allenporter commented 2 years ago

@junalmeida I said the issue is with the nest servers or an issue with your camera. The Nest API may have a specific issues with your camera even if it works in the Google Home app. The Nest API uses a totally different implementation. Your cameras may be fine, i have no idea, just saying i can't do a lot to help you given its working for me and everyone else.

There is a lot of information on https://www.home-assistant.io/integrations/nest/#troubleshooting and you can also turn up logging in homeassistant.components.stream or pyav to get additional details about the errors.

I'm guessing if you get additional logging, however, it won't give us any more information since the nest servers are failing which is out of our control. As I mentioned, I can look at ways to add additional logging since the existing logging probably won't tell you much new information. Just trying to set your expectations appropriately, but happy to look if you get more logs.

allenporter commented 2 years ago

If you want to really get extreme you could try creating a new test home and moving the camera to it, then adding that to home assistant to see if you have any better luck. Just trying to think out side of the box for how to "reset" things.

junalmeida commented 2 years ago

I believe given this exception catch https://github.com/home-assistant/core/blob/5a72c9f7c3817737d916816d257c1b55c62357a6/homeassistant/components/stream/worker.py#L411-L415 We have no way to know what exactly was the error. The message got swallowed by the except av.AVError

I could change the source in order to make it spit out the original error, but I'm running HA OS so I'm not sure I have access to any source code.

allenporter commented 2 years ago

Yes, that is what I was referring to above. Happy to review a PR to do that. In particular, when I tested locally I didn't get a very good error message so perhaps you can see for your own case what error you get and if it useful.

When I did it, it was redundant with what was already there, but it was likely because the way I simulated an error with iptables.

You can see here more detail: https://pyav.org/docs/develop/api/error.html and my impression is that AVError is an alias for FFmpegError

Maybe also crank up pyav error logging for yourself as well.

junalmeida commented 2 years ago

Ok so I just ssh'd into home assistant docker container, I navigated to stream/worker.py, edited the catch above to:

    try:
        container = av.open(source, options=options, timeout=SOURCE_TIMEOUT)
    except av.AVError as err:
        _LOGGER.error("Error opening stream - %s", err)
        return

And now I get the following:

Error opening stream - [Errno 875574520] Server returned 404 Not Found: 'rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr5cpMIxo4crJgjVs6oOR_9g4_22oIIA5BhvSTQOQiFxNEnEAfW1qkb9NfaifqyykVC4yFl289tsD-_jW5Q24mB3LrckpWsmLdHTv69G-fBa2s5BpZMCEY4B0_lPivIdTPBERKqSiTSF4sZfl7gI0zL1L7aKpztgLuIjRlUYiQeIeFITLPSZXB6b8DawP_jyxJ8ZuKw?auth=g.0.eyJraWQiOiIyMzhiNTUxZmMyM2EyM2Y4M2E2ZTE3MmJjZTg0YmU3ZjgxMzAzMmM4IiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJuZXN0LXNlY3VyaXR5LWF1dGhwcm94eSIsInN1YiI6Im5lc3RfaWQ6bmVzdC1waG9lbml4LXByb2Q6MTY5Njc4OTUiLCJwb2wiOiIzcC1vYXV0aC1zY29wZS1BUElfU0RNX1NFUlZJQ0UtY2xpZW50LTEwNzUwMDAzOTE5MDItdHI1aWt1ZGE4dWc0MmY5djQ0bXMxMzJzYWptaWU2ZWYuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJleHAiOjE2Mzc5ODU0MTB9.qidGZQSPTQON138SpxGMRk8Hf6U4bANLJ-LA2-H7bzqN59uP3Oiu84Uv3T_WUQnaJHsaPxlt6j7mgozarqL86yO4-tzS37Lgpk__VeuPMcPCFKUhqoZERE4gZQXw4cDYJUHD0fzhnJlG4KHloUOrWbY_Ee9BLEAni4gcnvkNbRPRlD31A6eiDt2rhPURHPqOnnMOPNJNitB7YwXYv4mYF_KpKWufUSZRiDQbz7GN0cFcB07y9EUMa_rjRWJn08E4aqSrVmVPq81z8Qd70p9YqU8i0wRjCcEp5fxb2mFUWnEbOhKxV_xS-J0Ewk3nTCmYrSR39E4YEaTV_MsWCvNkog'; last error log: [rtsp] method DESCRIBE failed: 404 Not Found

So is this URL entirely provided by google SDM API or manipulated somehow by the HA component?

allenporter commented 2 years ago

Provided by Google API. You can turn up logs in google_nest_sdm.auth to verify however. I think it should log API responses there.

allenporter commented 2 years ago

Actually I don't see logs for the responses. Maybe extra logging here: https://github.com/allenporter/python-google-nest-sdm/blob/a96f9b0ec346e23fb319195359d0b3450516d782/google_nest_sdm/auth.py#L61 Capturing the response and logging it.

allenporter commented 2 years ago

Actually there is one manipulation. The stream token is added to the url as an auth parameter.

junalmeida commented 2 years ago

I added the logger you requested, and this is what I see:

2021-11-28 10:28:42 DEBUG (MainThread) [google_nest_sdm.google_nest_subscriber] Starting background watchdog thread
2021-11-28 10:28:43 DEBUG (ThreadPoolExecutor-0_0) [google_nest_sdm.google_nest_subscriber] Subscriber 'projects/fine-justice-310117/subscriptions/homeassistant' configured on topic 'projects/sdm-prod/topics/enterprise-faedc057-fe93-4f48-9510-6447106e5e77'
2021-11-28 10:28:44 DEBUG (MainThread) [google_nest_sdm.auth] request[get]=https://smartdevicemanagement.googleapis.com/v1/enterprises/faedc057-fe93-4f48-9510-6447106e5e77/structures
2021-11-28 10:28:45 DEBUG (MainThread) [google_nest_sdm.auth] request[get]=https://smartdevicemanagement.googleapis.com/v1/enterprises/faedc057-fe93-4f48-9510-6447106e5e77/devices
2021-11-28 10:28:48 DEBUG (MainThread) [google_nest_sdm.auth] request[post]=https://smartdevicemanagement.googleapis.com/v1/enterprises/faedc057-fe93-4f48-9510-6447106e5e77/devices/AVPHwEtg6R8KiN5eUclzdK69frQKeSW2NoJaX-mJpcTJz1P9WwaAwpf1o04P9MKGzNnXEi2zDcLQUB62KG3LX7aheLo8agY:executeCommand
2021-11-28 10:28:48 DEBUG (MainThread) [google_nest_sdm.auth] request[post json]={'command': 'sdm.devices.commands.CameraLiveStream.GenerateRtspStream', 'params': {}}
2021-11-28 10:29:02 ERROR (stream_worker) [homeassistant.components.stream.worker] Error opening stream - [Errno 875574520] Server returned 404 Not Found: 'rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxryKR_rR99wSRzaj0sj8sqAFZtcaDNcAku07tq6ptny2tEnEAfW1qka13kFrN81r8ACrlq3ZOv10-h4hY92bGHSnEpwGR6F71SokxTcaFXfHKBDQXsCdQL0PtkEqzQ2-6LcJFz4a_dE4itBdoA7gxEc7hyfyF8NaUmASTJsXx8yAHPkboKPrg3Aa0HMfAoLQyBaX49A?auth=g.0.eyJraWQiOiIyMzhiNTUxZmMyM2EyM2Y4M2E2ZTE3MmJjZTg0YmU3ZjgxMzAzMmM4IiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJuZXN0LXNlY3VyaXR5LWF1dGhwcm94eSIsInN1YiI6Im5lc3RfaWQ6bmVzdC1waG9lbml4LXByb2Q6MTY5Njc4OTUiLCJwb2wiOiIzcC1vYXV0aC1zY29wZS1BUElfU0RNX1NFUlZJQ0UtY2xpZW50LTEwNzUwMDAzOTE5MDItdHI1aWt1ZGE4dWc0MmY5djQ0bXMxMzJzYWptaWU2ZWYuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJleHAiOjE2MzgxMTcyMjl9.VVyMavLV62yPEX6JrdYcux0N66siynM7X-Od6veWr_4Hs4DKN9t6SnrqoRSJV0mZezOgr_1Vq5D2HaIE4Uq6gMVtgLbc8vvHC-leuXMcv13E5aWXBvYhXjhESMFuO85g6-nHOfSCpg1nLKeshiQjB4AwILhBMS-zpoQsGebPlwnCHX2ogKYf_6BIW7nAX80IRdERkUCzilUMo4iq4zF_nWoeB1vpIAuhz-adIXtUyyRJFFb6S1BropPdD7rhT8V26Uk_2IAHMvWIYU_rm-HUzm6cEr5e5dCdX5ojmOivyIRynP_91VhE950cbwhBBGxmV8b-1h66xOLIaE2CSO1VdQ'; last error log: [rtsp] method DESCRIBE failed: 404 Not Found - rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxryKR_rR99wSRzaj0sj8sqAFZtcaDNcAku07tq6ptny2tEnEAfW1qka13kFrN81r8ACrlq3ZOv10-h4hY92bGHSnEpwGR6F71SokxTcaFXfHKBDQXsCdQL0PtkEqzQ2-6LcJFz4a_dE4itBdoA7gxEc7hyfyF8NaUmASTJsXx8yAHPkboKPrg3Aa0HMfAoLQyBaX49A?auth=g.0.eyJraWQiOiIyMzhiNTUxZmMyM2EyM2Y4M2E2ZTE3MmJjZTg0YmU3ZjgxMzAzMmM4IiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJuZXN0LXNlY3VyaXR5LWF1dGhwcm94eSIsInN1YiI6Im5lc3RfaWQ6bmVzdC1waG9lbml4LXByb2Q6MTY5Njc4OTUiLCJwb2wiOiIzcC1vYXV0aC1zY29wZS1BUElfU0RNX1NFUlZJQ0UtY2xpZW50LTEwNzUwMDAzOTE5MDItdHI1aWt1ZGE4dWc0MmY5djQ0bXMxMzJzYWptaWU2ZWYuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJleHAiOjE2MzgxMTcyMjl9.VVyMavLV62yPEX6JrdYcux0N66siynM7X-Od6veWr_4Hs4DKN9t6SnrqoRSJV0mZezOgr_1Vq5D2HaIE4Uq6gMVtgLbc8vvHC-leuXMcv13E5aWXBvYhXjhESMFuO85g6-nHOfSCpg1nLKeshiQjB4AwILhBMS-zpoQsGebPlwnCHX2ogKYf_6BIW7nAX80IRdERkUCzilUMo4iq4zF_nWoeB1vpIAuhz-adIXtUyyRJFFb6S1BropPdD7rhT8V26Uk_2IAHMvWIYU_rm-HUzm6cEr5e5dCdX5ojmOivyIRynP_91VhE950cbwhBBGxmV8b-1h66xOLIaE2CSO1VdQ
2021-11-28 10:29:24 ERROR (stream_worker) [homeassistant.components.stream.worker] Error opening stream - [Errno 875574520] Server returned 404 Not Found: 'rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxryKR_rR99wSRzaj0sj8sqAFZtcaDNcAku07tq6ptny2tEnEAfW1qka13kFrN81r8ACrlq3ZOv10-h4hY92bGHSnEpwGR6F71SokxTcaFXfHKBDQXsCdQL0PtkEqzQ2-6LcJFz4a_dE4itBdoA7gxEc7hyfyF8NaUmASTJsXx8yAHPkboKPrg3Aa0HMfAoLQyBaX49A?auth=g.0.eyJraWQiOiIyMzhiNTUxZmMyM2EyM2Y4M2E2ZTE3MmJjZTg0YmU3ZjgxMzAzMmM4IiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJuZXN0LXNlY3VyaXR5LWF1dGhwcm94eSIsInN1YiI6Im5lc3RfaWQ6bmVzdC1waG9lbml4LXByb2Q6MTY5Njc4OTUiLCJwb2wiOiIzcC1vYXV0aC1zY29wZS1BUElfU0RNX1NFUlZJQ0UtY2xpZW50LTEwNzUwMDAzOTE5MDItdHI1aWt1ZGE4dWc0MmY5djQ0bXMxMzJzYWptaWU2ZWYuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJleHAiOjE2MzgxMTcyMjl9.VVyMavLV62yPEX6JrdYcux0N66siynM7X-Od6veWr_4Hs4DKN9t6SnrqoRSJV0mZezOgr_1Vq5D2HaIE4Uq6gMVtgLbc8vvHC-leuXMcv13E5aWXBvYhXjhESMFuO85g6-nHOfSCpg1nLKeshiQjB4AwILhBMS-zpoQsGebPlwnCHX2ogKYf_6BIW7nAX80IRdERkUCzilUMo4iq4zF_nWoeB1vpIAuhz-adIXtUyyRJFFb6S1BropPdD7rhT8V26Uk_2IAHMvWIYU_rm-HUzm6cEr5e5dCdX5ojmOivyIRynP_91VhE950cbwhBBGxmV8b-1h66xOLIaE2CSO1VdQ'; last error log: [rtsp] method DESCRIBE failed: 404 Not Found - rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxryKR_rR99wSRzaj0sj8sqAFZtcaDNcAku07tq6ptny2tEnEAfW1qka13kFrN81r8ACrlq3ZOv10-h4hY92bGHSnEpwGR6F71SokxTcaFXfHKBDQXsCdQL0PtkEqzQ2-6LcJFz4a_dE4itBdoA7gxEc7hyfyF8NaUmASTJsXx8yAHPkboKPrg3Aa0HMfAoLQyBaX49A?auth=g.0.eyJraWQiOiIyMzhiNTUxZmMyM2EyM2Y4M2E2ZTE3MmJjZTg0YmU3ZjgxMzAzMmM4IiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJuZXN0LXNlY3VyaXR5LWF1dGhwcm94eSIsInN1YiI6Im5lc3RfaWQ6bmVzdC1waG9lbml4LXByb2Q6MTY5Njc4OTUiLCJwb2wiOiIzcC1vYXV0aC1zY29wZS1BUElfU0RNX1NFUlZJQ0UtY2xpZW50LTEwNzUwMDAzOTE5MDItdHI1aWt1ZGE4dWc0MmY5djQ0bXMxMzJzYWptaWU2ZWYuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJleHAiOjE2MzgxMTcyMjl9.VVyMavLV62yPEX6JrdYcux0N66siynM7X-Od6veWr_4Hs4DKN9t6SnrqoRSJV0mZezOgr_1Vq5D2HaIE4Uq6gMVtgLbc8vvHC-leuXMcv13E5aWXBvYhXjhESMFuO85g6-nHOfSCpg1nLKeshiQjB4AwILhBMS-zpoQsGebPlwnCHX2ogKYf_6BIW7nAX80IRdERkUCzilUMo4iq4zF_nWoeB1vpIAuhz-adIXtUyyRJFFb6S1BropPdD7rhT8V26Uk_2IAHMvWIYU_rm-HUzm6cEr5e5dCdX5ojmOivyIRynP_91VhE950cbwhBBGxmV8b-1h66xOLIaE2CSO1VdQ
allenporter commented 2 years ago

Ok, I don't see the response for t he generate live stream call logged, but anyway, not sure it's going to tell us much.

junalmeida commented 2 years ago

I don't see any code logging the response, just the request.

allenporter commented 2 years ago

Right, I was saying you need to add it "maybe extra logging here.. capturing the response and logging it".

msmithGH commented 2 years ago

Adding that I too see the following in my logs, and appear to experience latency issues when loading the stream. Unknown if the two are definitely related or not, but I see the following repeatedly and continuously throughout the day and everyday:

2021-12-19 21:45:15 ERROR (stream_worker) [libav.rtsp] method DESCRIBE failed: 404 Not Found 2021-12-19 21:45:15 ERROR (stream_worker) [homeassistant.components.stream.worker] Error opening stream rtsps://stream-uc2-alfa.dropcam.com:443/sdm_live_stream/XYZ****bunch_of_chars***ABC

allenporter commented 2 years ago

I've also seen @potmat see similar issues with homebridge so it seems pretty consistently that its a problem with the nest API.

potmat commented 2 years ago

I created this issue to alert Google the problem: https://stackoverflow.com/questions/70086032/rtsp-streams-often-fail-with-404-on-describe-method

bencmeyer commented 2 years ago

What is the current status of this issue?

Looks like there are some fixes being played with in the dev channel.

I have been dealing with this for a while as well, and trying to track down some status on the issue.

Thank you,

allenporter commented 2 years ago

My impression is there is this is an issue with the nest API, and we have reported it through a couple different channels. The nest API team has fixed other issues i've reported when we had a lot of information about the issue that makes it easier for them to diagnose, so I've added back additional error logging so we can get more details about the 404 describe failure.

I think what will make a good error report is to have more examples of the issue happening with the extra logging enabled. However, I personally am seeing this issue happen a lot less than it used to so i haven't been able to capture it lately.

allenporter commented 2 years ago

If many folks are still seeing this comment, then i'd say it would be reasonable to reply here with details about it. In the mean time, i'll continue to think about ways to make it easier to include additional debug information (e.g. our recent diagnostics additions don't yet have extra details for this because i'm not sure the best way to do it)

bencmeyer commented 2 years ago

I can't have my nest cam live for more than 5 minutes without it erroring out. A refresh fixes it, but after a while I give up.

Let me know what debug information you need more of, and I am happy to provide.

Logger: homeassistant.components.stream
Source: components/stream/__init__.py:305
Integration: Stream (documentation, issues)
First occurred: 12:46:44 PM (1 occurrences)
Last logged: 12:46:44 PM

Error from stream worker: Error opening stream rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr-CgYMQP2zYLbI5H0vZGvH2Hbz3BkDeE9ryiDLhVZVB-EnEAYm9dx_Bt7nXI11DUVQwisrVvNzGQlhcgBoE1HN3uO-3e9GIMuapR0Wbw3uSeR3HNKPVgWAkGxnlXSrkvmaCaYuJwooSQu_a8iryoweKNpvN1dmxB_YPbJ3_rL7F2iDyYLzB8Poe-fENGZcVBQrg3wg?auth=****
allenporter commented 2 years ago

Thanks. The next release will have more debug data available also which will help a bit.

If that error message comes up after 5 minutes, it implies that the stream is being re-opened and closed multiple times within 5 minutes. For example, when i have the stream open it opens the stream once then stays open, so i don't quite have enough context to understand. Can you describe your frontend UI setup in more detail? e.g. if you're using a picture glance card and the settings used, or if there are multiple attempts to open close the streams in the logs.

bencmeyer commented 2 years ago

I am using a Picture card on my main lovelace dashboard. Edit: I am using an iPad with the home assistant app running, but that doesn't seem to matter as it happens on my computer as well.

type: picture-entity
entity: camera.front_door
show_state: false
hold_action:
  action: none
show_name: true
camera_view: live
tap_action:
  action: more-info

Haha, it happened during me trying to copy out the config. This is a different error, but same problem. The one I see on the dashboard is fragLoadError. image

Logs show the same error as my last post. Is there a different log I can look at?

allenporter commented 2 years ago

If you have the advanced settings turned on and look at the full logs you should see INFO logs from homeassistant.components.stream about how often it opens the stream. e.g. Starting stream.

bencmeyer commented 2 years ago

Enabled the logger for info. The first occurrence after restarting:

2022-01-30 21:33:28 INFO (MainThread) [homeassistant.components.stream] Started stream: rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr_1QB3ILWQtz53khanDjR0WILvvBX-6GRN-lnjf4K2AzEnEAYm9dx4but8AWMV_mFtCkeB4tubjG8LWq0FMyDhFA8MOz2Km2ye2rBgpj8zmmi95f-NjBbNZwxmvWafzuyhodzSy_jduK_aRPQCEzPaVKz8NEvV3_4o4bQFHjBn60bAC-GLkJnyOHj73zMPwzLpi4ig?auth=****

The next and last occurrence 9 minutes later. Strange.


2022-01-30 21:42:40 ERROR (stream_worker) [homeassistant.components.stream] Error from stream worker: Error opening stream rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr_1QB3ILWQtz53khanDjR0WILvvBX-6GRN-lnjf4K2AzEnEAYm9dx4but8AWMV_mFtCkeB4tubjG8LWq0FMyDhFA8MOz2Km2ye2rBgpj8zmmi95f-NjBbNZwxmvWafzuyhodzSy_jduK_aRPQCEzPaVKz8NEvV3_4o4bQFHjBn60bAC-GLkJnyOHj73zMPwzLpi4ig?auth=****
2022-01-30 21:42:40 INFO (MainThread) [homeassistant.components.stream] Stopped stream: rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr_1QB3ILWQtz53khanDjR0WILvvBX-6GRN-lnjf4K2AzEnEAYm9dx4but8AWMV_mFtCkeB4tubjG8LWq0FMyDhFA8MOz2Km2ye2rBgpj8zmmi95f-NjBbNZwxmvWafzuyhodzSy_jduK_aRPQCEzPaVKz8NEvV3_4o4bQFHjBn60bAC-GLkJnyOHj73zMPwzLpi4ig?auth=****
allenporter commented 2 years ago

I forgot the reopen also happens when a stream is expired and refreshed, apologies. The timing makes sense.

bencmeyer commented 2 years ago

I started to realize something.

This may be caused entirely by the iPad running Home Assistant. If I load the stream only on my computer, it seems to run forever, or at least longer than 9+ minutes. It is only when I refresh the iPad dashboard, and it then causes the stream to stop after 4-9 minutes.

2022-01-31 07:40:58 INFO (MainThread) [homeassistant.components.stream] Started stream: rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr_1QB3ILWQtz53khanDjR0WILvvBX-6GRN-lnjf4K2AzEnEAYm9dx4but8AWMV_mFtCkeB4tubjG8LWq0FMyDhFA8MOz2Km2ye2rBgpj8zmmi95f-NjBbNZwxmvWafzuyhodzSy_jduK_aRPQCEzPaVKz8NEvV3_4o4bQFHjBn60bAC-GLkJnyOHj73zMPwzLpi4ig?auth=****

Letting the computer go inactive, or at least the tab in edge, appears to stop the stream.

2022-01-31 08:04:55 INFO (SyncWorker_8) [homeassistant.components.stream] Stopped stream: rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr_1QB3ILWQtz53khanDjR0WILvvBX-6GRN-lnjf4K2AzEnEAYm9dx4but8AWMV_mFtCkeB4tubjG8LWq0FMyDhFA8MOz2Km2ye2rBgpj8zmmi95f-NjBbNZwxmvWafzuyhodzSy_jduK_aRPQCEzPaVKz8NEvV3_4o4bQFHjBn60bAC-GLkJnyOHj73zMPwzLpi4ig?auth=****

Then, waking the computer back up/going back to the tab


2022-01-31 08:14:41 INFO (MainThread) [homeassistant.components.stream] Started stream: rtsps://stream-uc2-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr_1QB3ILWQtz53khanDjR0WILvvBX-6GRN-lnjf4K2AzEnEAYm9dx4but8AWMV_mFtCkeB4tubjG8LWq0FMyDhFA8MOz2Km2ye2rBgpj8zmmi95f-NjBbNZwxmvWafzuyhodzSy_jduK_aRPQCEzPaVKz8NEvV3_4o4bQFHjBn60bAC-GLkJnyOHj73zMPwzLpi4ig?auth=****
allenporter commented 2 years ago

Interesting, there is definitely an idle timeout on the streams so it stopping when not in use makes sense.

I'm having trouble following the iPad and desktop interactions order. Sounds like you're saying when adding the iPad it will fail after a bit, but not sure how that relates to the desktop going inactive. Maybe you can elaborate on steps that make this happen and I can also try to reproduce or consider where there might be more problems / bugs.

kenttse commented 2 years ago

Not sure if this is exactly the same issue. After upgrading to 2022.2 from 2021.12.10 I'm seeing lots of 404 errors in the log and 'Garage_Camera became unavailable' in my logbook. I have 3 cameras in my setup and all 3 are exhibiting the same errors. My automations aren't capturing snapshots or video until I restart HomeAssistant

2022-02-03 13:29:08 INFO (MainThread) [homeassistant.components.stream.stream.camera.garage_camera] Started stream: rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxrwwrYHKF14htCQTHgWNZfvvGsdPV9YHc0eIj0PwAkwBmEnEAYm9dx_1chxBBRDpqibgBbzADP2vTsGp3xWMwIz7gJ1s1Hf8fcfXlLkXejHVQ9S4BM6Ih3nXUagfK8nqaVK4o40ogesm3DiEB740k7uC3YP-gsoQLgQamF9iN_fGH8d2yaQPn-_-_G91yzKhHXUWGCw?auth=****
2022-02-03 13:29:18 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.garage_camera] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxrwwrYHKF14htCQTHgWNZfvvGsdPV9YHc0eIj0PwAkwBmEnEAYm9dx_1chxBBRDpqibgBbzADP2vTsGp3xWMwIz7gJ1s1Hf8fcfXlLkXejHVQ9S4BM6Ih3nXUagfK8nqaVK4o40ogesm3DiEB740k7uC3YP-gsoQLgQamF9iN_fGH8d2yaQPn-_-_G91yzKhHXUWGCw?auth=****
2022-02-03 13:38:29 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.garage_camera] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxrwwrYHKF14htCQTHgWNZfvvGsdPV9YHc0eIj0PwAkwBmEnEAYm9dx_1chxBBRDpqibgBbzADP2vTsGp3xWMwIz7gJ1s1Hf8fcfXlLkXejHVQ9S4BM6Ih3nXUagfK8nqaVK4o40ogesm3DiEB740k7uC3YP-gsoQLgQamF9iN_fGH8d2yaQPn-_-_G91yzKhHXUWGCw?auth=****
2022-02-03 14:32:43 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.garage_camera] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxrwwrYHKF14htCQTHgWNZfvvGsdPV9YHc0eIj0PwAkwBmEnEAYm9dx_1chxBBRDpqibgBbzADP2vTsGp3xWMwIz7gJ1s1Hf8fcfXlLkXejHVQ9S4BM6Ih3nXUagfK8nqaVK4o40ogesm3DiEB740k7uC3YP-gsoQLgQamF9iN_fGH8d2yaQPn-_-_G91yzKhHXUWGCw?auth=****
2022-02-03 14:55:28 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.garage_camera] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxrwwrYHKF14htCQTHgWNZfvvGsdPV9YHc0eIj0PwAkwBmEnEAYm9dx_1chxBBRDpqibgBbzADP2vTsGp3xWMwIz7gJ1s1Hf8fcfXlLkXejHVQ9S4BM6Ih3nXUagfK8nqaVK4o40ogesm3DiEB740k7uC3YP-gsoQLgQamF9iN_fGH8d2yaQPn-_-_G91yzKhHXUWGCw?auth=****
2022-02-03 15:13:39 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.garage_camera] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxrwwrYHKF14htCQTHgWNZfvvGsdPV9YHc0eIj0PwAkwBmEnEAYm9dx_1chxBBRDpqibgBbzADP2vTsGp3xWMwIz7gJ1s1Hf8fcfXlLkXejHVQ9S4BM6Ih3nXUagfK8nqaVK4o40ogesm3DiEB740k7uC3YP-gsoQLgQamF9iN_fGH8d2yaQPn-_-_G91yzKhHXUWGCw?auth=****
2022-02-03 15:14:59 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.garage_camera] Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxrwwrYHKF14htCQTHgWNZfvvGsdPV9YHc0eIj0PwAkwBmEnEAYm9dx_1chxBBRDpqibgBbzADP2vTsGp3xWMwIz7gJ1s1Hf8fcfXlLkXejHVQ9S4BM6Ih3nXUagfK8nqaVK4o40ogesm3DiEB740k7uC3YP-gsoQLgQamF9iN_fGH8d2yaQPn-_-_G91yzKhHXUWGCw?auth=****
2022-02-03 15:36:30 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.garage_camera] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxrwwrYHKF14htCQTHgWNZfvvGsdPV9YHc0eIj0PwAkwBmEnEAYm9dx_1chxBBRDpqibgBbzADP2vTsGp3xWMwIz7gJ1s1Hf8fcfXlLkXejHVQ9S4BM6Ih3nXUagfK8nqaVK4o40ogesm3DiEB740k7uC3YP-gsoQLgQamF9iN_fGH8d2yaQPn-_-_G91yzKhHXUWGCw?auth=****
allenporter commented 2 years ago

The symptoms look the same, however, nothing has changed in this stream code since 2021.12.10 so im surprised its correlated. Have you confirmed that rolling back to the prior version that it works?

kenttse commented 2 years ago

Here's my logbook for the garage camera for the time I was running 2022.02 and back to 2021.12.10 (no entries after reinstalling around 15:50)

Logbook

I am still getting errors in the log, but doesn't seem to render the camera unavailable. On 2021.12.10, some of my automations do fail to capture a snapshot, but it is very intermittent (days to weeks).

2022-02-03 18:52:08 ERROR (stream_worker) [homeassistant.components.stream] Error from stream worker: Error opening stream rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxr22CSrkXOcYU-BDuKIsTDGPB8K96l-i6paM3ODRnE_QeEnEAYm9dx7ezqqHLCEaDCDO6pSX0tgB_1FFltTW3RroR-VHvrOsKcQh1tjLkdSoTjbqorVu1cdU6tGDLx8J17w59SFBiEQt1L88HoVv-wgPyKZD6aG9yIl1yyimIMQ0mloKBNOHNY4UJ24E9VxZfj3TGaQ?auth=****
2022-02-03 18:54:58 ERROR (stream_worker) [homeassistant.components.stream] Error from stream worker: Error opening stream rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxr22CSrkXOcYU-BDuKIsTDGPB8K96l-i6paM3ODRnE_QeEnEAYm9dx7ezqqHLCEaDCDO6pSX0tgB_1FFltTW3RroR-VHvrOsKcQh1tjLkdSoTjbqorVu1cdU6tGDLx8J17w59SFBiEQt1L88HoVv-wgPyKZD6aG9yIl1yyimIMQ0mloKBNOHNY4UJ24E9VxZfj3TGaQ?auth=****
2022-02-03 18:57:58 ERROR (stream_worker) [homeassistant.components.stream] Error from stream worker: Error opening stream rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxr22CSrkXOcYU-BDuKIsTDGPB8K96l-i6paM3ODRnE_QeEnEAYm9dx7ezqqHLCEaDCDO6pSX0tgB_1FFltTW3RroR-VHvrOsKcQh1tjLkdSoTjbqorVu1cdU6tGDLx8J17w59SFBiEQt1L88HoVv-wgPyKZD6aG9yIl1yyimIMQ0mloKBNOHNY4UJ24E9VxZfj3TGaQ?auth=****
2022-02-03 19:01:09 ERROR (stream_worker) [homeassistant.components.stream] Error from stream worker: Error opening stream rtsps://stream-ue1-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxr22CSrkXOcYU-BDuKIsTDGPB8K96l-i6paM3ODRnE_QeEnEAYm9dx7ezqqHLCEaDCDO6pSX0tgB_1FFltTW3RroR-VHvrOsKcQh1tjLkdSoTjbqorVu1cdU6tGDLx8J17w59SFBiEQt1L88HoVv-wgPyKZD6aG9yIl1yyimIMQ0mloKBNOHNY4UJ24E9VxZfj3TGaQ?auth=****

I even tried removing and reinstalling the integration from scratch (including redoing the registration), but something is different on 2022.02.

allenporter commented 2 years ago

The issue with becoming Unavailable has now been fixed in https://github.com/home-assistant/core/issues/65697, and we can still use this for tracking general 404 errors on nest streams.

tomkessler commented 2 years ago

I have been struggling with these 404 (and sometimes 403) errors for a while now. Interestingly, ever since 2022.3 the cameras are more responsive in the UI and load up faster. However, ever since 2022.3, my HA instance becomes unresponsive (happened 3 or 4 times); I'm not sure if this is related, but ever after it becomes unresponsive there still are a few log entries showing up related to Nest. Nothing appears in the "fault" log. Attaching my log file from today (18 March) which has debug turned on for related entities; HA became unresponsive a few minutes before the end of the entries in this log file. Happy to collect / provide more logs / info if it helps. Honestly, the log entries (404, 403) are benign as long as things work. My biggest concern lately is that HA becomes unresponsive home-assistant-18mar.log .

bencmeyer commented 2 years ago

My UI is still working fine, but I gave up on the camera feed. Constantly says Stream Network Error. I haven't removed it, because I can refresh the page and see a live view for a few minutes.

junalmeida commented 2 years ago

UI is always responsive here, but it is a rare moment to see the stream working, refreshing doesn't do any good. Still seeing the same 404 errors on the logs.

mdegat01 commented 2 years ago

I see this as well. I tried recreating everything from scratch today to see if that fixed it. I noticed based on the latest instructions I had two things wrong:

  1. I was using a Web Application type client ID
  2. I had put in a subscriber ID

So I deleted the integration and remade it with a new client ID. Nothing seems to have changed unfortunately. Going to the dashboard where my camera cards are still just shows nothing and has 404 errors in the logs.

I'm not too fussed about it since I still get the person detected events which is the main thing I care about it. But it would be nice to be able to see these streams in HA instead of having to go to the nest app.

allenporter commented 2 years ago

@mdegat01 your issue is probably https://github.com/home-assistant/home-assistant.io/issues/22141 since i think you're talking about an issue getting the integration setup.

This issue is about nest servers providing bad stream urls.

Lumute commented 2 years ago

I have this issue as well, I have 2 old Nest cameras (Doorbell Wired & Outdoor IQ) and recently added them to a dashboard with the “Preload Steam” checked.

The Doorbell works just fine and the Outdoor IQ seems to work but sometimes the stream stops working and after a while it works again, I get these error when that happens:

2022-04-18 15:35:47 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.entrance] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://stream-uc2-bravo.dropcam.com:443/sdm_live_stream/CiUA2vuxr3XlVTr1r-gRUmu6tqPkZ4Vk7_sE3thRaATKOU4IMm_EEnEAMPcxGP0KClfNF3PbYn6JzgSB5_u5aZ6KGalWjJbNq9iyw1QZK5fQPzvwaHbympmfx-CDgIAnJJlxc55SKyQUYXUzLHjv-PjaYR1COv36V5tgpovD2DnQ5s2o38cueKnySQS42FiwOBiYR-aiAOupww?auth=****`
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://stream-us1-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr6PJde-syqMMVHlH0PoMd8AIH7LGxeHICR9gonEe_qADEnEAMPcxGOPd7CHahFBGSbR_S9Y2yPk5B2mthtWm0xMPxhP7xZNTjAv2y_wLZDVTS1OkipCGURk0c6TxdDGLdHKQPiRFz-l50_M726uT8zoowp05iMd4g6rmF1_z6gcwxZZOjLSSx-LgQXttJUlU-xM2_w?auth=****
Error from stream worker: Error opening stream (HTTP_FORBIDDEN, Server returned 403 Forbidden (access denied)) rtsps://stream-us1-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr6PJde-syqMMVHlH0PoMd8AIH7LGxeHICR9gonEe_qADEnEAMPcxGOPd7CHahFBGSbR_S9Y2yPk5B2mthtWm0xMPxhP7xZNTjAv2y_wLZDVTS1OkipCGURk0c6TxdDGLdHKQPiRFz-l50_M726uT8zoowp05iMd4g6rmF1_z6gcwxZZOjLSSx-LgQXttJUlU-xM2_w?auth=****
Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://stream-us1-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxr6PJde-syqMMVHlH0PoMd8AIH7LGxeHICR9gonEe_qADEnEAMPcxGOPd7CHahFBGSbR_S9Y2yPk5B2mthtWm0xMPxhP7xZNTjAv2y_wLZDVTS1OkipCGURk0c6TxdDGLdHKQPiRFz-l50_M726uT8zoowp05iMd4g6rmF1_z6gcwxZZOjLSSx-LgQXttJUlU-xM2_w?auth=****

It happens often so please let me know if there is anything else I can provide to help the SDM API team figure out what is the problem...

junalmeida commented 2 years ago

@Lumute On my case it won't work most of the times, and it is a brand new Nest Hub Maxx. My nest hub camera can be disabled or enabled by the home/away assist feature, and I suspect that this happens when it is disabled. It would be good if one could confirm that and if that is true research for a way to enable it?

github-actions[bot] commented 2 years 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.

kmcas10 commented 2 years ago

I am having this exact same problem. I have a Nest Doorbell and Nest IQ Outdoor and get this error on both devices. I am on HA 2022.08.3

allenporter commented 2 years ago

This issue has been reported to Google (not a home assistant bug as far as we know, seen by other users of the APIs)

allenporter commented 1 year ago

My latest updated is that the Nest API folks are investigating.

allenporter commented 1 year ago

Hi folks, what would be helpful is if end users that see this go report an issue in https://developers.google.com/nest/device-access/support -- the information that is helpful is:

allenporter commented 11 months ago

From issue https://issuetracker.google.com/issues/300953239 there is some update from Google

Thanks for bringing this up. We can reproduce the issue with RTSP streaming server on our end and our internal teams are looking into this.