MotionEyeOS Intergration? (Security Camera intergration)

I have a small set of Raspberry Pi’s running cameras with motion detection software…

Is it possible to embed the webpage inside of HA? Ideally what I would like is a single DNS point in my router to HA which would allow me to navigate to a sub page, being the camera web page output by Motion Eye OS.


I don’t think it’s possible to embed the page, but why don’t you just display the latest image from motioneye in the HASS GUI? I’m doing that and it works perfectly.

Well I’d be happy to give that a try if I could peek at your code sample!

I’ve got 2 cameras and I already enjoy the ability to log in & see “history” of picture taken as I am often away from home for days.


I’m just grabbing the latest image using the still image URL provided in MotionPie. It should be off one of the menus

In configuration.yaml

camera: !include devices/cameras.yaml

In cameras.yaml

- platform: generic still_image_url: name: Internal House scan_interval: 60

Obviously replace the URL with the one you get from Motionpie. I haven’t checked if you can grab older pictures, but have a look around, there might be a way.


Many thanks to RSACHOC, I was able to get this to work! Multiple cameras even.

It wasn’t readily obvious to me where the “still_image_url” is derived in MotionEyeOS but it may be found within the MotionEyeOS tools, Video Streaming, Snapshot_URL. Simply copy the text from there & paste in the sample cameras.yaml.

This will permit you to pull your latest picture from MotionEyeOS camera and display it in HA. (Single IP address to multiple address within the house via HA).

It still would be nice to see HA pass the MotionEyeOS and support the other features such as Action buttons, and the ability to see stored pictures/ movies.


Thanks for the clue. I compared both Generic and MJPEG and in my side, the MJPEG seems to be more responsive.

have you tried to get motion events from MotionEye?

What does that signature mean? I tried to use the password for my MotionEyeOS, but I receive an error “unauthorized”

It’s my unique link for my MotionEye setup, you’ll need to get yours per the instructions above

Any ideas?
P.S i used the user login i created for each camera not the admin login.

heres an example of windows with python opencv face and eye recognition:

paste this file version 3.4.1 to C:\Python27\Lib\site-packages

run this python script:

import numpy as np
import cv2

# multiple cascades:

face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml')
  ##replace videocapture with () for default windows cam.
cap = cv2.VideoCapture('http://remoteipaddress:port/?action=stream')

while 1:
    ret, img =
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    faces = face_cascade.detectMultiScale(gray, 1.3, 5)

    for (x,y,w,h) in faces:
        roi_gray = gray[y:y+h, x:x+w]
        roi_color = img[y:y+h, x:x+w]
        eyes = eye_cascade.detectMultiScale(roi_gray)
        for (ex,ey,ew,eh) in eyes:

    k = cv2.waitKey(30) & 0xff
    if k == 27:


I tried them both and indeed I find MJPEG to be better.
However, I do constantly get an error:

Log Details (WARNING)
Wed Mar 14 2018 21:53:48 GMT-0700 (PDT)

Failed to parse headers (url=http://192.168.1.XX:8081/): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/urllib3/”, line 399, in _make_request
File “/usr/lib/python3.6/site-packages/urllib3/util/”, line 66, in assert_header_parsing
raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)
urllib3.exceptions.HeaderParsingError: [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’

Does this happen to you as well?

i use to get that error with my cameras, but my cameras work fine now with athe newest version 0.66.0, anyways this is what i used to mask those errors even though it was working fine.

  default: warning
    requests.packages.urllib3.connectionpool: critical

mine was for the connection pool in urllib3 obviously.

I think that you can have webpages embedded in HA using the iframe component.

    title: 'Weather'
    icon: 'mdi:weather-lightning-rainy'
    url: 'http://myserver/weewx/'