it seems that you are using Python 2.x, WyzeUpdater
needs Python 3.x instead
Hmm. I installed 3.8 for windows and I see that is whatâs installed however if I just type python in cmd window it shows 2.7. Iâll try a reinstall and see if that gets it up to the correct version.
On windows try running:
python3.exe
you can just use the full path to the python.exe
you want to run, Common places to have it installed are:
C:\Python27\python.exe
C:\Python38\python.exe
C:\Users\<your-user>\AppData\Local\Microsoft\WindowsApps\python.exe
and many more, depending on which installer you used.
If in doubt, you can typically find which version it is by running:
path-to\python.exe --version
Also, in a recent version of Windows, you should be able to run this in a command-line:
where python
and get the path of the python.exe instance that will run if you just invoke it with python
If you feel curious and want to find all the different python.exe
that you could possibly have in your drive, running this in a command-line will take a while to scan the entire drive but will give you all those paths:
dir /s /b \python.exe
Iâve debugged this a bit with console. It appears they have modified the mount point from /media/mmcblk0p1 to /media/mmc. After modifying upgradrun.sh and flash_bootloader.sh to reflect /media/mmc I was able to successfully flash the bootloader (re-tar as specified). After the bootloader was flashed I was then able to apply the Wyze RTSP firmware using the standard demo.bin (push button at boot method).
Note: This is my experienceâYMMV!
Tried this but unfortunately did not work, unpacked the tar file and modified the entries as suggested, repacked the file and tried the upload. Got as far as trying to serve up the new firmware and then just sat there drawing dots as before. Learning more about Python every day
Did you see the camera making the HTTP GET request to your machine running wyzeupdater? You must at minimum see the GET request; otherwise, the update package (tar file) is not even being processed on the Wyze cam.
For example, if you are running wyzeupdater on Windows and the Windows Firewall service is running (blocking the port you specified in the wyzeupdater command) the camera will not be able to access the webserver thatâs started by wyzeupdater. This also applies even on linux if you are running a host-based firewall. If you have a more complex network with vlans and firewalls be sure the hardware firewall is not blocking the HTTP GET request from the camera. There are other wifi-security scenarios that you need to check for. For example, if your wifi router or access-point prevents communication to other devices on your network (i.e. wifi isolation) then the camera will not be able to reach the webserver started by wyzeupdater. You really need to see the HTTP GET almost immediately after running the wyzeupdater update command.
Iâm getting the following errors trying to run the wyzeupdater, any ideas?
This is directly after it asks me to enter my username and password:
C:\WINDOWS\system32>C:\Python38\python.exe C:\Users\username\Downloads\WyzeUpdater-master\wyze_updater.py list
INFO:root:No saved credentials found, logging in with username/passwordâŚ
Please enter the account name:username (using my actual username here)
Please enter the password:password (using my actual password here)
Traceback (most recent call last):
File âC:\Users\username\Downloads\WyzeUpdater-master\wyze_updater.pyâ, line 325, in
creds = wyze_login(args.user, args.password)
File âC:\Users\username\Downloads\WyzeUpdater-master\wyze_updater.pyâ, line 59, in wyze_login
if not rsp[âaccess_tokenâ]:
KeyError: âaccess_tokenâ
I was unable to successfully run the fix-pan since Iâm on FW 4.10.6.156, however I was able to authenticate and didnât receive the errors you got. Few thoughts:
- If you have 2FA enabled, this might be the cause?
- Is requests installed?
python.exe -m pip list - You are running it from system32, maybe try directly from the WyzeUpdater-master folder. It was mentioned above that this makes a difference when using https.
Thanks for the suggestion, I tried again but am still getting the same error. Iâve tried playing with the script itself but that makes it worse so I downloaded the script fresh again and am still getting the same error:
C:\Users\username\Downloads\WyzeUpdater-master>C:\Python38\python.exe wyze_updater.py list
INFO:root:No saved credentials found, logging in with username/passwordâŚ
Please enter the account name:username
Please enter the password:password
Traceback (most recent call last):
File âwyze_updater.pyâ, line 325, in
creds = wyze_login(args.user, args.password)
File âwyze_updater.pyâ, line 59, in wyze_login
if not rsp[âaccess_tokenâ]:
KeyError: âaccess_tokenâ
Iâm stumped. The error output looks like there might be a read / write issue on the file? Iâm running CMD as an administrator Iâm not sure what else could be wrongâŚ
I was able to recreate your issue by using an incorrect Username/Password:
C:\Temp\WyzeUpdater-master>python.exe âC:\Temp\WyzeUpdater-master\wyze_updater.pyâ list
INFO:root:No saved credentials found, logging in with username/passwordâŚ
Please enter the account name:fake@fake.com
Please enter the password:incorrectpassword
Traceback (most recent call last):
File âC:\Temp\WyzeUpdater-master\wyze_updater.pyâ, line 325, in
creds = wyze_login(args.user, args.password)
File âC:\Temp\WyzeUpdater-master\wyze_updater.pyâ, line 59, in wyze_login
if not rsp[âaccess_tokenâ]:
KeyError: âaccess_tokenâ
It is possible that your Wyze password contains a character which the script doesnât like. You might want to try changing your Wyze password to something simple. I verified that % and & work, so you can use them as a special character if needed.
Edit: You will also want to delete the WyzeUpdater-master\.tokens file if you change your password, otherwise it will retain your previous entry.
Omgosh⌠what a dummy. Thanks so much @jmach314 I had to double check and I had a capital on my password that didnât need to be there.
Unfortunately it looks like my pan already updated to 4.10.6.156 so I may be out of luck to sideload the firmware until they update the firmware with a flash fix oh well, small victories! Thanks again!
Youâre welcome, Iâm glad I was able to help. Hopefully someone finds a method to get this to work if FW 4.10.6.156 or greater is installed.
Check comment by riorescue above, he found a modification to the payload that appears to make it successful even with the latest FW
Thanks @sa-pr and @riorescue, somehow I missed that. I was able to apply the fix on my Cam Pan with FW 4.10.6.156. Below are the modified 4.10.6.156 steps I used if it helps anyone else:
- Opened fix-pan.tar using 7Zip
- Navigated to fix-pan.tar\Upgrade\
- Modified upgradrun.sh and flash_bootloader.sh with the new mountpoint: from
/media/mmcblk0p1
to/media/mmc
- Saved directly into the archive
- Ran:
python wyze_updater.py update -p 18080 -d <MyMAC> -f "<FirmWarePath>\fix-pan.tar"
- My camera never rebooted, however the fix was applied. I waited 5 minutes after getting the below message:
192.168.2.184 - - [16/Sep/2020 11:07:24] "GET /firmware.bin HTTP/1.1" 200 - Press Ctrl+C when all the updates are done...
- After waiting 5 minutes, I checked the SD Card and confirmed in the wyze-cam-pan-fix.log that the bootloader was replaced
Iâm now able to manually update the FW using the demo.bin and the push button method.
Hi @jmach314, did you ctrl+c to end the upgrade or did you just take the SD card out? Iâve tried running the command a few times (I get the same message you do that the update is running), but Iâm not seeing a log file in the root directory.
Hi @im.mjb83, I modified my previous steps, main changes are in step 1 and step 8. My best guess would be the router or firewall is blocking port 18080.
- Added a port 18080 forward rule to my routers and turned off Windows Firewall temporally
- Opened fix-pan.tar using 7Zip
- Navigated to fix-pan.tar\Upgrade\
- Modified upgradrun.sh and flash_bootloader.sh with the new mountpoint: from
/media/mmcblk0p1
to/media/mmc
- Saved directly into the archive
- Ran:
python wyze_updater.py update -p 18080 -d <MyMAC> -f "<FirmWarePath>\fix-pan.tar"
- My camera never rebooted, however the fix was applied. I waited 5 minutes after getting the below message:
192.168.2.184 - - [16/Sep/2020 11:07:24] "GET /firmware.bin HTTP/1.1" 200 - Press Ctrl+C when all the updates are done...
- After waiting 5 minutes, I ctrl+c to end the upgrade. I unplugged the camera and removed the SD card. I checked the root of the SD Card and confirmed in the wyze-cam-pan-fix.log that the bootloader was replaced.
Hmm. I just cannot get this to go. I tried opening up port to the IP of the camera, and then the computer acting as server, and then both at the same time and I get all the other steps done but Iâm not getting a log file after 5 minutes and a ctrl + c. Windows firewall is disabled, I get no type of error message or any feedback anything is incorrect.
Hi Riorescue, any thoughts of what else to do if I am seeing the âGET /firmware.bin HTTP/1.1â 200 -â message? @jmach314 modified his command line to use port 18080 which Iâve done as well but Iâll let the updater run for 5, 10, even 20 minutes and it just keeps spinning those dots in the dos prompt and when I unplug the camera and remove the SD card, no log file.
@im.mjb83 Iâve heard of various problems with SD cards if not using a brand size thatâs commonly used with these cameras. Is your SD card 32GB and formatted FAT32? If you are comfortable with shell scripts you can extract the .tar and use a simple echo command to the SD card without running the boot loader update. A simple shell script would help you identify where the failure is occurring.