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 Forcing New Firmware #786

Open
bjs-pdx opened this issue Aug 19, 2024 · 73 comments
Open

Wyze Forcing New Firmware #786

bjs-pdx opened this issue Aug 19, 2024 · 73 comments

Comments

@bjs-pdx
Copy link

bjs-pdx commented Aug 19, 2024

It looks like Wyze is forcing new firmware onto cameras. Just noticed a V2 that was changed.

What is the best way to stop this. It’s going to break things.

@ltoolio
Copy link

ltoolio commented Aug 19, 2024

What FW ver did you get forced to?

@bjs-pdx
Copy link
Author

bjs-pdx commented Aug 19, 2024

V2 - 4.9.9.3006

@bjs-pdx
Copy link
Author

bjs-pdx commented Aug 19, 2024

Here is the information from the config page:

image

@endertable
Copy link

endertable commented Aug 24, 2024

The actual setting we need is what you have in your /opt/wz_mini/wz_mini.conf file. Look for a setting:

DISABLE_FW_UPGRADE=

to see if it is true or false.

Fortunately, for the V2 cam, wz_mini still works with the latest FW, but you may want to check your V3 cams for this setting as a FW update could break things on those for wz_mini. So far, Wyze has only tried updates on my V2's not on my V3's. Although most of my V3's are on FW 4.36.10.3406 or higher. I think they are ok if you are on at least 4.36.9.139 or higher for the V3 and anything less they may try forced updates, possibly so they don't have to support so many different API calls and security purposes.

@bjs-pdx
Copy link
Author

bjs-pdx commented Sep 7, 2024

So Wyze is forcing updated firmware in order to use the cameras in the app:
IMG_1033

@dudududodododedede
Copy link

I'm seeing this too when I'm trying to view the cameras in the app
Has anyone tried rolling back to an older version of the app?

@bjs-pdx
Copy link
Author

bjs-pdx commented Sep 7, 2024

I'm seeing this too when I'm trying to view the cameras in the app Has anyone tried rolling back to an older version of the app?

You can’t rollback on iOS.

@tismofied
Copy link

So Wyze is forcing updated firmware in order to use the cameras in the app: IMG_1033

I am seeing the exact same thing 😭

@gtxaspec
Copy link
Owner

gtxaspec commented Sep 8, 2024

someone on the old firmware, try:

Please write the following in /system/bin/app.ver file and restart.

V2:

[VER]
appver=4.9.9.3006

V3:

[VER]
appver=4.36.13.0416

taken from mnakada/atomcam_tools#115 (comment)

see if it works.

@endertable
Copy link

On iOS you can also switch to another app real quick and switch back, and the box will be gone for the rest of the session.

@bjs-pdx
Copy link
Author

bjs-pdx commented Sep 8, 2024

Had to give up and accept the inevitable upgrade. Every time I tried to view a camera in the app the forced upgrade window would pop up with no way to close it. I was able to sneak past it by powering off the camera and, when I powered it back on, quickly clicking the setup gear icon. I had to reformat the SD Cards then run the update. Of course after that, no more wyze_mini_hacks.

This really sucks.

@gtxaspec
Copy link
Owner

gtxaspec commented Sep 8, 2024

@bjs-pdx you could try and downgrade, and try the fix i posted above

@bjs-pdx
Copy link
Author

bjs-pdx commented Sep 8, 2024

Not sure a downgrade is going to do anything. Wyze app checks the firmware and forces the upgrade. How does your suggested fix change that?

@gtxaspec
Copy link
Owner

gtxaspec commented Sep 8, 2024

the fix physically changes the firmware version reported by the device. icamera reads from that file to tell the fw ver

@bjs-pdx
Copy link
Author

bjs-pdx commented Sep 8, 2024

Okay...I see. But still don't know what breaks in the Wyze app when running older firmware. They are forcing this for some hidden reason but can't tell what that may be. This also may be the future of constant breakage.

@bjs-pdx
Copy link
Author

bjs-pdx commented Sep 8, 2024

Just to be clear, I think this project is great. I’m just done with Wyze. Seems like every month or so they make a change and things break. Tired of fighting a losing battle. Going to switch to Amcrest for my camera needs. Much more reliable.

@gtxaspec
Copy link
Owner

gtxaspec commented Sep 8, 2024

You can convert the wyze devices to a standalone firmware we've been working on... www.thingino.com. just FYI.

@bjs-pdx
Copy link
Author

bjs-pdx commented Sep 8, 2024

Not really something I want to do. Liked the idea of added functionality without losing the native functions.

@cad1231
Copy link

cad1231 commented Sep 8, 2024

someone on the old firmware, try:

Please write the following in /system/bin/app.ver file and restart.

V2:

[VER]
appver=4.9.9.3006

V3:

[VER]
appver=4.36.13.0416

taken from mnakada/atomcam_tools#115 (comment)

see if it works.

That file appears to be read-only. How can I write to it?

Thanks!

@endertable
Copy link

You can’t on the V3 camera, but you should be able to alter the file that is in the /configs directory. Supposedly, that is the file that I camera reads…

@cad1231
Copy link

cad1231 commented Sep 8, 2024

I tried changing /configs/app.ver - it doesn't do anything, just reverts to the old app.ver (even in /configs) on reboot.

@cad1231
Copy link

cad1231 commented Sep 9, 2024

@gtxaspec do you have any other ideas? The thread on atomcam-tools that you linked said that the person had to update the firmware for this trick to work. I upgraded wz-mini-hacks using the shell script, but changes to /configs/app.ver still don't stick after a reboot. I have the wyze cam v3. Thanks!

@gtxaspec
Copy link
Owner

gtxaspec commented Sep 9, 2024

i'll have to setup a wyze device ( i dont currently have any setup with stock firmware ) I'll try to restore one soon and test

@sideup66
Copy link
Contributor

sideup66 commented Sep 9, 2024

Note that we should try to find out WHY its updating. I asked in the discord and WyzeJason told me it was due to a bug? (what bug im not sure)? However, if it is a certificate change wyze did on their end and the newer apps potentially have newer certs where the old will expire soon, that may be the reason for the force. I did upgrade as well as I needed things functioning and now note that a change im noticing is that wyze seems to be trying to use a hardcoded dns server and trying to bypass dnsmasq. Im seeing strange behavior where the local app is pinging api.wyze every minute. My DNAT rule at my router is successfully dnating this to pihole, but it is strange behavior regardless.
I took a look at wz_mini to see what can be done, and know I have a firewall present, which I tried to configure to simply dnat the traffic to the local dnsmasq instance, but NAT doesnt seem to be present in the kernel and isnt addable via lsmod by what I can see. Might be something to look into if we need to upgrade it.

@sideup66
Copy link
Contributor

sideup66 commented Sep 9, 2024

Figured out the dns issue. Seems like wyze took a page out of our book :) and now runs dnsmasq by default on the device. Ours fails because the address is bound by their instance, plus on the newest firmware the build of dnsmasq in firmware is newer than the one present on wz_mini. I was able to address the DNS noise issue by killing the watchdog process they run for it + dnsmasq, running the copy as in the init file for resolv.conf, then starting the Wyze copy of dnsmasq with our config file (using -C argument.) after work ill submit a PR tonight with the fix so it can be integrated into the tree. Can include an if statement easily enough to check the existence of the system dnsmasq and if not present, simply use the wyze_mini one.

@cad1231
Copy link

cad1231 commented Sep 9, 2024

i'll have to setup a wyze device ( i dont currently have any setup with stock firmware ) I'll try to restore one soon and test

Thanks!

@sideup66
Copy link
Contributor

See here for a updated dnsmasq script that is compatible with the newer firmware beyond 4.36.9.139. Also sent @gtxaspec a PR for upstream so its included here.
#789

@endertable
Copy link

@sideup66 hi, what FW version did you upgrade to that had all these changes? Does the newer firmware allow wz_mini functionality again?

@sideup66
Copy link
Contributor

I am on 4.36.13.0416. Aside from dnsmasq, I am not sure if the way firmware is pushed may have changed. That should be investigated as well.

On the newer versions, you won't have RTSP still but wz_mini still has root shell on the device. I am simply updating the Dnsmasq script in my PR to utilize the built-in dnsmasq binary from wyze if it exists, it seems more up-to-date currently than the one present in wz_mini and I included logic for both, so the script should be able to detect one way or the other and effectively let you configure dnsmasq with our configuration file.

@qip
Copy link

qip commented Sep 11, 2024

To continue view my wyze V3 on the app, I've the following quick fix:

In /media/mmc/wz_mini/etc/rc.d/S10firmware, add:

echo -e "[VER]\nappver=4.36.13.0416" > /opt/wz_mini/tmp/patched_app.ver
mount --bind /opt/wz_mini/tmp/patched_app.ver /system/bin/app.ver

somewhere between if [[ "$DISABLE_FW_UPGRADE" == "true" ]]; then and else.

After that, restart the camera.

This fix is effective for immediate needs (I just want to check if my package is delivered on my phone right now), I guess it could be better to move this code to rc.local.d or somewhere more appropriate.

@sideup66
Copy link
Contributor

Wanted to report my final findings regarding this. As a person who "jumped the fence" and went to the newer wyze firmware....

After upgrading, I initially had a weird issue where my camera's record light would typically get stuck after recording an event. Was able to fix that by resetting the camera. I learned that well, after the firmware jump there were multiple reports of weirdness from other v3 owners who were able to fix it by performing the reset. Wyze mini still works, albeit without any of the RTSP features, but if you need root shell to run services and effectively make the experience of it not suck, it works well :).

The other interesting thing of note is that in the newer firmware (my v3 is on 4.36.13.0416 at the time of this writing). I notice that wyze actually took a page from our book, and added a local dnsmasq server on the camera. That build is at 2.88 while the wz-mini build is 2.86. Not a HUGE difference but a slightly newer version. Therefore, I had the update merged to determine whether the onboard dnsmasq was present and restart it using the wz-mini config rather than its builtin config if the local dns is enabled. otherwise, use the wz-mini's build.

One thing of note in that fix is that the initial 3 second setting i pushed with the commit might be too short. If needed, I can submit another PR pushing it out to 5 seconds, or even 10 if preferred. But its such a small change if Gtxaspec wants to do it im fine with that also. Or maybe we come up with a faster way to do it. Also, I would suggest makign the firmware spoof a separate feature from blocking firmware updates. In my own setup, I am using the firmware update block as given Wyze's history of messy updates, id rather not update again unless forced and/or a major breaking bug occurs to the device but rather not spoof the firmware version, just incase there is a change in the way cloud is communicating or functioning with my device and that spoofed version throws things off....

At the time of this report my camera seems stable.

Few TLDR notes.

  1. if you DO decide to upgrade the firmware to the new version.... DO IT LOCALLY. Download the version you want, put it on a blank microsd and do a local flash. the cloud update will take you through ~3 flashes before the final. Also, a local update will be the most reliable.
  2. IF YOU DO UPDATE.....RESET your device after, then set it up again in wyze. The firmware in this seems to be a more drastic jump in their setup and may not place nice with the older configuration. In my experience, it just seemed to clear up a lot of weirdness in my camera and things are more stable in my experience.
  3. after updating, get the latest wz_mini firmware update so if you are using dnsmasq locally on the device you can take advantage of it. By default the update does break that script.

@dasb00ter
Copy link

dasb00ter commented Oct 1, 2024

So I have few pan cam that i had firmware update disable= true. It seems to have blocked the update but I have the nag in the wyze app(which my wife uses...sigh). I have run update-run.sh and it looks as if it has updated mini hacks. Is there something I need to do so this works as I still get the nag. I guess first how do tell if I have in fact had a successful run of upgrade-run.sh? Is there a config setting for "spoofing the firmware"

Thanks

EDIT: upgrade-run.sh worked on 5 out of 6 cams vs 2's and original pans. One required reformatting and reaplying the firmware I had saved directly running upgrade-run from that and deleting it and relinking it to the wyze app. The fix does appear to be working for me....and my wife is happy for a bit longer

@sideup66
Copy link
Contributor

I plan to make a followup PR soon. Im testing out some further changes I made to the dnsmasq script. It seems something from the wyze app side kept trying to overwrite the change from the script, I was able to block this by remounting the bind to make it read-only.

Im testing due to an unrelated issue with the LED not functioning correctly on mine. I think I solved it, but im trying to be sure.

Only other follow up from all of this I am going to send a PR for is to break out the firmware spoofing potentially into its own independent script that can be controlled from the conf file. Not a fan of it being enabled with fw disable as some cams may be on newer firmware, thus breaking their reporting and potential cloud communications.

@sideup66
Copy link
Contributor

Made PR #801 with my aforementioned fixes.

@dasb00ter
Copy link

I plan to make a followup PR soon. Im testing out some further changes I made to the dnsmasq script. It seems something from the wyze app side kept trying to overwrite the change from the script, I was able to block this by remounting the bind to make it read-only.

Im testing due to an unrelated issue with the LED not functioning correctly on mine. I think I solved it, but im trying to be sure.

Only other follow up from all of this I am going to send a PR for is to break out the firmware spoofing potentially into its own independent script that can be controlled from the conf file. Not a fan of it being enabled with fw disable as some cams may be on newer firmware, thus breaking their reporting and potential cloud communications.

I had an interesting thing happen with one camera(vs2). It was fully functional but I had the blue led in the back flashing. It was doing so even with the light disabled in the app. I think I rebooted and it was fine. It was just a problem BC it's in a dark area and was bothersome to somebody

@sideup66
Copy link
Contributor

sideup66 commented Oct 19, 2024 via email

@ericloyd
Copy link

I know I'm coming late to this party, but I only recently discovered how great wz_mini is for V3 cams and so I bought two of them to use for livestreaming, monitoring and generally doing public outreach for astrophotography. Originally, I flashed the beta RTSP firmware from Wyze, obtained from Wayback Machine. It worked great with my two test cams on 32GB cards. I decided to get six more cams to do a full roll-out of setting up live streams for the telescopes (both looking at the rigs and looking at the sky). I purchased 128GB cards to go in all those cams. I use RTSP to stream all that to OBS that then streams to YouTube and/or Twitch.

Then I found out that I had to ugprade the firmware to solve the micro SD card corruption problem. I went to 4.36.9.131 and then .139 to make sure I didn't go past the RTSP barrier.

Now I see, like everyone else, that the app is forcing me to ugprade further. Honestly, I don't care. I don't use the app, I don't need its features, and if I do, I'll use Home Assistant. But I just downloaded the latest wz_mini which seems to have the "echo -e "[VER]\nappver=4.36.13.0416" > /opt/wz_mini/tmp/patched_app.ver" line in S10firmware, and yet the Wyze app is still telling me I should update.

While I don't need the app, it's faster to check on cam stats there than it is to pop up an RTSP stream (though I could use VLC for that on the Android phone). Do I need to do something else to have this fix work for convincing the app that I don't need to upgrade? wz_mini web page reports the .0416 firmware so it looks like it's working, but the app still complains.

Also, the whole point of wz_mini for me was the RTSP streams. If I bite the bullet and push past the upgrade barrier, I know I lose that. Would I still be able to pull a live stream via the Go2RTC server, or does that rely on the RTSP under the hood?

Sorry for the questions, I'm just trying to make sure I didn't make a $400 mistake with all these cameras and cards.

@sideup66
Copy link
Contributor

sideup66 commented Oct 24, 2024 via email

@ericloyd
Copy link

Okay, thanks for that. I was unaware of the other firmwares. I took a quick look, but it does not seem like they do the recording that the Wyze firmware does. Which is something I like; being able to go back in time to look at a specific event/time is great for monitoring remote telescopes.

Honestly, I'd be fine with just using the .139 firmware to get the RTSP and then wz_mini to get the streaming capabilities and other things that it provides, but now I have a new problem - the camera keeps crashing on me. It's like it ran fine on a 32GB test microSD card with the old beta RTSP firmware from Wyze, but now that I've got the .139 on it, on a 128GB card, it's just completely unstable.

Maybe I'll return all these 128GB cards and get 32GB cards instead. They seem to work with the old RTSP firmware just fine but man, what a pain.

@sideup66
Copy link
Contributor

sideup66 commented Oct 24, 2024 via email

@sideup66
Copy link
Contributor

sideup66 commented Oct 24, 2024 via email

@ericloyd
Copy link

Yes, wz_mini is definitely loading. I have monitoring software that SSHes to the box and checks to make sure that /opt/wz_mini/log is writeable. That's how I found the corrupt microSD card problem. I'm actually going to see if I can find the 4.49.1.47 firmware, since the person on the microSD corruption thread said that solved their problem.

And while I could move images around with new firmware, if I can't stream with it, then it's useless. That's the whole point - to be able to stream these things to Youtube and Twitch for real-time outreach in the field of Astrophotography.

@ericloyd
Copy link

Wait. I can't go to 4.49.1.47, because that breaks the RTSP barrier. I'm going to downgrade from .139 to .131 and see if that solves my crashing problem.

@gtxaspec
Copy link
Owner

4.49.x is for the pan, not for the v3, FYI.

@ericloyd
Copy link

Thanks. Just put .131 on and let it run for a few minutes. No crashes. Now I've got wz_mini on and just first booted. Waiting to see if it crashes or gives me an sd card corruption.

@ericloyd
Copy link

So far, with just RTSP enabled (low res for now) and the web interface but no Go2RTC, the 4.36.9.131 firmware is holding steady without crashes and without sd card corruptions. If this works, I may just lock it here and call it a day.

@gtxaspec
Copy link
Owner

if you have no interest in using the app, you may want to switch to thingino, which provides RTSP too. There's other folks interested in astronomy which are using it.

@ericloyd
Copy link

I saw that briefly, but wasn't sure if it still did the automatic recording that the Wyze app does, and I have no clue on how to figure out what my specific SoS and Wifi controller is. So I punted and came back to this.

@ericloyd
Copy link

Okay. I spoke too soon. Still crashes doing nothing other than web and low-res RTSP. I guess it's time to look into thingino if I can figure out my specific hardware.

@sideup66
Copy link
Contributor

sideup66 commented Oct 24, 2024 via email

@ericloyd
Copy link

Hm. Did not do resets. Will try that before abandoning Wyze ship.

@ericloyd
Copy link

No improvement. It seems that I can spend hours more trying to figure this out. Just finished flashing Thingino on my first cam. Seems to work. Thanks!

@tismofied
Copy link

whats the cleanest way to update to latest while keeping the config settings?

@ericloyd
Copy link

ericloyd commented Nov 3, 2024

Switch to thingino and never look back.

@tismofied
Copy link

Switch to thingino and never look back.

Thought about it but does it support poe adapter UCTRONICS?

@ericloyd
Copy link

ericloyd commented Nov 4, 2024

Thingino is a custom firmware that turns your Wyze cam into a full-fledged Linux computer. I can't speak to a specific PoE adapter, but you can start at https://github.com/themactep/thingino-firmware/wiki/Features, which does say "USB Ethernet Adapter Support: Extend network connectivity with external USB Ethernet adapters, including PoE adapter support." So I'm guessing "yes."

@tismofied
Copy link

Thingino is a custom firmware that turns your Wyze cam into a full-fledged Linux computer. I can't speak to a specific PoE adapter, but you can start at https://github.com/themactep/thingino-firmware/wiki/Features, which does say "USB Ethernet Adapter Support: Extend network connectivity with external USB Ethernet adapters, including PoE adapter support." So I'm guessing "yes."

Thanks for that. The only reason I asked is because I wanted to add the 5 wyze cams I have to each corner of the house through the attic and poe is a must for me. I rather not have to deal with powering each camera with a power adapter.
I tried wz_mini for few days but with the latest stunt wyze pulled forcing eveyone to update broke everything for me with crashing all the time.
I am a point of throwing wyze through the shredder and getting amcrest or reolinks and call it a day. Lol

@ericloyd
Copy link

ericloyd commented Nov 5, 2024

Watch https://www.youtube.com/watch?v=SX637mrp0R0 and install Thingino and you will never look back.

@sideup66
Copy link
Contributor

How is this working out for folks? Has anything broken on their device since adding the firmware spoof? just curious as I have tried updating but continually having led status problems, despite the camera working fine.

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

No branches or pull requests