Home Assistant Community Add-on: motionEye

Hi guys. I was able to add my sonoff camera to motioneye hassio add-on, but it’s showing gray screen with “unable to open video device” message. Same rtsp url is working in hassio but not in motioneye.
rtsp://192.168.1.65:554/av_stream/ch0
user: rtsp
pass:12345678

Any idea what could be wrong? I’m running hassio on RPi 3

I got same camera and I have same case

I also just show grey video.

what can I do for it ?

If I found something I’ll share the configuration.

I found the way

you can find the camera if you config udp packet transfer not tcp.

I wish you can config sonoff camera in the Motion Eye

I got one Sannce 1920x1080 HD camera that can do rtsp streams and does H264 or MJPEG.
Grabbing this stream: rtsp://192.168.1.175:10554/tcp/av0_0 it should be FFMPEG.
If I only ENABLE the cam, and do NOTHING else (no motion detection, no streaming, nothing activated) I get >100% CPU on a RPI4. This doesn’t seem ok to me.
What can i do to reduce CPU massively and install a second camera?!

not sure if I understand it correctly. Where exactly should I setup udp transfer ?

I found it. Still doesn’t work though.

rtsp://192.168.1.175:10544 <----- not 10544 you assign 544 port

I’ll check you exact address as like my conifg

-> rtsp://192.168.1.175:544/av_stream/ch0

I wish you can make it.

Thanks a lot, but have a look at my original post. I’m connecting through port 544 not 10544. Is it working for you? Maybe my motioneye is corrupted? I wish I find solution for that

Funny thing is that my camera screen in motioneye is shwing fps changing but no video feed. Is anyone able to help?
In logs I can see only one error occasionally: ERROR: mjpg client timed out receiving data for camera 1 on port 8081

I just set up 2 Sonoff cameras with MotionEye. In the eWeLink App go to Settings > More Settings > RTSP and change the password. There’s a button there to Create RTSP Link which should give you something like
rtsp://rtsp:[email protected]:554/av_stream/ch0

Then you can use that URL when setting up a new camera in MotionEye, but like this
Camera Type: Network Camera
URL: rtsp://192.168.0.10:554/av_stream/ch0
Note the user / password is removed from the URL the app gave you, those go in the User / Pass fields.

Have option connect espcam32 with esphome to motionEye?

Has anyone been able to compile this add-on locally by downloading 0.6 version git files into the addon folder? I get a compile error. I want to add a custom fstab, imagemagik and gifsicle.

Thanks for this addon. I think there may be a typo in the installation section of the first post. It says to search for InfluxDB instead of motionEye in the add-on store. Github has the correct instructions, and most are probably smart enough to figure it out. Thanks again.

Thanks, well spotted :eyes:

Adjusted.

Hi guys, first of all thank you for this add-on. :star_struck:
in the past I already used motioneye with my raspberry pi and my web cam but now have everything integrated in home assistant is wonderful!
I read all the posts here and googling in order to find a solution form my doubt but I don’t have found a clear answer. I hope that someone has already do it.
What I’m looking for is simple: activate the Motion Detection option in motioneye when home assistant (through a tracker) kwnow that i’m out of home and deactivate the Motion Detection when I’m at home.
Someone can help me with this?
I’ve already done some automations that turn on and off lights triggered by this kind of event but I’m not sure how to proceed for the motion detection.

Thank you for your help!
Andrea

1 Like

Thanks a lot for the great work. Was looking for something like this for ages.
Here is my issue. Everything is working fine when I goto WebUI. I’ve added it to the frontend as a iFrame card. When I launch Home Assistant it shows me “401 Unauthorized”. Then if I go to the webUI using the sidebar, I can see the cam feed well. Now when I come back to the frontend (Lovelace) I can see the feed on the iFrame Card. I have to do this every time to get the feed on the iFrame Card. But it is working really well through the webUI. Hope someone can help.
Thanks again!

I would like to have a simple switch in lovelace to toggle on/off for motion detection or even the whole video device. It should work remotely. I have already tried some command line options, but these don’t seem to work, the switch just doesn’t stay on but pops back. Have you succeeded in this? What command and what to use in ip address?

I’ve tried without success :frowning:
How do you have created the switch in lovelace?

I’m using the basic entities card. Switches are in config.yaml and I’ve tried command lines like: command_off: ‘wget -q “http://******.duckdns.org:7999/4/detection/pause”’,
and
command_off: ‘curl -k “http://192.168.0.xxx:7999/5/detection/pause”’, where xxx is HA ip.
No luck.
I have no idea if this should even work remotely or not.

Hi @mr.jones, finally I guess I solved it or at least it seems working.
I’ve done only quickly test but this is what I’ve done:

  1. in the motioneye add-on configuration, i’ve activated the “motion_webcontrol: true” (it was false) then restarted the add-on
  2. by a browser (connected inside my lan network) I’ve tried to open the following link: http://192.168.1.XXX:7999/1/detection/start (where 192.168.1.XXX is the ip of home assistant not the ipcam!). This activates the motion detection on motioneye (it works).

Please note that unfortunately the switch on the motioneye add on remains displayed as “off” seems not updated.

That’s it! i’ve configured an e-mail when a motion is detected so after that i’ve executed the step 2, I start to receive email from motioneye :slight_smile: then i’ve tried to call http://192.168.1.xxx:7999/1/detection/pause , and the “e-mail” flow is stopped so I can say that it works.

In your previous post I’ve seen that you use a different number from “1” after the 7999 like “4” or “5” probably this is way it doesn’t works, or maybe it can used in case you have more than one ipcam (my guess), or as ip you are using the IpCam (lan ip).

Here a the link that I found that works for me: Camera motion detection on after leaving home

Hope this can be useful also for you!
Andrea

1 Like