MQTT Camera for Home Assistant

Adding your camera’s Live Video

Home Assistant comes with a Camera Module that we can use to add our camera’s Live Video. Lets start by accessing the configuration.yaml. Open the configuration file and add the line:

camera: !include cameras.yaml

Now create the cameras.yaml file next to the configuration file and add the following lines:

- platform: mjpeg
  name: '117'
  mjpeg_url: http://192.168.2.117:80/mjpegstream.cgi?-chn=11
  verify_ssl: false
  authentication: 'basic'
  username: 'admin'
  password: 'instar'

This will add a camera with the IP 192.168.2.117, HTTP port 80 and the user login admin / instar. In case you need to restrict the bandwidth this live stream is requiring, use chn=12 or chn=13 instead of chn=11.

Now test your configuration and reload Home Assistant to be able to see the changes you just made. Once the UI is back up, click on Configure UI in the top right of your dashboard. Then click on the big + Button to add a new card. Here we have to add a new Entity and select the camera that we just added:

Save the entity to return to your dashboard. Clicking the camera card will now open your cameras live video: