Home Assistant Community Add-on: motionEye

someone is kind enough to explain to me how to configure the recordings on “google drive” I have not found any documentation on the steps. Thank you

The steps are detailed in post #146

I have an issue that has persisted since I first started using the addon. Every time the addon is restarted I get a critical error which makes it unusable:

CRITICAL: media directory "/var/lib/motioneye" does not exist or is not writable

The only workaround is for me to unistall and re-install the add-on. Fortunately I have a backup config for the addon so that I can reconfigure it quickly. The above error is always for the same directory.

sorry in the post 146 I don’t see “The steps are detailed” I see this …

These are the steps to follow.

Hello,

I am trying to run PS3Eye camera (USB) connected to RPI3B running HassIO 0.92.2.

I tried looking for some guidance here.

However aint got much traction.

Can someone please guide how to use PS3Eye camera to be able to use MotionEye for Motion detection. For motioneye itself I guess pretty much a lot of documentation would be availabe to make it work.

Thanks.

I’m still unable to get the add-on to start up. As far as I can tell everything is setup correctly.

I have /share/google_assistant.json installed and the content looks right…

{  
   "installed":{  
      "client_id":"XXXXXXXX.apps.googleusercontent.com",
      "project_id":"XXXXXXXX",
      "auth_uri":"https://accounts.google.com/o/oauth2/auth",
      "token_uri":"https://oauth2.googleapis.com/token",
      "auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
      "client_secret":"XXXXXXXX",
      "redirect_uris":[  
         "XXXXXXXX",
         "http://localhost"
      ]
   }
}

Those who have it work, are you able to shed some light or share your config?

I’m using Hass.io inside Docker/Proxmox and currently running HomeAssistant 0.93.0

Is there someone who has been able to get a ESPHome ESP32 camera to work with motioneye?

I added the ESP32 camera with ESPHome. Then I added the integration, so that I have a new entity within Hassio, containing the videostream.

Now I’m struggling to find the correct settings to access this stream in motioneye. Any help would be appreciated!

2 Likes

Providing the ESP32 camera is broadcasting an RTSP stream, you should be able to access it in MotionEye as a Network Camera.

A quick Google search seems to imply that the following address is what you need. rtsp://yourdevipaddr:8554/mjpeg/1 the trailing address after the port number maybe different in your case.

2 Likes

I tried your suggestion, but I’m still struggling. Which camera type do I choose?

image

Also it’s unable to connect:

image

Greetings fellow HassOS Motioneye users.

I noticed that my CPU usage was very high and after investigating the source (thanks to @tom_l and the help on using Portainer) the culprit was confirmed to be MotionEye. Without ME running CPU is generally below 5%. However, as soon as I start up ME it rockets and is always >85% and causes the RPi to overheat.

Given I am only driving 3xRTSP camera’s off ME, I’m struggling to understand why it has such a massive impact on the RPi. Each of the cameras is configured as follows and is set to the lowest frame rate;

I am posting here in the hope that someone can confirm this is normal (or not) and if there is a parameter somewhere else I have missed.

Thanks in advance.

It is a Pi!

2 Likes

Thanks @frenck so I take that to mean it is “normal” for a RPi and if I really want to use ME I should consider migrating to another platform.

correct,
I tried it before,
Now I am only using hassio with adb, mariadb, MQTT server, configurator

Even than it uses 500mb ram.
With cpu @ 3% and load reaches .90.

1 Like

A pi is a small and limited computer. It can do quite a bit. But video is heavy… 3 streams and all the rest, to be honest I’m amazed it even manages to do it without instantly crashing

1 Like

:tada: Release v0.5.0

Full Changelog

This is a big, but general maintenance release.

:hammer: Changes

  • :arrow_up: Updates motioneye to v0.40 (#37)
  • :arrow_up: Upgrades python to 2.7.16-r1
  • :arrow_up: Upgrades curl to 7.64.0-r2 (CVE-2019-5435, CVE-2019-5436)
  • :arrow_up: Updates pycurl to v7.43.0.3 (#41)
  • :arrow_up: Upgrades add-on base image to v4.0.1
  • :pencil2: Maintaince -> Maintenance
  • :fire: Removes now deprecated ssl directive
  • :arrow_up: Upgrades curl to 7.65.1-r0
  • :arrow_up: Upgrades musl-dev to 1.1.22-r2
  • :arrow_up: Upgrades py-setuptools to 40.8.0-r1
  • :arrow_up: Upgrades cifs-utils to 6.9-r0
  • :arrow_up: Upgrades ffmpeg to 4.1.3-r1
  • :arrow_up: Upgrades mosquitto-clients to 1.6.3-r0
  • :arrow_up: Upgrades nginx to 1.16.0-r2
  • :sparkles: Adds FUNDING.yml

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

1 Like

If you have MotionEye set to record any of those cameras then the RPi is definitely going to struggle

Hi @all,

I’m running 4 rtsp cameras with motion detection and recording on a normal rpi 3 without any performance issues.

I struggled at the beginning and thought the performance is not sufficient, but it was just the wrong settings I used. for example:

  • I allocated too many frames before and after a motion event to be recorded (20-50 frames in memory), as I thought motionEye will need this to respond in time and not to loose frames
  • I had the frame rate on my camera’s very high to ensure I capture all frames ( I still had dropped frames)
  • I used a remote storage for my video files, as I did not want my SD card to be corrupted

With the above settings I was able to setup 2 camera’s with good performance but was not happy with that result. I did below steps to optimize my systems.

  • I did a full re-install of motionEye on a dedicated rpi3
  • I configured 1 rtsp camera
    — >with HD resolution
    —> set the frame rate to 20 frames
    —> set Keyframes to every 5 frames
  • I kept the standard motionEye parameters and only changed
    –> detect motion within 3 frames
    –> number of leading frames 3
    –> silence between frames (for new motion) = 10 frames
    –> store the video on SD card for 1 week
    –> disabled pictures and streaming
    –> configured webhook to send the filename to NR when a motion was detected

I kept these settings for a few hours and the results were great. All my motions were detected and correctly recorded. The utilization of the rpi was under 10%

I added a second camera with the same settings and had the same good results with only a slight increase to the system load

I did the same for camera 3 & 4 and it works like a charm for all cameras. My system load is now at 50% when no motion is detected and about 75-80% when 2 or 3 cameras are getting motion detected and recording the stream.

On rare occasions I have motion detection on all camera’s at the same time and the load is going to 100% resulting in frames dropped, but this is something I can live with.

I’m sure there can be further optimization for motionEye or on the rpi but I’m no exert and found these settings working for me on trial and error.

My recommendation: Don’t try to tweak motionEye too much as it is very performant.

I hope that helped a bit

5 Likes

Ok, I’ve just installed and configured my camera, and it’s working ok on my sidebar. But please, could you provide any simple example of how to show the stream inside a card on lovelace home screen? I mean, is it possible? Sorry for the dumb question, I’m new to all of this…

1 Like

The easiest way is to enable the streaming option in motionEye. The stream should than be visible with your web browser

than you have to add the HA stream component https://www.home-assistant.io/components/stream