Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / containers / docker

The Fastest Way to Install Home Assistant on Windows and Add a Wyze Cam

4.94/5 (7 votes)
9 Feb 2023CPOL7 min read 8.4K  
Here is the bare bones, fastest way to install Home Assistant on Windows, and add a Wyze Cam v3 to it.
This article gives a step-by-step guide on installing Home Assistant Windows Portable and integrating a Wyze Cam v3 using docker-wyze-bridge with Docker Compose.

Image 1

In my previous article, I demonstrated How to Install Home Assistant Container on Windows. But there was a lot going on in that article; Portainer, Agent DVR, an MQTT Broker. So here is the bare bones, fastest way to install Home Assistant on Windows, and add a Wyze Cam v3 to it.

One important note about this, is that Home Assistant Windows Portable (HassWP) is not maintained by the Home Assistant developer team. It's a GitHub project by AlexxIT that does seem to be maintained, but nonetheless, it means some components/integrations may not work. In addition, Home Assistant Windows Portable (HassWP) is similar to Home Assistant Container, in that, it does not come with Supervisor or Addons, so everything you use in Home Assistant must be added as an integration. You can do a lot of things with integrations, it's just more work.

Requirements

This article assumes that you are using Windows (10), have Docker Desktop installed, and a Wyze Cam v3 set up with the RTSP firmware. I actually read that you don't need the RTSP firmware for your Wyze Cams for this setup to work, but I did not test that. So this article assumes you have the following:

Setting Up Home Assistant Windows Portable

First, head to the latest version of HassWP. For me, this is HassWP_2022.12.8.zip.

Extract. Double-click hass.cmd. Don't close this window for as long as you want to use Home Assistant.

Image 2

Home Assistant should automatically launch into your default browser. Input your Name (which automatically starts entering that as your Username in lower case), then choose a password. Make sure you write this password down somewhere, you're going to need it a lot. Hit Create Account.

Image 3

Next, input more specific details for Home Assistant. You can give Home Assistant a name (I'm very creative and call mine "Home"), then select a Country, Language, Time Zone, and Currency. Hit Next.

Image 4

Then is a screen about sharing data. I'm not interested in sharing so I click Next.

Image 5

This next page is where all your IoT devices would show up if have them. Nothing shows up for me. Click Finish.

Now we need to set up our Wyze Cam v3 with Home Assistant Windows Portable. Because Home Assistant Windows Portable acts like Home Assistant Container, and everything you add to it must be an integration, we need to do the legwork for Home Assistant in setting up our Wyze Cam. Fortunately, someone has created a way to containerize our Wyze Cam v3 into a local stream.

To do this, we'll need to make use of Docker Compose. There are several ways to do this depending on your setup, but I'm on Windows 10 and I already have Docker Desktop installed which includes Docker Compose.

Image 6

You can confirm your Docker Compose installation yourself by going to the Start button on Windows, typing "CMD" and opening a command line, then typing docker-compose version.

How to Create a docker-compose.yml File for docker-wyze-bridge

Now we need to create a docker-compose.yml file.

I don't know why the internet is so determined to be vague about how to create a docker-compose.yml file. It's probably because you actually have to create the file yourself out of nothing, and people who already know you create the file yourself understand this implicitly. I thought you had to follow some kind setup when making your Docker container, and that may be a thing, but I couldn't figure it out. So I'm going to break down my steps on how to do this, the simplest way possible.

To set up our Wyze Cam v3, we're going to use docker-wyze-bridge. So go to the main GitHub page https://github.com/mrlt8/docker-wyze-bridge.

Under Basic Usage, you'll find some instructions on how to set up docker-wyze-bridge using Docker Compose. These instructions also link to a sample docker-compose.yml that you can use. This is the basis of what I used, but modified it to the following:

yml
version: '2.4'
services:
    wyze-bridge:
        container_name: wyze-bridge
        restart: unless-stopped
        image: mrlt8/wyze-bridge:latest
        ports:
            - 1935:1935 # RTMP
            - 8554:8554 # RTSP
            - 8888:8888 # HLS
            - 8889:8889 #WebRTC
            - 8189:8189/udp # WebRTC/ICE
            - 5001:5000 # WEB-UI
        environment:
            # [REQUIRED] Fill the following two lines:
            - WYZE_EMAIL=
            - WYZE_PASSWORD= 
            # [OPTIONAL] IP Address of the host to enable WebRTC e.g.,:
            - WB_IP=youripaddress

Open Notepad. Paste this in there. Make sure you put in the email you used to create your Wyze account after WYZE_EMAIL= and the password you used for that account in WYZE_PASSWORD=. Because CodeProject.AI Server uses port 5000, you need to change that next line to - 5001:5000. If you try to use port 5000, when opening up the local steam you're creating for your Wyze Cam, it will open CodeProject.AI Server. I also included my IP address in the - WB_IP= line. If you do not know your IP address, go to the Start button in Windows and start to type "CMD", then select Command Prompt. Then, type ipconfig. The address you want is the IPv4 Address.

Image 7

Go to Windows Explorer. Create a new folder to hold your docker-compose.yml file. I called mine "docker-wyze-bridge".

Image 8

Go back to Notepad. Go to File, then Save As. In the Save as type field, change the dropdown from Text Documents (*.txt) to All Files (*). Type in "docker-compose.yml". Hit Save.

There. That's how you create a docker-compose.yml. Take THAT internet.

Setting Up docker-wyze-bridge with Docker Compose

Image 9

Now it's time to finally create our docker-wyze-bridge container. Go back to the Start button on Windows, type "CMD" and open a command line. Navigate to the folder you created by typing cd.. and cd foldername (in my case, this is cd docker-wyze-bridge. Then type docker-compose up

BAT
docker-compose up

With this command, Docker Compose will take that docker-compose.yml file from that directory, and run it. The contents of the docker-compose.yml file tell Docker Compose to pull the latest image for docker-wyze-bridge, name it, and tell it what ports to use, in addition to the environment information we added.

You should see a stream of data indicating WyzeBridge has been set up. Finally, go to your browser and put in youripaddress:5001.

Image 10

You should see something like the following. That's me, and that's my camera name "Eye Spy". Now let's set this up in Home Assistant Windows Portable.

Setting Up docker-wyze-bridge in Home Assistant Windows Portable

Image 11

Go back to your Home Assistant tab and click the Settings tab on the left. Then click Devices & Services.

Image 12

From here, hit + Add Integration.

Image 13

Start typing "camera" and then select Generic Camera.

Image 14

Now go back to the docker-wyze-bridge tab. Hover over RTSP, right-click, and Copy Link. It should look something like rtsp://ipaddress:8554/cameraname. That's what you need for the Stream Source field in Home Assistant.

Image 15

Back to the docker-wyze-bridge tab. Click on the Camera details icon.

Image 16

Scroll down to snapshot_url. You should see snapshot/cameraname.jpg. But this is just the end of the URL. It should actually be http://ipaddress:5001/snapshot/cameraname.jpg. That's what you need for the Still Image field in Home Assistant.

Image 17

Back to the Home Assistant tab. This is what your final Generic Camera settings looks like. For RTSP transport protocol, choose TCP. For Authentication choose basic. Under Username, put the username you created for the Wyze Cam itself, not your Wyze email account, and then for Password, put in this same password. Uncheck Verify SSL certificate. Hit Submit.

Image 18

If all goes well, a Preview shows up, asking if the image looks good. Check the box, hit Submit, then Finish.

Image 19

Now click Overview in the Home Assistant settings on the left, and there we go. The Wyze Cam v3 is now added to Home Assistant Windows Portable. Hopefully that was easier for you than it was for me. If you have any questions, please ask them in the article forum below.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)