Home Assistant Community Add-on: motionEye

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

Hi Andrea, thanks for sharing!
However, I can’t get this to work. I’m trying this remotely, since I don’t have access to local HA for few months. Have you tried this remotely, does it work for you?

And yes, the switch remains as “off”, whatever I do.

I do have multiple cameras, hence the numbering “4” and “5”.

I will continue searching for a solution to have a switch that toggles motion detection (or video device, or even the whole add-on) on/off.

@mr.jones,what do you mean as remotely?

because right now I’ve created 2 automations: the first one to turn on the motion detection when I leave home and the second one to turn off it when I’m come back.
The automation works locally, so you can add a switch to activate both the automations (it is not a good solution but only to understand if it works) probably ther is a way to configure a toggle to do this avoiding 2 switch (but i don’t know how).

I suggest to configure also the e-mail notification when a motion is detected (it helped me to undestand when the motion detection is active and when not even if the toggle in motioneye add-on remain always OFF).

the only things that comes in my mind that you can do is: call the address as http://ipaddressHASSIO:7999/1/detection/start from a browser by a device connected on the same lan of hassio and then try to trigger the motion detection on motioneye on the wished ipcam (by moving one hand in front of the camera :slight_smile: ) whait to receive the e-mail notification and in case nothing happens changing the number in the address till you find the camera wished that is activated corretely.

I don’t know how the motion detection “maps” the number of the ipcam… for example my ipcam has camera id =2 but in the link i need to specify …:7990/1/detection/start it is a little bit strange

I know that probaly ther is a better and structured way to do it, but I don’t know it :frowning:

I got this finally working by using command line on/off/state configuration from here: https://github.com/ccrisan/motioneyeos/issues/1778#issuecomment-483360828

I also have the switch working in lovelace UI showing the actual state. Using the switch I can simply turn off the motion detection to stop receiving email alerts.
The key issue was (as Andrea also pointed out) to use different camera id than in motioneye web UI. I have no idea why the camera id is different, but now it works for all of my cameras.

I have no plan to implement any “smart logic” by sensing whether I’m at home or not. Simple switch in UI is quite enough for now. (Cameras are located in a remote location, at our summer house).

Thanks Andrea for your help!

2 Likes

Well done! :+1:
probably I will also add a switch on my lovelave UI!

I have the same error, Reolink RLC-422
VLC is working OK on this RTSP stream etc…

:tada: Release v0.7.0

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Updates pycurl to v7.43.0.4 (#66)
  • :arrow_up: Updates six to v1.14.0 (#67)
  • :arrow_up: Updates pycurl to v7.43.0.5 (#70)
  • :arrow_up: Updates jinja2 to v2.11.1 (#71)
  • :arrow_up: Upgrades nginx to 1.16.1-r6
  • :ambulance: Fix Patreon link
  • :arrow_up: Upgrades motion to 4.3.0-r0
  • :books: Update add-on documentation to use new YAML configuration format
  • :hammer: Re-branding
  • :hammer: Update add-on config with new password & list features
  • :hammer: Updates for upstream Supervisor changes
  • :arrow_up: Upgrades add-on base image to v7.0.2
  • :hammer: Update community forum links
  • :fire: Removed redundant copy statement. (#73)
  • :sparkles: Add action buttons (#75)
  • :hammer: Use bashio for action buttons
  • :books: Update readme
  • :shirt: Fix lint warnings

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

1 Like

For some reason my raspberry pi3 cpu runs 10 degrees cooler after updating to v.0.7.0.
There was also some strange behavior earlier between cpu temperatures in camera daylight/night-mode, where in night-mode cpu usually running around 55°C and in daylight around 65°C. Now the cpu temp stays constantly around 45°C.
I am not sure if it was because of the new version or just “restarting” the addon.

Anyways, big thanks for the update!

motion (the underlying tool that powers motionEye) got a pretty decent update the last release, so that should help :slight_smile:

Hello.

Features mentioned include timelapse ~ “Can record continuously, motion, or timelapse, with retention settings”.

Could anyone point me to a simple walk through of how to do it or help with one?

I found this but was hoping there was a simpler way out of the box? I’m fine with the first half in the UI ( “Capture Setup”), and I mainly get a bit lost at the scripting part - “Video setup”.
http://james-batchelor.com/index.php/2019/09/21/motioneye-timelapse-capture/

Making a GIF somehow would be fine too.

My goal is to record the sunrise each day and have it playing on my main screen/dashboard when I actually get up.

Thanks…

Hi all, I’m sorry but I cannot find this add on in my Home Assistant instance.

I’m running Home Assistant 0.106.0.dev20200216, using a docker image (homeassistant/raspberrypi2-homeassistant)

I cannot find where I can add this repo

https://github.com/hassio-addons/repository

and after select this add on :frowning:

You need to go to ‘Supervisor’ in the side panel menu, then ‘Add-on store’.

I don’t have supervisor

Well ‘Add-ons’ are a part of Home Assistant (old HassIO) where you would have the ‘supervisor’ tab. I take it that you are just running Home Assistant Core? In this case you won’t be able to use this…unless you upgrade to Home Assistant (old name ‘HassIO’)

Many thanks.
I’m running it via docker image on a raspberry pi2 B.
Do you know any image usable on a rpi?

Actually I’m using homeassistant/raspberrypi2-homeassistant
Checking in docker hub I see some images like netdaemon/homeassistant-addon-armhf
Does addon work as separate image?