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

Wyze Outdoor Cam Battery Drain #709

Closed
efloyd opened this issue Feb 6, 2023 · 27 comments · Fixed by #1184
Closed

Wyze Outdoor Cam Battery Drain #709

efloyd opened this issue Feb 6, 2023 · 27 comments · Fixed by #1184

Comments

@efloyd
Copy link

efloyd commented Feb 6, 2023

I'm experiencing accelerated battery drain with Wyze Outdoor Cam V2 running on Portainer with Wyze Bridge and Scrypted running on separate containers.

I'll charge the camera to 100%, and it will be down to 0% in 6-8 hours. I'm hoping that someone here can validate my settings and/or provide guidance. And, I'm not sure if this more of a Wyze-Bridge question, or a Scrypted question. I do have a Ring Outdoor Cam Battery connected using the Ring plugin in Scrypted, and it doesn't drain nearly as fast - I'll get 10-15 days out of that battery, which leads me to believe that it has something to do with the settings I have for the Wyze camera.

For the Wyze Bridge container, I do have the variable ON_DEMAND set to True. It's my understanding that this forces the camera to not stream unless the stream is called, which in my case would be Scrypted and Homekit.

I've attached screenshots of the settings for this Wyze Outdoor V2 cam in Scrypted.

Scrypted - 1 RTSP Camera
Scrypted - 2 Snapshot
Scrypted - 3 PAM Diff Motion Detection
Scrypted - 4 Streams - Manage
Scrypted - 4 Streams - Stream
Scrypted - 5 Transcoding
Scrypted - 6 Extensions

Any guidance would be appreciated!

@efloyd efloyd changed the title Wyze Outdoor Battery Drain Wyze Outdoor Cam Battery Drain Feb 6, 2023
@mrlt8
Copy link
Owner

mrlt8 commented Feb 7, 2023

I believe it's the pre-buffer and motion detection which will keep a connection to the camera open.

Unfortunately, the bridge tries to keep everything local, so we don't have access to the motion sensor (yet), but you may be able to poll the status off the wyze server using one of the other wyze plug-ins.

@efloyd
Copy link
Author

efloyd commented Feb 10, 2023

I'm now experiencing a completely different issue - when I had 1 Outdoor Cam and 2 V2 cams, things seemed pretty stable. I just added a second Outdoor Cam, and it's become very unstable, and I can't seem to get the cams to load in the Wyze App when the the Wyze-Bridge container is running.

I deleted both the Stack and Container in Portainer, and redployed everything, setting ON_DEMAND to "True" and NET_MODE to "LAN".

I'm seeing a lot of "Snapshot Unavailable", cams dropping, inability to view cams in Wyze App, cams not refreshing at all in Wyze-Bridge.

@mrlt8
Copy link
Owner

mrlt8 commented Feb 11, 2023

Could be the cameras flooding your wifi if you only experience it when streaming simultaneously.

May need to check your router for IGMP Snooping/IGMP Proxy related settings.

ubiquiti unifi and tp-link deco seem to have more issues with the wyze cams.

@jshg46
Copy link

jshg46 commented Feb 14, 2023

I have 2 outdoor cams myself, this does kill the batteries quick.

@efloyd
Copy link
Author

efloyd commented Feb 15, 2023

Good news is that I think I've stabilized my 2 V2s and 2 Outdoor V2s. Here's what I did:

  1. I was running the old RTSP firmware on the V2s, so I upgraded them to the most recent V2 firmware
  2. I changed 2.4 GHz channel on my Netgear Orbi Mesh system (RBR850) to channel 11. It was on Auto before.
  3. I disabled IGMP proxying on the Netgear Orbi.
  4. I unchecked "Enable 20/40 MHz Coexistence" on the Netgear Orbi to disable it.
  5. I unchecked "Enable WMM (Wi-Fi multimedia) settings to disable it.

I'm not sure if all of these contributed to the stability, but things seem to be working better. My cams are staying connected, and I'm seeing fewer cam drops in the wyze bridge logs.

The setup is still draining the batteries pretty quick on my Outdoor V2s. I added the solar panels, but they can't keep up. If I can't find a solution for the battery drain, I'm going to have to switch back to the Ring Cam Batteries with solar.

The Ring Battery Cam running with the Scrypted plugin doesn't drain, and the solar panel can keep up.

I was really hoping the Wyze cams would work for me because of their price point, small form factor, and simple-to-use app. I'd prefer to not have to use two camera brands and have to switch back and forth between apps to view recorded events when HSK craps out.

@mrlt8
Copy link
Owner

mrlt8 commented Feb 16, 2023

Unfortunately, the cameras will continue to drain if pre-buffering and/or motion detection are turned on for the battery cameras in scrypted including the ring:

The persistent live stream will drain the battery faster than it can charge.

@efloyd
Copy link
Author

efloyd commented Feb 16, 2023 via email

@jshg46
Copy link

jshg46 commented Feb 16, 2023

I just gave up on it for the time being. I cant just keep on killing the batteries. Maybe a fix for this will be found soon.

@mrlt8
Copy link
Owner

mrlt8 commented Feb 17, 2023

@efloyd you need to disable pre-buffering and any motion detection in scrypted. You may be able to poll the motion status from the web API using one of the other wyze libraries like https://github.com/JoshuaMulliken/wyzeapy or https://github.com/shauntarves/wyze-sdk and use that as a motion sensor in scrypted. Keep in mind that wyze doesn't like people doing this.

@jshg46 This is a design flaw in the camera itself. The bridge already stops streaming when there aren't any clients connected, and there isn't anything that can be done to "fix" the battery.

@efloyd
Copy link
Author

efloyd commented Mar 2, 2023

I decided to give the Ring Cam Battery another try - the standalone cam battery without the solar panel, for now. I installed the Scrypted Ring plugin, which allowed me to add the Ring cam to Homebridge. Configured motion alerts and recording in the Home app, and I get Homekit notifications on motion and HKSV recording, just like I did with my Wyze Cam Outdoors.

So far, I've been running it for 2 weeks straight and it's taken this long for the batter to get to 29%. If I add the solar panel, I'm sure it will be able to keep up at that rate. And I do check my Home app pretty often which forces the Ring cam to refresh its snapshot.

I'm not sure sure what the technical/implementation differences are between the Wyze Bridge exposing the cams to Scrypted via RTSP vs the Ring plugin for Scrypted. For the Ring camera, I don't have to enable the Rebroadcast, Snapshot or Motion Detection plugins in Scrypted That functionality seems to be inherently built into the Scrypted Ring plugin?

Unless anyone has any guidance on how to prevent so much battery drain on the Wyze Cam Outdoors with the Wyze Bridge exposing RTSP to Scrypted, I think I'll be switching to Ring cameras. Which is a huge bummer because not only are the Ring cameras so much more expensive, I love everything about the Wyze cameras - the images/video are better, the AI events are better, the Wyze app is better, the form factor is better, the power cables are easier to manage/hide, and I love the new V3 Pan Cam.

Below are screenshots of the Ring camera configuration in Scrypted:

image

image

@tae180
Copy link

tae180 commented Apr 2, 2023

I’m having an issue with my wyze outdoor camera battery draining fast. Can’t go 1 day when I have docker wyze bridge running. Any suggestions?

@efloyd
Copy link
Author

efloyd commented Apr 2, 2023

I’m having an issue with my wyze outdoor camera battery draining fast. Can’t go 1 day when I have docker wyze bridge running. Any suggestions?

I had the same issue. Couldn’t resolve. I’m switching to Ring cams using the Scrypted plugin. My Ring battery cams take days to run down, and never run down with the solar attachment.

I love the Wyze cams, but didn’t want to use two different cam brands and juggle 2 different apps.

@weromemuero
Copy link

I’m having an issue with my wyze outdoor camera battery draining fast. Can’t go 1 day when I have docker wyze bridge running. Any suggestions?

The only way I'm able to get my streams working without battery drain is without motion detection enabled... This are the plugins i have enabled on scrypted:

imagen

No snapshot from prebuffer and no prebuffered stream.

I can get to stream the camera on the home app but cant use the HKSV options as i'm not activating the motion detection. With this settings my camera battery lasts at least 3+ weeks

@TheRealWaldo
Copy link

TheRealWaldo commented May 3, 2024

I am not using scrypted, just the stock Home Assistant add-on, and I am having the battery drain issue. Any suggestions?

mrlt8 added a commit that referenced this issue May 7, 2024
@mrlt8
Copy link
Owner

mrlt8 commented May 7, 2024

@TheRealWaldo motions events should update and pull the snapshot from the API without connecting to the camera in the latest dev build.

@TheRealWaldo
Copy link

TheRealWaldo commented May 7, 2024

I'm using 2.8.3 of the HA add-on and have MOTION_API on, but it is not updating the images on either the wired or wireless cameras. Not sure if that's the most current?

Sorry missed the dev build answer, so I'm guessing my answer is 'no'.

@TheRealWaldo
Copy link

I tried moving to the dev version with these settings:

NET_MODE: LAN
SNAPSHOT: API
MQTT_DTOPIC: homeassistant
ENABLE_AUDIO: false
MOTION_API: true
ON_DEMAND: false
SUBSTREAM: false
CAM_OPTIONS: []

The obvious API and account credentials are hidden. The thumbnail is not updating, and the motion entity for the outdoor cam remains 'unknown'.

I have it plugged into power for testing, so I don't know if it is still draining.

@TheRealWaldo
Copy link

I took the camera off power and it drained within a few hours using the above settings on the dev branch.

@mrlt8
Copy link
Owner

mrlt8 commented May 9, 2024

hmm, is something in HA trying to access the streams that is causing the battery to drain?

@TheRealWaldo
Copy link

This is a scratch installation of the Wyze addon, none of the cameras were set up previously. There are no automations or anything else hooked up to it yet.

Only thing I added was a picture entity for the snapshot to a dashboard.

@TheRealWaldo
Copy link

Another note: the entity shows that the stream is always on with the above settings. If I set ON_DEMAND to true, it doesn't stream, but it also doesn't take snapshots, show motion, or allow you to manually take a snapshot on the outdoor cam.

@mrlt8 mrlt8 linked a pull request May 12, 2024 that will close this issue
mrlt8 added a commit that referenced this issue May 12, 2024
* Sign motion event request #1125

* use device id instead of mac #1125

* remove wrong flags from mkfifo #1174

* less aggressive flush #1159 #1167

* Use K10052 for setting FPS #1161

* Refactor bits for going above 255 for quality

* Revert ffmpeg changes #1159 #1167

* version is obsolete

* default quality to hd180

* Update Wyze iOS App version from v2.44.5.3 to v2.50.6.1 (#1176)

* use struct pack

* Token based auth over the webUI

* Fix redirect for Home Assistant Ingress

* Use request headers to fix redirect for HA

* Change GET to POST for webhooks data

* Deprecate ifttt_webhook in favor of webhooks

* use yml for HA config and make credentials optional

* keep trying to identify audio #1172

* Snapshot on motion and push to mqtt #709 #970

* Add event time to motion message

* refactor auth

* EVENT_API option #1125

* Add additional headers  #1125

* Audio sync with higher bitrate

* Debug api request #1125

* Update api.py

* only debug on error

* Tweak audio sync

* don't raise error on lost frame

* clear buffer if out of sync

* Unique macs only #1125

Co-Authored-By: Cameron <32912464+kiwi-cam@users.noreply.github.com>

* Require auth by default and block non-ingress access #1181

* Allow non-ingress access with auth #1181

* Remove retain flag from commands #1182

* update webrtc to work with auth streams

* Add WB_API and rename WEB to WB #1181

WEB_USERNAME > WB_USERNAME
WEB_PASSWORD > WB_PASSWORD

* HA move /config/wyze-bridge/ to /config/

* Don't notify substream event and remove v2 #1125

* WebUI Auth related config for HA

* Don't retain discovery message? #1182

* Case sensitive credentials for WebUI

* changelog and readme

---------

Co-authored-by: Cameron <32912464+kiwi-cam@users.noreply.github.com>
@TheRealWaldo
Copy link

Using the new version, battery is still draining with the settings above.

@TheRealWaldo
Copy link

I might have a hint as to what is happening with the settings above. On startup, WyzeBridge tries to connect to ALL cameras. If any one camera is unreachable, it retries connecting to ALL cameras every 10 seconds, restarting the stream for ALL cameras every time.

Effectively, this means that if any one camera is unreachable, regardless of whether it is intentional or not, it will quickly deplete the batteries of all battery-operated cameras.

@TheRealWaldo
Copy link

I tried IGNORE_OFFLINE, which did stop the continuous retry on ALL cameras, but it still continues to reconnect to and stream the battery-operated cam for some reason; also seeing:

[WyzeBridge] [EVENTS] WyzeAPIError: code='1011' msg='system limit exceeded, please try again later.' method=POST path=/app/v4/device/get_event_list, cooling down.

A lot.

@mrlt8
Copy link
Owner

mrlt8 commented May 14, 2024

Do you have another instance of the bridge running? Default settings shouldn't be exceeding the rate limit.

Only thing I added was a picture entity for the snapshot to a dashboard.

is this pulling the image from the /media folder?

@TheRealWaldo
Copy link

There were no other instances. I was not even attempting to pull images.

All I was doing was moving in front of the camera and watching the logs to see what it was doing. Occasionally, I would alter the settings to see if I could get it to work, which would cause a restart.

@TheRealWaldo
Copy link

Re the picture entity; it's just pointing to the snapshot entity created by MQTT

If you view the preview from the entity itself, it throws an error (access denied). When viewed from the dashboard (had to pull this out of the generated HTML), it looks to be pulling the image from /api/camera_proxy which is the same behaviour as any other snapshot in Home Assistant.

I have not sniffed out the MQTT to do any discovery on the source beyond that, but this would be the same behaviour as other camera sources with snapshots if it was coming from the media folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants