RTSP: Flashing Wyze Cam V2 with Dafang-Hacks firmware, Blue Iris

Purpose: Better RTSP on the wyze cam (confirmed after 2 months of use!) and more features. Plus, “Dafang Hacks” firmware is open source.

Follow the official docs to flash the wyze cam v2 with dafang-hacks firmware.

Couple of tips not found in the docs:

  • I used a 32GB micro-SD flash card, fat32 formatted and had no problems
  • Chrome browser would not allow me to ignore the HTTPS SSL certificate warning (no “proceed to site” option). So I used Safari browser on Mac. UPDATE: On Chrome, you can type “thisisunsafe” to bypass the cert warning page (thanks to reader PSv).
  • Default login/password is: root/ismart12

Video options: I changed port to 554, to match Blue Iris. I set low-resolution, low-bitrate, and low-fps because my 2.4GHz wifi has a lot of other traffic:

RTSP (I had to flip video 180-degrees because my wyze cam is mounted upside-down). Note the URLs, which you’ll use with Blue Iris:

Wifi/wlan signal strength (link quality) info is great for tuning/troubleshooting the wifi link:

Camera controls (MQTT!):

Blue Iris camera settings:

If video doesn’t appear in Blue Iris, test with VLC by opening a Network Stream:

Disable switching to night mode by increasing exposure threshold from 1.2M to 2.2M:

 

So far so good.  I’ll know more after a week or two.

UPDATE 2020/08/07: Open-source firmware is working great! Wyze cam V2 is functional and reliable. Low-bandwidth settings are appropriate for the area of the house where the wyze cam is installed.

UPDATE 2020/09/18: Dafang firmware has been rock-solid 🙂 I haven’t touched the wyzecam since the firmware change and everything is working well with Blue Iris.

#

tuya-convert: BN-LINK BNC-60/U133TJ Wifi Smart Plugs

These are harder to flash OTA than other ESP8266 devices. This guide assumes you already know the normal tuya-convert process.

Final goal (July 2020): tasmota.bin 8.3.1

Run ./start_flash.sh

If prompted, answer ‘y’ (yes) as necessary to terminate dnsmasq, mosquitto, etc.

When prompted connect Android (not iOS) smartphone to vtrust-flash ssid; because iOS will disconnect from the ssid when it detects there’s no actual Internet access.

Script says: “Press ENTER to continue”

Connect BN-LINK smart plug to AC power.

WITHIN 2 SECONDS, press ENTER.

Wait 1 second (1s).

WITHIN 3 SECONDS, hold BNC-60 power button for about 7s, and release when led blinks red (blinks about 2 times). After about 2s you should see led flashing blue (fast blinking), and then after ~20s led will be steady blue.

Then script will output a row of dots that’s longer than previous row of dots:

Starting smart config pairing procedure

Waiting for the device to install the intermediate firmware

Put device in EZ config mode (blinking fast)

Sending SSID                  vtrust-flash

Sending wifiPassword

Sending token                 00000000

Sending secret                0101

................

SmartConfig complete.

Resending SmartConfig Packets

................

SmartConfig complete.

Resending SmartConfig Packets

.................................................................................

Then error (below) usually appears, and that’s OK. You may get lucky* and the error won’t appear (it’ll just proceed per normal tuya-convert process).

*It seems that doing those “WITHIN 3 SECONDS” steps (above) quickly enough is the best chance of getting lucky.

SmartConfig complete.

Resending SmartConfig Packets

.................................................................................

Device did not appear with the intermediate firmware

Check the *.log files in the scripts folder

Do you want to try flashing another device? [y/N]

After you see the error, say “n” (no) to return to shell.

Android smartphone will disconnect from vtrust-flash ssid because the tuya-convert AP was torn-down.

Disconnect BNC-60 from AC power.

You should see gwId lines in the log (this is progress):

pi@raspberrypi:~/tuya-convert $ cat scripts/smarthack-web.log | grep gwId

GET /gw.json?a=s.gw.token.get&et=1&gwId=12345678904f22bf16d3&other={"token":"00000000","region":"US","tlinkStat":{"configure":"smartconfig","time":1,"source":"ap","path":"broadcast"}}&t=7&v=3.0&sign=98765432157018e229a15811f3d99a7a

[I 200708 06:59:05 web:2250] 200 GET /gw.json?a=s.gw.token.get&et=1&gwId=12345678904f22bf16d3&other={"token":"00000000","region":"US","tlinkStat":{"configure":"smartconfig","time":1,"source":"ap","path":"broadcast"}}&t=7&v=3.0&sign=98765432157018e229a15811f3d99a7a (10.42.42.1) 46.31ms

[...]

Restart the script:

./start_flash.sh

Now, on the 2nd pass, when it prompts you to connect a smartphone to vtrust-flash ssid, DO NOT connect anything to the vtrust-flash ssid.

It says, “Press ENTER to continue”

Hit the ENTER key and then quickly plug-in the BNC-60 to AC power. Do not press any buttons on the BNC-60.

This time you’ll see:

Fetching firmware backup

with downloading progress.

and then:

Available options:
  0) return to stock
  1) flash espurna.bin
  2) flash tasmota.bin
  q) quit; do nothing
Please select 0-2:

At this point, you’re back to a normal tuya-convert flow.

Pick your choice “1” or “2”.  Eg. I’m using tasmota.bin so “2”.

and it’ll complete normally.

On the BNC-60, the red LED will blink super-fast when it is flashing tasmota.bin.

Enjoy!