Get the stream URL
The first thing we need to do is getting the URL we need for the integration. You’ll find it in the “Video Stream” tab in the settings on your motionEye server. I’m using the Fast Network Cam option, but you can use the normal mode as well. If you’re using the normal mode, note down the Snapshot URL too, it can be used for the
still_image_url property in the camera integration.
Fast Network Cam Mode
There are several different ways to display a camera stream in Lovelace. The method I went with is the Picture Entity Card. To use a camera in Lovelace, we need to add the camera and stream integrations:
stream: camera: - platform: mjpeg name: My Fancy Camera still_image_url: "http://URLFROMMOTIONEYE/picture/1/current/" mjpeg_url: "http://URLFROMMOTIONEYE:8081/mjpeg"
Make sure to check that the port matches the one you set in motionEye and to append
mjpeg to actually get the mjpeg stream.
Once the camera and the stream are set up properly, we need to add the picture entity card to Lovelace:
- type: picture-entity entity: camera.my_fancy_camera camera_view: live
That’s it. Restart Home Assistant and you should see the camera stream:
Sorry for the pinkish image, I’m running the Pi NoIR Camera V2 without a filter.
If you have questions, concerns or just want to say hi 👋, hit me up on Twitter.