-
-
Notifications
You must be signed in to change notification settings - Fork 254
Wyze
This guide documents how to set up Wyze Cameras with the Dafang-Hack mod to enable motion alerts and RTSP streams.
- Install the Scrypted MQTT Plugin and enable the MQTT Broker.
It should be noted that as of Some of the more recent Wyze Cam firmware releases, you will not be able to flash the firmware without a bit of trickery BEYOND the recommended procedure. I would recommend heading to the Dafang-Hacks repo and pulling a FULL copy from the page. In there, you will find older firmware under /firmware_original/ directory for your camera. The older the better in this case. You can also use the Way Back machine to go to Wyze's support pages and pull and old firmware. This can be mixed though.
How to flash. Original source here
- Take the micro SD card you wish to use and format it to FAT32 SPECIFICALLY. Other formats won't work, so its suggested you use this. If your SD card is large (larger than 4gb) I would suggest either finding a smaller one, or you COULD partition a small bit of it. This latter method may not work though.
- Head over to their GitHub and clone the full repository. You can do it as a .zip file as we will need the whole thing. Be sure to extract it.
- Next, I would head to the install guide page and reference Step 1. They will have a CFW binary for YOUR camera. Grab it and extract it. Then name it to
demo.bin
. - Place the
demo.bin
file to the root of the SD card. This SD card CANNOT have any file (including the hidden macOS ones). Make sure they are deleted outright, and trash emptied. - Remove the cable from your camera and insert the card.
- IMPORTANT: while HOLDING the setup button, insert the USB cable and continue to hold that button for 10 seconds.
- Wait 3-5 minutes. Wyze Cam Pan models will move when done, but for static cameras, you will need to wait the full length. At the end of the wait unplug the camera and remove the card.
- Next, we need to copy everything from inside the
firmware_mod
folder on our cloned repo to the root of the SD card. Then we need to make a few duplicate file's and rename them. - On the SD card, duplicate
config/wpa_supplicant.conf.dist
and rename the NEW filewpa_supplicant.conf
- (For those not using reserved IP addressed on their router) Take the file at
config/staticip.conf.dist
, duplicate it, and rename it tostaticip.conf
- Open
wpa_supplicant.conf
and give the proper SSID and password for your network. Make sure they are in quotes and spelled EXACTLY. Forkey_mgmt
, ONLY change it if you need too. For everyone else,WPA-PSK
(WPA2) is totally fine. - Open the
staticip.conf
file and make sure you put in the DESIRED IP address and subnet mask. You dont have to make this change if you set the reserved IP on your router. (MAC address is on the camera body). The format is192.168.x.x net mask 255.255.255.0
as an example - Remove the card, insert it into the camera and power it on. Then, head to your browser and enter the IP address of the camera. The default username is
root
and passwordismart13
. It is suggested you change these as anyone can look these up.
Additional issues with flashing can be troubleshooted on their GitHub or looked up on their issues tab.
- In the Dafang-Hacks web ui of your camera, go to the gear icon located in the top navigation bar then network services.
- Enter the ip address of Scrypted. The default server port is 1883. If you didn't set up a user id and password in your MQTT plugin, you can leave those fields blank. Set your Location and Device to whatever you'd like. I used "Home" for location on all my cameras and whatever room the camera is in as the device name, i.e. "Garage".
- Ensure that MQTT notifications and Motion Detection are enabled, they may not be by default.
- Go to gear icon, camera, video, format. The settings I use which give me reliable streaming are: H264, 1280x720, 299kbps, FixedQp, 15FPS. This should allow you to stream through Scrypted without transcoding (copy).
- Community reports also indicate H264, 1280x720, 2000kbps, VBR, 15FPS works well.
- Go to Audio, change the audio format to MP3. This will further prevent any streaming issues.
- Go to the wrench/screwdriver icon, services. Ensure that "MQTT Live Status Updates" control is set to start and autostart is set to on. I believe these are already activated by default.
- Go to gear icon, system, properties. Set your http root password. (ID should be "root" by default.) This is supposed to set your password protection for dafang's web ui, but I can't remember if I ever have been asked to enter my password. This will be used for the snapshot url later in Scrypted.
- Go to gear icon, camera, video, network/security. Set your user id and password. These will be used for your rtsp stream later in Scrypted.
- In the Scrypted web ui, go to the plugins page and click "Install Plugin". Install the following plugins: mqtt (should already have this), rtsp, rebrebroadcast, and homekit.
- From the plugins page, open the mqtt plugin, and type the name of the device into the "Add MQTT Custom Handler" field inside the "Settings" panel. Then click the green paper airplane icon to add it. Click on your new device which should now be showing in the "Providing Things" panel.
- In the "MQTT Handler" panel, I replaced all of the default code with:
createMotionSensor({
topic: 'motion',
when: ({text}) => text === 'ON',
delay: 10
})
- Set your device type to "Sensor".
- Within the "Settings" panel, for the "Subscription URL" field enter your mqtt url: mqtt://ip.address.of.pi/Home/Garage/
- Within the "Integrations and Extensions" panel, make sure the "Homekit" checkbox is NOT checked. The motion sensor will be integrated with the camera later.
- From the plugins page, open the RTSP Camera Controller plugin and add a new camera. In the "Settings" panel type the name of your camera and click the green paper airplane icon to add it. The new camera should be in the "Provider Things" panel.
- In the "Integrations and Extensions" panel, ensure the rebroadcast plugin and homekit checkboxes are checked.
- In the "Settings" panel under "General", enter the username and password you used in step 8. Make sure you click the green paper airplane icon after each field is filled to save that particular field.
- For snapshot url use: http://root:password_from_step7@ip.address.of.camera/cgi-bin/currentpic.cgi
- For RTSP Stream URL use: rtsp://ip.address.of.camera:8554/unicast This field won't display a green paper airplane icon for saving. Instead click the "Save RTSP Stream URL" button.
- Under "Rebroadcasting: Stream 1", "Audio Codec Transcoding", select "MP2/MP3 Audio".
- Under "Homekit", "Linked Motion Sensor", select the mqtt motion sensor you created in step 10.
- The remaining settings I left as default.
- You might need to restart scrypted (in settings) to ensure everything is working.
- From the plugins page, open the Homekit plugin. In the settings panel, you can see the pairing info needed to add Scrypted to homekit.
- In the "Homekit" panel, click console button to view the homekit QR code.
Scrypted Docs have moved. Please visit https://docs.scrypted.app.