How To Connect A Wyze Camera
Setting up Shinobi and a Wyze G2 Photographic camera
I wanted to set up a security camera outside, just I didn't want to be dependent on an outside cloud service - if my internet goes out, I don't desire to lose my ability to record footage.
Wyze cameras are nice and cheap, and you lot tin can reflash them to support RTSP in addition to streaming to the Wyze deject.
Setup
Prerequisites
- A camera that supports the RTSP protocol (I'm using a Wyze G2)
- A spare microSD carte du jour for reflashing the Wyze G2 camera
- An x86 auto running docker. As of 2021-03-14, Shinobi only publishes an amd64 version of the shinobisystems/shinobi docker image.
- A reasonable amount of disk infinite - the Wyze G2 I'chiliad using generates effectually 330 megs per hour of stored 1080p video.
Camera Setup
I wanted a camera that supported the Real Fourth dimension Streaming Protocol (RTSP) because that is an open standard which works with a wide variety of tooling, both Open Source and commercial.
I looked at a diversity of camera options, and Wirecutter's All-time Wifi Dwelling house Security Camera listed the Wyze G2 as runner-up. It and the showtime pick (Eufy 2K Indoor cam) both support RTSP, but the Wyze was in stock (and half the price at $26) so I went with it.
I did have to reflash the Wyze G2 to enable a beta firmware that supports both Wyze'due south cloud and RTSP. Conveniently, it can stream to both simultaneously, and so I can watch the streams with the Wyze app when away from dwelling and still record everything to my homelab cluster.
Reflash the Wyze Camera
Wyze at present has a beta firmware that simultanously supports both their cloud offering and RTSP. Note that they've explicitly stated that the RTSP branch volition go features later than the mainline firmware. I personally don't care, merely information technology is something to consider if you're going to want to use bleeding edge features.
The official instructions for reflashing the G2 photographic camera are on the Wyze Cam RTSP page and articulate, so I'm not going to rehash them here. Y'all'll need a FAT32 formatted microSD card to practice the firmware reflash.
Later you reflash the camera, you'll demand to configure a username/countersign combination for the camera stream using the Wyze phone app.
Before you configure the photographic camera, I recommend that you go into your router's configuration and assign the photographic camera a static IP so that your DVR doesn't lose the stream connexion when the camera or router are rebooted. You can likewise hardcode an IP address into the G2 camera's configuration, but I prefer to go on all the static IP assignments for my network in one place, the DHCP configuration on my router.
You'll end upwards with a rtsp url that looks like rtsp://username:password@192.168.1.CAMERAIP/live
.
DVR Setup
I don't use any IOT devices that require a cloud service to part. In this example, I especially do not desire to be unable to record security footage just because the internet is downwards, so I set up shinobi as a local DVR to tape my security footage.
Starting time shinobi
I'm running shinobi in a docker container. Equally of 2021-03-14, at that place is only an AMD64 build of this docker image so I'chiliad running it on the an Intel machine in my homelab cluster.
Here'south a shinobi-kickoff script:
#!/usr/bin/env bash # # Outset shinobi # # Copyright 2021, Joe Cake <jpb@unixorn.internet> # # License: Apache ii.0 SHINOBI_D = ${ SHINOBI_D :- '/data/shinobi' } set up -o pipefail if [[ -n " $DEBUG " ]] ; then set -x fi for dvr_d in config customAutoLoad database plugins video do mkdir -p " $SHINOBI_D / $dvr_d " washed exec docker run -d -p 8080:8080 \ --name = 'shinobi' \ -five ${ SHINOBI_D }/config:/config:rw \ -v ${ SHINOBI_D }/customAutoLoad:/home/Shinobi/libs/customAutoLoad:rw \ -v ${ SHINOBI_D }/database:/var/lib/mysql:rw \ -five ${ SHINOBI_D }/plugins:/plugins:rw \ -v ${ SHINOBI_D }/videos:/home/Shinobi/videos:rw \ -v /dev/shm/Shinobi/streams:/dev/shm/streams:rw \ -5 /etc/localtime:/etc/localtime:ro \ -5 /etc/timezone:/etc/timezone:ro \ --restart ever \ shinobisystems/shinobi
Run this with SHINOBI_D=/path/to/local/dvr/files shinobi_start
and it will create any missing required directories for you and showtime shinobi.
Configure shinobi
First, set upwards a new admin business relationship
- Login at http://your.shinobi.server:8080/super with username admin@shinobi.vido and password admin
- Create a new admin account
- Don't forget to reset the countersign for the admin@shinobi.video account!
Add the camera
- Login at http://your.shinobi.server:8080
- Click on the + icon in the toolbar at the top of the folio
- Set up way to record
- Change the proper noun to something human friendly like "Mailbox Camera"
- Set input type (in the connection section) to
H.264 / H.265 / H.265+
- Set the full URL path to the rtsp stream url you got from the camera
- Optionally set Skip Ping to Yes
- Set up Stream Blazon to
HLS (includes audio)
- Set Record File Type to
MP4
- Set Video codec to
copy
- Set Audio Codec to
Car
- Save
You can optionally set retention times for the camera data.
It took virtually xxx-45 seconds earlier my camera stream was visible in shinobi.
Source: https://dev.to/unixorn/setting-up-shinobi-and-a-wyze-g2-camera-5bh8
Posted by: lillystuaque.blogspot.com
0 Response to "How To Connect A Wyze Camera"
Post a Comment