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
Doorbell keeps going offline #338
Comments
Anything in the log before that? You might want to increase |
That's everything that related to the doorbell, and true, this did start happening after I made it 10s rather than the 30s I had before, will see if that fixes it soon. Also, not sure if this has anything to do with the addon or if it may be just the camera card for HA but every time the doorbell image refreshes it seems to show that offline picture before showing the updated thumbnail seconds later, only the doorbell does this. |
Try to keep an eye on the logs next time it happens to see if you see any other messages around the time:
|
I will definitely do so but gonna have to wait for 2022.4.1 because it seems 2022.4.0 has broken still images since I only have the "stream-source" in the camera configs, (home-assistant/core#69128) which is also taking forever to finish the database upgrade too atm, been over an hour so far. But I have made the 'RTSP_READTIMEOUT' 30 seconds now, so will have to see if that helps. |
I managed to get these from the log too, it seems to be affecting all of my cameras and I have no idea why they keep showing as unavailable in HA when they are not offline, because of this my notification snapshots are never accurate, and always hours behind. CPU usage also jumps insanely high sometimes all the way from 32% to 88% Here is my config: WYZE_EMAIL: - 2022/04/08 00:13:29 [Front Doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4) 2022/04/08 00:14:31 [Front Doorbell] WARNING: FPS param mismatch (framerate=20) 2022/04/08 00:13:29 [Driveway] WARNING: Skipping smaller frame at start of stream (frame_size=1) And finally, when I was trying to test why the snapshots are old and it wasn't even making a new one when I called the service, this is what the HA log showed: Error from stream worker: Error opening stream (ERRORTYPE_111, Connection refused) rtsp://:@127.0.0.1:8554/driveway |
@mrlt8 Yea so this now seems to be affecting more than the doorbell, no idea why the cameras go offline randomly when they work fine in the wyze app. I wonder if it's because they are constantly streaming? Maybe on-demand streaming could solve this... it seems to be really affecting my snapshot automations too. |
How's the WiFi coverage around those two cameras? |
So I restarted the bridge, and like usual, that fixed it and they are back online. Also, all of my cameras are near my modem, especially the 2 of them are basically beside it. I actually just added a 5th camera to my setup so not sure about that one 😂... The cameras are back online on HA right now but I guess I'll let you know if they go offline again. But the two cameras I was talking about were the "Porch" (98% wifi) and the "Garage Cam" (89% wifi) I just restarted the addon again to get you the wifi info and it really doesn't seem like it should be an issue as you can see here: 2022/04/08 23:41:55 [Luna Cam] 📡 Getting 120kb/s HD stream (20fps) via LAN mode (WiFi: 67%) FW: 4.36.3.19 (2/3) 2022/04/08 23:41:55 [Front Doorbell] 📡 Getting 120kb/s HD stream (20fps) via LAN mode (WiFi: 98%) FW: 4.25.1.042 🔒 2022/04/08 23:41:55 [Porch] 📡 Getting 120kb/s HD stream (15fps) via LAN mode (WiFi: 98%) FW: 4.9.8.1002 🔒 (DTLS) (2/3) 2022/04/08 23:41:55 [Driveway] 📡 Getting 120kb/s HD stream (20fps) via LAN mode (WiFi: 95%) FW: 4.36.9.117 🔒 (DTLS) (2/3) 2022/04/08 23:41:55 [Garage Cam] 📡 Getting 120kb/s HD stream (15fps) via LAN mode (WiFi: 89%) FW: 4.9.8.1002 🔒 (DTLS) (2/3) |
I think we're getting a couple of overlapping issues here..
The streams do go down every now and then (If you watch closely, you'll notice something similar in the app), but they should be able start back up on their own. |
Ok sorry for the confusion, I just didn't want to open 100 issues.
Here are some errors listed in the logs though, note that not all the cameras go "unavailable" even with these errors, (Garage Cam) came bac online even with this: 2022/04/09 13:43:48 [Garage Cam] WARNING: Skipping smaller frame at start of stream (frame_size=1) |
Just an update: So the "Porch cam" is staying offline for whatever reason so I am going to filter that out from the bridge, so now it will be 4 cameras instead of 5. 🚀 STARTING DOCKER-WYZE-BRIDGE v1.3.2 One question I have though does "2022/04/09 14:11:20 [WyzeBridge] ☁️ Fetching 'user' from the Wyze API..." mean it's not streaming the cameras locally but instead through the API? Would hope not... One more question does SNAPSHOT=RTSP15 have anything to do with it, you think? |
I don't know if this is related or not but i was having issues with safari and Home assistant saying "network stream error" cams not updated live, constantly needing to refresh the page, then i switched browsers to firefox and all my issues magically disappeared, cams are all live now and no error messages. I suspect it has something to do with safari trying to be power efficient or something. Anyway just thought I'd add a note here. Cheers |
Interesting.. this seems like it could be more of a HA issue..? how are you checking the status of the cams, is it from MQTT?
|
Ok so with this info I'm taking that The whole resolution thing HAS to be a wyze issue because even in the God damn wyze app I always set the camera resolutions to "HD" but they always load in "SD" for some reason! So I really have no idea how to solve that tbh unless the app stream is separate and doesn't matter. I am perfectly fine with HA receiving the cameras in 360p if that helps with everything tbh, would just hope it would switch to 720p/HD when I actually click the thumbnails to view the live video though. And I am not using MQTT, no and yes correct I enabled Also, the thumbnails are sometimes behind the actual stream yes but like I said it fixes itself after a couple of hours sometimes, but as of right now my doorbell is still about 30 mins behind the other cameras. |
The resolution thing shouldn't be an issue as the bridge should be able to correct for that within a couple of frames. If not via mqtt, where is HA listing the cameras as offline? Can you stream from the RTSP stream via VLC when it is reporting as offline? |
So for whatever reason, 1 camera is once again reporting as "unavailable" in HA, on the Wyze app they are perfectly fine and up and running. Also nope, cannot access it via VLC, something's up with the bridge for sure. I removed 2 cameras fully from the Hub and HA and am only using 4 cameras right now. |
Unless you have auth setup in rtsp-simple-server, the stream uri to that in the readme, in your case, assuming HA running on the same machine as VLC:
|
I will have to try this again if another camera goes offline 👍 |
So I've just been able to test this as the garage cam is showing as "unavailable" in HA, but not the app.... And it isn't accessible through both URLs on VLC. But I'm watching it live on the wyze app as I'm typing this! haha. I will be restarting HA a couple times today anyways since I am adding some stuff to it so it'll probably come back after. One thing I haven't mentioned is I have my HA on a 2nd router that the cameras are not on, this never seemed like an issue as because the router is plugged in to the main one (it's basically a repeater) it still is able to stream the cameras, maybe in the future I may try moving my RIP4 to the main router which is closer to all the cameras, will just have to see if this will mess anything else up though but it shouldn't. |
I don't think the router is an issue since it starts up correctly. Unavailable in HA does not mean that the camera is offline. Again, please view the bridge's logs when it is showing as unavailable, otherwise we have no idea what is going on. The bridge, just like the app, will lose connection to the camera from time to time, but is supposed to restart the process if the connection is lost. The bridge will show and adjust the connection attempts if the camera is detected as being offline. |
Well in other news my "garage cam" has not come back in HA, but checked in the logs it said the camera came back online... so I checked and the thumbnail updated, but the stream was not online so it looks like it came back for like 1 second enough to update thumbnail then went back as unavailable. weird. It actually did this a couple times. Now regarding the doorbell, I just checked and ever since turning off the doorbell rotation it's only fell back once and by 5 minutes, I will check again tomorrow too see if this stays like that but that seems like positive news. QUICK UPDATE: So I've checked multiple times and now have my dashboard open in the background and the thumbnail seems to be updating on the garage cam but the stream is not working?... damn that is weird. The logs seem to think the camera is online though but the stream definitely isn't so I wonder what's going on here. ANOTHER UPDATE: And now suddenly the garage cam stream is also up lol. Gonna keep the developer page and logs open in the background to monitor it a bit. |
Thumbnails from RTSP15? If those are updating then it means the rtsp stream is most likely still up and it's whatever HA is doing to read the stream that is having issues..? |
Yep, RSTP15 for now then RTSP5 when that comes out, and I assumed it was HA with the problem. I just wish it wouldn't randomly go unavailable when the wyze app stream isn't down. |
Have you tried the ffmpeg platform instead? I believe that one does it's own snapshots as well. |
I moved away from the ffmpeg and switched to generic a couple weeks ago as I was told it was better, I may try the doorbell on it soon as I don't remember these problems on ffmpeg.. I could be wrong though. |
I've been running some tests, and believe this is an MQTT bug that's just reporting the camera as offline even though the camera is still up. Will need to look into it, but you should be able to ignore the status and continue to use the cams as normal. |
I'm not even using MQTT but I hope this fixes it because I have one camera that is constantly unavailable in home assistant so no video feed, but it never is offline in the app, getting annoying. |
When you say unavailable, do you mean the RTSP stream is not responding or is it just saying "unavailable" somewhere in home assistant..? MQTT is what is sending the entity info in #340 and I'm assuming the camera status that you're referring to. MQTT should set the status to "offline" if the stream is down or "disconnected" if the bridge stop updating the status for some reason. |
When I mean "unavailable" I mean the stream doesn't play, sorry. Here is more info here in this issue. #340 |
This is definitely Home assistant related. I was able to replicate the "unavailable" with generic and ffmpeg even though the actual rtsp stream was still up in VLC. Not sure why HA stop reading the stream though... |
Just checked again today and the doorbell is 1 minute behind which is the best it's been so will have to report back if it stays this way. This is still with all cameras filtered out. And I am for sure starting to think this is a HA issue too, wonder what I would name the issue to report to them. |
take a look at https://community.home-assistant.io/t/i-tried-all-the-camera-platforms-so-you-dont-have-to/222999 They all seem to have some sort of lag and/or processing issue. As to why HA stops reading the stream, we could try making some tweaks to rtsp-simple-server to see if we might be able to improve things. Is it mostly just the doorbell that goes unavailable or do the other cameras go unavailable at a similar rate? |
The other cameras also go unavailable, I would say the doorbell goes unavailable the least, but is always behind when it is available. And yea i read that before and may make some changes as I plan to test the V3 RTSP firmware alongside the docker. |
try removing FPS_FIX and setting QUALITY to HD180, this made by doorbell stay up for days with a few short timeout but it always reconnects successfully. |
I'm on the dev branch and don't see an option for FPS_FIX but I added the HD180 quality. |
I just switched back to the public version and the doorbell started with a 3 min delay. This is the setup as recommended: WYZE_EMAIL: - |
I noticed that the rotation could cause the bitrate to spike, so I limited the bitrate to 3,000 kb/s in dev 4 to see if that might help with the drops. |
* Clear MQTT topics on exit #338 * Time based keyframes #338 * Speed up snapshots #340 * Limit bitrate on rotation #338 #340 * Don't block on FPS change #340 * Match cases when checking model names #346 * APP_VERSION bump to 2.30.0 * Option to save snapshots as PNG * tutk_ioctl_mux log level #330 * send_ioctl log level * Reduce rtsp snap logging #340
On the latest update with the following config settings and the doorbell, stream keeps going offline, I have an automation that notifies me when it happens, and it's basically spamming me about the doorbell, but not the other cameras.
Not sure why this is happening as it's not offline in the Wyze app, but offline on HA a lot of the time, Based off the offline notification it seems to come online then go back offline like every 5 mins or so. On the latest firmware for both wyze docker and doorbell.
My config:
WYZE_EMAIL: -
WYZE_PASSWORD: -
NET_MODE: ANY
SNAPSHOT: RTSP15
MQTT_DTOPIC: homeassistant
ROTATE_DOOR: true
WEBRTC: false
FRESH_DATA: true
RTSP_READTIMEOUT: 10s
KEEP_BAD_FRAMES: true
FPS_FIX: true
FILTER_BLOCK: true
FILTER_MACS: -
The log:
2022/04/07 00:56:09 [RTSP][FRONT-DOORBELL] 📕 Client stopped reading
2022/04/07 00:56:11 [RTSP][FRONT-DOORBELL] ❌ '/front-doorbell' stream is down
2022/04/07 00:56:11 [RTSP][FRONT-DOORBELL] 📕 Client stopped reading
The text was updated successfully, but these errors were encountered: